lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adde3972-f055-464b-83ac-8d8a2d874e29@linaro.org>
Date: Fri, 10 May 2024 16:39:18 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 James Schulman <james.schulman@...rus.com>,
 David Rhodes <david.rhodes@...rus.com>,
 Richard Fitzgerald <rf@...nsource.cirrus.com>,
 Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
 Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
 Lars-Peter Clausen <lars@...afoo.de>, Nuno Sá
 <nuno.sa@...log.com>, Banajit Goswami <bgoswami@...cinc.com>
Cc: alsa-devel@...a-project.org, patches@...nsource.cirrus.com,
 linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/4] ASoC: qcom: qdsp6: Set channel mapping instead of
 fixed defaults



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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