[alsa-devel] Question about soc_bind_dai_link()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Aug 1 10:47:00 CEST 2017


Hi

> > static int soc_bind_dai_link(struct snd_soc_card *card,
> > 	struct snd_soc_dai_link *dai_link)
> > {
> > 	...
> > 	/* find one from the set of registered platforms */
> > 	list_for_each_entry(platform, &platform_list, list) {
> > 		platform_of_node = platform->dev->of_node;
> > 		if (!platform_of_node && platform->dev->parent->of_node)
> > 			platform_of_node = platform->dev->parent->of_node;
> > 
> > 		if (dai_link->platform_of_node) {
> > 			if (platform_of_node != dai_link->platform_of_node)
> > 				continue;
> > 		} else {
> > 			if (strcmp(platform->component.name, platform_name))
> > 				continue;
> > 		}
> > 
> > =>		rtd->platform = platform;
>> 
> This isn't actually a bug because you reach here only if the
> given platform is found.

Thanks. Yes, any cases it is not a big deal.
In my cases it reaches here only once, because my system
registers 1 platform only.
I don't know detail, but some board is registering 2 platforms
(own platform and dmaengine ?)
In such case, rtd->platform was overwrote ?
It seems existing such board is working, thus this is not a big deal.
Just question


Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list