diff options
author | Huang Chao <chao7.huang@samsung.com> | 2014-06-13 13:58:31 +0800 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:59:50 +0900 |
commit | 421a8cb2f97f33f56d0019cf201f7b04f1fb1589 (patch) | |
tree | 3cfed35ead379a63645474ed2d536fb1d5afd62a /sound | |
parent | 8c109f2a92f4f18bedbee1048956620ef1752295 (diff) | |
download | linux-3.10-421a8cb2f97f33f56d0019cf201f7b04f1fb1589.tar.gz linux-3.10-421a8cb2f97f33f56d0019cf201f7b04f1fb1589.tar.bz2 linux-3.10-421a8cb2f97f33f56d0019cf201f7b04f1fb1589.zip |
ASoC: samsung: dma: Implement audio stream pause/resume interfaces
This patch implements the pause/resume operations for audio stream
when users are playback the music, which will call the correlative
pause/resume callbacks from samsung dma operations set.
Change-Id: I151a9b48152dab52b9b618c54af4200fecd3fd8a
Signed-off-by: Huang Chao <chao7.huang@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/dma.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 6e2b2b4dca5..b0bdf515735 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -263,6 +263,16 @@ static int dma_trigger(struct snd_pcm_substream *substream, int cmd) prtd->params->ops->stop(prtd->params->ch); break; + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + prtd->state &= ~ST_RUNNING; + prtd->params->ops->pause(prtd->params->ch); + break; + + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + prtd->state |= ST_RUNNING; + prtd->params->ops->resume(prtd->params->ch); + break; + default: ret = -EINVAL; break; |