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] [day] [month] [year] [list]
Message-ID: <7b9d66a9-22b4-4fdc-a6a5-dda737a4f932@linaro.org>
Date: Mon, 20 May 2024 15:57:35 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...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 10/05/2024 17:39, Srinivas Kandagatla wrote:
> 
> 
> 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.

Ack.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