Change all omap15xx devices to use similar DMA handling than h6300 uses.
PATCH 1/5 Change all omap15xx devices to use similar DMA handling than h6300 uses.
Change all omap15xx devices to use similar DMA handling than h6300 uses. Thanks for the James Selvam for verifying this with omap 1510 innovator.
http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007256.html
From: Mika Laitio <[email protected]>
Date: Fri, 18 Aug 2006 01:47:42 +0300
Subject: [PATCH 1/5] change all omap15xx devices to use similar DMA handling than h6300 uses.
Change all omap15xx devices to use similar DMA handling than h6300 uses. Thanks for the James Selvam for verifying this with omap 1510 innovator. http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007256.html
--- sound/arm/omap/omap-alsa.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-)
sound/arm/omap/omap-alsa.c +13 -9
@@ -190,9 +190,7 @@ static void audio_process_dma(struct audunsigned int dma_size;unsigned int offset;int ret; -#ifdef CONFIG_MACH_OMAP_H6300 unsigned long flags; -#endif ADEBUG (); runtime = substream->runtime;
@@ -200,14 +198,20 @@ #endif dma_size =frames_to_bytes (runtime, runtime->period_size); offset = dma_size * s->period; snd_assert(dma_size <= DMA_BUF_SIZE,); -#ifdef CONFIG_MACH_OMAP_H6300 -spin_lock_irqsave (&s->dma_lock, flags); -omap_stop_alsa_sound_dma (s); -spin_unlock_irqrestore (&s->dma_lock, flags); -#endif +/* +* On omap1510 based devices, we need to call the stop_dma +* before calling the start_dma or we will not receive the +* irq from DMA after the first transfered/played buffer. +* (invocation of callback_omap_alsa_sound_dma() method). +*/ +if (cpu_is_omap15xx ()) { +spin_lock_irqsave (&s->dma_lock, flags); +omap_stop_alsa_sound_dma (s); +spin_unlock_irqrestore (&s->dma_lock, flags); + } ret =omap_start_alsa_sound_dma (s, - (dma_addr_t ) runtime->dma_area + - offset, dma_size); + (dma_addr_t )runtime->dma_area + offset, + dma_size);if (ret) { printk(KERN_ERR "audio_process_dma: cannot queue DMA buffer (%i)\n",
Signature · 1 line
1.4.2
Hi,
Quoted 1 line · lamikr
Change all omap15xx devices to use similar DMA handling than h6300 uses.
I recently got audio working on Palm Tungsten E which is OMAP311 based (so cpu_is_omap15xx() returns 1). First I used this same fix but I was hearing a short noise after every DMA iteration. It was fixed by avoiding stopping and starting McBSP everytime. From reading Palm Zire 71 (OMAP310) patches by Marek Vasut, I know they had the same problem there.
I'm going to submit a patch to apply on top of this one for audio on OMAP310/311.
Palm Tungsten E uses a TSC2102 chip, I'm going to submit the driver too, 2102 is slightly different from 2101.
Palm Zire 71 has a AIC23 chip.
Quoted 8 lines
Thanks for the James Selvam for verifying this with omap 1510 innovator.
http://linux.omap.com/pipermail/linux-omap-open-source/2006-May/007256.htmlSigned-off-by Mika Laitio <[email protected]>
Quoted 8 lines
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
Regards,
Andrzej
Signature · 1 line
balrog 2oo6