summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2015-02-09 18:21:27 +0800
committerShengjiu Wang <shengjiu.wang@freescale.com>2015-02-10 11:09:17 +0800
commitf403628ef48e56c77bdf4d5df23e8b37fea0fc34 (patch)
tree01708d1d516b87cf43306756f4925f1b7ba1fbb2 /sound
parent83a61c8270be4690e076445a3f72505011175c82 (diff)
MLK-10213-2: ASoC: dmaengine: Merge trigger RESUME to START and SUSPEND to STOP
Merged from 2a17c1bbcd83a9d9f6d07bc0545742a59a043ae4 The SDMA driver doesn't support DMA_PAUSE and DMA_RESUME commands. So this patch use TRIGGER_START for TRIGGER_RESUME and TRIGGER_SUSPEND for TRIGGER_STOP as a work around so that Audio can normally stop and restart its corresponding DMA channels. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_dmaengine.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index fe527cff3e2b..1b1683253b06 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -5,7 +5,7 @@
* Based on:
* imx-pcm-dma-mx2.c, Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
* mxs-pcm.c, Copyright (C) 2011 Freescale Semiconductor, Inc.
- * imx-pcm-dma.c, Copyright (C) 2014 Freescale Semiconductor, Inc.
+ * imx-pcm-dma.c, Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
* ep93xx-pcm.c, Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
* Copyright (C) 2006 Applied Data Systems
*
@@ -183,20 +183,16 @@ int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
ret = dmaengine_pcm_prepare_and_submit(substream);
if (ret)
return ret;
dma_async_issue_pending(prtd->dma_chan);
break;
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- dmaengine_resume(prtd->dma_chan);
- break;
+ case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- dmaengine_pause(prtd->dma_chan);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
dmaengine_terminate_all(prtd->dma_chan);
break;
default: