OSDN Git Service

ASoC: soc-core: add soc_unbind_dai_link()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 5 Nov 2019 06:46:25 +0000 (15:46 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 5 Nov 2019 23:50:07 +0000 (23:50 +0000)
commitbc7a9091e5b927ecc20dbb3bc07a5a09783fc27b
treeeef1c27533a530b9e57b47da6511bdb429342495
parent6b1dff0266a30df16846a20d1109ab25b985f0d7
ASoC: soc-core: add soc_unbind_dai_link()

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 it will be difficult to
debug.

ALSA SoC has soc_bind_dai_link(), but its paired soc_unbind_dai_link()
is not implemented.
More confusable is that soc_remove_pcm_runtimes() which should be
soc_unbind_dai_link() is implemented without synchronised
to soc_bind_dai_link().

This patch cleanup this unbalance.

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/877e4e3jni.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c