[alsa-devel] [PATCH 1/2 v2] ASoC: add snd_soc_register_component()

Lars-Peter Clausen lars at metafoo.de
Tue Mar 12 19:57:47 CET 2013


On 03/12/2013 07:19 PM, Stephen Warren wrote:
> On 03/11/2013 07:27 PM, Kuninori Morimoto wrote:
>> Current ASoC has register function for platform/codec/dai/card,
>> but doesn't have for cpu.
>> It often produces confusion and fault on ASoC.
>>
>> As result of ASoC community discussion,
>> we consider new struct snd_soc_component for CPU/CODEC,
>> and will switch over to use it.
>>
>> This patch adds very basic struct snd_soc_component,
>> and register function for it.
> 
> The series seems reasonable enough to me, as a basis for future work on
> the DT stuff, so,
> 
> Reviewed-by: Stephen Warren <swarren at nvidia.com>
> 
> I wonder how much work it is to convert all users of
> snd_soc_register_dais() to this new API; is it worth doing so?

If we allow the component driver to be NULL it's pretty much straight
forward using coccinelle. Don't know if it is worth it to conver them all
right away.

@@
expression dev;
@@
-snd_soc_register_dais(
+snd_soc_register_component(
 dev,
+NULL,
 ...)

@@
expression dev;
expression num_dais;
@@
-snd_soc_unregister_dais(
+snd_soc_unregister_component(
 dev,
-num_dais
 )

- Lars


More information about the Alsa-devel mailing list