public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices.
@ 2006-05-31  0:23 lamikr
  2006-05-31 10:54 ` Jonathan McDowell
  0 siblings, 1 reply; 2+ messages in thread
From: lamikr @ 2006-05-31  0:23 UTC (permalink / raw)
  To: OMAP

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

Hi

According to tests made by James Selvam, this patch is also needed in
other omap1510 based devices that with iPAQ h6300.
I suggest adding this patch unless someone finds out a bug in upper
level explaining the need for stopping the dma in every round to be able
to get the irq.

Mika

[-- Attachment #2: omap-alsa-force-the-dma-to-receive-irqs-on-all-omap15xx-based-devices.txt --]
[-- Type: text/plain, Size: 1420 bytes --]

>From nobody Mon Sep 17 00:00:00 2001
From: Mika Laitio <lamikr@cc.jyu.fi>
Date: Wed May 31 02:08:16 2006 +0300
Subject: [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices.

Signed-off-by: lamikr <lamikr@cc.jyu.fi>


---

 sound/arm/omap/omap-alsa.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

8dcab62d5f3e6cb4ba4f8d1b677d94694036e4ae
diff --git a/sound/arm/omap/omap-alsa.c b/sound/arm/omap/omap-alsa.c
index 328003b..5a68471 100644
--- a/sound/arm/omap/omap-alsa.c
+++ b/sound/arm/omap/omap-alsa.c
@@ -190,7 +190,7 @@ static void audio_process_dma(struct aud
 	unsigned int dma_size;
 	unsigned int offset;
 	int ret;
-#ifdef CONFIG_MACH_OMAP_H6300
+#ifdef CONFIG_ARCH_OMAP15XX
 	unsigned long flags;
 #endif
 	
@@ -200,7 +200,13 @@ static void audio_process_dma(struct aud
 		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
+#ifdef CONFIG_ARCH_OMAP15XX
+		/*
+		 * 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).
+		 */
 		spin_lock_irqsave(&s->dma_lock, flags);
 		omap_stop_alsa_sound_dma(s);
 		spin_unlock_irqrestore(&s->dma_lock, flags);
-- 
1.2.2


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices.
  2006-05-31  0:23 [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices lamikr
@ 2006-05-31 10:54 ` Jonathan McDowell
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan McDowell @ 2006-05-31 10:54 UTC (permalink / raw)
  To: linux-omap-open-source

On Wed, May 31, 2006 at 03:23:36AM +0300, lamikr wrote:
> According to tests made by James Selvam, this patch is also needed in
> other omap1510 based devices that with iPAQ h6300.
>
> I suggest adding this patch unless someone finds out a bug in upper
> level explaining the need for stopping the dma in every round to be
> able to get the irq.

As well as the #ifdef should it not be wrapped in "if
(cpu_is_omap15xx()) {...}"?

Also I know Mark Underwood hit an issue on the Amstrad Delta where he
had to call omap_start_dma(); I don't know if this is an alternative fix
or not so I've cc'd him in case he has some input.

> >From nobody Mon Sep 17 00:00:00 2001
> From: Mika Laitio <lamikr@cc.jyu.fi>
> Date: Wed May 31 02:08:16 2006 +0300
> Subject: [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices.
> 
> Signed-off-by: lamikr <lamikr@cc.jyu.fi>
> 
> 
> ---
> 
>  sound/arm/omap/omap-alsa.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> 8dcab62d5f3e6cb4ba4f8d1b677d94694036e4ae
> diff --git a/sound/arm/omap/omap-alsa.c b/sound/arm/omap/omap-alsa.c
> index 328003b..5a68471 100644
> --- a/sound/arm/omap/omap-alsa.c
> +++ b/sound/arm/omap/omap-alsa.c
> @@ -190,7 +190,7 @@ static void audio_process_dma(struct aud
>  	unsigned int dma_size;
>  	unsigned int offset;
>  	int ret;
> -#ifdef CONFIG_MACH_OMAP_H6300
> +#ifdef CONFIG_ARCH_OMAP15XX
>  	unsigned long flags;
>  #endif
>  	
> @@ -200,7 +200,13 @@ static void audio_process_dma(struct aud
>  		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
> +#ifdef CONFIG_ARCH_OMAP15XX
> +		/*
> +		 * 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).
> +		 */
>  		spin_lock_irqsave(&s->dma_lock, flags);
>  		omap_stop_alsa_sound_dma(s);
>  		spin_unlock_irqrestore(&s->dma_lock, flags);
> -- 
> 1.2.2

J.

-- 
I don't sleep, I dream.

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

end of thread, other threads:[~2006-05-31 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31  0:23 [PATCH] omap-alsa, force the dma to receive irqs on all omap15xx based devices lamikr
2006-05-31 10:54 ` Jonathan McDowell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox