summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Eduardo Candelaria <x0107209@ti.com>2009-07-21 17:40:40 -0500
committerMisael Lopez Cruz <x0052729@ti.com>2009-07-24 04:50:09 -0500
commitda39383f924510cf4b48fc379af74149ec3deb7f (patch)
treeb89e68821a83c98e18c7e08a286cc1fa80274211
parenta4075d7f3fa904bfe7e4af7d19ac6ff9dcb35da8 (diff)
ASoC: OMAP4: Add delay to DMA interrupt handler
To avoid underruns when opening a playback stream, add a delay of 300 microseconds before calling "omap_get_dma_src_pos" under the DMA interrupt handler. Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
-rw-r--r--sound/soc/omap/omap-pcm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 316bbe3ccb3f..358de90d07a8 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -23,6 +23,7 @@
*/
#include <linux/dma-mapping.h>
+#include <linux/delay.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -32,6 +33,8 @@
#include "omap-pcm.h"
#include "mcpdm.h"
+#define VIRTIO_SDP4430
+
static const struct snd_pcm_hardware omap_pcm_hardware = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
@@ -75,6 +78,9 @@ static void omap_pcm_dma_irq(int ch, u16 stat, void *data)
spin_unlock_irqrestore(&prtd->lock, flags);
}
+#ifdef VIRTIO_SDP4430
+ udelay(300);
+#endif
snd_pcm_period_elapsed(substream);
}