[alsa-devel] [PATCH] ad1848 ac loop

Lee Revell rlrevell at joe-job.com
Fri Sep 21 05:15:05 CEST 2007


On 9/20/07, Trent Piepho <xyzzy at speakeasy.org> wrote:
> It's also worth noting that only local interrupts are disabled, not global
> interrupts.  Absent a spin-lock, an SMP system can still have an irq
> handler run while another thread on another CPU has interupts disabled.
>
> > I am not expert on this but following your reasoning any core kernel code
> > (vm, scheduler) could not be interrupt-safe because most of interrupt handlers
> > are in drivers and the core has no idea that drivers exist.
>
> None of the variables used by drivers' interrupt handlers are modified by
> the core kernel code.  In this case, chip->playback_substream and
> chip->record_substream are the relevant variables.  They are used
> non-atomically from the irq handler, so any code which modifies them must
> be protected from the irq handler.

Most ALSA drivers would not enable the device interrupt until trigger
START, and disable them in trigger STOP.  So your interrupt should
never be enabled during open()/close().

Lee


More information about the Alsa-devel mailing list