All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] ASoC: omap: Stop DMA re enabling in self linkage mode
@ 2010-12-06 22:34 Olaya, Margarita
  2010-12-06 22:47 ` Mark Brown
  2010-12-07  9:17 ` Peter Ujfalusi
  0 siblings, 2 replies; 8+ messages in thread
From: Olaya, Margarita @ 2010-12-06 22:34 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel@alsa-project.org

From: Hari Nagalla <hnagalla@ti.com>

While using self linking, there is a chance that the DMA
has re-enabled the channel just after disabling it.

This patch stops the OMAP4 DMA re-enabling after stoping the
DMA channel.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
---
 sound/soc/omap/omap-pcm.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6a21447..afe91ad 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -234,6 +234,13 @@ 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;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-07 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 22:34 [PATCH 2/2] ASoC: omap: Stop DMA re enabling in self linkage mode Olaya, Margarita
2010-12-06 22:47 ` Mark Brown
2010-12-07  9:17 ` Peter Ujfalusi
2010-12-07 14:05   ` Mark Brown
2010-12-07 14:38     ` Peter Ujfalusi
2010-12-07 14:43       ` Mark Brown
2010-12-07 15:17       ` Liam Girdwood
2010-12-07 16:00       ` Jarkko Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.