It's not clear whether you're trying to get your USB sound card to work at all or if you want to start playing audio with your built-in and then switch to the USB card.

Assuming you're just trying to get your USB sound card working, you generally want snd_usb_audio under ALSA. If that doesn't help, let me know and we'll see what we can figure out._________________Gentoo Studio
Currently working on stage4 installs. Feedback wanted. See sticky in Multimedia.

Hi,
you have the choice to tell every audio application which sound card to use, according to the output of the command

Code:

aplay -l

It tell you the audio outputs you have and their respective number. For example, with Mplayer using Alsa drivers you will specify

Code:

mplayer -ao alsa:device=hw=0,0 audio-file

or

Code:

mplayer -ao alsa:device=hw=1,0 audio-file

That's a bit painfull to do that every time you want to change audio card. You can modify the file /etc/asound.conf or ~/.asoundrc to tell Alsa drivers which audio card to use by default:

Code:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

You can change the zeros for any number you want according to aplay -l, than every program who use Alsa drivers should use the card number specify unless you change it in the Preferences of the program itself.

Every audio driver you want to use need to know which sound card you want to use. With Pulseaudio sound mixer set has the default Alsa output, you can use a graphical interface, Pulse Volume Control, to choose in the Configuration tab the sound card Pulse will use. In this way, /etc/asound.conf or ~/.asoundrc can look like this:

I do not think Alsa and Pulseaudio can switch automacically from a sound card to an other without any indication by the user.

Something have to be done to change the default sound card to use when you plug and unglug the Usb sound card. The change will not be reflected during audio activity but, if I am right, only between it. That's mean you can have to restart the audio programs in use.

Maybe someone else have an HOWTO. Udev and Dbus could do it. You can have informations from the Web._________________Paul

Ability to change which output device an application plays sound through while the application is playing sound (without the application needing to support this, and indeed without even being aware that this happened)

In Lxde menu, Preferences/PulseAudio Preferences/Simultaneous Output tab, there's an option that allow to create a virtual audio device that can be use to synchronise audio output with all sounds cards._________________Paul

In Lxde menu, Preferences/PulseAudio Preferences/Simultaneous Output tab, there's an option that allow to create a virtual audio device that can be use to synchronise audio output with all sounds cards.

PulseAudio is fully scriptable via pactl. You just need to write something that moves all currently playing streams from the default device to the USB device. Then you let udev exec this (with a delay) upon plugin of the USB device. The removal should automatically be handled by PA, if you've loaded the right PA modules (should move the streams back to the fallback device when the current device disappears).

PulseAudio is fully scriptable via pactl. You just need to write something that moves all currently playing streams from the default device to the USB device. Then you let udev exec this (with a delay) upon plugin of the USB device. The removal should automatically be handled by PA, if you've loaded the right PA modules (should move the streams back to the fallback device when the current device disappears).

PulseAudio is fully scriptable via pactl. You just need to write something that moves all currently playing streams from the default device to the USB device. Then you let udev exec this (with a delay) upon plugin of the USB device. The removal should automatically be handled by PA, if you've loaded the right PA modules (should move the streams back to the fallback device when the current device disappears).