public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP audio DMA changes for 310 CPUs
@ 2006-08-18  8:20 andrzej zaborowski
  2006-08-18 17:07 ` lamikr
  0 siblings, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2006-08-18  8:20 UTC (permalink / raw)
  To: Linux-OMAP

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

Avoid restarting McBSP hardware after every DMA transfer to OMAP audio
devices on OMAP310, restart only DMA. Also avoid trying to link DMA
channels together as this feature isn't supported on 310 processors.
Apply on top of "[PATCH 1/5] Change all omap15xx devices to use
similar DMA handling than h6300 uses".

Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>

[-- Attachment #2: linux-omap310-audio.patch --]
[-- Type: application/octet-stream, Size: 1644 bytes --]

diff -pNaur -X b/Documentation/dontdiff a/sound/arm/omap/omap-alsa-dma.c b/sound/arm/omap/omap-alsa-dma.c
--- a/sound/arm/omap/omap-alsa-dma.c	2006-03-22 17:45:13.000000000 +0000
+++ b/sound/arm/omap/omap-alsa-dma.c	2006-08-18 00:01:23.000000000 +0000
@@ -200,7 +200,7 @@ int omap_request_alsa_sound_dma(int devi
 	}
 
 	/* Chain the channels together */
-	if (!cpu_is_omap1510())
+	if (!cpu_is_omap15xx())
 		omap_sound_dma_link_lch(data);
 
 	spin_unlock(&dma_list_lock);
@@ -251,7 +251,7 @@ int omap_free_alsa_sound_dma(void *data,
 	}
 	chan = (*channels);
 
-	if (!cpu_is_omap1510())
+	if (!cpu_is_omap15xx())
 		omap_sound_dma_unlink_lch(data);
 	for (i = 0; i < nr_linked_channels; i++) {
 		int cur_chan = chan[i];
@@ -349,7 +349,8 @@ static int audio_start_dma_chain(struct 
 		omap_start_dma(channel);
 		s->started = 1;
 		s->hw_start();	   /* start McBSP interface */
-	}
+	} else if (cpu_is_omap310())
+		omap_start_dma(channel);
 	/* else the dma itself will progress forward with out our help */
 	FN_OUT(0);
 	return 0;
diff -pNaur -X b/Documentation/dontdiff a/sound/arm/omap/omap-alsa.c b/sound/arm/omap/omap-alsa.c
--- a/sound/arm/omap/omap-alsa.c	2006-08-18 10:05:56.000000000 +0000
+++ b/sound/arm/omap/omap-alsa.c	2006-08-18 10:06:58.000000000 +0000
@@ -204,7 +204,7 @@ static void audio_process_dma(struct aud
 		 * irq from DMA after the first transfered/played buffer.
 		 * (invocation of callback_omap_alsa_sound_dma() method).
 		 */
-		if (cpu_is_omap15xx()) {
+		if (cpu_is_omap1510()) {
 			spin_lock_irqsave(&s->dma_lock, flags);
 			omap_stop_alsa_sound_dma(s);
 			spin_unlock_irqrestore(&s->dma_lock, flags);

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



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

* Re: [PATCH] OMAP audio DMA changes for 310 CPUs
  2006-08-18  8:20 [PATCH] OMAP audio DMA changes for 310 CPUs andrzej zaborowski
@ 2006-08-18 17:07 ` lamikr
  2006-08-19  0:12   ` andrzej zaborowski
  2006-09-12  9:53   ` andrzej zaborowski
  0 siblings, 2 replies; 5+ messages in thread
From: lamikr @ 2006-08-18 17:07 UTC (permalink / raw)
  To: balrogg; +Cc: Linux-OMAP

Hi andrzej

I have couple of questions from your patch.
Your patch has couple of these changes where cpu_is_omap1510() has been
changed to cpu_is_omap15xx().
    -    if (!cpu_is_omap1510())
    +    if (!cpu_is_omap15xx())

Do they affect to the sound in omap 310? (I mean is cpu_is_omap15xx()
true for your omap310)
Or is following the only relevant omap310 specific change

    +    } else if (cpu_is_omap310())
    +        omap_start_dma(channel);

