[alsa-devel] Is there a function I can call from my ISR to tell ALSA to abort playback?

Takashi Iwai tiwai at suse.de
Thu Nov 15 12:45:17 CET 2007

At Thu, 15 Nov 2007 09:00:54 -0600,
Timur Tabi wrote:
> Jaroslav Kysela wrote:
> > Yes, call snd_pcm_stop() function. The call must be protected with 
> > snd_pcm_stream_lock... See to i2c/other/ak4117.c for an example.
> That code calls snd_pcm_stop() from a timer, not an ISR.  Do I need the call to 
> wake_up() as well?

snd_pcm_stop() can be called from ISR, too (e.g.
snd_pcm_period_elapsed() may call snd_pcm_stop() when XRUN occurs).
You only need to protect it via snd_pcm_stream_lock*().


More information about the Alsa-devel mailing list