All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/x v2] ASoC: replace platform to component
@ 2017-06-26  8:51 Kuninori Morimoto
  2017-06-26  8:52 ` [RFC 1/x v2] ASoC: soc-core: add component remove/unregister_exp/lookup functions Kuninori Morimoto
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-06-26  8:51 UTC (permalink / raw)
  To: Mark Brown, Lars-Peter; +Cc: Simon, Linux-Renesas, Linux-ALSA


Hi Mark, Lars-Peter

These are v2 of platform replace patch-set.
Big difference is that from version, rtd can have component list.
As you know, current rtd has platform, codec, and this patch
replace rtd->platform into component list.
We can replace codec in same style in the future.

This patch-set adds new snd_soc_rtdcom_lookup().
So, current
	struct snd_soc_platform *platform = rtd->platform;
will be replaced into
	struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRIVER_NAME);

1 rtd doesn't detect same component multiple times, I guess.
Thus, lookup by driver name should be OK.

Current framework is listing component to card (it was originally codec) by component_dev_list.
And it is used in soc-pcm.c

	list_for_each_entry(component, &rtd->card->component_dev_list, card_list) {
		...
	}

But it is not correct I think.
card can have multiple runtimes, and runtime can have multiple components.
Thus, I think we can do below case ?

Card -+-> runtime1 -> component1 + component2
      +-> runtime2 -> component1 + component2
      +-> runtime3 -> component1 +             component3

Current list_for_each_entry() will call component1/2/3,
but runtime1 needs component1/2 only, for example.

It is connecting all components to card by component_dev_list.
OTOH, all runtimes are listed to card by rtd_list.
This patch lists component to runtime.

I think we can replace component_dev_list into

	for_each_rtdcom(rtd, rtdcom) {
		component = rtdcom->component;
		...
	}


1) - 5) : prepare to replace
6) - 8) : sample of platform -> component replace
9)      : remove platform

Kuninori Morimoto (9):
      1) ASoC: soc-core: add component remove/unregister_exp/lookup functions
      2) ASoC: soc-devres: use expanded unregister on devm register component
      3) ASoC: soc-core: add snd_soc_rtdcom_xxx()
      4) ASoC: snd_soc_component_driver has snd_pcm_ops
      5) ASoC: snd_soc_component_driver has snd_compr_ops
      6) ASoC: replace platform to component on rsnd
      7) ASoC: replace platform to component on soc-utils
      8) ASoC: replace platform to component on soc-generic-dmaengine-pcm
      9) ASoC: remove platform related things


Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2017-06-26  8:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26  8:51 [RFC 0/x v2] ASoC: replace platform to component Kuninori Morimoto
2017-06-26  8:52 ` [RFC 1/x v2] ASoC: soc-core: add component remove/unregister_exp/lookup functions Kuninori Morimoto
2017-06-26  8:52 ` [RFC 2/x v2] ASoC: soc-devres: use expanded unregister on devm register component Kuninori Morimoto
2017-06-26  8:52 ` [RFC 3/x v2] ASoC: soc-core: add snd_soc_rtdcom_xxx() Kuninori Morimoto
2017-06-26  8:53 ` [RFC 4/x v2] ASoC: snd_soc_component_driver has snd_pcm_ops Kuninori Morimoto
2017-06-26  8:53 ` [RFC 5/x v2] ASoC: snd_soc_component_driver has snd_compr_ops Kuninori Morimoto
2017-06-26  8:53 ` [RFC 6/x v2] ASoC: replace platform to component on rsnd Kuninori Morimoto
2017-06-26  8:54 ` [RFC 7/x v2] ASoC: replace platform to component on soc-utils Kuninori Morimoto
2017-06-26  8:54 ` [RFC 8/x v2] ASoC: replace platform to component on soc-generic-dmaengine-pcm Kuninori Morimoto
2017-06-26  8:54 ` [RFC x/x v2] ASoC: remove platform related things Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.