After warm boot Alsa not detecting sound card
Hi,
This is not a new problem on my system, but I wanted to get up to
date with Alsa before I presented it here. If I do a cold boot then Alsa is correctly installed and both my HDSP 9652 and my MidiSport 2x2 are detected and work fine. However, after a warm boot Alsa never installs for the HDSP 9652.
A BIT IMPROVEMENT with 0.9.8 is that Alsa will now load if I stop and
start Alsa by hand after the warm boot, so thanks for that! I used to have to completely power down with 0.9.6, so this is a big improvement! However, I'd like to get this fixed so that even these by-hand steps are not required.
After a warm boot the card is visible as a PCI device, but it isn't
given an interrupt and the drivers aren't loaded:
Wizard asound # lspci
<SNIP>
00:0e.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 65)
<SNIP>
Wizard asound #
Wizard asound # cat /proc/interrupts
CPU0
0: 86720 IO-APIC-edge timer 1: 1271 IO-APIC-edge keyboard 2: 0 XT-PIC cascade 8: 2 IO-APIC-edge rtc 9: 0 IO-APIC-level acpi 12: 12786 IO-APIC-edge PS/2 Mouse 14: 6276 IO-APIC-edge ide0 15: 5 IO-APIC-edge ide1 16: 27066 IO-APIC-level ohci1394, radeon@PCI:1:0:0 18: 62 IO-APIC-level eth0 21: 1332 IO-APIC-level usb-uhci, usb-uhci, usb-uhci NMI: 0 LOC: 86667 ERR: 0 MIS: 0
Wizard asound #
bash-2.05b$ su -
Password:
Wizard root # lsmod
Module Size Used by Not tainted
radeon 103400 1 usb-midi 17180 0 (unused) audio 41400 0 (unused) snd-usb-audio 46336 0 snd-rawmidi 15072 0 [snd-usb-audio] snd-pcm 64804 0 [snd-usb-audio] snd-page-alloc 6676 0 [snd-pcm] hid 15108 1 snd-seq 39408 0 (unused) snd-timer 15876 0 [snd-pcm snd-seq] snd-seq-device 4416 0 [snd-rawmidi snd-seq] snd 35428 0 [snd-usb-audio snd-rawmidi snd-pcm snd-seq snd-timer snd-seq-device] sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]
Wizard root #
Wizard asound # pwd/proc/asound
Wizard asound # more version
Advanced Linux Sound Architecture Driver Version 0.9.8. Compiled on Nov 2 2003 for kernel 2.4.20-gentoo-r7 with versioned symbols.
Wizard asound #
I can at this point stop and restart Alsa and everything works:
Wizard root # lsmod
Module Size Used by Not tainted
radeon 103400 1 usb-midi 17180 0 (unused) audio 41400 0 (unused) hid 15108 1 sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]
Wizard root # /etc/init.d/alsasound start
* Loading ALSA drivers...
* Loading: snd-seq-oss
* Loading: snd-pcm-oss
* Loading: snd-mixer-oss
* Loading: snd-hdsp
* Loading: snd-usb-audio
* Loading: snd-seq-midi
* Loading: snd-seq-oss
* Running card-dependent scripts
* Restoring Mixer
Levels [ ok ]
Wizard root # lsmod
Module Size Used by Not tainted
snd-pcm-oss 39492 0 (unused) snd-mixer-oss 13648 0 [snd-pcm-oss] snd-usb-audio 46336 0 snd-seq-midi 4096 0 (autoclean) (unused) snd-hdsp 39204 0 snd-pcm 64804 0 (autoclean) [snd-pcm-oss snd-usb-audio snd-hdsp] snd-rawmidi 15072 0 (autoclean) [snd-usb-audio snd-seq-midi snd-hdsp] snd-page-alloc 6676 0 (autoclean) [snd-hdsp snd-pcm] snd-hwdep 5344 0 (autoclean) [snd-hdsp] snd-seq-oss 30368 0 (unused) snd-seq-midi-event 3840 0 [snd-seq-midi snd-seq-oss] snd-seq 39408 2 [snd-seq-midi snd-seq-oss snd-seq-midi-event] snd-timer 15876 0 [snd-pcm snd-seq] snd-seq-device 4416 0 [snd-seq-midi snd-rawmidi snd-seq-oss
snd-seq]
snd 35428 0 [snd-pcm-oss snd-mixer-oss
snd-usb-audio snd-seq-midi snd-hdsp snd-pcm snd-rawmidi snd-hwdep snd-seq-oss snd-seq-midi-event snd-seq snd-timer snd-seq-device]
radeon 103400 1 usb-midi 17180 0 (unused) audio 41400 0 (unused) hid 15108 1 sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]
Wizard root #
Wizard root # cat /proc/interrupts
CPU0
0: 115711 IO-APIC-edge timer 1: 1673 IO-APIC-edge keyboard 2: 0 XT-PIC cascade 8: 2 IO-APIC-edge rtc 9: 0 IO-APIC-level acpi 12: 20211 IO-APIC-edge PS/2 Mouse 14: 6667 IO-APIC-edge ide0 15: 5 IO-APIC-edge ide1 16: 40297 IO-APIC-level ohci1394, radeon@PCI:1:0:0 17: 0 IO-APIC-level hdsp 18: 68 IO-APIC-level eth0 21: 1673 IO-APIC-level usb-uhci, usb-uhci, usb-uhci NMI: 0 LOC: 115660 ERR: 0 MIS: 0
Wizard root #
At this point the card has an interrupt, the drivers are loaded, and everything works.
My modules.conf file is attached.
Thanks in advance for any ideas.
Cheers,
Mark
### This file is automatically generated by modules-update #
# Please do not edit this file directly. If you want to change or add
# anything please take a look at the files in /etc/modules.d and read # the manpage for modules-update. # ### modules-update: start processing /etc/modules.d/aliases # Aliases to tell insmod/modprobe which modules to use
# Uncomment the network protocols you don't want loaded:
# alias net-pf-1 off # Unix # alias net-pf-2 off # IPv4 # alias net-pf-3 off # Amateur Radio AX.25 # alias net-pf-4 off # IPX # alias net-pf-5 off # DDP / appletalk # alias net-pf-6 off # Amateur Radio NET/ROM # alias net-pf-9 off # X.25 # alias net-pf-10 off # IPv6 # alias net-pf-11 off # ROSE / Amateur Radio X.25 PLP # alias net-pf-19 off # Acorn Econet
alias char-major-10-175 agpgart
alias char-major-10-200 tun
alias char-major-81 bttv
alias char-major-108 ppp_generic
alias /dev/ppp ppp_generic
alias tty-ldisc-3 ppp_async
alias tty-ldisc-14 ppp_synctty
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
# Crypto modules (see http://www.kerneli.org/)
alias loop-xfer-gen-0 loop_gen
alias loop-xfer-3 loop_fish2
alias loop-xfer-gen-10 loop_gen
alias cipher-2 des
alias cipher-3 fish2
alias cipher-4 blowfish
alias cipher-6 idea
alias cipher-7 serp6f
alias cipher-8 mars6
alias cipher-11 rc62
alias cipher-15 dfc2
alias cipher-16 rijndael
alias cipher-17 rc5
# Support for i2c and lm_sensors
alias char-major-89 i2c-dev
# Old nvidia support ...
alias char-major-195 NVdriver
alias /dev/nvidiactl char-major-195
### modules-update: end processing /etc/modules.d/aliases
### modules-update: start processing /etc/modules.d/alsa
# Alsa 0.9.X kernel modules' configuration file.
# $Header: /home/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.1 2003/08/05 21:07:55 johnm 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-hdsp
alias snd-card-1 snd-usb-audio
## OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
##
# OSS/Free portion - card #1 (HDSP9652)
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 (MidiSport 2x2)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-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=2
add options -k snd-card-0
add options -k snd-card-1
### modules-update: end processing /etc/modules.d/alsa
### modules-update: start processing /etc/modules.d/i386 alias parport_lowlevel parport_pc
alias char-major-10-144 nvram
alias binfmt-0064 binfmt_aout
alias char-major-10-135 rtc
### modules-update: end processing /etc/modules.d/i386
### modules-update: start processing /etc/modules.d/svgalib probeall /dev/svga svgalib_helper
### modules-update: end processing /etc/modules.d/svgalib
Quoted 40 lines
This is not a new problem on my system, but I wanted to get up to
date with Alsa before I presented it here. If I do a cold boot then Alsa is correctly installed and both my HDSP 9652 and my MidiSport 2x2 are detected and work fine. However, after a warm boot Alsa never installs for the HDSP 9652.A BIT IMPROVEMENT with 0.9.8 is that Alsa will now load if I stop and
start Alsa by hand after the warm boot, so thanks for that! I used to have to completely power down with 0.9.6, so this is a big improvement! However, I'd like to get this fixed so that even these by-hand steps are not required.After a warm boot the card is visible as a PCI device, but it isn't
given an interrupt and the drivers aren't loaded:Wizard asound # lspci
<SNIP>
00:0e.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 65)
<SNIP>
Wizard asound #Wizard asound # cat
/proc/interrupts
CPU00: 86720 IO-APIC-edge timer 1: 1271 IO-APIC-edge keyboard 2: 0 XT-PIC cascade 8: 2 IO-APIC-edge rtc 9: 0 IO-APIC-level acpi 12: 12786 IO-APIC-edge PS/2 Mouse 14: 6276 IO-APIC-edge ide0 15: 5 IO-APIC-edge ide1 16: 27066 IO-APIC-level ohci1394, radeon@PCI:1:0:0 18: 62 IO-APIC-level eth0 21: 1332 IO-APIC-level usb-uhci, usb-uhci, usb-uhci NMI: 0 LOC: 86667 ERR: 0 MIS: 0
Quoted 7 lines
Wizard asound #
bash-2.05b$ su -
Password:
Wizard root # lsmod
Module Size Used by Not tainted
radeon 103400 1
The following two are the oss usb modules, you should blacklist them in /etc/hotplug/blacklist so that only the alsa modules are loaded.
Quoted 2 lines
usb-midi 17180 0 (unused) audio 41400 0 (unused)
It _is_ strange that the alsa usb modules are also loaded...
Quoted 26 lines
snd-usb-audio 46336 0 snd-rawmidi 15072 0 [snd-usb-audio] snd-pcm 64804 0 [snd-usb-audio] snd-page-alloc 6676 0 [snd-pcm] hid 15108 1 snd-seq 39408 0 (unused) snd-timer 15876 0 [snd-pcm snd-seq] snd-seq-device 4416 0 [snd-rawmidi snd-seq] snd 35428 0 [snd-usb-audio snd-rawmidi snd-pcm snd-seq snd-timer snd-seq-device] sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]Wizard root #
Wizard asound # pwd
/proc/asound
Wizard asound # more version
Advanced Linux Sound Architecture Driver Version 0.9.8. Compiled on Nov 2 2003 for kernel 2.4.20-gentoo-r7 with versioned symbols.
Wizard asound #
Quoted 1 line
I can at this point stop and restart Alsa and everything works:
This is, I think, a problem with the stock alsasound script. It does not take into account that other stuff may start alsa subsystems before the alsasound script runs.
In this case hotplug loads the alsa usb driver. A while later alsasound is executed but it tests for /proc/asound to determine if it is "already running", that test is true and the rest of the alsa modules are not started.
If this is (as I suspect) in your Gentoo box you could try copying the hacks I made to the Planet CCRMA alsasound script so that it loads anything that has not been loaded so far. That should fix the problem.
-- Fernando
Quoted 78 lines
Wizard root # lsmod
Module Size Used by Not taintedradeon 103400 1 usb-midi 17180 0 (unused) audio 41400 0 (unused) hid 15108 1 sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]Wizard root #
/etc/init.d/alsasoundstart
* Loading ALSA drivers...
* Loading: snd-seq-oss
* Loading: snd-pcm-oss
* Loading: snd-mixer-oss
* Loading: snd-hdsp
* Loading: snd-usb-audio
* Loading: snd-seq-midi
* Loading: snd-seq-oss
* Running card-dependent scripts
* Restoring Mixer
Levels [ ok ]
Wizard root # lsmod
Module Size Used by Not taintedsnd-pcm-oss 39492 0 (unused) snd-mixer-oss 13648 0 [snd-pcm-oss] snd-usb-audio 46336 0 snd-seq-midi 4096 0 (autoclean) (unused) snd-hdsp 39204 0 snd-pcm 64804 0 (autoclean) [snd-pcm-oss snd-usb-audio snd-hdsp] snd-rawmidi 15072 0 (autoclean) [snd-usb-audio snd-seq-midi snd-hdsp] snd-page-alloc 6676 0 (autoclean) [snd-hdsp snd-pcm] snd-hwdep 5344 0 (autoclean) [snd-hdsp] snd-seq-oss 30368 0 (unused) snd-seq-midi-event 3840 0 [snd-seq-midi snd-seq-oss] snd-seq 39408 2 [snd-seq-midi snd-seq-oss snd-seq-midi-event] snd-timer 15876 0 [snd-pcm snd-seq] snd-seq-device 4416 0 [snd-seq-midi snd-rawmidi snd-seq-osssnd-seq]
snd 35428 0 [snd-pcm-oss snd-mixer-oss
snd-usb-audio snd-seq-midi snd-hdsp snd-pcm snd-rawmidi snd-hwdep snd-seq-oss snd-seq-midi-event snd-seq snd-timer snd-seq-device]radeon 103400 1 usb-midi 17180 0 (unused) audio 41400 0 (unused) hid 15108 1 sbp2 17984 0 (unused) raw1394 8028 0 (unused) ohci1394 18196 0 (unused) ieee1394 35280 0 [sbp2 raw1394 ohci1394]Wizard root #
Wizard root # cat
/proc/interrupts
CPU00: 115711 IO-APIC-edge timer 1: 1673 IO-APIC-edge keyboard 2: 0 XT-PIC cascade 8: 2 IO-APIC-edge rtc 9: 0 IO-APIC-level acpi 12: 20211 IO-APIC-edge PS/2 Mouse 14: 6667 IO-APIC-edge ide0 15: 5 IO-APIC-edge ide1 16: 40297 IO-APIC-level ohci1394, radeon@PCI:1:0:0 17: 0 IO-APIC-level hdsp 18: 68 IO-APIC-level eth0 21: 1673 IO-APIC-level usb-uhci, usb-uhci, usb-uhci NMI: 0 LOC: 115660 ERR: 0 MIS: 0Wizard root #
At this point the card has an interrupt, the drivers are loaded, and everything works.
Quoted 6 lines
My modules.conf file is attached.
Thanks in advance for any ideas.
Cheers,
Mark
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Fernando,
Thanks for the response. I have blacklisted the usb-midi and audio
drivers and they no longer load. as expected.
I discovered this afternoon that I have too much stuff in
modules.conf I think. (Actually in /etc/modules.d/alsa)
# OSS/Free portion - card #1 (HDSP9652)
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 (MidiSport 2x2)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
Shouldn't I remove some of the services for card #2? (The MidiSport) The PlanetCCRMA Nano Config guide doesn't seem to show which of these 5 aliases should be used. (If any!) Can you help? I'll try removing the mixer and pcm-oss ones, and I'll try keeping the seq-oss ones, however all of that is just OSS support, correct? Running Alsa apps, do I care at all about OSS support for the MidiSport? I'm thinking no, and that maybe all 5 lines can be removed?
Quoted 6 lines · Fernando Pablo Lopez-Lezcano
The following two are the oss usb modules, you should blacklist them in
/etc/hotplug/blacklistso that only the alsa modules are loaded.Quoted 2 lines
usb-midi 17180 0 (unused) audio 41400 0 (unused)
<SNIP>
Quoted 4 lines
This is, I think, a problem with the stock alsasound script. It does not take into account that other stuff may start alsa subsystems before the alsasound script runs.
Quoted 8 lines
In this case hotplug loads the alsa usb driver. A while later alsasound is executed but it tests for
/proc/asoundto determine if it is "already running", that test is true and the rest of the alsa modules are not started.If this is (as I suspect) in your Gentoo box you could try copying the hacks I made to the Planet CCRMA alsasound script so that it loads anything that has not been loaded so far. That should fix the problem.
I will take a close look at that script on my Planet box soon and see if I can scope out what you did. Thanks for the pointer.
With best regards,
Mark
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Quoted 1 line · Fernando Pablo Lopez-Lezcano
It _is_ strange that the alsa usb modules are also loaded...
It seems to be used when I make MIDI connections with aconnect to make MIDI connections. The usage count jumps up.
I looked at your alsasound script (from /etc/init.d) and the Gentoo one. They are *very* different. I think for the short term I'll just stop and start alsa by hand, maybe in a sudo script or something, until I get some time to really think about this stuff.
Or possibly you're comments will start a discussion that leads to a better script. Why wouldn't this be better for Alsa to be in CVS?
Thanks!
Cheers,
Mark
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Hallo,
Quoted 7 lines · Mark Knecht hat gesagt: // Mark Knecht wrote:
# OSS/Free portion - card #1 (HDSP9652)
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
Quoted 6 lines
# OSS/Free portion - card #2 (MidiSport 2x2)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
You don't need to define snd-seq-oss for the second card, as there is only one sequencer device anyway, and that includes both cards. You probably also don't need snd-mixer and snd-oss for the 2x2, because the Midisport does no audio, or does it?
ciao
Signature · 8 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Quoted 17 lines · Frank Barknecht
Hallo,
Quoted 7 lines · Mark Knecht hat gesagt: // Mark Knecht wrote:
# OSS/Free portion - card #1 (HDSP9652)
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-ossQuoted 6 lines
# OSS/Free portion - card #2 (MidiSport 2x2)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
Quoted 4 lines
You don't need to define snd-seq-oss for the second card, as there is only one sequencer device anyway, and that includes both cards. You probably also don't need snd-mixer and snd-oss for the 2x2, because the Midisport does no audio, or does it?
You are exactly correct. I removed those last evening. It doesn't seem to change what drivers get loaded at all, and it doesn't fix my problem. I still cannot do a warm boot and get Alsa to load correctly.
Have the developers considered Fernando's comments about the startup scripts before? I don't know, but they seem to the point.
Anyway, with all 5 lines removed I seem to get the same things loaded as per lsmod's output, and I seem to have the same problems, so this is not the answer. None the less, I'm happy to try and use Alsa the way the developers intended it.
Thanks,
Mark
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Hallo,
Quoted 3 lines · Mark Knecht hat gesagt: // Mark Knecht wrote:
Anyway, with all 5 lines removed I seem to get the same things loaded as per lsmod's output, and I seem to have the same problems, so this is not the answer.
Actually I didn't expect it to be an answer to the reboot-problem, but one for your secondary question about what is redundant in you modules.conf
ciao
Signature · 8 lines
Frank Barknecht _ ______footils.org__ ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/