I’ve got a pc with two sound cards, the onboard sound, and a Sound Blaster Live Value I’ve had for a while. I use the Sound Blaster as I’ve never been able to get the onboard sound working in Ubuntu. For some reason or other, I managed to mess up the default sound card on my install of Ubuntu Karmic. Sound would work for most apps, but wouldn’t work for Flash (such as Youtube). Most of the apps were going through PulseAudio, and working fine. Flash however was still using Alsa directly and was using the wrong sound card by default, hence no sound.
So, I set about trying to fix the issue, but it quickly became apparent that it wasn’t an easy fix. There used to be an app called “asound” which would let you configure this sort of thing. But since Karmic it has been dropped from the repo’s! So I found a different way of fixing the issue.
You’ll need a terminal window open.
Find out what your default sound card is. You can simply do this by firing up alsamixer. The card that shows upon opening it is your default sound card for Alsa.
Next list the names of your sound cards. It should show two cards, and their “index”. The one with index 0 is your default one. In my case it was “snd_hda_intel”
Take note of the name of the card you don’t want to be the default. As mentioned mine was “snd_hda_intel”. You then need to open up the Alsa base configuration file.
sudo gedit /etc/modprobe.d/alsa-base.conf
Look for the line “# Prevent abnormal drivers from grabbing index 0″, then above it you want to put the following…
options snd_hda_intel index=1
In the above line I’ve set the currently default card (the one I don’t want as the default) to an index of 1. This will force the other card to become index 0 and hence the default.
Reboot, and all should be fixed. To check you can “sudo alsamixer” and see which card comes up.