Solving Onboard and USB Sound Card Issues in Alsa

Like I explained in my previous post, I have an Ubuntu Server playing HD audio and video using Turtle Beach USB Audio Card and Broadcom CrystalHD.

Pulseaudio worked when using VLC for some reason I did not get Dolby/DTS passthrough from XBMC. So I had to remove it as I explained in my previous post. While pulseaudio may be a better and much complex sound server, it did not work for me like most people.

After setting up everything, I had perfect 5.1 Channel Dolby Digital sound sent through a Toslink cable and decoded by my receiver. However, upon restarting, I lost sound. After research I determined that my onboard sound card was stealing the default sound card status from my USB sound card. This is how I fixed the problem.

Find what sound modules are enabled using the following command:

less /proc/asound/modules

The output may look something like this:

0 snd_hda_intel
1 snd_usb_audio

Since I do not use my onboard sound card. I wanted to disable it. This could be done through BIOS settings or by modifying ALSA configuration files. I added my onboard sound card to /etc/modprobe.d/blacklist:

sudo nano /etc/modprobe.d/blacklist

And add the onboard sound card. Use the name that you saw in the previous output:

blacklist snd_hda_intel

Then edit /etc/modprobe.d/alsa-base.conf to enable USB audio to take the default card status:

sudo nano /etc/modprobe.d/alsa-base.conf

Add the following line:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd_usb_audio

If you do not need the remaining "autoloader aliases" lines for other sound slots then comment them out. All I have is the one line mentioned above. Then change the following line:

options snd-usb-audio index=-2


#options snd-usb-audio index=-2

This allows USB sound card to take the default card status. Reboot and you should have your USB sound card as default. My XBMC audio settings are now:

DTS: Enable
Dolby: Enable
Audio: default (ALSA)
Passthrogh: default (ALSA)
Be the 1 in 200,000. Help us sustain what we do.
48 / 150 by Dec 31, 2024
Join Us (starting from just $1.67/month)


Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.