ALSA Multiple Sound Cards

The Problem
ALSA easily supports multiple sound devices but you need to follow specific steps to try out different configurations.

I wanted to have specific cards in specific slots so my configuration would stay the same over a reboot. But I did not want to reboot my system after I made each configuration change. The USB devices were problematic. Testing took me forever until I found all the proper steps for Gentoo. Once I discovered all the steps, configuring the usb audio options was trivial.

The Hardware

 * A motherboard based sound card that I wanted to be the ALSA default sound device at slot 0.
 * A motherboard based midi device.
 * A Logitech headset with microphone.
 * A Webcam with audio.

The Kernel Configuration
For this to work your kernel needs to have the sound subsystem configured as runtime loadable modules.

Module Configuration
For the hardware above I needed this configuration:

Edit, Configure, Test Cycle

 * Find and stop any programs that use sound


 * Edit


 * Configure


 * Test

A Script
I wrote this script to help: