Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH 0/x] ASoC: replace platform to component
@ 2017-07-25  3:58 Kuninori Morimoto
  2017-07-25  3:59 ` [PATCH 0/3] ASoC: add missing component functions Kuninori Morimoto
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Kuninori Morimoto @ 2017-07-25  3:58 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


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

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-02-12 12:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25  3:58 [PATCH 0/x] ASoC: replace platform to component Kuninori Morimoto
2017-07-25  3:59 ` [PATCH 0/3] ASoC: add missing component functions Kuninori Morimoto
2017-07-25  4:00   ` [PATCH 1/3] ASoC: soc-core: add component remove/unregister_exp/lookup functions Kuninori Morimoto
2017-08-02 11:05     ` Mark Brown
2017-08-02 11:35       ` Kuninori Morimoto
2017-08-02 13:17         ` Mark Brown
2017-08-03  0:05           ` Kuninori Morimoto
2017-07-25  4:01   ` [PATCH 2/3] ASoC: soc-core: add snd_soc_add_component() Kuninori Morimoto
2017-07-25  4:01   ` [PATCH 3/3] ASoC: soc-devres: use expanded unregister on devm register component Kuninori Morimoto
2017-07-25  4:08 ` [PATCH 0/3 v2] ASoC: Component level pcm_new/free v2 Kuninori Morimoto
2017-07-25  4:09   ` [PATCH 1/3 v2] ASoC: soc-core: add snd_soc_rtdcom_xxx() Kuninori Morimoto
2017-07-25  4:09   ` [PATCH 2/3 v2] ASoC: use snd_soc_rtdcom_add() and convert to consistent operation Kuninori Morimoto
2017-07-25  4:09   ` [PATCH 3/3 v2] ASoC: add Component level pcm_new/pcm_free v2 Kuninori Morimoto
2017-07-25  4:19 ` [RFC 0/x] ASoC: replace platform to component Kuninori Morimoto
2017-07-25  4:20   ` [RFC 1/x] ASoC: snd_soc_component_driver has snd_pcm_ops Kuninori Morimoto
2017-07-25  4:20   ` [RFC 2/x] ASoC: snd_soc_component_driver has snd_compr_ops Kuninori Morimoto
2017-07-25  4:21   ` [RFC 3/x] ASoC: remove rtd->platform checck Kuninori Morimoto
2018-02-12 12:32     ` Applied "ASoC: remove rtd->platform checck" to the asoc tree Mark Brown
2017-07-25  4:21   ` [RFC 4/x] ASoC: replace platform to component on soc-utils Kuninori Morimoto
2017-07-25  4:21   ` [RFC 5/x] ASoC: replace platform to component on soc-generic-dmaengine-pcm Kuninori Morimoto
2017-07-25  4:21   ` [RFC 6/x] ASoC: replace platform to component on atom hifi2 Kuninori Morimoto
2017-07-25  4:22   ` [RFC 7/x] ASoC: replace platform to component on cygnus-pcm Kuninori Morimoto
2018-02-12 12:31     ` Applied "ASoC: bcm: cygnus: replace platform to component" to the asoc tree Mark Brown
2017-07-25  4:22   ` [RFC 8/x] ASoC: remove platform related things Kuninori Morimoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox