Re: [PATCH v3 1/9] ASoC: dt-bindings: qcom,qaif-cpu: Add binding
From: Harendra Gautam
Date: Wed Aug 26 2026 - 06:27:29 EST
On Wed, Aug 26, 2026 at 3:36 PM Harendra Gautam
<harendra.gautam@xxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Aug 26, 2026 at 3:31 PM Srinivas Kandagatla <srini@xxxxxxxxxx> wrote:
> >
> >
> >
> > On 8/26/26 10:55 AM, Harendra Gautam wrote:
> > > On Wed, Aug 26, 2026 at 3:13 PM Srinivas Kandagatla
> > > <srinivas.kandagatla@xxxxxxxxxxxxxxxx> wrote:
> > >>
> > >>
> > >>
> > >> On 8/26/26 10:39 AM, Harendra Gautam wrote:
> > >>>>> + * CIF (Codec Interface) VA TX DAI IDs -- capture from voice activity codec.
> > >>>>> + * WRDMA channels collect audio from the VA codec and write it to memory.
> > >>>>> + */
> > >>>>> +#define QAIF_CDC_DMA_VA_TX0 246
> > >>>>> +#define QAIF_CDC_DMA_VA_TX1 247
> > >>>>> +#define QAIF_CDC_DMA_VA_TX2 248
> > >>>>> +#define QAIF_CDC_DMA_VA_TX3 249
> > >>>>> +#define QAIF_CDC_DMA_VA_TX4 250
> > >>>>> +#define QAIF_CDC_DMA_VA_TX5 251
> > >>>>> +#define QAIF_CDC_DMA_VA_TX6 252
> > >>>>> +#define QAIF_CDC_DMA_VA_TX7 253
> > >>>>> +#define QAIF_CDC_DMA_VA_TX8 254
> > >>>>> +#define QAIF_CDC_DMA_VA_TX9 255
> > >>>>> +
> > >>>> These DAI IDs exceed the LPASS_MAX_PORT limit, which will cause sound
> > >>>> card registration to fail.
> > >>>>
> > >>>> Check sound/soc/qcom/common.c, as the current indices (246-255) are
> > >>>> beyond the supported LPASS port range.
> > >>>>
> > >>>> Best Regards,
> > >>>> Rafi.
> > >>> Thanks for pointing this out. We can either add the range check for
> > >>> min/max QAIF DAI IDs in qcom/common.c or introduce a common helper in
> > >>> qcom/common.h to validate the supported DAI IDs across Qualcomm
> > >>> platforms.
> > >>
> > >> You should add these ids to
> > >> include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h instead to avoid
> > >> conflicts with common code.
> > >>
> > >> --srini
> > > Thanks for the suggestion. qcom,q6dsp-lpass-ports.h is specific to Q6
> > > DSP/AFE virtual port IDs. Since QAIF is a direct MMIO driver with no
> > > Q6 DSP involvement, would adding QAIF IDs there not be misleading?
> >
> > These are IDs that will be reused across both dsp and non-dsp solution.
> > So it makes more sense to keep it in one single place to allow the
> > hardware description (DT) unchanged across different software solutions.
> >
> >
> > > would it be better to update the range check in common.c/common.h to
> > > accommodate both LPASS and QAIF DAI ID ranges instead?
> > No, that does not make sense because these numbering might conflicting
> > with other ports in future.
> >
> > --srini
Just checked the code. If QAIF DAIs are added to
qcom,q6dsp-lpass-ports.h, LPASS_MAX_PORT becomes QAIF_CDC_DMA_VA_TX9 +
1, increasing q6afe_dai_data, q6apm_lpass_dai_data, and afe_port_map
by 56 entries. Is that acceptable?
-Harendra
> Thanks for the clarification. Will add QAIF DAI IDs in qcom,q6dsp-lpass-ports.h.
> -Harendra
> >
> >
> > THat
> > > -Harendra
> > >>> -Harendra
> > >>
> >