Summary: | udev load snd_usb_audio before alsasound | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dominique Michel <dominique.c.michel> |
Component: | New packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | VERIFIED WORKSFORME | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2006.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dominique Michel
2006-09-05 15:45:05 UTC
(In reply to comment #0) > The problem is at, when my "old" 2006.0 gcc-3.4.5 work fine, the new one load > the snd_usb_audio before alsasound, and I get my webcam as first sound card > when I really want my audigy. So why don't you configutre your ALSA properly? http://alsa.opensrc.org/index.php?page=MultipleCards (In reply to comment #1) > (In reply to comment #0) ... > http://alsa.opensrc.org/index.php?page=MultipleCards > In my first comment, I wrote: Same alsa configuration. And I wrote also at with one instal it work, when not with the other. I don't posted my alsa conf file, because I don't think at it is the problem. When I run alsasound restart, if you don't look to know what it does: It begin by unlodond the sound modules, and after it relaod them. The problem is at udev start some snd modules before alsasond at boot time, and nothing else. BTW: tell the alsa user email list at alsa.opensrc.org is official alsa documentation. they will only answer you to take a look on http://alsa-project.org Another issue with this link to alsa.opensrc.org is at it is an option: snd_device_gid=29 and it is not gentoo's gid of the audio group. Such option are defined in /etc/udev/rules.d in gentoo. Here is my alsa configuration, one again, the SAME in the 2 installs, one work, not the other: $ cat /etc/modules.d/alsa # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.con f-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ## IMPORTANT: ## You need to customise this section for your specific sound card(s) ## and then run `update-modules' command. ## Read alsa-driver's INSTALL file in /usr/share/doc for more info. ## ## ALSA portion alias snd-card-0 snd-emu10k1 alias snd-card-1 snd-ens1370 alias snd-card-2 snd-usb-audio alias snd-card-3 snd-virmidi ## OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 ## # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion - card #2 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss ## alias sound-service-2-0 snd-mixer-oss alias sound-service-2-3 snd-pcm-oss alias sound-service-2-12 snd-pcm-oss ## alias sound.service-3-0 snd-mixer-oss alias sound-service-3-3 snd-pcm (In reply to comment #1) > (In reply to comment #0) ... > http://alsa.opensrc.org/index.php?page=MultipleCards > In my first comment, I wrote: Same alsa configuration. And I wrote also at with one instal it work, when not with the other. I don't posted my alsa conf file, because I don't think at it is the problem. When I run alsasound restart, if you don't look to know what it does: It begin by unlodond the sound modules, and after it relaod them. The problem is at udev start some snd modules before alsasond at boot time, and nothing else. BTW: tell the alsa user email list at alsa.opensrc.org is official alsa documentation. they will only answer you to take a look on http://alsa-project.org Another issue with this link to alsa.opensrc.org is at it is an option: snd_device_gid=29 and it is not gentoo's gid of the audio group. Such option are defined in /etc/udev/rules.d in gentoo. Here is my alsa configuration, one again, the SAME in the 2 installs, one work, not the other: $ cat /etc/modules.d/alsa # Alsa 0.9.X kernel modules' configuration file. # $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.con f-rc,v 1.4 2004/11/16 01:31:22 eradicator Exp $ # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ## IMPORTANT: ## You need to customise this section for your specific sound card(s) ## and then run `update-modules' command. ## Read alsa-driver's INSTALL file in /usr/share/doc for more info. ## ## ALSA portion alias snd-card-0 snd-emu10k1 alias snd-card-1 snd-ens1370 alias snd-card-2 snd-usb-audio alias snd-card-3 snd-virmidi ## OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 ## # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion - card #2 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss ## alias sound-service-2-0 snd-mixer-oss alias sound-service-2-3 snd-pcm-oss alias sound-service-2-12 snd-pcm-oss ## alias sound.service-3-0 snd-mixer-oss alias sound-service-3-3 snd-pcmoss alias sound-service-3-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss # Set this to the correct number of cards. options snd cards_limit=4 Once again: this file work like a charm in my old install, but the audigy become the second sound card and snd_usb_audio the first in my new install. So the problem is at udev load the usb_snd_audio before alsasound. More, if I restart alsasound in my new install, the audigy become the first sound card and the snd_usb_audio the third, and it is exactly was I want and for what, amoung other things, my /etc/modules.d/alsa is made for. If you need a fixed cards orden, then your config is wrong. See the URL referred to in Comment #1. Use the index= parameter as documented. It try what you suggested. My new alsa config file Is: # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-emu10k1 options snd-emu10k1 index=0 alias snd-card-1 snd-usb-audio options snd-snd-usb-audio index=1 alias snd-card-2 snd-virmidi options snd-virmidi index=2 alias snd-card-3 snd-ens1370 options snd-ens1370 index=3 ## OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 ## # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion - card #2 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss ## alias sound-service-2-0 snd-mixer-oss alias sound-service-2-3 snd-pcm-oss alias sound-service-2-12 snd-pcm-oss ## alias sound.service-3-0 snd-mixer-oss alias sound-service-3-3 snd-pcm It try what you suggested. My new alsa config file Is: # ALSA portion alias char-major-116 snd # OSS/Free portion alias char-major-14 soundcore ## ALSA portion alias snd-card-0 snd-emu10k1 options snd-emu10k1 index=0 alias snd-card-1 snd-usb-audio options snd-snd-usb-audio index=1 alias snd-card-2 snd-virmidi options snd-virmidi index=2 alias snd-card-3 snd-ens1370 options snd-ens1370 index=3 ## OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1 alias sound-slot-2 snd-card-2 alias sound-slot-3 snd-card-3 ## # OSS/Free portion - card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss ## OSS/Free portion - card #2 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss ## alias sound-service-2-0 snd-mixer-oss alias sound-service-2-3 snd-pcm-oss alias sound-service-2-12 snd-pcm-oss ## alias sound.service-3-0 snd-mixer-oss alias sound-service-3-3 snd-pcmoss alias sound-service-3-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss But I get exactly the same behaviour. After booting: /proc/asound/cards: 0 [U0x46d0x8b2 ]: USB-Audio - USB Device 0x46d:0x8b2 USB Device 0x46d:0x8b2 at usb-0000:00:03.1-1, full speed 1 [Audigy2 ]: Audigy2 - Audigy 2 [SB0240] Audigy 2 [SB0240] (rev.4, serial:0x10071102) at 0x9400, irq 9 2 [VirMIDI ]: VirMIDI - VirMIDI Virtual MIDI Card 1 After restarting alsasound: 0 [Audigy2 ]: Audigy2 - Audigy 2 [SB0240] Audigy 2 [SB0240] (rev.4, serial:0x10071102) at 0x9400, irq 9 1 [VirMIDI ]: VirMIDI - VirMIDI Virtual MIDI Card 1 2 [U0x46d0x8b2 ]: USB-Audio - USB Device 0x46d:0x8b2 USB Device 0x46d:0x8b2 at usb-0000:00:03.1-1, full speed The ens1370 don't show up because I removed it from the box to put a TV card. Alsasound just ignore it. I found something about the 2.6.16 kernel: http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29#Kernel_2.6.16 Quote: here is currently a problem with the alsa-driver package and kernel 2.6.16, either vanilla, Gentoo, or -ck. Please note that upgrading to ALSA 1.0.11_rc3 or newer should solve the problem for some. Yet for others, this option might create modules that cannot load into your new kernel. Be aware that as of right now, you should only run 2.6.16 with Alsa built into the kernel. 2.6.15 is recommended for anybody on the alsa-driver package until this problem is solved. If you choose to compile Sound card Support directly into the kernel and have alsa-sound on video capture cards there may be problems starting with 2.6.16. (It worked for me in 2.6.15.) My system detects the TV card before the sound card as an alsa device. This makes the TV card the default sound card which results in no sound and causes many alsa utilites to fail. Compiling as modules [as in the 2.6.15 example above] solved this problem for me. EndQuote So it is definitly a problem. At alsasound work well when I put snd_usb_audio in the blacklist file or after restarting alsasound show me at it is udev that load this module before alsasound. And nothing else. I don't thing either at it come from the kernel, because I have exactly the same kernel in both install, one work as expectd, not the other. If one work, in the non working one it is an iteraction between the kernel and something else, or something else. It is another fact: I have exactly the same kernel, the same alsa-*, udev, hotplug and coldplug versions, and the same configuration in both install, the 2006.0 gcc-3.4.5 work just fine, the 2006.1 with gcc-4.1.1 just don't work as expected. I don't thing at it is a problem with the compiler version, I have saffer CFLAGS with the new install (In my old working install: CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer -fforce-addr -fno-ident -ftracer" CHOST="i686-pc-linux-gnu" CXXFLAGS="${CFLAGS}" LDFLAGS="-Wl,-O1 -Wl,--sort-common") Sorry, it was my fault. A typo in /etc/init.d/alsa with snd-snd-usb-audio. Changed it to snd-usb-audio and it work without to blacklist anything. OK, closing. :) |