[alsa-devel] [PATCH 14/21] ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai()

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


Hi Pierre-Louis

Thank you for your feedback

> > snd_soc_register_dai() is now used from topology.
> > But, to reduce duplicated code, it will be used from soc-core, too.
> > To prepare for it, this patch adds missing parameter legacy_dai_naming
> > to snd_soc_register_dai().
> 
> It doesn't look like this series reduces the confusion between
> snd_soc_register_dai() and snd_soc_register_dais() ?
> 
> maybe for the latter case since it's a static function we don't want
> the entire prefix then?

Maybe my explain is not so good...
The point is that, in general people think like below from naming.
Other functions are this style.

=>	int snd_soc_register_dai()
	{
		...
	}

	int snd_soc_register_dais()
	{
		for(..) {
=>			snd_soc_register_dai()
		}		
	}

But in reality is like this

	int snd_soc_register_dai()
	{
		/* almost same but different code */
	}

	snd_soc_register_dais()
	{
		/* almost same but different code */
	}

To avoid duplicate code and confusion,
this patchset try to implement "general" style.
But needs some preparation.

I will fix log and English.

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


More information about the Alsa-devel mailing list