PulseAudio/alsa_plugins bugs without Wine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/04/2012 05:11 PM, Joerg-Cyril.Hoehle at t-systems.com wrote:
> a) Ubuntu Lucid never enters XRUN state like hw:0 or dmix do, given the same
> parameters. I've been using stop_threshold = alsa_buffer_size.
> The older Ubuntu Intrepid worked better.
> (one PA bug report says sw_params are unsupported except for start_threshold?)

I can answer to this one. In Intrepid we had a bug related to "obsoleted 
underruns" caused by the asynchronous nature of PulseAudio. Basically, 
the application started the playback first and filled the buffer 
immediately after. PulseAudio took the commands in order, first started 
playback, noticed that the buffer was empty and sent an underrun message 
back. The application, once it received the underrun message later on, 
naturally deduced that the written buffer had been played back completely.

So around Lucid, we changed the behaviour to never report an underrun, 
which made that application work. But, other applications depended on 
the XRUN information, just as you have discovered. So in Oneiric (and 
PulseAudio 1.0), the protocol has been extended to include the index 
where the underrun occurred, and only signal XRUN back to the 
application when the application has not written more data (that will 
automatically resolve the underrun).

I think the behaviour in Oneiric is the best so far.

> b) After snd_pcm_pause, avail_update suddenly returns results doubled, i.e.
> as if the buffer size had doubled.
>
> c) After an underrun and a sequence of snd_pcm_recover/drop/reset/prepare,
> avail_update initially returns alsa_buffer_size.
> So far so good, but as soon as I start writing, avail_update grows beyond buffer_size
> and produces values that continue the growth from before the underrun, as if
> no reset/recover ever took place. avail then grows way beyond buffer size.

I also made a fix or two to that handling a while back (the code in 
there is a little crazy to get right, with queue indices on top of a 
phantom ring buffer on top of queue indices again!), but maybe there is 
still some bug left as I haven't specifically tested that in combination 
with underruns...

> Now the question is, how can the situation improve?

Well, speaking in Ubuntu terms, I guess now is the right time to start 
fixing bugs for 12.04, so thanks for reporting! Now, I wish I could 
promise time to start digging deep and fixing the stuff as well :-/

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux