Re: [PATCH v2 06/11] ASoC: qcom: Add generic of_xlate_dai_name helper and use it in lpass-cpu and qaif-cpu

Harendra Gautam <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-sound
Message-ID <CAC-tS8D3KReZ8tJ3LZdnrUbEE36KVACDHaZ+=cDddKLgSLUgtg@mail.gmail.com>
On Thu, Jul 2, 2026 at 12:42 PM Krzysztof Kozlowski <[email protected]> wrote:
>
> On Wed, Jul 01, 2026 at 04:27:52PM +0530, Harendra Gautam wrote:
> > Multiple Qualcomm ASoC CPU DAI drivers need to resolve a sound-dai
> > phandle argument to a DAI name by searching the component's DAI driver
> > array by ID. Each driver currently implements this identically.
>
> Heh? Identically? So why even doing this?
>
>  +
> > +static int qaif_cpu_of_xlate_dai_name(struct snd_soc_component *component,
> > +                                   const struct of_phandle_args *args,
> > +                                   const char **dai_name)
> > +{
> > +     struct qaif_drv_data *drvdata = snd_soc_component_get_drvdata(component);
> > +     const struct qaif_variant *v = drvdata->variant;
> > +
> > +     return asoc_qcom_of_xlate_dai_name(v->dai_driver,
> > +                                        v->num_dai, args, dai_name);
> > +}
> > +
> > +static const struct snd_soc_component_driver qaif_cpu_comp_driver = {
> > +     .name = "qaif-cpu",
> > +     .of_xlate_dai_name = qaif_cpu_of_xlate_dai_name,
>
> I miss something - qaif_cpu_of_xlate_dai_name() wrapper and
> lpass_cpu_of_xlate_dai_name() are identical. Why can't you use
> asoc_qcom_of_xlate_dai_name() here directly (or
> lpass_cpu_of_xlate_dai_name() without all this renaming)?
>
>
>
> Best regards,
> Krzysztof
>
Will address this in next patchset.
-Harendra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.