ASoC: soc-core: add snd_soc_pcm_lib_ioctl()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 2 Oct 2019 05:31:06 +0000 (14:31 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 8 Oct 2019 12:40:48 +0000 (13:40 +0100)
add snd_soc_pcm_lib_ioctl() to bypass to snd_pcm_lib_ioctl()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r23vaf39.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c

index d93cb46c536dc3f3d6355655171700706ae5451a..32748f78060a7e520f0d2ff7bb2dd7956d9cf943 100644 (file)
@@ -1390,6 +1390,11 @@ static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
        mutex_unlock(&dapm->card->dapm_mutex);
 }
 
+/* bypass */
+int snd_soc_pcm_lib_ioctl(struct snd_soc_component *component,
+                         struct snd_pcm_substream *substream,
+                         unsigned int cmd, void *arg);
+
 #include <sound/soc-component.h>
 
 #endif
index d39d908f3204299512a9a259dd01bde87a4b6272..bd2ac1912466a845ced543b87da73bee4d391e78 100644 (file)
@@ -277,6 +277,18 @@ static inline void snd_soc_debugfs_exit(void)
 
 #endif
 
+/*
+ * This is glue code between snd_pcm_lib_ioctl() and
+ * snd_soc_component_driver :: ioctl
+ */
+int snd_soc_pcm_lib_ioctl(struct snd_soc_component *component,
+                         struct snd_pcm_substream *substream,
+                         unsigned int cmd, void *arg)
+{
+       return snd_pcm_lib_ioctl(substream, cmd, arg);
+}
+EXPORT_SYMBOL_GPL(snd_soc_pcm_lib_ioctl);
+
 static int snd_soc_rtdcom_add(struct snd_soc_pcm_runtime *rtd,
                              struct snd_soc_component *component)
 {