summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-12-02 09:57:00 +0800
committerSebastien Jan <s-jan@ti.com>2011-12-05 11:20:20 +0100
commit1426946ede2754703332302565f3c41f58e13afd (patch)
treef2335857d59ce28567a8812b45a87a7ea933ed6a /sound
parent0de97897e0e2e4cf5bf3299449fdb3cdbbd6790b (diff)
ASoC: OMAP4 PCM - make sure self linked DMA is really stopped (fixme)
Make sure OMAP self linked DMA is really stopped. FIXME: this needs a counter so we dont lock up. Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-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 5e37ec915de2..4cfa276f6b46 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -243,6 +243,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;