Re: [PATCH v3 3/4] ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Best regards,
Krzysztof




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux