summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto2017-11-28 07:27:09 +0100
committerMark Brown2017-11-28 16:21:39 +0100
commitef2e8175eb19011f756469d4d14f4207bf7f289c (patch)
tree4acc8387c4c1f102c8d2d174e0e6e27e0e456ed4 /sound/soc/soc-core.c
parentLinux 4.15-rc1 (diff)
downloadkernel-qcow2-linux-ef2e8175eb19011f756469d4d14f4207bf7f289c.tar.gz
kernel-qcow2-linux-ef2e8175eb19011f756469d4d14f4207bf7f289c.tar.xz
kernel-qcow2-linux-ef2e8175eb19011f756469d4d14f4207bf7f289c.zip
ASoC: add snd_soc_disconnect_sync()
Now, we have snd_card_disconnect_sync() on ALSA framework. snd_soc_disconnect_sync() is ASoC version of it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index c0edac80df34..9047046c749c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1392,6 +1392,16 @@ static int soc_init_dai_link(struct snd_soc_card *card,
return 0;
}
+void snd_soc_disconnect_sync(struct device *dev)
+{
+ struct snd_soc_component *component = snd_soc_lookup_component(dev, NULL);
+
+ if (!component || !component->card)
+ return;
+
+ snd_card_disconnect_sync(component->card->snd_card);
+}
+
/**
* snd_soc_add_dai_link - Add a DAI link dynamically
* @card: The ASoC card to which the DAI link is added