[alsa-devel] [PATCH 1/2] ALSA: pcm: Allow nonatomic trigger operations

Jarkko Nikula jarkko.nikula at linux.intel.com
Tue Sep 2 14:27:47 CEST 2014


On 09/01/2014 03:00 PM, Takashi Iwai wrote:
> Currently, many PCM operations are performed in a critical section
> protected by spinlock, typically the trigger and pointer callbacks are
> assumed to be atomic.  This is basically because some trigger action
> (e.g. PCM stop after drain or xrun) is done in the interrupt handler.
> If a driver runs in a threaded irq, however, this doesn't have to be
> atomic.  And many devices want to handle trigger in a non-atomic
> context due to lengthy communications.
>
> This patch tries all PCM calls operational in non-atomic context.
> What it does is very simple: replaces the substream spinlock with the
> corresponding substream mutex when pcm->nonatomic flag is set.  The
> driver that wants to use the non-atomic PCM ops just needs to set the
> flag and keep the reset as is.  (Of course, it must not handle any PCM
>
I guess "s/reset/rest/"?

-- 
Jarkko


More information about the Alsa-devel mailing list