diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2014-04-28 14:17:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-29 21:04:32 +0200 |
commit | 4792b0dbcf3d41a19e76adc9c98c5cc889daa065 (patch) | |
tree | 3143b126b6e46271002c780b6314b122a0c45ee3 /sound/soc/soc-pcm.c | |
parent | Linux 3.15-rc1 (diff) | |
download | linux-4792b0dbcf3d41a19e76adc9c98c5cc889daa065.tar.xz linux-4792b0dbcf3d41a19e76adc9c98c5cc889daa065.zip |
ASoC: core: Add support for machine specific trigger callback
Machine specific trigger callback allows to do final stream start/stop
related operations in a machine driver after setting up the codec, DMA and
DAI.
One example could be clock management for linked streams case where machine
driver can start/stop synchronously the linked streams.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 2cedf09f6d96..a3a70214edee 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -819,6 +819,13 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd) if (ret < 0) return ret; } + + if (rtd->dai_link->ops && rtd->dai_link->ops->trigger) { + ret = rtd->dai_link->ops->trigger(substream, cmd); + if (ret < 0) + return ret; + } + return 0; } |