From: "Shuming [范書銘]" <shumingf@realtek.com>
To: Mark Brown <broonie@kernel.org>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
"lars@metafoo.de" <lars@metafoo.de>,
"Flove(HsinFu)" <flove@realtek.com>,
"Oder Chiou" <oder_chiou@realtek.com>,
"Jack Yu" <jack.yu@realtek.com>,
"Derek [方德義]" <derek.fang@realtek.com>
Subject: RE: [PATCH v2 3/3] ASoC: rt766: add RT766/RT767 SDCA driver
Date: Fri, 31 Jul 2026 08:51:04 +0000 [thread overview]
Message-ID: <05d20b887b654ebba569848b79c3df8b@realtek.com> (raw)
In-Reply-To: <40a15f17-4e3c-4304-8b68-8ccb8ef7ca4f@sirena.org.uk>
> > +config SND_SOC_RT766_SDCA_SDW
> > + tristate "Realtek RT766 SDCA Codec - SDW"
> > + depends on SOUNDWIRE
> > + depends on SND_SOC_SDCA
> > + select REGMAP_SOUNDWIRE
> > + select REGMAP_SOUNDWIRE_MBQ
> > +
>
> Does this need SND_SOC_SDCA_IRQ and SND_SOC_SDCA_HID?
Yes, will select this two configs.
> > +static int rt766_sdca_mbq_size(struct device *dev, unsigned int reg)
> > +{
> > + switch (reg) {
> > + case RT766_VOLUME_REG(UAJ, USER_FU41, 1):
> > + case RT766_VOLUME_REG(UAJ, USER_FU41, 2):
> > + case RT766_VOLUME_REG(UAJ, USER_FU36, 1):
> > + case RT766_VOLUME_REG(UAJ, USER_FU36, 2):
> > + case RT766_VOLUME_REG(MIC, USER_FU113, 1):
> > + case RT766_VOLUME_REG(MIC, USER_FU113, 2):
> > + case RT766_VOLUME_REG(MIC, USER_FU113, 3):
> > + case RT766_VOLUME_REG(MIC, USER_FU113, 4):
> > + case RT766_VOLUME_REG(AMP, USER_FU21, 1):
> > + case RT766_VOLUME_REG(AMP, USER_FU21, 2):
> > + return 2;
>
> Are the FU33 gain registers also 2 bytes?
Yes, will add FU33 gain registers here.
> > +static void rt766_sdca_sdw_remove(struct sdw_slave *slave) {
> > + struct rt766_sdca_priv *rt766 = dev_get_drvdata(&slave->dev);
> > +
> > + pm_runtime_disable(&slave->dev);
> > +
> > + mutex_destroy(&rt766->disable_irq_lock);
> > +}
>
> The mutex is used by the interrupt code, probably better to allocate it using
> devm so it's ordered with everything else during teardown.
will fix. Thanks.
> > +static int rt766_sdca_pcm_hw_params(struct snd_pcm_substream
> *substream,
> > + struct snd_pcm_hw_params *params,
> > + struct snd_soc_dai *dai)
> > +{
>
> > +
> > + /* set sampling frequency */
> > + switch (dai->id) {
> > + case RT766_AIF1:
> > + regmap_write(rt766->regmap,
> > + RT766_SDCA_CTL(UAJ, CS41,
> SDCA_CTL_CS_SAMPLERATEINDEX),
> > + sampling_rate);
> > + regmap_write(rt766->regmap,
> > + RT766_SDCA_CTL(UAJ, CS36,
> SDCA_CTL_CS_SAMPLERATEINDEX),
> > + sampling_rate);
> > + break;
>
> Are these separate playback/capture clocks? If so should we only be
> programming the one that's active, or if they have to be in sync should the DAI
> be flagged as needing symmetric rates?
Will add symmetric_rate = 1 for this DAI.
> > +int rt766_sdca_init(struct device *dev, struct regmap *regmap, struct
> > +sdw_slave *slave) {
>
> > + rates = rt766_find_dt_rates(dev, func_data_ptr, "IT 41");
> > + if (rates)
> > + rt766_sdca_dai[RT766_DAI_UAJ].playback.rates = rates;
> > +
> > + rates = rt766_find_dt_rates(dev, func_data_ptr, "OT 36");
> > + if (rates)
> > + rt766_sdca_dai[RT766_DAI_UAJ].capture.rates = rates;
>
> This should modify a local copy rather than the global in case there's multiple
> devices with different configs.
Will fix.
prev parent reply other threads:[~2026-07-31 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 3:22 [PATCH v2 3/3] ASoC: rt766: add RT766/RT767 SDCA driver shumingf
2026-07-29 10:00 ` Pierre-Louis Bossart
2026-07-30 17:26 ` Mark Brown
2026-07-31 8:51 ` Shuming [范書銘] [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=05d20b887b654ebba569848b79c3df8b@realtek.com \
--to=shumingf@realtek.com \
--cc=broonie@kernel.org \
--cc=derek.fang@realtek.com \
--cc=flove@realtek.com \
--cc=jack.yu@realtek.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.