Opened 18 years ago

Closed 18 years ago

#1960 closed task (fixed)

Sound goes to the random card

Reported by: alexander@… Owned by: blfs-book@…
Priority: normal Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by alexander@…)

After the udev_update merge, the module loading order became random. If someone has two sound cards and both drivers are modular, the "default" sound card becomes random. I.e., after some boots, the FM801 card is treated as the "default" one, and after rebooting it may well be that the onboard SBPCI sound card becomes the default. So one cannot predict where the sound goes.

One cannot address this in LFS or BLFS by creating persistent symlinks, because ALSA library doesn't allow specification of the output device via device node name (i.e., one can create a persistent /dev/snd/pcmIntelD0 symlink that always points to the right card, but cannot tell ALSA to output sound using this symlink).

I have already complained to LKML about that, and was told to use a completely non-standard method for binding the default device to a certain card:

http://lkml.org/lkml/2006/1/5/214

So there are the following alternatives:

1) fix the card order in modprobe.conf:

options snd-fm801 index=0
options snd-ens1371 index=1

2) bind the default device to the correct card in /etc/asound.conf:

pcm.default {
    type plug
    slave.pcm "dmix:FM801AU"
}

3) Don't rely upon udev to load ALSA drivers, do that by hand in /etc/sysconfig/modules so that the order becomes known and fixed.

Change History (3)

comment:1 by bdubbs@…, 18 years ago

What happens if the sound card drivers are not modules but built into the kernel? It would seem that the order would not be random, but it would also not be possible to control which device is "default."

comment:2 by alexander@…, 18 years ago

Description: modified (diff)

If drivers are non.modular, one can append snd-fm801.index=0 snd-ens1371.index=1 to the kernel command line.

So, I propose mentioning the problem in the book, and implementing option 1 and kernel command line trick as the easiest solutions.

One more note: Debian duplicate of this bug was marked as wontfix: http://bugs.debian.org/365226

comment:3 by bdubbs@…, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in new About Devices page.

Committed revision 6099.

Note: See TracTickets for help on using tickets.