[alsa-devel] [PATCH 11/21] ASoC: soc-core: add snd_soc_del_component()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Fri Oct 11 03:35:25 CEST 2019


Hi Pierre-Louis

> > From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> > 
> > It is easy to read code if it is cleanly using paired function/naming,
> > like start <-> stop, register <-> unregister, etc, etc.
> > But, current ALSA SoC code is very random, unbalance, not paired, etc.
> > It is easy to create bug at the such code, and is difficult to debug.
> > 
> > Now ALSA SoC has snd_soc_add_component(), but there is no paired
> > snd_soc_del_component(). Thus, snd_soc_unregister_component() is
> > calling cleanup function randomly. it is difficult to read.
> > This patch adds missing snd_soc_del_component() and balance up code.
> 
> 
> the problem now is that the naming is confusing
> 
> we have snd_soc_component_del and snd_soc_del_component.
> we already had snd_soc_component_add and snd_soc_add_component.

Yes, very confusing.

> Also I find it useful to keep the _unlocked suffix when relevant, it
> adds value that is lost otherwise.
> 
> Can we avoid this pretty please?

Yeah, thanks.
The only issue for it is that my English naming sense/skill ;P

Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list