diff mbox series

ASoC: qcom: audioreach: Correct mapping of back speakers

Message ID 20240507100209.610436-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State New, archived
Headers show
Series ASoC: qcom: audioreach: Correct mapping of back speakers | expand

Commit Message

Krzysztof Kozlowski May 7, 2024, 10:02 a.m. UTC
Qualcomm DSP, according to downstream sources, expects back speakers to
be mapped as "back", not "surround".  The surround is used only for 8+
speakers configuration.

Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 3c5fcb20e07e ("ASoC: qcom: audioreach: Add 4 channel support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 sound/soc/qcom/qdsp6/audioreach.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski May 7, 2024, 1:39 p.m. UTC | #1
On 07/05/2024 12:02, Krzysztof Kozlowski wrote:
> Qualcomm DSP, according to downstream sources, expects back speakers to
> be mapped as "back", not "surround".  The surround is used only for 8+
> speakers configuration.
> 
> Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Fixes: 3c5fcb20e07e ("ASoC: qcom: audioreach: Add 4 channel support")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

I just figured out that I duplicated Srini's patch, so I should instead
sent his one to preserve author of original report.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index 5291deac0a0b..c655f0213723 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -277,8 +277,8 @@  static void audioreach_set_channel_mapping(u8 *ch_map, int num_channels)
 	} else if (num_channels == 4) {
 		ch_map[0] =  PCM_CHANNEL_FL;
 		ch_map[1] =  PCM_CHANNEL_FR;
-		ch_map[2] =  PCM_CHANNEL_LS;
-		ch_map[3] =  PCM_CHANNEL_RS;
+		ch_map[2] =  PCM_CHANNEL_LB;
+		ch_map[3] =  PCM_CHANNEL_RB;
 	}
 }
 
@@ -851,8 +851,8 @@  static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
 	} else if (num_channels == 4) {
 		media_format->channel_mapping[0] = PCM_CHANNEL_FL;
 		media_format->channel_mapping[1] = PCM_CHANNEL_FR;
-		media_format->channel_mapping[2] = PCM_CHANNEL_LS;
-		media_format->channel_mapping[3] = PCM_CHANNEL_RS;
+		media_format->channel_mapping[2] = PCM_CHANNEL_LB;
+		media_format->channel_mapping[3] = PCM_CHANNEL_RB;
 	}
 
 	rc = q6apm_send_cmd_sync(graph->apm, pkt, 0);