Making Ubuntu default to using the USB sound card

The nVidia video card in my machine also gets registered as a sound card. There appears to be a high definition audio (HDA) chip on it that gets automatically detected and made default.

To get sound through my USB sound card, I’ve had to add the following to /etc/udev/rules.d/00_local.rules:

# Default to using additional (USB) sound cards when they are available.
KERNEL==”pcmC[D0-9cp]*”, ACTION==”add”, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'”
KERNEL==”pcmC[D0-9cp]*”, ACTION==”remove”, PROGRAM=”/bin/sh -c ‘echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'” 

Any new applications that launch will default to using the USB sound card.

Why can’t anything be simple?

Advertisements