Pulseaudio suc– wait, it works??

The other day, I wiped the media PC which was running Windows 7 and installed Ubuntu 10.10. I was tired of everything “just working” and not having to screw around with anything just to watch a Flash video or 1080p movies.

I went with the AMD64 release because I feel like less of a man running a 32-bit OS on 64-bit hardware. Unlike when you put 64-bit Windows on a box, with Linux typically this means your entire userland is 64-bit — all applications including, notably, the web browser. This wouldn’t be a problem except for the Adobe Flash plugin. There is now a 64-bit ‘preview’…again…since it obviously takes close to a decade to get it ready for release. This actually works decently until you try to watch video full-screen. Luxury, right? Wait what’s this?? There’s a 10.2 release candidate! Oh, gee, they only support 32-bit Linux. There’s a shocker.

The irony here is that the 32-bit release-candidate plugin runs faster with nspluginwrapper than the ‘native’ 64-bit plugin. Can actually watch videos fullscreen, etc, mostly glitch free.

But I digress. The biggest change for me since the last time I use plain ol’ Debian unstable on the media PC is that Ubuntu has switched to Pulseaudio as its default audio framework. The last time I encountered this, it couldn’t even play MP3s without weird pauses, static, skipping, and high latency. There were still things to contend with for me here, today, but it’s a lot better than the last time.

  • Glitchy audio, latency, etc. This is pretty much gone. The login sound stuttered all over the place, but I disable that anyway and everything else works well. Simultaneous MP3 player, flash, and VLC works nicely.
  • IEC958 output works. GIANT CAVEAT: for stereo output. This is still a huge improvement from before, when I was unable to get it to work at all without resorting to ALSA directly.
  • VLC/mplayer ac3/dts passthrough…sorta works. I’ve switched to VLC for my media player and it works with audio output set to ALSA, “Use S/PDIF when available” is checked, and the default non-IEC958 device is selected. It automagically sends ac3/dts unmodified if there is no other sound application using Pulseaudio. Otherwise, it degrades to stereo and plays fine that way. More on this behavior later.
  • Mixing multiple apps is trouble free. This is sort of “the point” to Pulseaudio. ALSA can do this too but Pulseaudio is apparently more flexible. For example, applications that support it receive individual volume controls.
  • Configuring sound cards is no longer black magic…if it actually worked right for me. It shows me all the outputs and speaker configurations my card supports, but none aside from stereo and possibly 4.0 surround worked properly. This will be fantastic once it becomes more mature. ALSA can be very unfriendly if the default settings do not work for you.

The marriage of ALSA and Pulseaudio seems a lot more harmonious than it was before. ALSA is still your bare-metal interface to the sound card. However, by default in Ubuntu 10.10 it is tied to the Pulseaudio daemons. The applications all send their sound to the daemon which does its thing, including mixing if necessary, before sending it onto ALSA where it hopefully becomes the expected sound from your speakers. Selecting ALSA as an output option in programs which support it, such as VLC and Audacious, no longer results in a message stating that the sound device could not be opened (except for the passthrough note above) and it gets routed through Pulseaudio anyway.

It’s not perfect. Would I prefer straight ALSA? At this point, probably…but I’m used to dealing with it. For a regular user I believe this new configuration is much nicer for most applications, particularly for plain ol’ users that don’t want to dig around on the command line to get sound to work the way that they want. I plan to leave it in place on the media PC and see how it progresses. I look forward to the day when surround sound works properly on my setup — as I only use the S/PDIF for output this is lower priority for me. I’m less optimistic about the ac3/dts passthrough…but who knows? The rest of my machines running straight Debian will continue to use ALSA for the foreseeable future but I was pleasantly surprised with Pulseaudio this time around on Ubuntu.

As an aside, in the course of trying to get passthrough to work I did consider getting rid of Pulseaudio. Here is the most concise, least intrusive guide I could find to disabling it instead of removing it: https://help.ubuntu.com/community/UbuntuStudioPreparation#Disabling%20PulseAudio

February 1, 2011 В· agw В· No Comments
Tags: , , ,  В· Posted in: Linux

Leave a Reply