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

Jaroslav Kysela perex at perex.cz
Thu Nov 15 09:34:05 CET 2007


On Wed, 14 Nov 2007, Timur Tabi wrote:

> In my ISR, I call snd_pcm_period_elapsed() to tell it that a period has 
> elapsed.
>   I can also detect if playback has aborted for some reason (e.g. DMA 
> controller has died).  Is there a function I can call in my ISR to tell 
> ALSA to abort playback or capture?

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.

						Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project


More information about the Alsa-devel mailing list