diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2014-06-17 18:49:08 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-08-27 18:28:59 -0500 |
commit | 2a17c1bbcd83a9d9f6d07bc0545742a59a043ae4 (patch) | |
tree | afd116a007002982fc809f1b3e318552e3195490 /sound | |
parent | 7f82849c8b5686a4a3086d189a5244a337522d4f (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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dmaengine-pcm.c | 10 |
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) 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: |