aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@slimlogic.co.uk>2011-02-03 18:17:34 +0000
committerSimon Wilson <simonwilson@google.com>2011-04-16 14:56:12 -0700
commit8569a0f424bc92d99491d9336ef775f94144db4a (patch)
treeb6e2b6937d3f1925b6f6ef322c8da84ce463faf6
parent0fda76bf98957fbba75dd7841b7e145ab8c6e257 (diff)
downloadexperimental-8569a0f424bc92d99491d9336ef775f94144db4a.tar.gz
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@slimlogic.co.uk>
-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 d4297919223..551b7f5b437 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -234,6 +234,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;