All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Giuliano Pochini <pochini@shiny.it>,
	Alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: echoaudio.c, Revision 1.6
Date: Mon, 14 Mar 2005 18:30:13 +0100	[thread overview]
Message-ID: <s5hhdjerv8a.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.HPX.4.33n.0503140909500.15356-100000@studcom.urz.uni-halle.de>

At Mon, 14 Mar 2005 09:19:28 +0100 (MET),
Clemens Ladisch wrote:
> 
> Giuliano Pochini wrote:
> > I'm a bit confused about the latest changes to pci/echoaudio/echoaudio.c
> >
> > The CVS interface says: "Use spin_lock_irqsave() instead of spin_lock() in
> > places where we could be interrupted by another hardware interrupt that
> > could call the rawmidi trigger callback that could try to take the same
> > lock."
> >
> > But in snd_echo_interrupt() we are running in hard irq context, so we know
> > irqs are already disabled.
> 
> Only the sound card interrupt itself is disabled.  It is architecture-
> specific whether other interrupts are disabled.
> 
> > Then: "Additionally, remove locking code that is no longer needed now that
> > the trigger callback is no longer called recursively from the rawmidi
> > "event" handler."
> >
> > Your patch does not remove anything.
> 
> It removed code in some other files.
> 
> > It only replaces spin_lock() in pcm_trigger() which is a stupid
> > bug of mine, sorry.
> 
> I think this wasn't a bug because the trigger callback is already
> called with interrupts disabled, AFAICS.  I'm planning to revert most
> of these locking changes when I've proven that it's safe.

I fixed snd_pcm_suspend*() functions to do in irq disabled.
So, all calls of trigger and pointer callbacks are atomic now.


Takashi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  reply	other threads:[~2005-03-14 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12 11:32 echoaudio.c, Revision 1.6 Giuliano Pochini
2005-03-14  8:19 ` Clemens Ladisch
2005-03-14 17:30   ` Takashi Iwai [this message]
2005-03-15 21:33   ` Giuliano Pochini
2005-03-16  8:20     ` Clemens Ladisch
2005-03-19 18:31       ` Giuliano Pochini
2005-03-21  8:33         ` Clemens Ladisch

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=s5hhdjerv8a.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=pochini@shiny.it \
    /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.