alsa-1.0.8 builds fine now on my Xbox. However, when I load the alsa module (see below for my modules.d/alsa), no sound card is detected. It may be important to note that my XBox is a newer model (1.6). Reproducible: Always Steps to Reproduce: 1. ACCEPT_KEYWORDS="~x86" emerge alsa-driver 2. edit /etc/modules.d/alsa (see below), then run modules-update 3. /etc/init.d/alsasound start, or modprobe -v snd-card-0 Actual Results: When running /etc/init.d/alsasound start: * Loading ALSA modules... * Loading: snd-card-0... [ ok ] * ERROR: Failed to load necessary drivers [ ok ] * Restoring Mixer Levels... * No mixer config in /etc/asound.state, you have to unmute your card! [ !! ] When loading manually (modprobe -v snd-card-0): xbox root # modprobe -v snd-card-0 insmod /lib/modules/2.6.10-xbox/kernel/sound/acore/snd-page-alloc.ko insmod /lib/modules/2.6.10-xbox/kernel/sound/soundcore.ko insmod /lib/modules/2.6.10-xbox/kernel/sound/acore/snd.ko cards_limit=1 insmod /lib/modules/2.6.10-xbox/kernel/sound/acore/snd-timer.ko insmod /lib/modules/2.6.10-xbox/kernel/sound/acore/snd-pcm.ko insmod /lib/modules/2.6.10-xbox/kernel/sound/pci/ac97/snd-ac97-codec.ko insmod /lib/modules/2.6.10-xbox/kernel/sound/pci/snd-intel8x0.ko xbox=1 xbox root # cat /proc/asound/cards --- no soundcards --- xbox root # lsmod Module Size Used by snd_intel8x0 28672 0 snd_ac97_codec 74520 1 snd_intel8x0 snd_pcm 83496 2 snd_intel8x0,snd_ac97_codec snd_timer 21348 1 snd_pcm snd 47300 4 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer soundcore 7424 1 snd snd_page_alloc 7460 2 snd_intel8x0,snd_pcm Expected Results: Sound card should be detected and accessible. Sound card should be visible in /proc/asound/cards. xbox root # cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.8. Compiled on Jan 30 2005 for kernel 2.6.10-xbox. xbox root # cat /etc/modules.d/alsa alias char-major-116 snd option cards_limit=1 alias char-major-14 soundcore alias snd-card-0 snd-intel8x0 alias sound-slot-0 snd-card-0 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-12 snd-pcm-oss options snd cards_limit=1 options snd-intel8x0 xbox=1 xbox root # emerge info Portage 2.0.51-r15 (default-linux/x86/xbox, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.10-xbox i686) ================================================================= System uname: 2.6.10-xbox i686 Celeron (Coppermine) Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 07:40:35)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r5 sys-devel/automake: 1.8.5-r1 sys-devel/binutils: 2.14.90.0.8-r1 sys-devel/libtool: 1.5.2-r5 virtual/os-headers: 2.4.21-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share /config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qma il/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/ http://mirrors.sec.informatik.tu- darmstadt.de/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apache2 apm avi berkdb bitmap-fonts crypt cscope cups dvd encode esd f77 fam flac font-server foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 joystick jpeg kde libg++ libwww lirc mad matroska mikmod mmx motif mpeg mysql ncurses net nvidia oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse ssl svga tcpd theora tiff transcode truetype truetype-fonts type1-fonts v412 x86 xinerama xml2 xmms xv xvid zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
When building alsa-driver, you should have had ALSA_CARDS='intel8x0' in your make.conf. Is this the case?
Yes, I have ALSA_CARDS='intel8x0' in make.conf. The module is built and it loads just fine (see the lsmod output), it just does not detect the card.
Did you use "modprobe snd-intel8x0 xbox=1"? Alsa can't auto detect the xbox sound hw.
Yes. That is, I've put xbox=1 as option for the card in /etc/modules.d/alsa, which gets folded into /etc/modules.conf by modules-update. When I do (as shown above in the problem description): xbox root # modprobe -v snd-card-0 it says [other insmods] insmod /lib/modules/2.6.10-xbox/kernel/sound/pci/snd-intel8x0.ko xbox=1 So that should be the same, right?
That is the same (assuming you did modules-update before the modprobe).
Yes, I did run modules-update... Maybe this is helpful info: the following appears in /var/log/kernel/current each time I try to load the module: Feb 25 17:44:11 [kernel] PCI: Setting latency timer of device 0000:00:06.0 to 64 Feb 25 17:44:11 [kernel] ohci_hcd 0000:00:03.0: wakeup - Last output repeated 2 times - Feb 25 17:44:12 [kernel] Intel ICH: probe of 0000:00:06.0 failed with error -13 Feb 25 17:44:13 [kernel] ohci_hcd 0000:00:03.0: wakeup I don't know what to make of "error -13", but 0000:00:06.0 is the pci address of the audio device (it has two, for some reason?): xbox root # lspci | grep audio 0000:00:05.0 Multimedia audio controller: nVidia Corporation nForce Audio (rev d2) 0000:00:06.0 Multimedia audio controller: nVidia Corporation nForce Audio (rev d2) Any ideas, anyone?
Could be related to the "No sound in 2.6.10" thread on xbox-linux-user? http://sourceforge.net/mailarchive/message.php?msg_id=10500378
Thanks for the link Chris, you made my day! I changed (in sound/pci/ac97/ac97_codec.c): if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_AUDIO)) { /* test if we can write to the record gain volume register */ snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06); if (((err = snd_ac97_read(ac97, AC97_REC_GAIN)) & 0x7fff) == 0x0a06) ac97->scaps |= AC97_SCAP_AUDIO; } to if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_$ if ((ac97->scaps & AC97_SCAP_DETECT_BY_VENDOR)) ac97->scaps |= AC97_SCAP_AUDIO; else { /* test if we can write to the record gain volume register */ snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06); if (((err = snd_ac97_read(ac97, AC97_REC_GAIN)) & 0x7fff) == 0x$ ac97->scaps |= AC97_SCAP_AUDIO; } } And now it works! The intel_8x0 card is detected: xbox root # cat /proc/asound/cards 0 [nForce ]: NFORCE - NVidia nForce NVidia nForce with unknown codec at 0xfec00000, irq 6 My Xbox is playing through the stereo as I write this. :-D Could someone with more Gentoo-hacking experience than me convert this into a patch and add it to the alsa-driver ebuild?
I've emailed David Pye, I think maybe the fix never got sent upstream..
Searching the alsa bugs I found this: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=778 Looks like the same bug.
That's because I submitted it... ;-) Too bad nobody reacted; there is a lot more activity here at bugs.gentoo.org (fortunately).
Oh, and that first line in the fixed version should read: if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO) && !(ac97->scaps & AC97_SCAP_AUDIO)) { (not AC97_SCAP_$, that's what you get when cutting/pasting from nano -w ;-)
Created attachment 53849 [details] Working version of sound/pci/ac97/ac97_codec.c
Thanks for that, I've added it to cvs. Re-open this bug if it doesn't work.