[Pkg-alsa-devel] Bug#614113: alsa-base: alsa accepts cards names in /usr/share/alsa/alsa.conf but wants only numbers in /etc/alsa.conf

sergey sergey_ifeo at rambler.ru
Sun Feb 20 20:40:39 UTC 2011


> So which one do you want to use as the default?
I want to use my embedded sound card that corresponds to snd_intel8x0
kernel module.

I run /usr/sbin/alsa force-reload several times and get:

# cat /proc/asound/cards
 0 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17

next alsa reload:

# cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17
 1 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
next reload:

# cat /proc/asound/cards
 0 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17
again :-)

Cards always exchange numbers.

I write /etc/modprobe.d/snd_cards_priorities.conf:
------------------------
alias snd-card-0 snd_intel8x0
options snd_intel8x0 index=0

alias snd-card-1 snd_hda_intel
options snd_hda_intel index=1
------------------------

I run /usr/sbin/alsa force-reload several times and result always correct now:

# cat /proc/asound/cards
 0 [ICH5           ]: ICH4 - Intel ICH5
                      Intel ICH5 with AD1888 at irq 17
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xff8ec000 irq 17

Now my Debian configured in right way :-)
Thank you very much for help and patience :-)


Now we have the step-by step instructions of setting sound cards priorities:

1) run alsamixer;
2) use F6 and research available sound devices
3) set correct levels for playing on devices;
4) run some sound player that allow select sound devices (audacious for example);
5) play with you sound devices (with repeating steps 2,3) and decide what should be 
default;
5) exit alsamixer and player;

6) login as root;
7) run lsmod|grep snd and try to understood what modules corresponds to physical sound devices;
8) if unsure that you correctly determine modules on step 2:
go to /sys/module and inspect all directories wich names begins with "snd". This directories names exactly as modules. If you will see ""drivers" directory in 
inspected directory - then name of inspected directory is name of module that corresponds to physical sound device. Remember (wrote in notepad) all such modules.
9) run 
modprobe <module name> | grep desc 
for each module that yo found at steps 2 and 3. Read descriptions and
make decidion about priorities of this modules. This will be priorities of
corresponding sound devices.
10) go to /etc/modprobe.d;
11) create snd_cards_priorities.conf;
12) write to snd_cards_priorities.conf something like this:
	alias snd-card-0 <module for highest priority card>
	options <module for highest priority card> index=0
	alias snd-card-1 <module for lower priority card>
	options <module for lower priority card> index=1
13) save file;
14) restart alsa with 
/usr/sbin/alsa force-reload
command;
15) run 
cat /proc/asound/cards
command and check that sound devices are in correct order
(device #0 has highest priority);
16) repeat steps 9, 10 several times and check that sound devices order is not
changing;
17) exit root;

18) run alsamixer and configure you default sound device, exit alsamixer.
19) use you favorite sound player to test you new configuration.

I suggest write something like this steps in readme, at least steps 6-17.

I also suggest to send this steps to mainstream and make feature request:
simple GUI/TUI based on steps 6-17. It can be stand-alone program or - yes!- it
can be implemented as part of alsamixer :-)





More information about the Pkg-alsa-devel mailing list