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