[alsa-devel] alsa-utils aplay/arecord can't be interrupted when streaming is not active
perex at perex.cz
Wed Apr 16 10:06:11 CEST 2014
Date 16.4.2014 09:54, jiwang wrote:
> Hi All
> With latest 126.96.36.199 alsa-utils, I am facing problem to interrupt
> when the streaming is not active (no data can be written to or read from
> further more, if I start aplay/arecord with "-N" nonblocking option,
> then aplay/arecord can never exit, unless I do a system reset
If I/O stalls it's usually problem in the driver. You don't write any
information about your configuration - post 'aplay -v' to see more.
You may kill the process using the SIGABRT signal.. No reboot is required.
> I found if I revert the following patch
> /commit 1d0042d7e948815f8015c62bc53143eed3b83206//
> //Author: Jaroslav Kysela <perex at perex.cz>//
> //Date: Mon Apr 8 13:30:54 2013 +0200//
> // aplay/arecord: change the interrupt handling using snd_pcm_abort()//
> // //
> // It is required (exclude the fatal SIGABRT) to call snd_pcm_close()
> // the end of work (outside of the interrupt handler). Use new
> // function to inform alsa-lib to not ignore EINTR and move the
> // variable to the global scope to be checked in the i/o loops.//
> // //
> // Signed-off-by: Jaroslav Kysela <perex at perex.cz>//
> then aplay/arecord can be interrupted correctly
> Is it a defect in aplay.c or did I miss something?
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.
More information about the Alsa-devel