summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHari Nagalla <hnagalla@ti.com>2010-02-03 13:58:03 -0600
committerRicardo Perez Olivares <x0081762@ti.com>2010-02-03 14:23:56 -0600
commit304f42b049147458056c76e644d0a027973ada7b (patch)
treec7c5de2b0423a3220d3266b0078cc179da53a69f
parent953da5265ab9be874e7a7d74e67d21f91b315c89 (diff)
OMAP4-AUDIO: Fix Audio DMA transaction Errorti-2.6.31-omap4-L24.3-p3
Ensure that the DMA channel is stopped for self linked audio DMA channel. Signed-off-by: Hari Nagalla <hnagalla@ti.com>
-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 f0b4c1a8bcc4..97a62ef4594b 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -205,6 +205,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;