From 5643cb7945d0a53b06c1179e8a08d9fe640a8737 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sat, 31 Oct 2026 21:52:05 -0400 Subject: [PATCH] ASoC: tas2764: Write the idle slot setup again after a reset The component probe resets the amp and reinitialises the register cache, which clears the SDOUT idle slot mask and the force-0 enable. The idle slot setup cached in the driver data survives the reset, though, so when the card binds again and set_tdm_idle() asks for the same mask and mode, it returns early and the force-0 enable is never written. set_bclk_ratio() writes the mask again but not the enable. On the J713 every rebind of the speaker card left the two amps that force their idle slots to zero without the enable, and the other two amps' voltage sense words then came back with the top bit set in about a quarter of the frames. The speaker protection daemon reads those as a voltage without current and holds the speakers at a safe level. Clear the cached setup after the reset, so that the next set_tdm_idle() writes it. Signed-off-by: Erik Bourget --- sound/soc/codecs/tas2764.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c index 399aa42c6414a..9905ac1eec3cb 100644 --- a/sound/soc/codecs/tas2764.c +++ b/sound/soc/codecs/tas2764.c @@ -934,6 +934,10 @@ static int tas2764_codec_probe(struct snd_soc_component *component) tas2764_reset(tas2764); regmap_reinit_cache(tas2764->regmap, &tas2764_i2c_regmap); + /* The reset cleared the idle slot setup: make the next set_tdm_idle() write it */ + tas2764->idle_slot_config.tx_mask = 0; + tas2764->idle_slot_config.tx_mode = SND_SOC_DAI_TDM_IDLE_NONE; + if (tas2764->irq) { ret = snd_soc_component_write(tas2764->component, TAS2764_INT_MASK0, 0x00); if (ret < 0)