linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"James Schulman" <james.schulman@cirrus.com>,
	"David Rhodes" <david.rhodes@cirrus.com>,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Banajit Goswami" <bgoswami@quicinc.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults
Date: Fri, 10 May 2024 16:39:18 +0100	[thread overview]
Message-ID: <adde3972-f055-464b-83ac-8d8a2d874e29@linaro.org> (raw)
In-Reply-To: <aa8509c9-7475-40b3-82cb-9bfc1e33b202@linaro.org>



On 09/05/2024 12:43, Krzysztof Kozlowski wrote:
> On 09/05/2024 11:17, Srinivas Kandagatla wrote:
>>> diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
>>> index eb9306280988..208b74e50445 100644
>>> --- a/sound/soc/qcom/qdsp6/audioreach.h
>>> +++ b/sound/soc/qcom/qdsp6/audioreach.h
>>> @@ -766,6 +766,7 @@ struct audioreach_module_config {
>>>    /* Packet Allocation routines */
>>>    void *audioreach_alloc_apm_cmd_pkt(int pkt_size, uint32_t opcode, uint32_t
>>>    				    token);
>>> +void audioreach_set_channel_mapping(u8 *ch_map, int num_channels);
>>>    void *audioreach_alloc_cmd_pkt(int payload_size, uint32_t opcode,
>>>    			       uint32_t token, uint32_t src_port,
>>>    			       uint32_t dest_port);
>>> diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
>>> index 00bbd291be5c..8ab55869e8a2 100644
>>> --- a/sound/soc/qcom/qdsp6/q6apm-dai.c
>>> +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
>>> @@ -243,6 +243,7 @@ static int q6apm_dai_prepare(struct snd_soc_component *component,
>>>    	cfg.num_channels = runtime->channels;
>>>    	cfg.bit_width = prtd->bits_per_sample;
>>>    	cfg.fmt = SND_AUDIOCODEC_PCM;
>>> +	audioreach_set_channel_mapping(cfg.channel_map, runtime->channels);
>>>    
>>
>> Prepare can be called multiple times.. so we have channels overwritten here.
> 
> Which is expected - just like we overwrite number of channels.
This will work in q6apm-dai.c case as there is no set_channel_map callback.

lgtm.

Can you rename audioreach_set_channel_mapping to 
audioreach_set_default_channel_mapping which makes it more obvious that 
we are setting a default channel mappings.


--srini
> 
> Best regards,
> Krzysztof
> 

  reply	other threads:[~2024-05-10 15:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  6:51 [PATCH v3 0/4] ASoC: qcom: x1e80100: Correct channel mapping Krzysztof Kozlowski
2024-05-09  6:51 ` [PATCH v3 1/4] ASoC: Constify channel mapping array arguments in set_channel_map() Krzysztof Kozlowski
2024-05-09  6:51 ` [PATCH v3 2/4] ASoC: qcom: q6apm-lpass-dais: Implement proper channel mapping Krzysztof Kozlowski
2024-05-09  6:51 ` [PATCH v3 3/4] ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults Krzysztof Kozlowski
2024-05-09  9:17   ` Srinivas Kandagatla
2024-05-09 11:43     ` Krzysztof Kozlowski
2024-05-10 15:39       ` Srinivas Kandagatla [this message]
2024-05-20 13:57         ` Krzysztof Kozlowski
2024-05-09  6:51 ` [PATCH v3 4/4] ASoC: qcom: x1e80100: Correct channel mapping Krzysztof Kozlowski

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=adde3972-f055-464b-83ac-8d8a2d874e29@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=broonie@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=james.schulman@cirrus.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).