public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: lamikr <lamikr@cc.jyu.fi>
To: OMAP-Linux <linux-omap-open-source@linux.omap.com>
Subject: [PATCH 1/5] Change all omap15xx devices to use similar DMA handling than h6300 uses.
Date: Fri, 18 Aug 2006 04:14:35 +0300	[thread overview]
Message-ID: <44E5147B.3020006@cc.jyu.fi> (raw)

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

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

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



[-- Attachment #2: 0001-change-all-omap15xx-devices-to-use-similar-DMA-handling-that-h6300-uses.patch --]
[-- Type: text/x-patch, Size: 1969 bytes --]

From: Mika Laitio <lamikr@cc.jyu.fi>
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

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

---
 sound/arm/omap/omap-alsa.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/sound/arm/omap/omap-alsa.c b/sound/arm/omap/omap-alsa.c
index 328003b..583460c 100644
--- a/sound/arm/omap/omap-alsa.c
+++ b/sound/arm/omap/omap-alsa.c
@@ -190,9 +190,7 @@ static void audio_process_dma(struct aud
 	unsigned 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",
-- 
1.4.2


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



             reply	other threads:[~2006-08-18  1:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18  1:14 lamikr [this message]
2006-08-18  7:55 ` [PATCH 1/5] Change all omap15xx devices to use similar DMA handling than h6300 uses andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44E5147B.3020006@cc.jyu.fi \
    --to=lamikr@cc.jyu.fi \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox