[alsa-devel] [PATCH 1/4] snd-usb-caiaq: Do not disable local interrupts

Takashi Iwai tiwai at suse.de
Mon Sep 28 10:33:35 CEST 2009


At Sat, 26 Sep 2009 17:06:23 +0100 (BST),
Mark Hills wrote:
> 
> On Fri, 25 Sep 2009, Daniel Mack wrote:
> 
> > On Fri, Sep 25, 2009 at 04:22:15PM +0100, Mark Hills wrote:
> >> The driver documentation states that local interrupts are already
> >> disabled when trigger() is called, so only a spinlock is required.
> >
> > Hmm. I assume you tested them well. But I remember to have had quite 
> > some trouble at this point on SMP machines and ended up with that 
> > irqsave code. However, if you're sure that fixes a bug or is not 
> > necessary, let's take the patches and I'll test them once I'm back home 
> > around mid Oct.
> 
> I did check both non and SMP machines, and it corresponds to the docs. I 
> also removed the patches to verify I could reproduce the original 
> problems.

The irqsave is needed for deactivate_substream() because it's called
also in your hw_free callback, which is non-atomic.
In the real case, it's hard to hit this codepath, though.

Meanwhile, activate_substream() is called only from the trigger callback,
and thus it's safe to use without irqsave version.


thanks,

Takashi


More information about the Alsa-devel mailing list