From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Shenghao Ding <shenghao-ding@ti.com>, broonie@kernel.org
Cc: andriy.shevchenko@linux.intel.com, lgirdwood@gmail.com,
perex@perex.cz, 13916275206@139.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com,
bard.liao@intel.com, mengdong.lin@intel.com,
yung-chuan.liao@linux.intel.com, baojun.xu@ti.com,
kevin-lu@ti.com, tiwai@suse.de, soyer@irl.hu
Subject: Re: [PATCH v9] ASoc: tas2783: Add tas2783 codec driver
Date: Thu, 22 Feb 2024 19:13:51 -0500 [thread overview]
Message-ID: <10f53a13-a0ff-40f9-b089-f5baacdb76b6@linux.intel.com> (raw)
In-Reply-To: <20240222074000.659-1-shenghao-ding@ti.com>
On 2/22/24 2:40 AM, Shenghao Ding wrote:
> The tas2783 is a smart audio amplifier with integrated MIPI SoundWire
> interface (Version 1.2.1 compliant), I2C, and I2S/TDM interfaces designed
> for portable applications. An on-chip DSP supports Texas Instruments
> SmartAmp speaker protection algorithm. The integrated speaker voltage and
> current sense provides for real-time monitoring of lodspeakers.
loudspeakers.
> +static void tas2783_apply_calib(struct tasdevice_priv *tas_dev,
> + unsigned int *cali_data)
> +{
> + struct regmap *map = tas_dev->regmap;
> + u8 *cali_start;
> + u16 offset;
> + int ret;
> +
> + if (!tas_dev->sdw_peripheral) {
> + dev_err(tas_dev->dev, "%s: peripheral doesn't exist.\n",
> + __func__);
> + return;
> + }
> +
> + offset = tas_dev->sdw_peripheral->id.unique_id -
> + TAS2783_UNIQUE_ID_BASE;
> + if (offset >= TAS2783_MAX_DEV_NUM) {
> + dev_err(tas_dev->dev, "%s: offset(%u) is out of range.\n",
> + __func__, offset);
> + return;
> + }
I think we are at the 4th iteration where I have to repeat myself...
In the SoundWire spec, the unique_id is *LINK SPECIFIC*, and only used
at the bus level within the context of a link to help avoid enumeration
conflicts
If you are using the unique_id as a SYSTEM-UNIQUE value to lookup EFI
data, this is a TI-specific requirement that needs to be documented.
That also means you need to double-check for errors so make sure there
are no board configurations where the same unique_id is used in multiple
links, or by devices other than tas2783.
next prev parent reply other threads:[~2024-02-23 0:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 7:40 [PATCH v9] ASoc: tas2783: Add tas2783 codec driver Shenghao Ding
2024-02-23 0:13 ` Pierre-Louis Bossart [this message]
2024-02-23 10:12 ` [EXTERNAL] " Ding, Shenghao
2024-02-23 17:20 ` Mark Brown
2024-02-26 15:56 ` Pierre-Louis Bossart
2024-02-27 2:52 ` Ding, Shenghao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10f53a13-a0ff-40f9-b089-f5baacdb76b6@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=13916275206@139.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baojun.xu@ti.com \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mengdong.lin@intel.com \
--cc=perex@perex.cz \
--cc=shenghao-ding@ti.com \
--cc=soyer@irl.hu \
--cc=tiwai@suse.de \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).