All pastes #453404 Raw Edit

alsa.info

public text v1 · immutable
·published 2007-04-22 23:47 UTC
rendered paste body
This is a list of the order of the sound modules loaded by alsa currently:
snd_ice1712
snd_intel8x0
The sound modules are for these cards:
snd_ice1712	"ICE1712 - M Audio Delta 44"
snd_intel8x0	"ICH4 - Intel ICH5                 "

Changing the alsa card order requires at least one of these steps to succeed.
Step 1: Attempt to manually unload and reload the sound modules in the new order:
as root: which alsaconf #if it exists then run alsaconf;
alsaconf will ask you to choose the new default card
after alsaconf exits then reboot; See if your preferred card is the default card
with this command: cat /proc/asound/cards
If alsaconf did not load the correct sound card as default then
Close all sound apps,daemons,mixers,
and mixer-applets like kamix and gnome-mixer;
If you can not close these sound apps you may have to
logout from your window manager and login to a new
console using ctrl-alt-F2; then try this command
which will attempt to kill all sound apps,mixers,daemons,applets:
as root: kill $(lsof -t /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*)
run this command to see which sound apps are using your card now:
lsof /dev/dsp* /dev/snd/*
When all sound apps are closed then reload your sound modules by
running these commands in the order printed below:
modprobe -r snd_intel8x0
modprobe -r snd_ice1712
modprobe snd_intel8x0
modprobe snd_ice1712
if no errors then as root: cat /proc/asound/cards #lists the NEW card order

Step 2: If the modules load ok manually you may want to edit one of these files
to load the modules in the NEW order on each reboot:
#edit /etc/modprobe.conf OR /etc/modprobe.d/  for debian/ubuntu based distros
Add these lines to the End of the File (only one file) listed above:
options snd_ice1712 index=-1
options snd_intel8x0 index=0
If these commands do NOT load the sound modules in the correct order then
remove the lines you added from the file you edited. If more than one
file was listed above then try adding the lines to another file and reboot.
After editing all of the above file(s) one at a time
did not change the sound card order on reboot then:
Step 3: Copy/paste this script to a file in some secure directory like /root:

#Begin file to save (Do not save this line)
#!/bin/sh
modprobe -r snd_intel8x0
modprobe -r snd_ice1712
modprobe snd_intel8x0
modprobe snd_ice1712
#End file to save (Do not save this line)

As root run this command: chmod 700 /path/to/name-of-saved-file
Edit /etc/rc.local and add a line to run the "file to save" on reboot.
The new line in /etc/rc.local should include the full path to the "file to save"
If running this file from /etc/rc.local does not work properly then edit
/etc/rc.local and remove the line that runs the "file to save" on reboot.
Contact the alsa developer for the linux distribution you are using
to ask how to change the default sound card order on reboot.

memo gnubien at freenode.net to inform me of which /etc/file works
to load the sound modules in the correct order and the linux
distribution and version you are using; improvements and additions
to this script are also welcome.

Save this file for future reference; if you ran my script then...
This info is in the file: /tmp/new.default.card.info