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

From: Harendra Gautam

Date: Mon Aug 24 2026 - 02:26:43 EST


On Thu, Jul 2, 2026 at 12:42 PM Krzysztof Kozlowski <krzk@xxxxxxxxxx> 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