[PATCH] ASoC: aw88399: fix register used to disable I2S TX

From: Marco Giunta

Date: Sat Nov 21 2026 - 02:05:55 EST


aw_dev_i2s_tx_enable() uses I2SCTRL3 when enabling the I2S transmitter
but I2SCFG1 when disabling it. Per the datasheet, the I2STXEN bit lives
in I2SCTRL3.

As a result, the I2S transmitter is never disabled when the device is
stopped.

Use I2SCTRL3 in both cases, as the vendor Android driver (aw883xx) and
aw88166 (which is also derived from aw883xx) do.

Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver")
Signed-off-by: Marco Giunta <marco_giunta@xxxxxxxxxx>
---
Tested on a Lenovo Legion Pro 7 16AFR10H by reading I2SCTRL3 via
regmap debugfs: without the fix bit 9 (I2STXEN) in register 8 (I2SCTRL3)
remains set after playback ends and the device returns to idle;
with this patch, it is cleared once playback stops.

Link to aw883xx: https://www.awinic.com/en/driver/AW88399QNR/832

sound/soc/codecs/aw88399-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88399-lib.c b/sound/soc/codecs/aw88399-lib.c
index f2e2c88f5ec0..a6303f32e2cf 100644
--- a/sound/soc/codecs/aw88399-lib.c
+++ b/sound/soc/codecs/aw88399-lib.c
@@ -552,7 +552,7 @@ static void aw_dev_i2s_tx_enable(struct aw_device *aw_dev, bool flag)
ret = regmap_update_bits(aw_dev->regmap, AW88399_I2SCTRL3_REG,
~AW88399_I2STXEN_MASK, AW88399_I2STXEN_ENABLE_VALUE);
else
- ret = regmap_update_bits(aw_dev->regmap, AW88399_I2SCFG1_REG,
+ ret = regmap_update_bits(aw_dev->regmap, AW88399_I2SCTRL3_REG,
~AW88399_I2STXEN_MASK, AW88399_I2STXEN_DISABLE_VALUE);

if (ret)

base-commit: 7884221ca9857a317bf4bd81ac3bf5528f266feb
--
2.56.1