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

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

 



Hi Mark

These are for replace "platform" to "component".
It needs 3 steps I think.
 step1. "component" needs _add_ function, like "platform"
 step2. "component" level pcm_new/free support
 step3. replace platform to component

We can get platform pointer from rtd->platform on current style.
But these are very categorized pointer, in other words, non generic pointer.
This cleanup is 1st step of merging all feature into component.
I think new style wil be

	CPU + Codec + Platform = Component

I think merging CPU into Component is already done.
This patch set merges Platform feature into Component, and remove Platform. 
Merging Codec into Component is next step.

This patch set will add new rtd connected component list.
All CPU/Codec/Platform are connected to this list.
And we can get each component pointer by using rtd and its driver name.
Here, We can replace rtd->platform like below

-	struct device *dev = rtd->platform->dev;
+	struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRIVER_NAME);
+	struct device *dev = component->dev;


-	if(rtd->platform->pcm_new)
-		rtd->platform->pcm_new(yyy);
+	for_each_rtdcom(rtd, rtdcom) {
+		component = rtdcom->component; /* rtd connected CPU/Codec/Platform */
+		if (component->pcm_new)
+			component->pcm_new(yyy);
+	}

Now, only platform has pcm_new/free, but in new style,
all component can have it.

I will post step1/2/3 patch-set.
step1 is normal patches.
step2/3 are now still [RFC].

Best regards
---
Kuninori Morimoto



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux