ASoC: soc-core: add snd_soc_rtdcom_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 8 Aug 2017 06:17:47 +0000 (06:17 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 10 Aug 2017 15:39:19 +0000 (16:39 +0100)
commita0ac441152238c9b474bafa46940511d9b2e9c7e
tree1b34ee414d38ece79284c14de6bcae1d3cfda881
parentd9a02c552cd69c466998e3afdf420cb4c0b9d9d9
ASoC: soc-core: add snd_soc_rtdcom_xxx()

Current snd_soc_pcm_runtime has platform / codec pointers, and we could
use these specific pointer. But these will be replaced to more generic
"component" soon, and will need more generic method to get each
connected component pointer from rtd.

This patch adds new snd_soc_rtdcom_xxx() to connect/disconnect
component to rtd. It means same as previous "platform" / "codec"
pointer style, but more generic.
We can find necessary component pointer from rtd by using component
driver name on snd_soc_rtdcom_lookup().

Here, the reason why it uses "driver name" is that "component name"
was created by fmt_single_name() and difficult to use it from driver.
Driver of course knows its "driver name", thus, using it is more easy.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c