If you have multiple soundcards in your system and have to switch between them regularly (e.g. laptop owners like me, who use an external soundcard while being docked to groove to the highest and the lowest of frequencies through those 7.1 channels and use the in-built sound card while on the move) you would definitely be under-whelmed by the less-than-stellar performance of ubuntu in switching between the sound cards. For me at least, ubuntu (fiesty 7.04 amd64) never seems to recognize that I’ve connected the speakers to my Audigy 2 ZS Notebook PCMCIA card, and merrily continues to huff-puff through the tinny laptop speakers until I manually go into the sound preferences, switch over to multichannel playback and vice versa. Well, I still haven’t found an automated solution for the switching, but here is a little cli-magic to do this in a click.
If you have alsa on ur system, just use the command “asoundconf list” first to list out all the soundcards connected to your system. e.g. on my system, the output is
Here, IXP is my internal sound card and AUDIGY2 is my external (PCMCIA) sound card. Now, all you need to is use “asoundconf set-default-card
script 1 - setixp.sh
asoundconf set-default-card IXP
Similarly, script 2 - setaudigy.sh
asoundconf set-default-card AUDIGY2
Now, all that remains is save the two scripts (maybe in ur home directory or ur desktop), and make them executable (use “chmod +x