All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Koenig <mkoenig@suse.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] alsa-driver: portman2x4 code cleanup
Date: Thu, 25 Jan 2007 10:56:41 +0100	[thread overview]
Message-ID: <n7xirevsa3q.fsf@sor.suse.de> (raw)
In-Reply-To: <s5hhcugb41m.wl%tiwai@suse.de> (Takashi Iwai's message of "Wed, 24 Jan 2007 20:47:17 +0100")

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

Takashi Iwai <tiwai@suse.de> writes:
>> > Also, added cpu_relax() in busy loops, and fixed unneeded
>> > initialization of variables.
>> 
>> Ok, thanks
>> 
>> > The code is now committed to ALSA HG tree.  Please give it a try.
>> 
>> Ah, I just tested and found that the rawmidi open/close callbacks
>> have to be defined and cannot be NULL. So the driver as it is
>> will oops if device will be opened.
>> Fixed this, now tested with amidi input/output on all ports works
>> fine. Patch is below.
>
> Thanks, applied now.
>
>> > BTW, if the driver works for you, we can move this to alsa-kernel tree
>> > so that it's merged to the upstream kernel...
>> 
>> Great, yes I think it can then be moved to alsa-kernel tree.
>
> OK, I'll work on this tomorrow.

Ok, I still found another minor issue. Probably we do not need 
irqsave/irqrestore for the spinlock calls in the interrupt handler.

Matthias

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
=====================================================================
Summary: portman2x4 - do not use irqsave/irqrestore in IRQ handler

Replace spin_lock_irqsave/spin_unlock_irqrestore with
spin_lock/spin_unlock in IRQ handler.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: portman2x4-irq.patch --]
[-- Type: text/x-patch, Size: 846 bytes --]

diff -r e2ef37984418 drivers/portman2x4-kernel.c
--- a/drivers/portman2x4-kernel.c	Wed Jan 24 20:46:25 2007 +0100
+++ b/drivers/portman2x4-kernel.c	Thu Jan 25 10:44:44 2007 +0100
@@ -617,11 +617,10 @@ static void snd_portman_interrupt(int ir
 static void snd_portman_interrupt(int irq, void *userdata, struct pt_regs *regs)
 #endif
 {
-	unsigned long flags;
 	unsigned char midivalue = 0;
 	struct portman *pm = ((struct snd_card*)userdata)->private_data;
 
-	spin_lock_irqsave(&pm->reg_lock, flags);
+	spin_lock(&pm->reg_lock);
 
 	/* While any input data is waiting */
 	while ((portman_read_status(pm) & INT_REQ) == INT_REQ) {
@@ -649,7 +648,7 @@ static void snd_portman_interrupt(int ir
 
 	}
 
-	spin_unlock_irqrestore(&pm->reg_lock, flags);
+	spin_unlock(&pm->reg_lock);
 }
 
 static int __devinit snd_portman_probe_port(struct parport *p)

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

  reply	other threads:[~2007-01-25  9:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 15:28 [PATCH] alsa-driver: portman2x4 code cleanup Matthias Koenig
2007-01-24 17:00 ` Takashi Iwai
2007-01-24 19:43   ` Matthias Koenig
2007-01-24 19:47     ` Takashi Iwai
2007-01-25  9:56       ` Matthias Koenig [this message]
2007-01-25 11:57         ` Takashi Iwai
2007-01-25 12:26       ` Takashi Iwai
2007-01-26  9:22         ` Matthias Koenig

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=n7xirevsa3q.fsf@sor.suse.de \
    --to=mkoenig@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.