From: Niranjan H Y <niranjan.hy@ti.com>
To: <linux-sound@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <broonie@kernel.org>,
<ckeepax@opensource.cirrus.com>, <lgirdwood@gmail.com>,
<perex@perex.cz>, <tiwai@suse.com>, <cezary.rojewski@intel.com>,
<peter.ujfalusi@linux.intel.com>,
<yung-chuan.liao@linux.intel.com>, <kai.vehmanen@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <baojun.xu@ti.com>,
<shenghao-ding@ti.com>, <sandeepk@ti.com>, <v-hampiholi@ti.com>,
Niranjan H Y <niranjan.hy@ti.com>
Subject: [PATCH v2 4/5] ASoC: tac5xx2-sdw: initialize volume registers to 0 dBFS on first probe
Date: Thu, 26 Nov 2026 20:20:22 +0900 [thread overview]
Message-ID: <20261126112023.29054-4-niranjan.hy@ti.com> (raw)
In-Reply-To: <20261126112023.29054-1-niranjan.hy@ti.com>
The SDCA volume registers power on at 0x9c00 (-100 dBFS in Q7.8 format)
which is below the mixer control range (-72 dBFS to +6 dBFS). Write 0x0
(0 dBFS) to all volume registers on first probe so the initial HW state
is within the valid range and consistent with the regmap cache.
SA FU21 is already handled by the existing tac_spk_seq. Add tac_dmic_seq
for SM FU113 and tac_uaj_seq for UAJ FU41/FU36.
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
changes since v1:
* newly added patch
sound/soc/codecs/tac5xx2-sdw.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/sound/soc/codecs/tac5xx2-sdw.c b/sound/soc/codecs/tac5xx2-sdw.c
index 1cea864a2..d679a4194 100644
--- a/sound/soc/codecs/tac5xx2-sdw.c
+++ b/sound/soc/codecs/tac5xx2-sdw.c
@@ -438,6 +438,18 @@ static const struct reg_sequence tac_spk_seq[] = {
TAC_SDCA_CHANNEL_VOLUME, TAC_CHANNEL_RIGHT), 0),
};
+static const struct reg_sequence tac_dmic_seq[] = {
+ REG_SEQ0(TAC_VOLUME_REG(SM, FU113, LEFT), 0),
+ REG_SEQ0(TAC_VOLUME_REG(SM, FU113, RIGHT), 0),
+};
+
+static const struct reg_sequence tac_uaj_seq[] = {
+ REG_SEQ0(TAC_VOLUME_REG(UAJ, FU41, LEFT), 0),
+ REG_SEQ0(TAC_VOLUME_REG(UAJ, FU41, RIGHT), 0),
+ REG_SEQ0(SDW_SDCA_CTL(TAC_FUNCTION_ID_UAJ, TAC_SDCA_ENT_FU36,
+ TAC_SDCA_CHANNEL_VOLUME, TAC_JACK_MONO_CS), 0),
+};
+
static bool tac_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
@@ -1854,6 +1866,15 @@ static int tac_io_init(struct device *dev, struct sdw_slave *slave, bool first)
goto io_init_err;
}
dev_dbg(dev, "smartmic init done\n");
+
+ if (first) {
+ ret = regmap_multi_reg_write(tac_dev->regmap, tac_dmic_seq,
+ ARRAY_SIZE(tac_dmic_seq));
+ if (ret) {
+ dev_err(dev, "dmic vol init failed, err=%d\n", ret);
+ goto io_init_err;
+ }
+ }
}
if (tac_dev->uaj_func_data) {
@@ -1866,6 +1887,13 @@ static int tac_io_init(struct device *dev, struct sdw_slave *slave, bool first)
dev_dbg(dev, "uaj init done\n");
if (first) {
+ ret = regmap_multi_reg_write(tac_dev->regmap, tac_uaj_seq,
+ ARRAY_SIZE(tac_uaj_seq));
+ if (ret) {
+ dev_err(dev, "uaj vol init failed, err=%d\n", ret);
+ goto io_init_err;
+ }
+
if (tac_dev->hs_jack) {
ret = tac5xx2_jack_init(tac_dev);
if (ret) {
--
2.34.1
next prev parent reply other threads:[~2026-11-26 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 11:20 [PATCH v2 1/5] ASoC: tac5xx2-sdw: add tac5272 support Niranjan H Y
2026-11-26 11:20 ` [PATCH v2 2/5] ASoC: sdw_utils: " Niranjan H Y
2026-11-26 11:20 ` [PATCH v2 3/5] ASoC: tac5xx2-sdw: correct default volume registers Niranjan H Y
2026-11-26 11:20 ` Niranjan H Y [this message]
2026-11-26 11:20 ` [PATCH v2 5/5] ASoC: tac5xx2-sdw: drop DSP algo re-enable from port post-prepare Niranjan H Y
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=20261126112023.29054-4-niranjan.hy@ti.com \
--to=niranjan.hy@ti.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sandeepk@ti.com \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.com \
--cc=v-hampiholi@ti.com \
--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
all inboxes | Powered by JetHome®