All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/x] ASoC: replace platform to component
@ 2017-06-20  2:25 Kuninori Morimoto
  2017-06-20  2:26 ` [RFC][PATCH 1/x] ASoC: snd_soc_component_driver has snd_pcm_ops Kuninori Morimoto
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2017-06-20  2:25 UTC (permalink / raw)
  To: Mark Brown, Lars-Peter; +Cc: Simon, Linux-Renesas, Linux-ALSA


Hi Mark, Lars-Peter

Now, we can replace "platform" to "component".
It will be large patch-set. To avoid many posting big-patch-set,
I will post few of then as example.

1) - 2) : prepare for last missing parts for replace
3) - 4) : example of replace patch
5)      : remove platform

Kuninori Morimoto (xx):
      1) ASoC: snd_soc_component_driver has snd_pcm_ops
      2) ASoC: snd_soc_component_driver has snd_compr_ops
      3) ASoC: replace platform to component on sh/rcar
      4) ASoC: replace platform to component on sst-xxx
      5) ASoC: remove platform related things

Big change of this replace are
 1) snd_soc_lookup_platform() will be snd_soc_lookup_component()
 2) debugfs_create_file("platform", xxx) will be debugfs_create_file("component", xxx)
 3) remove platform_list

1st Note is that it is still using rtd->platform_com style.
I guess it will be removed or replaced in the future, but it is not
this patch-set purpose.

2nd Note is that, as you can see, above example is merging few
components into 1 component.
Almost all cases, 1 component is for register DAI, 1 component is
for register platform. I think we can merge these into 1 component.

I have 1 concern. Current snd_soc_unregister_component() is checking
"dev" only. This means, 1 device : 1 component can only be correctly handled.
I don't know detail, but below case, maybe works.

	snd_soc_register_component(dev, driver_A);
	snd_soc_register_component(dev, driver_B);

	snd_soc_unregister_component(dev);
	snd_soc_unregister_component(dev);

I think we want to have "driver" parameter on unregister, like

	snd_soc_unregister_component(dev, driver_A);
	snd_soc_unregister_component(dev, driver_B);

For example, tegra sound driver is registering its component, and
snd_dmaengine_pcm_register() which register its component.
One headache is that snd_dmaengine_pcm_unregister() is using
snd_soc_lookup_platform() which will be replaced to
snd_soc_lookup_component(). And its parameter is only "dev".

We want to have below
	snd_soc_lookup_component(dev, driver);
	snd_soc_unregister_component(dev, driver);

Can I replace current unregister before "replace platform" patch set ?
(= many drivers are using it)

Best regards
---
Kuninori Morimoto

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

end of thread, other threads:[~2017-06-22  1:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20  2:25 [RFC][PATCH 0/x] ASoC: replace platform to component Kuninori Morimoto
2017-06-20  2:26 ` [RFC][PATCH 1/x] ASoC: snd_soc_component_driver has snd_pcm_ops Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 2/x] ASoC: snd_soc_component_driver has snd_compr_ops Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 3/x] ASoC: replace platform to component on sh/rcar Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 4/x] ASoC: replace platform to component on sst-xxx Kuninori Morimoto
2017-06-20  2:28 ` [RFC][PATCH 5/x] ASoC: remove platform related things Kuninori Morimoto
2017-06-21  4:32 ` [RFC][PATCH 0/x] ASoC: replace platform to component Kuninori Morimoto
2017-06-21 16:15   ` Mark Brown
2017-06-22  1:01     ` 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.