2010/11/1 Matthew Gregan kinetik@flim.org
Hi,
I've attached a simple test program that reproduces this problem reliably on my machine. It writes a period sized buffer in a loop, waiting half a period until the next attempt. Every few iterations, it pauses the sound device for half a period and then resumes it. It usually hangs within 2-3 pause/resume cycles. Running the test with "-r" enables the recovery code I mentioned above. It never hangs when tested using the hardware ALSA backend with alsa-pulse disabled, but my sound hardware doesn't seem to support snd_pcm_pause.
when increase the sleep time from half period to one period, the hang occur after around 50 pause/resume cycles.
did PA server stop sending data to the sound card immediately when your program pause ?
But cannot reproduce your problem using the "pause" function of aplay
which sound card are you using and did you change the pulseaudlo daemon.conf ?