From: David Heidelberg <[email protected]>

Both Left and Right codec DAIs were passing the same SPK_TDM_RX_MASK,
both speakers ended up on slot 0, breaking the one speaker in
configuration such as on Pixel 3.

Split SPK_TDM_RX_MASK into per-speaker masks so that the Left codec
gets slot 0 (rx_mask=0x01) and the Right codec gets slot 1
(rx_mask=0x02).

This commit is here, so later CS35L36 receives correct slot for right
and left speakers.

Assisted-by: Claude:claude-4.6-opus
Signed-off-by: David Heidelberg <[email protected]>
---
 sound/soc/qcom/sdm845.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
index 9de3282bda4be..8b65aa3982d47 100644
--- a/sound/soc/qcom/sdm845.c
+++ b/sound/soc/qcom/sdm845.c
@@ -150,29 +150,29 @@ static int sdm845_tdm_snd_hw_params(struct 
snd_pcm_substream *substream,
                }
        }
 
        for_each_rtd_codec_dais(rtd, j, codec_dai) {
 
                if (!strcmp(codec_dai->component->name_prefix, "Left")) {
                        ret = snd_soc_dai_set_tdm_slot(
                                        codec_dai, LEFT_SPK_TDM_TX_MASK,
-                                       SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
+                                       LEFT_SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
                                        slot_width);
                        if (ret < 0) {
                                dev_err(rtd->dev,
                                        "DEV0 TDM slot err:%d\n", ret);
                                return ret;
                        }
                }
 
                if (!strcmp(codec_dai->component->name_prefix, "Right")) {
                        ret = snd_soc_dai_set_tdm_slot(
                                        codec_dai, RIGHT_SPK_TDM_TX_MASK,
-                                       SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
+                                       RIGHT_SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
                                        slot_width);
                        if (ret < 0) {
                                dev_err(rtd->dev,
                                        "DEV1 TDM slot err:%d\n", ret);
                                return ret;
                        }
                }
        }

-- 
2.53.0



Reply via email to