Re: [RFC][PATCH 0/x] ASoC: replace platform to component

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark, Lars-Peter

> 1st Note is that it is still using rtd->platform_com style.

It is still using this "rtd->xxx" style, but we should expand it.
I'm thinking that we can connect each component to rtd by using list
and we can get it by "driver" (or something).
Then, we can add new snd_soc_lookup_runtime() function for it.
But, what do you think ?

	- rtd->platform_com = component;
	+ list_add(component->rtd_list, rtd->list_head);

	- struct device *dev = rtd->platform_com->dev;
	+ struct snd_soc_component *component = snd_soc_lookup_runtime(rtd, driver);
	+ struct device *dev = component->dev;

struct snd_soc_component *snd_soc_lookup_runtime(rtd, driver)
{
	...
	list_for_each_entry(component, &rtd->list_head, xxx) {
		if (driver == component->driver)
			return component;
	}

	return NULL;
}


Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux