mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: qcom: audioreach: Add 4 channel support
Date: Thu, 30 Nov 2023 13:17:18 +0100	[thread overview]
Message-ID: <81b23ae7-bb01-4c23-80df-df171fbc2d08@linaro.org> (raw)
In-Reply-To: <f882b666-8a68-4341-a143-cb226ab7d22b@linaro.org>

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@linaro.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


  reply	other threads:[~2023-11-30 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  8:49 Krzysztof Kozlowski
2023-10-23  8:42 ` Srinivas Kandagatla
2023-11-30 12:17   ` Krzysztof Kozlowski [this message]
2023-11-30 12:24     ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81b23ae7-bb01-4c23-80df-df171fbc2d08@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®