Re: [PATCH v2] ASoC: qcom: audioreach: support multichannel PCM formats
From: Zhangfei Gao
Date: Tue Oct 27 2026 - 22:40:57 EST
On Tue, Oct 27, 2026 at 9:47 PM Srinivas Kandagatla
<srinivas.kandagatla@xxxxxxxxxxxxxxxx> wrote:
>
> On 10/26/26 8:25 AM, Zhangfei Gao wrote:
> > AudioReach currently rejects PCM streams with more than four channels in
> > the PCM and shared-memory media format paths.
> bit more context would help, why you need it now?
Sure
>
> >
> > Reuse q6dsp_map_channels() to support multichannel PCM formats.
> >
> > Signed-off-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxxxxxxxx>
> > ---
> >
> > v2: reuse q6dsp_map_channels
> >
> > sound/soc/qcom/qdsp6/audioreach.c | 26 -------------------------
> > sound/soc/qcom/qdsp6/audioreach.h | 1 -
> > sound/soc/qcom/qdsp6/q6apm-dai.c | 12 +++++++++---
> > sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 9 +++++++--
> > 4 files changed, 16 insertions(+), 32 deletions(-)
> >
> > diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
> > index d2dc5d37bccf..33161523c7da 100644
> > --- a/sound/soc/qcom/qdsp6/audioreach.c
> > +++ b/sound/soc/qcom/qdsp6/audioreach.c
> > @@ -306,22 +306,6 @@ void *audioreach_alloc_apm_cmd_pkt(int pkt_size, uint32_t opcode, uint32_t token
> > }
> > EXPORT_SYMBOL_GPL(audioreach_alloc_apm_cmd_pkt);
> >
> > -void audioreach_set_default_channel_mapping(u8 *ch_map, int num_channels)
> > -{
> > - if (num_channels == 1) {
> > - ch_map[0] = PCM_CHANNEL_FL;
> > - } else if (num_channels == 2) {
> > - ch_map[0] = PCM_CHANNEL_FL;
> > - ch_map[1] = PCM_CHANNEL_FR;
> > - } else if (num_channels == 4) {
> > - ch_map[0] = PCM_CHANNEL_FL;
> > - ch_map[1] = PCM_CHANNEL_FR;
> > - ch_map[2] = PCM_CHANNEL_LS;
> > - ch_map[3] = PCM_CHANNEL_RS;
> > - }
> > -}
> > -EXPORT_SYMBOL_GPL(audioreach_set_default_channel_mapping);
> > -
> while you at this, please remove AR_PCM_MAX_NUM_CHANNEL too.
Good idea,
Will reuse PCM_MAX_NUM_CHANNEL to replace AR_PCM_MAX_NUM_CHANNEL
>
> Other than that it looks good to me.
>
>
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
>
Thanks