From 25ec3e86d26b482a652f5794de88a8ee5cb3bc1d Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 3 Feb 2011 18:17:34 +0000 Subject: [PATCH] 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 --- sound/soc/omap/omap-pcm.c | 5 +++++ 1 file changed, 5 insertions(+) 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;