SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-10-08 22:52:20

nolatux
#! Member
From: New Orleans, LA
Registered: 2010-09-11
Posts: 79

How to Assign USB Audio as primary sound device in ALSA

This is for anyone that has a fried sound card (like me) in their laptop. Instead of replacing the motherboard or tossing your old laptop in the trash, get a pair of USB speakers and follow this procedure:

(This procedure will get sound going without the need of installing pulse audio)

1) Backup the file /etc/modprobe.d/alsa-base.conf

Note: Original alsa-base.conf:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

Add:

# Assign USB Audio as default sound card
options snd_usb_audio index=-1

Delete these last TWO lines in the file:

# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

New file should look like this:

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }

# Assign USB Audio as default sound card
options snd_usb_audio index=-1

# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2

NOTE 1: If a sound card is not found by ALSA... ALSA config will not make USB the default sound card, so this tells method tells ALSA, USB audio is what you want it to use.

NOTE 2: PCM still needs to be checked in the Alsa Mixer.

NOTE 3: The volume icon will now show up in Tint2 (needs to be unmuted) - reboot may be required.

NOTE 4: The spelling of the word "beeing", it's a typo by the original coder.

Last edited by nolatux (2010-10-09 02:08:19)


Currently running "Statler" - Openbox edition.

Offline

Be excellent to each other!

#2 2010-10-20 13:11:09

Bagfields
New Member
Registered: 2010-03-23
Posts: 2

Re: How to Assign USB Audio as primary sound device in ALSA

This post describes a simpler way:
http://ubuntuforums.org/showpost.php?p= … ostcount=2

Offline

#3 2011-12-16 14:04:38

scyntl
New Member
Registered: 2011-12-16
Posts: 1

Re: How to Assign USB Audio as primary sound device in ALSA

nolatux> This was the solution to my problems with sound getting routed from jack to the wrong soundcard. Thank you!!! smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo