aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-pcm.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-02-03 18:17:34 +0000
committerColin Cross <ccross@android.com>2011-06-14 10:06:59 -0700
commitd2ffdb418f3cf208c7567b89f388e95b7432ede3 (patch)
tree539d33ede9e44caa4031aee1a7bb214afd98f6c6 /sound/soc/omap/omap-pcm.c
parent7be655b8a6b6274bfe115b38840d7eba07888429 (diff)
downloadkernel_samsung_tuna-d2ffdb418f3cf208c7567b89f388e95b7432ede3.zip
kernel_samsung_tuna-d2ffdb418f3cf208c7567b89f388e95b7432ede3.tar.gz
kernel_samsung_tuna-d2ffdb418f3cf208c7567b89f388e95b7432ede3.tar.bz2
ASoC: OMAP4 PCM - make sure self linked DMA is really stopped
Make sure OMAP self linked DMA is really stopped. Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-rw-r--r--sound/soc/omap/omap-pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 4e6fef2..28cc3a6 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -235,6 +235,11 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
prtd->period_index = -1;
omap_stop_dma(prtd->dma_ch);
+ /* Since we are using self linking, there is a
+ chance that the DMA as re-enabled the channel
+ just after disabling it */
+ while (omap_get_dma_active_status(prtd->dma_ch))
+ omap_stop_dma(prtd->dma_ch);
break;
default:
ret = -EINVAL;