]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 5 Nov 2019 06:47:14 +0000 (15:47 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 5 Nov 2019 23:50:49 +0000 (23:50 +0000)
commite443c20593de9f8efd9b2935ed40eb0bbacce30b
treec65453840fd927fe9e8e60247a0b1dc946bf00d1
parent5d07519703bc2f0bf19d33652401552a480d68b8
ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()

ALSA SoC has 2 functions.
snd_soc_register_dai()  is used from topology
snd_soc_register_dais() is used from snd_soc_add_component()

In general, people think like _dai() is called from _dais()
with for loop. But in reality, these are very similar
but different implementation.
We shouldn't have duplicated and confusing implementation.

snd_soc_register_dai() is now used from topology.
But to reduce duplicated code, it should be used from _dais(), too.

Because of topology side specific reason,
it is calling snd_soc_dapm_new_dai_widgets(),
but it is not needed _dais() side.

This patch factorizes snd_soc_register_dai() to
topology / _dais() common part, and topology specific part.
And do topology specific part at soc-topology.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87sgn2251p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-topology.c