[alsa-devel] Hang in snd_pcm_writei with alsa-pulse plugin

Matthew Gregan kinetik at flim.org
Tue Nov 2 05:44:21 CET 2010


At 2010-11-02T10:43:54+0800, Raymond Yau wrote:
> No much response because there are bugs in atest2.c
> 
>   /* prefill sound buffers and begin playback */
>   fill(pcm);
> 
>   while (++count) {
> 
> The program had filled the buffer but the output does not indicate those
> write

This doesn't affect the result of the testcase.  count is only used to pause
and resume less frequently than every iteration of the write loop.

> I can confirm that the program seem hang after a few pause/unpause when
> using alsa-pulse plugin
> 
> However it assert when using hw device
> 
>   assert(bsize / psize >= 4);

The assert is present because I've only tested on systems where this
assertion holds true.  It's likely that the loop timing would need to be
changed to work correctly in other cases.

Thanks for confirming that you can reproduce the problem.  I've since
discovered that it's possible to produce the same problem with the
PulseAudio API directly, so I'll take this up on pulseaudio-discuss at .

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    kinetik at flim.org


More information about the Alsa-devel mailing list