[alsa-devel] [PATCH v2 116/146] ASoC: sof: use modern dai_link style
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Jun 27 09:06:32 CEST 2019
Hi Daniel
> > > diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
> > > index f485f7f751a1..ee73318135fc 100644
> > > --- a/sound/soc/soc-topology.c
> > > +++ b/sound/soc/soc-topology.c
> > > @@ -1883,7 +1883,7 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
> > > int ret;
> > >
> > > /* link + cpu + codec */
> > > - link = kzalloc(sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL);
> > > + link = kzalloc(sizeof(*link) + (3 * sizeof(*dlc)), GFP_KERNEL);
> > > if (link == NULL)
> > > return -ENOMEM;
> > >
> > > @@ -1891,9 +1891,11 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
> > >
> > > link->cpus = &dlc[0];
> > > link->codecs = &dlc[1];
> > > + link->platforms = &dlc[2];
> > >
> > > link->num_cpus = 1;
> > > link->num_codecs = 1;
> > > + link->num_platforms = 1;
(snip)
> > Above one is also OK, but now we can use NULL platform.
> > I'm not familiar with SOF, but maybe like this code instead
> > of having dummy platform can salve your issue ?
> >
> > if (link->platforms) {
> > link->platforms->name = dev_name(sdev->dev);
> > }
> >
> Yes, this also seems to work.
Thanks, Nice to know !!
For SOF future, NULL platform support is nice idea, I think.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list