On 02/17/2012 08:05 PM, Joerg-Cyril.Hoehle at t-systems.com wrote: > David Henningsson wrote: > >> For the record, I received some test code from Joerg a few weeks ago, >> and tested it on Ubuntu 12.04 (based on PulseAudio 1.1 + my jack >> detection), and I was unable to find something as serious as the >> buffer_size and avail values going havoc. > > Please keep in mind that out of range avail values was just one of my > gripes. Equally important is to observe the dynamic changes of these values: > > - snd_pcm_delay is amenable to a speaker position. As such, it should > change very regularly. However, on my Ubuntu PA system, it > sometimes purely and simply stops for as long as 200ms! > (without intervening underrun) Hmm, I can't tell off the top of my head if this is okay or not. But if 200 ms is less than the period size, I *think* that there is ALSA hardware out that would react the same, and the application should be able to cope with it. > The deltas in snd_pcm_delay do not correlate with elapsed time. > > - snd_pcm_avail also changes in a bizarre way. > > >> IIRC, Joerg uses an older version of PulseAudio. > Ubuntu Intrepid and Ubuntu Lucid. > > I was glad to hear from David that he could not observe the bad > behaviour that I mention on his machine with the latest PA/alsa_plugins. > > > However, I don't know what to tell users of the old Ubuntu systems, > some of which use the long term support (LTS) distributions. My > experiments with PA on those old systems make me wonder how it can > manage to play anything or why even speaker-test works. > > The behaviour of avail and delay is so irregular and non predictable > that I simply don't know how to write code for Wine that would > reliably allow to play a simple continuous tone. I simply don't > understand why some apps on my Ubuntu systems appear to play > audio nicely for a few hours when I can't for a few seconds. > Note that MS's mmdevapi wants to write data every 10ms. It's not the > "write 2s and be done" style which old PA seems to prefer. > In random cases, PA will report an underrun shortly after the initial > write. snd_pcm_recover gets called and I can hear an audible pause. > > So what am I going to tell the users of such systems? > > David, not me, is from Canonical, what are you going to tell LTS users? First; I'm not in a position to give "official Canonical statements", so this is not such a statement, and second, wine is in "universe", i e, it's not even officially supported. (PulseAudio and alsa-plugins are officially supported though.) However, what I've learned from experience, is that if you want to make a real difference, you should test, report and fix things *before* they are released. When I started off as a user, I was upset by bugs that I found in stable software and I didn't want to wait for the next release to have them fixed. But now I'm on the other side of the fence, and I know how difficult it is to to ensure that what looks like an obvious fix to one person, won't regress behaviour on another machine. And what's even more upsetting than a bug? A bug that suddenly appears with your daily updates. Given that experience, I've learned that it's more effective to change and fix things while they are still in development. It's less administration and more content, essentially. As for Ubuntu 12.04, it has just passed Feature Freeze, which means that now is the optimal time to test, report, and fix bugs in it. For PulseAudio, I'm waiting for that 2.0 release plan that Arun talked about on IRC the other day ;-) So, at the moment you seem to have more time to do in-depth analysis of this than I do, and so I encourage you to try Ubuntu 12.04. I encourage you to try PulseAudio's git head as well. Should you want to work with trying to fix bugs in stable releases of Ubuntu and/or PulseAudio, that's encouraged as well, of course. Here are relevant links to get you started: Trying PulseAudio's git head: http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/ Trying Ubuntu 12.04: https://wiki.ubuntu.com/PrecisePangolin/TechnicalOverview/Alpha2 Process for fixing bugs in a stable release of Ubuntu: https://wiki.ubuntu.com/StableReleaseUpdates -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic