summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-07-24 20:59:47 +0100
committerAndy Green <andy.green@linaro.org>2011-08-25 07:38:07 +0100
commit138ada857c64d9229e111b71eebda26ddf823a04 (patch)
tree7753e87c670865cab045d0223b59e69a51616cc6 /sound
parent56bcc8d079d6057d2db86a99ca2b46afc0db3de9 (diff)
Subject: [PATCH 085/104] 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 4e6fef29b51..28cc3a61b63 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;