Btw, your patch will not apply on top of all 5 patches I sent.
Could you perhaps re-send it one more time? (I need also test whether
your changes could work with omap1510/h6300)

Mika

andrzej zaborowski wrote:
> Avoid restarting McBSP hardware after every DMA transfer to OMAP audio
> devices on OMAP310, restart only DMA. Also avoid trying to link DMA
> channels together as this feature isn't supported on 310 processors.
> Apply on top of "[PATCH 1/5] Change all omap15xx devices to use
> similar DMA handling than h6300 uses".
>
> Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>   

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

* Re: [PATCH] OMAP audio DMA changes for 310 CPUs
  2006-08-18 17:07 ` lamikr
@ 2006-08-19  0:12   ` andrzej zaborowski
  2006-09-12  9:53   ` andrzej zaborowski
  1 sibling, 0 replies; 5+ messages in thread
From: andrzej zaborowski @ 2006-08-19  0:12 UTC (permalink / raw)
  To: lamikr; +Cc: Linux-OMAP

Hi,

On 18/08/06, lamikr <lamikr@cc.jyu.fi> wrote:
> Hi andrzej
>
> I have couple of questions from your patch.
> Your patch has couple of these changes where cpu_is_omap1510() has been
> changed to cpu_is_omap15xx().
>     -    if (!cpu_is_omap1510())
>     +    if (!cpu_is_omap15xx())
>
> Do they affect to the sound in omap 310? (I mean is cpu_is_omap15xx()
> true for your omap310)

Yes, from what I've seen cpu_is_omap15xx() is always cpu_is_omap1510()
|| cpu_is_omap310() and it makes sense because the processors are
mostly compatible (with little exceptions). Similarly
CONFIG_ARCH_OMAP15XX.

> Or is following the only relevant omap310 specific change
>
>     +    } else if (cpu_is_omap310())
>     +        omap_start_dma(channel);
>
> Btw, your patch will not apply on top of all 5 patches I sent.

Oops. I will resend. (but can't do it now)

> Could you perhaps re-send it one more time? (I need also test whether
> your changes could work with omap1510/h6300)

They shouldn't affect omap1510.

>
> Mika
>
> andrzej zaborowski wrote:
> > Avoid restarting McBSP hardware after every DMA transfer to OMAP audio
> > devices on OMAP310, restart only DMA. Also avoid trying to link DMA
> > channels together as this feature isn't supported on 310 processors.
> > Apply on top of "[PATCH 1/5] Change all omap15xx devices to use
> > similar DMA handling than h6300 uses".
> >
> > Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linux-omap-open-source mailing list
> > Linux-omap-open-source@linux.omap.com
> > http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >
>
>


-- 
balrog 2oo6

Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258

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

* Re: [PATCH] OMAP audio DMA changes for 310 CPUs
  2006-08-18 17:07 ` lamikr
  2006-08-19  0:12   ` andrzej zaborowski
@ 2006-09-12  9:53   ` andrzej zaborowski
  2006-09-12 12:05     ` Tony Lindgren
  1 sibling, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2006-09-12  9:53 UTC (permalink / raw)
  To: lamikr; +Cc: Linux-OMAP

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

On 18/08/06, lamikr <lamikr@cc.jyu.fi> wrote:
> Hi andrzej
>
> I have couple of questions from your patch.
> Your patch has couple of these changes where cpu_is_omap1510() has been
> changed to cpu_is_omap15xx().
>     -    if (!cpu_is_omap1510())
>     +    if (!cpu_is_omap15xx())
>
> Do they affect to the sound in omap 310? (I mean is cpu_is_omap15xx()
> true for your omap310)
> Or is following the only relevant omap310 specific change
>
>     +    } else if (cpu_is_omap310())
>     +        omap_start_dma(channel);
>
> Btw, your patch will not apply on top of all 5 patches I sent.
> Could you perhaps re-send it one more time? (I need also test whether
> your changes could work with omap1510/h6300)

Ok, this one applies on top of the five alsa patches. Sorry for the delay.

>
> Mika
>
> andrzej zaborowski wrote:
> > Avoid restarting McBSP hardware after every DMA transfer to OMAP audio
> > devices on OMAP310, restart only DMA. Also avoid trying to link DMA
> > channels together as this feature isn't supported on 310 processors.
> > Apply on top of "[PATCH 1/5] Change all omap15xx devices to use
> > similar DMA handling than h6300 uses".
> >
> > Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linux-omap-open-source mailing list
> > Linux-omap-open-source@linux.omap.com
> > http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >
>
>


-- 
balrog 2oo6

[-- Attachment #2: linux-omap310-audio.patch --]
[-- Type: application/octet-stream, Size: 1392 bytes --]

diff --git a/sound/arm/omap/omap-alsa-dma.c b/sound/arm/omap/omap-alsa-dma.c
--- a/sound/arm/omap/omap-alsa-dma.c
+++ b/sound/arm/omap/omap-alsa-dma.c
@@ -200,7 +200,7 @@ int omap_request_alsa_sound_dma(int devi
 	}
 
 	/* Chain the channels together */
-	if (!cpu_is_omap1510())
+	if (!cpu_is_omap15xx())
 		omap_sound_dma_link_lch(data);
 
 	spin_unlock(&dma_list_lock);
@@ -251,7 +251,7 @@ int omap_free_alsa_sound_dma(void *data,
 	}
 	chan = (*channels);
 
-	if (!cpu_is_omap1510())
+	if (!cpu_is_omap15xx())
 		omap_sound_dma_unlink_lch(data);
 	for (i = 0; i < nr_linked_channels; i++) {
 		int cur_chan = chan[i];
@@ -349,7 +349,8 @@ static int audio_start_dma_chain(struct 
 		omap_start_dma(channel);
 		s->started = 1;
 		s->hw_start();	   /* start McBSP interface */
-	}
+	} else if (cpu_is_omap310())
+		omap_start_dma(channel);
 	/* else the dma itself will progress forward with out our help */
 	FN_OUT(0);
 	return 0;
diff --git a/sound/arm/omap/omap-alsa.c b/sound/arm/omap/omap-alsa.c
--- a/sound/arm/omap/omap-alsa.c
+++ b/sound/arm/omap/omap-alsa.c
@@ -203,7 +203,7 @@ static void audio_process_dma(struct aud
 		 * irq from DMA after the first transfered/played buffer.
 		 * (invocation of callback_omap_alsa_sound_dma() method).
 		 */
-		if (cpu_is_omap15xx()) {
+		if (cpu_is_omap1510()) {
 			omap_stop_alsa_sound_dma(s);
 		}
 		ret = omap_start_alsa_sound_dma(s,

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



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

* Re: [PATCH] OMAP audio DMA changes for 310 CPUs
  2006-09-12  9:53   ` andrzej zaborowski
