aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2014-06-17 06:49:08 -0400
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-06-19 05:07:39 -0400
commit29a807b337b0e74460fd3ec699e54eb61183279a (patch)
treece8565eeb347e40ae92fcb3ac90c5fed57d597ff
parentfffc5ae25c72411f65b75a49afc1f7436ac2d0ed (diff)
ENGR00318773-5 ASoC: dmaengine: Merge trigger RESUME to START and SUSPEND to STOP
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. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
-rw-r--r--sound/soc/soc-dmaengine-pcm.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c
index f762ac0f9f1c..8d01630c93f7 100644
--- a/sound/soc/soc-dmaengine-pcm.c
+++ b/sound/soc/soc-dmaengine-pcm.c
@@ -187,20 +187,16 @@ int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
187 187
188 switch (cmd) { 188 switch (cmd) {
189 case SNDRV_PCM_TRIGGER_START: 189 case SNDRV_PCM_TRIGGER_START:
190 case SNDRV_PCM_TRIGGER_RESUME:
191 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
190 ret = dmaengine_pcm_prepare_and_submit(substream); 192 ret = dmaengine_pcm_prepare_and_submit(substream);
191 if (ret) 193 if (ret)
192 return ret; 194 return ret;
193 dma_async_issue_pending(prtd->dma_chan); 195 dma_async_issue_pending(prtd->dma_chan);
194 break; 196 break;
195 case SNDRV_PCM_TRIGGER_RESUME: 197 case SNDRV_PCM_TRIGGER_STOP:
196 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
197 dmaengine_resume(prtd->dma_chan);
198 break;
199 case SNDRV_PCM_TRIGGER_SUSPEND: 198 case SNDRV_PCM_TRIGGER_SUSPEND:
200 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 199 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
201 dmaengine_pause(prtd->dma_chan);
202 break;
203 case SNDRV_PCM_TRIGGER_STOP:
204 dmaengine_terminate_all(prtd->dma_chan); 200 dmaengine_terminate_all(prtd->dma_chan);
205 break; 201 break;
206 default: 202 default: