[pulseaudio-discuss] writable_size does not increase after uncorking stream in some cases
Matthew Gregan
kinetik at flim.org
Mon Nov 1 21:54:19 PDT 2010
Hi,
I emailed alsa-devel yesterday reporting a possible deadlock in the
alsa-pulse plugin where a call to snd_pcm_writei would block forever after
pausing and then resuming with snd_pcm_pause. The original email is here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2010-November/033242.html
I've since managed to write a testcase that reproduces the same problem
using the PulseAudio client API directly. The testcase is attached. If you
can reproduce the problem, it'll eventually stop making progess and
continuously print 'wsize=3000, need >= 6000, corked=0'. The testcase may
look unusual, but I think it's an accurate minimization of the problem I
originally encountered with the alsa-pulse plugin.
It seems that corking and uncorking the stream when the writable_size is
less than minreq can result in playback not resuming after uncorking. The
testcase tries to exacerbate the problem by writing additional data to the
stream just before pausing so that writable_size is less than minreq would
be. After uncorking, is_corked returns false and writable_size never grows.
Thanks,
-mjg
--
Matthew Gregan |/
/| kinetik at flim.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptest.c
Type: text/x-csrc
Size: 5080 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20101102/2e644f52/attachment.c>
More information about the pulseaudio-discuss
mailing list