@ 2006-09-12 12:05     ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2006-09-12 12:05 UTC (permalink / raw)
  To: balrogg; +Cc: Linux-OMAP

* andrzej zaborowski <balrog@zabor.org> [060912 12:54]:
> On 18/08/06, lamikr <lamikr@cc.jyu.fi> wrote:
> >Hi andrzej
> >
> >I have couple of questions from your patch.
> >Your patch has couple of these changes where cpu_is_omap1510() has been
> >changed to cpu_is_omap15xx().
> >    -    if (!cpu_is_omap1510())
> >    +    if (!cpu_is_omap15xx())
> >
> >Do they affect to the sound in omap 310? (I mean is cpu_is_omap15xx()
> >true for your omap310)
> >Or is following the only relevant omap310 specific change
> >
> >    +    } else if (cpu_is_omap310())
> >    +        omap_start_dma(channel);
> >
> >Btw, your patch will not apply on top of all 5 patches I sent.
> >Could you perhaps re-send it one more time? (I need also test whether
> >your changes could work with omap1510/h6300)
> 
> Ok, this one applies on top of the five alsa patches. Sorry for the delay.

Pushing this today.

Tony

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

end of thread, other threads:[~2006-09-12 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-18  8:20 [PATCH] OMAP audio DMA changes for 310 CPUs andrzej zaborowski
2006-08-18 17:07 ` lamikr
2006-08-19  0:12   ` andrzej zaborowski
2006-09-12  9:53   ` andrzej zaborowski
2006-09-12 12:05     ` Tony Lindgren

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