ASoC: codecs: lpass-wsa-macro: Fix speaker quality distortion
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 31 Aug 2025 15:14:02 +0000 (17:14 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 4 Sep 2025 16:51:57 +0000 (17:51 +0100)
commit9004a450fccbeb40a71cc173747da37a459fd4dc
treee289bcbfbfe4a62a16c12c54483abe6508707fc2
parentd0f61658db58583b3acd1ada70a5352c39cd0388
ASoC: codecs: lpass-wsa-macro: Fix speaker quality distortion

Commit bb4a0f497bc1 ("ASoC: codecs: lpass: Drop unused
AIF_INVALID first DAI identifier") removed first entry in enum with DAI
identifiers, because it looked unused.  Turns out that there is a
relation between DAI ID and "WSA RX0 Mux"-like kcontrols (which use
"rx_mux_text" array).  That "rx_mux_text" array used first three entries
of DAI IDs enum, with value '0' being invalid.

The value passed tp "WSA RX0 Mux"-like kcontrols was used as DAI ID and
set to configure active channel count and mask, which are arrays indexed
by DAI ID.

After removal of first AIF_INVALID DAI identifier, this kcontrol was
updating wrong entries in active channel count and mask arrays which was
visible in reduced quality (distortions) during speaker playback on
several boards like Lenovo T14s laptop and Qualcomm SM8550-based boards.

Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
Fixes: bb4a0f497bc1 ("ASoC: codecs: lpass: Drop unused AIF_INVALID first DAI identifier")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Message-ID: <20250831151401.30897-2-krzysztof.kozlowski@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-wsa-macro.c