diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-05-20 16:19:59 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-27 01:31:01 +0100 |
commit | cf03e271fdca8059090622ef27c20576341f1a75 (patch) | |
tree | c6b4b1e3cd33bb14a136748272a84dc9f29af4fe /sound/soc/qcom | |
parent | 5d5dd9bb227a1bdbef5ec7d167ac65775d1b99dc (diff) |
ASoC: qcom: x1e80100: Correct channel mapping
X1E80100 CRD board comes with four speakers arranged as left front+back
and then right front+back. Using default channel mapping causes front
right speaker to play left back stream.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240520-asoc-x1e80100-4-channel-mapping-v4-4-f657159b4aad@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r-- | sound/soc/qcom/x1e80100.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c index 0e0773a85809..d7e0bd03dffd 100644 --- a/sound/soc/qcom/x1e80100.c +++ b/sound/soc/qcom/x1e80100.c @@ -12,6 +12,7 @@ #include "common.h" #include "qdsp6/q6afe.h" +#include "qdsp6/q6dsp-common.h" #include "sdw.h" struct x1e80100_snd_data { @@ -80,6 +81,23 @@ static int x1e80100_snd_prepare(struct snd_pcm_substream *substream) struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; + const unsigned int rx_slot[4] = { PCM_CHANNEL_FL, + PCM_CHANNEL_LB, + PCM_CHANNEL_FR, + PCM_CHANNEL_RB }; + int ret; + + switch (cpu_dai->id) { + case WSA_CODEC_DMA_RX_0: + case WSA_CODEC_DMA_RX_1: + ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, + ARRAY_SIZE(rx_slot), rx_slot); + if (ret) + return ret; + break; + default: + break; + } return qcom_snd_sdw_prepare(substream, sruntime, &data->stream_prepared[cpu_dai->id]); |