Dealing alsa defaults and a second sound card on Gentoo
My motherboard has an onboard sound card using the AC97 chipset, which not only has crappy sound quality, but also has often proven to be rather unstable on my system. As a result, I ended up installing a (very) old Sound Blaster Audigy 2 card onto my system. Unfortunately alsa, and various other applications (especially gnome-volume-control) tend to prefer to work with card 0, which in my case turns out to be the onboard audio.
In-so-much as alsa is concerned, I did some research and discovered that a file called .asoundrc
could be written whuch would allow me to reassign defaults so that the Audigy 2 card could be used as sound card 0. The code I used on my system follows.
defaults.pcm.!card Audigy2 defaults.ctl.!card Audigy2 defaults.pcm.!device 0 defaults.ctl.!device 0
To find the neccessary information about the cards (and sound card information in general, run the command aplay -l
. In order to use this fix on your computer, simply replace the sound card information in the above file with the information you find in that command. For example, the result when I run the command is <blockquote>card 1: Audigy2 [SB Audigy 2 Platinum [SB0240P]]</blockquote>. This reveals that the name of card 1 ( which I wish alsa to view as card 2) is Audigy2.
After having written this file, I was able to play sound through the proper sound card. The only thing lacking was my multimedia volume control keys still attempted to set the volume on the onboard sound - the only solution to which that I have found thus far was to remap the keys to use the amixer command. More on the post-to-be on remapping multimedia keys.