summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2015-02-09 18:21:27 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-04-14 14:02:19 -0500
commita21f8a846f653fe5415961fe8006f0f9688fe908 (patch)
tree65a25cf4b9264f04a890d8e0fb1a029f56628f9b /sound
parente250e2f494bcc7b7c2c20a5f95b58047db6584e3 (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: