As of the last couple of releases, popular Linux distro Ubuntu has switched the default sound system for the desktop to the PulsAaudio Sound Server. PulseAudio offers the promise of unified, abstracted access to a computer's sound capabilities, and from that standpoint it is a huge advance over previous solutions. However, the move to PulseAudio has been accompanied by a huge amount of frustration by end users with compatibility problems, crashes, and various conflicts with onboard sound, USB sound, and Adobe Flash and AIR.
Recently, I have experienced a number of these issues myself. (See the related posts for background on my transition to using Ubuntu on my desktop). In November I installed Ubuntu 8.10, and I have had some sound issues ever since. In the last few days, I have spent some time debugging these issues on my system, and I wanted to share my challenges and solutions.
Sound Hardware
I have two separate sound systems - onboard sound on my motherboard and a Bose Companion 3 USB sound system. For this type of configuration, the sound troubleshooting guides I have read recommend deactivating the onboard sound and using USB sound only.I tried that for awhile, but I had an issue. The Bose system has a microphone jack on the volume control, but Ubuntu seems not to see it, it only sees the output device. I need a microphone, so I enabled the onboard sound for that purpose. I have a headset/mic combo attached to the onboard sound system.
Skype
If you work remotely or travel on a regular basis like me, Skpe is a great solution for keeping in touch with people. It offers chat, voice over IP (VOIP) telephony, even video-conferencing. The latest Ubuntu client for Skype works reasonably well, but it tends to seize control of the pulseaudio process and eliminate sound for all other applications. My solution to the problem is to enable onboard sound (by removing any /etc/modprobe.d/blacklist entries and enabling the onboard sound in BIOS), assign USB sound to the first sound source in ALSA:
/etc/modprobe.d/alsa-base
install sound-slot-0 /sbin/modprobe snd_usb_audio
and setting USB sound as the default output sink in pulseaudio:
/etc/pulse/default.pa
.nofail
set-default-sink alsa_output.usb_device_5a7_1020_noserial_if0_sound_card_0_alsa_playback_0
Note that your exact settings will depend on your particular hardware.
After that, in Skype -> Options -> Sounds Devices I set my onboard sound hardware (mine is defined as HDA NVidia (hw:NVidia,0)) as the device for Sound In, Sound Out, and Ringing. The ring will sound in my headset, but that's OK for now. Maybe I'll get one of those Skype phone sets from eBay. This solution works fine and it is the only solution I have found for my system that gets Skype working without taking over the pulseaudio system.
Amarok
I use Amarok for my music library. I have Amarok configured to use the xine engine in Settings -> configure Amarok -> Engine. This setup works well, though I had to experiment with the settings for PulseAudio (making USB sound the default output sink) to get it to default to USB sound.
Adobe Flash/AIR
I do a lot of development with Adobe tools - ColdFusion and Flex in particular. I use YouTube, etc., so sound support for Flash tends to be important for me. As of right now, I have no sound support in Flash. I have installed the latest Flash 10 plugin (10.0.22.87) from Adobe and followed lots of recommendations from various guides about configuring PulseAudio and troubleshooting Flash sound problems. My best guess right now is that activating the onboard sound has caused a problem with Flash sound support. Since I need Skype more than I need YouTube, I'll be keeping my current configuration for now, but it would be great if Flash could use the PulseAudio system without any problems.
Even when Flash sound support was working (with a previous Flash plugin), sometimes Flash would have trouble after playing a video, and at that point PulseAudio would lose the USB sound device completely. Killing Firefox (and any AIR applications like Twhirl) and restarting pulseaudio (pulseaudio-k; pulseaudio -D) enabled PulseAudio to find the USB device again.
Miscellaneous Settings
Here are a few things I have set according to the varous guides:
/etc/asound.conf
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
~/.asoundrc:
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:0,0"
}
capture.pcm {
type plug
slave.pcm "hw:0,0"
}
}
I am not 100% sure exactly how all of these settings interact with each other, but it seems for the most part to be a successful setup. Based on the number of reported issues I have seen with Flash sound support, I am going to wait until Ubuntu 9.04 is released in April to see if the problems are resolved.
Ubuntu continues to improve as a desktop OS, but from these experiences, you can see it still has a ways to go to be considered as an easy alternative to OS X or Windows (although the huge number of issues with Vista has certainly provided Ubuntu an opportunity to show its capabilities).
Don't let my experiences discourage you from using Ubuntu. You can run the Ubuntu LiveCD and give Ubuntu a try on your hardware without actually having to wipe out your current OS. If you are seriously considering switching, my advice for now is to either buy a new computer that comes pre-installed with Ubuntu or do your homework and install Ubuntu with supported hardware.