[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <81b23ae7-bb01-4c23-80df-df171fbc2d08@linaro.org>
Date: Thu, 30 Nov 2023 13:17:18 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: qcom: audioreach: Add 4 channel support
On 23/10/2023 10:42, Srinivas Kandagatla wrote:
> Thanks for the patch,
>
> On 20/10/2023 09:49, Krzysztof Kozlowski wrote:
>> Add support four channel streams. Map channel 3 and 4 to left/right
>> surround ("quad(side)" from ffmpeg standard channel list) to match what
>> is in qdsp6/q6dsp-common.c driver.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>>
>
>> ---
>>
>> quad(side):
>> https://trac.ffmpeg.org/wiki/AudioChannelManipulation#Listchannelnamesandstandardchannellayouts
>> ---
>> sound/soc/qcom/qdsp6/audioreach.c | 25 ++++++++++++++++++++++---
>> 1 file changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
>> index 5974c7929dd3..4dd2a2e261c9 100644
>> --- a/sound/soc/qcom/qdsp6/audioreach.c
>> +++ b/sound/soc/qcom/qdsp6/audioreach.c
>> @@ -833,6 +833,11 @@ static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
>> } else if (num_channels == 2) {
>> media_format->channel_mapping[0] = PCM_CHANNEL_L;
>> media_format->channel_mapping[1] = PCM_CHANNEL_R;
>> + } 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;
>
>
> These are fine, but duplicated from q6dsp_map_channels(), Please
> consider using q6dsp_map_channels().
>
> Also when you do that pl get rid of PCM_CHANNEL_L and PCM_CHANNEL_R
> defines in audioreach.h
The code is not exactly equivalent, e.g. for one channel L (=1) -> FC
(=3). I assume that's okay for you.
Best regards,
Krzysztof
Powered by blists - more mailing lists