2024-05-07 10:02:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] ASoC: qcom: audioreach: Correct mapping of back speakers

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 <[email protected]>
Fixes: 3c5fcb20e07e ("ASoC: qcom: audioreach: Add 4 channel support")
Cc: <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
sound/soc/qcom/qdsp6/audioreach.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

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);
--
2.43.0



2024-05-07 13:52:00

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] ASoC: qcom: audioreach: Correct mapping of back speakers

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 <[email protected]>
> Fixes: 3c5fcb20e07e ("ASoC: qcom: audioreach: Add 4 channel support")
> Cc: <[email protected]>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

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