[alsa-devel] Applied "ASoC: soc-core: add .num_platform for dai_link" to the asoc tree

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Jan 22 03:10:09 CET 2019


Hi Mark

> Current snd_soc_dai_link is starting to use snd_soc_dai_link_component
> (= modern) style for Platform, but it is still assuming single Platform
> so far. We will need to have multi Platform support in the not far
> future.

In my understanding, if Intel / Pierre-Louis supported multi-CPU /
CPU modern style, we can switch to modern style for all drivers,
and remove legacy style code.

Then, I want to suggest 2 things for platform if possible.

1) Many sound driver is assuming "Platform == CPU",
   so, many driver have this code on current legacy style.

	dai_link->platforms->of_node = dai_link->cpu_of_node;

   Because of this settings, soc_bind_dai_link() will pick-up
   platform component, and try to add it to pcm_runtime.
   But this component will be ignored because it is already
   added when CPU bindings, I think.
   I think "platform" settings is not mandatory in this case.
   So we can allow "no platform" in modern style.
   But what do you think ?

2) On legacy style, if sound card dirver doesn't indicate specific "platform",
   then, "snd-soc-dummy" platform will be selected automatically.
   It is implemented on snd_soc_init_platform() today.
   In modern style, we can force to indicate necessary platform,
   or, not allow implicit snd-soc-dummy platform selection.
   But what do you think ?

If these are OK, we can add/modify such code on current glue code somehow,
and all driver follows this new rule when switching to modern style.

Good things is that driver code will be more simple/clear,
Bad  things is that switching to modern will be tough work.

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list