From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Baojun Xu <baojun.xu@ti.com>,
lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
shenghao-ding@ti.com, kevin-lu@ti.com,
krzysztof.kozlowski@linaro.org, rf@opensource.cirrus.com,
shumingf@realtek.com, herve.codina@bootlin.com,
povik+lin@cutebit.org, ryans.lee@analog.com,
ckeepax@opensource.cirrus.com, sebastian.reichel@collabora.com,
fido_max@inbox.ru, wangweidong.a@awinic.com,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
peeyush@ti.com, navada@ti.com, tiwai@suse.de,
mengdong.lin@intel.com
Subject: Re: [PATCH v2] ASoC: tas2783: Add source files for tas2783 soundwire driver
Date: Thu, 17 Aug 2023 11:28:25 -0500 [thread overview]
Message-ID: <6adf5b5d-fa61-667f-2c6c-6211d28d1ddb@linux.intel.com> (raw)
In-Reply-To: <19414ebc-1c33-4482-965d-681f15f06654@sirena.org.uk>
On 8/17/23 10:12, Mark Brown wrote:
> On Thu, Aug 17, 2023 at 09:17:50AM -0500, Pierre-Louis Bossart wrote:
>
>>> + goto out;
>>> + }
>>> + /* Read the primary device as the whole */
>>
>> I can't figure out what this comment means
>
> It's part of...
>
>>> + dev_err(tas_dev->dev, "%s, regmap doesn't exist.\n",
>>> + __func__);
>>> + return -EINVAL;
>>> + }
>>> + /* Read the primary device */
>>
>> What is a primary device?
>
> ...a thing where they're trying to present multiple devices as a unified
> device with grouped control, it looks like there's some hardware support
> for this.
Let me clarify the comment: SDCA peripheral can have multiple functions,
each with its own address space and can operate independently. So I am
just trying to have clarity on what 'device' means here.
>>> + /* Failed got calibration data from EFI. */
>
>> I don't get what the dependency on EFI is. First time I see a codec
>> needing this.
>
>> Please describe in details what you are trying to accomplish.
>
> It seems fairly normal to store calibration details in the device
> firmware?
No objection on the device firmware, but why use an EFI variable?
There is on-going work to standardize with ACPI, and there's also a
request_firmware(). Not sure what the direction is to read from an EFI
variable. I've been in SDCA circles since the beginning and never heard
about this, ever. I am not saying it's bad, just surprised and curious
on a 3rd way of getting information needed for initialization.
>>> + if (crc == tmp_val[21]) {
>>> + time64_to_tm(tmp_val[20], 0, tm);
>>> + dev_dbg(tas_priv->dev, "%4ld-%2d-%2d, %2d:%2d:%2d\n",
>>> + tm->tm_year, tm->tm_mon, tm->tm_mday,
>>> + tm->tm_hour, tm->tm_min, tm->tm_sec);
>
>> What is this about? Why would a codec care about time?
>
> I can see someone finding it helpful to confirm when the calibration data
> that got applied was generated to make sure they're testing/using what
> they thought they were.
Ah yes, I missed that. I wasn't sure if this was a log on when the
calibration finished, if this is a log on when the calibration data was
generated that's a different story indeed.
>> In addition, it's rather surprising that on attachment there is not a
>> single regmap access?
>
> Don't know if there's something different with Soundwire but for I2C/SPI
> devices it's a reasonable pattern to only actually start initialising
> the registers when the device actually becomes active. Not checked that
> this is actually happening.
that's precisely the point, there's an io_init() routine which is when
the peripheral is attached on the bus and the earliest time when the
registers can be initialized.
But there isn't a single initialization happening, which is different to
all existing SoundWire codec drivers. Maybe it's fine, I am just asking
the question if this was intentional.
prev parent reply other threads:[~2023-08-17 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 12:11 [PATCH v2] ASoC: tas2783: Add source files for tas2783 soundwire driver Baojun Xu
2023-08-17 14:17 ` Pierre-Louis Bossart
2023-08-17 15:12 ` Mark Brown
2023-08-17 16:28 ` Pierre-Louis Bossart [this message]
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=6adf5b5d-fa61-667f-2c6c-6211d28d1ddb@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=fido_max@inbox.ru \
--cc=herve.codina@bootlin.com \
--cc=kevin-lu@ti.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mengdong.lin@intel.com \
--cc=navada@ti.com \
--cc=peeyush@ti.com \
--cc=perex@perex.cz \
--cc=povik+lin@cutebit.org \
--cc=rf@opensource.cirrus.com \
--cc=ryans.lee@analog.com \
--cc=sebastian.reichel@collabora.com \
--cc=shenghao-ding@ti.com \
--cc=shumingf@realtek.com \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=wangweidong.a@awinic.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