[PATCH v2 4/5] ASoC: tac5xx2-sdw: initialize volume registers to 0 dBFS on first probe
From: Niranjan H Y
Date: Thu Nov 26 2026 - 06:25:45 EST
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@xxxxxx>
Reviewed-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
---
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