You are not logged in.
Hello,
I'm having trouble with alsa and my multiple sound cards. Sometimes when I boot, I get the following output from "aplay -l"
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC889A Analog [ALC889A Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC889A Digital [ALC889A Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0However, I also see this after other boots:
**** List of PLAYBACK Hardware Devices ****
card 1: SB [HDA ATI SB], device 0: ALC889A Analog [ALC889A Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 1: ALC889A Digital [ALC889A Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0Because the card numbering is not consistant, I'm having a great deal of trouble (if the card is 0, then I don't need an asoundrc, but if it's 1, I do). It also breaks my volume panel applet for the alsa card number to often change (volumeicon - from the AUR). Is there a way to force a certain device to always be card number 0?
Thanks for any help.
-Sean
Last edited by szim90 (2012-01-15 02:01:54)
Offline
Have you tried https://wiki.archlinux.org/index.php/Ud … _Each_Boot ?
I think you should check in /sys/class/sound/ for the device names.
Offline
Thank you for your response, karol.
I ran 'udevadm info -a -p /sys/class/sound/card1/' as was able to get the following information:
looking at device '/devices/pci0000:00/0000:00:14.2/sound/card1':
KERNEL=="card1"
SUBSYSTEM=="sound"
DRIVER==""
ATTR{id}=="SB"
ATTR{number}=="1"
looking at parent device '/devices/pci0000:00/0000:00:14.2':
KERNELS=="0000:00:14.2"
SUBSYSTEMS=="pci"
DRIVERS=="snd_hda_intel"
ATTRS{vendor}=="0x1002"
ATTRS{device}=="0x4383"
ATTRS{subsystem_vendor}=="0x1458"
ATTRS{subsystem_device}=="0xa102"
ATTRS{class}=="0x040300"
ATTRS{irq}=="16"
ATTRS{local_cpus}=="00000000,0000000f"
ATTRS{local_cpulist}=="0-3"
ATTRS{numa_node}=="0"
ATTRS{dma_mask_bits}=="64"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""I'm completely new to writing udev rules; would the proper procedure be to write something like this:
DEVPATH=="/devices/pci0000:00/0000:00:14.2/sound/card*" ATTRS{number}="0"
or will that happen too late in the boot process (after the card has already been assigned a number)?
Perhaps it would be easier to work through alsa itself? I know I can get sound consistantly by calling out the card in asoundrc:
pcm.!default { type hw card SB }
ctl.!default { type hw card SB }But this seems to disable dmix (software mixing). Is there a way to re-enable dmix from the asoundrc (and would that be easier than trying to work in udev)?
Regards,
Sean
Offline
But this seems to disable dmix (software mixing)
Of course - use "type dmix" instead of "type hw" - see my sig for an example.
Offline
Rather than mess with asoundrc, I'd advise using the index module parameter. Check here under "Multiple sound cards". Yeah it's a Gentoo guide, but that part is distro-agnostic.
Offline
Gusar, thanks for your reply. Unfortunately, since two of the cards that are conflicting both use snd_hda_intel module, using the index method didn't work for assigning card numbers.
Of course - use "type dmix" instead of "type hw" - see my sig for an example.
This worked flawlessly. Thanks for the help!
P.S. In case anyone else stumbles upon this thread, the alsa documentation on dmix, which breb mentions in his asoundrc file, was very insightful. It's available here: http://www.alsa-project.org/alsa-doc/al … ugins.html
Offline
Gusar, thanks for your reply. Unfortunately, since two of the cards that are conflicting both use snd_hda_intel module, using the index method didn't work for assigning card numbers.
Ah. There's another parameter too, that can be used in this case - id. So this could work:
option snd_hda_intel id=SB index=0I say "could" because I personally haven't tested it yet.
Offline