diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-04-24 01:15:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-29 14:27:44 +0200 |
commit | eb08411bdf48cff69f7226c86a97fba1ef5045e6 (patch) | |
tree | a91fb2c7b16b11d3266277a0e8f168c61bc2f4a4 /sound/soc/soc-dai.c | |
parent | ASoC: soc-dai: add snd_soc_dai_compr_shutdown() (diff) | |
download | linux-eb08411bdf48cff69f7226c86a97fba1ef5045e6.tar.xz linux-eb08411bdf48cff69f7226c86a97fba1ef5045e6.zip |
ASoC: soc-dai: add snd_soc_dai_compr_trigger()
dai related function should be implemented at soc-dai.c.
This patch adds snd_soc_dai_compr_trigger().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87mu71ssiz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dai.c')
-rw-r--r-- | sound/soc/soc-dai.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index d5cb8b0853a7..844b52528174 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -526,3 +526,16 @@ void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai, dai->driver->cops->shutdown(cstream, dai); } EXPORT_SYMBOL_GPL(snd_soc_dai_compr_shutdown); + +int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai, + struct snd_compr_stream *cstream, int cmd) +{ + int ret = 0; + + if (dai->driver->cops && + dai->driver->cops->trigger) + ret = dai->driver->cops->trigger(cstream, cmd, dai); + + return soc_dai_ret(dai, ret); +} +EXPORT_SYMBOL_GPL(snd_soc_dai_compr_trigger); |