Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am building specific gaming station based on Gentoo (2.6.11 r6) with Athlon XP optimisation. Motherboard have builtin ac97 sound, but I got problem with sound:
root # alsaconf .... {sound card intel8x0 detected and no error messages}
Running modules-update...
Loading driver...
* Loading ALSA modules...
* Loading: snd-card-0... [ ok ]
* Loading: snd-seq-oss... [ ok ]
* Loading: snd-pcm-oss... [ ok ]
* Restoring Mixer Levels...
* No mixer config in /etc/asound.state, you have to unmute your card! [ ok ]
Setting default volumes...
After that I run sound application: root # alsamixer alsamixer: function snd_ctl_open failed for default: No such file or directory root # strace alsamixer access("/etc/asound.conf", R_OK) = -1 ENOENT (No such file or directory)
access("/root/.asoundrc", R_OK) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/aloadC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDWR) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/aloadC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDWR) = -1 ENOENT (No such file or directory)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fea000
write(1, "\n", 1
) = 1
write(2, "alsamixer: function snd_ctl_open"..., 79alsamixer: function snd_ctl_open failed for default: No such file or directory
) = 79
munmap(0xb7fea000, 4096) = 0
exit_group(1) = ?
I am really guessing here. It used to be that ALSA came with a script for creating the necessary devices. If you have devfs (now deprecated) or udev installed this is supposed to happen automatically. I recently put together a gentoo compiled system with udev and alsa and this works just fine. Are you using udev? There should be a daemon running, udevd I think.
I just noticed one more thing using strace:
open("/dev/snd/controlC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/aloadC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDWR) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/aloadC0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDWR) = -1 ENOENT (No such file or directory)
When I force alsamixer to use card1 I get next error
open("/dev/snd/controlC1", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/aloadC1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC1", O_RDWR) = -1 ENODEV (No such device)
open("/dev/snd/controlC1", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/aloadC1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC1", O_RDWR) = -1 ENODEV (No such device)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fea000
write(1, "\n", 1
) = 1
write(2, "alsamixer: function snd_ctl_open"..., 65alsamixer: function snd_ctl_open failed for hw:1: No such device
) = 65
Why controlC1 is created when kernel reports only one card0 ? root # cat /proc/asound/cards
0 [nForce2 ]: NFORCE - NVidia nForce2
NVidia nForce2 with ALC650F at 0xe6002000, irq 11
I have only one internal sound card. How to make it to be detected as card0 and why it does not work even as card1 ?
I don't have access to a udev system at the moment. But I know I never used alsaconf. Just loaded the sound driver module, the devices appeared and it worked.
Maybe make sure the device files do not already exist before the sound system starts? Maybe udev creates a second set if the first set is already there?
There is also some switch to turn on debugging in udev (in /etc/udev.conf or similar?).
I found partial soultion (through ass). The problem is that device files are not created automaticaly. I included in startup small script:
mknod -m 666 /dev/snd/controlC0 c 116 0
mknod -m 666 /dev/snd/pcmC0D0c c 116 24
mknod -m 666 /dev/snd/pcmC0D0p c 116 16
mknod -m 666 /dev/snd/pcmC0D1c c 116 25
mknod -m 666 /dev/snd/pcmC0D2p c 116 18
mknod -m 666 /dev/sound/dsp c 14 3
mknod -m 666 /dev/sound/audio c 14 4
mknod -m 666 /dev/sound/adsp c 14 12
ln -s /dev/sound/dsp /dev
ln -s /dev/sound/audio /dev
ln -s /dev/sound/adsp /dev
Why udev did not create device files for alsa system?
i have the same problem udev deleted most all of /dev, didn't add sound (luckily i ran /dev/MAKEDEV all before rebooting). i tried the above too. i had one card that had no ac97 sound if old links in /dev/ were present tried that setup (only /dev/snd). and i insured user could rw a file in directory. i straced and saw, still, alsa claims (controlCxxx) is not a device.
#alsamixer -D /dev/snd/controlC0
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL /dev/snd/controlC0
cannot open mixer: No such file or directory
i do lspci, ok it's there. i do ldmod, all i've heard of are ok loaded w/right options
my module loading and conf, there, as suggested by recent docs and repeated by many
i checked and rechecked /lib/modules/`uname -r`/modules*, linux docs, and menuconfig depends
i compiled + installed new alsa for my kernel and the lib & utils from alsa project .org , thinking ICH6 may not detect on earlier kernel or my distro's base is older than kernels, or even binary incompat: but same messages after all that
i checks /proc/asound and the like in /sys: says card0 is intel8x0 is registered and ready (i didn't check what files device listens on (or what mode is needed) under /sys yet)
i'm just about to look. i suspect either my laptop says intel8x0 and isn't (?) or the device filenames are not what they used to be (and additionally udev didn't see that)
elswise i'd guess a windows XP driver destroyed the card by using firmware to "lock it out". doubt it but it's possible
# aplay /usr/share/sounds/phone.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:660: audio open error: No such device
/----------------------\
| TWO THINGS TO KNOW |
\----------------------/
never mind i can't think of any!
from the above you can see why i suspected alsa runtime was too old and didn't have intel8x0 strings in /usr/share/alsa. but i got a 1.024 in sync with kernel i checked.
if you think your distro's libasound is too old to
know of intel8x0 then do advice for compiling, else skip
follow advice there, which does not include advice on devs:
crw-rw---- 1 root audio 116, 20 Oct 14 06:47 /dev/snd/pcmC0D4p
crw-rw---- 1 root audio 116, 27 Oct 14 06:47 /dev/snd/pcmC0D3c
crw-rw---- 1 root audio 116, 26 Oct 14 06:47 /dev/snd/pcmC0D2c
crw-rw---- 1 root audio 116, 25 Oct 14 06:47 /dev/snd/pcmC0D1c
crw-rw---- 1 root audio 116, 16 Oct 14 06:47 /dev/snd/pcmC0D0p
crw-rw---- 1 root audio 116, 24 Oct 14 06:47 /dev/snd/pcmC0D0c
crw-rw---- 1 root audio 116, 0 Oct 14 06:47 /dev/snd/controlC0
crw-rw---- 1 root audio 116, 1 Feb 28 2012 /dev/snd/seq
crw-rw---- 1 root audio 116, 33 Feb 28 2012 /dev/snd/timer
# for x in `find /sys/class/sound -follow -type f -maxdepth 2 -name dev` ; do echo "$x" ; cat "$x" ; done
# a "rough in", incase your minors are not the same ...
#!/bin/sh
set -e ; mkdir -p /dev/snd/ ; cd /dev/snd/
for dev in /sys/class/sound/*
do
[ -f "$dev/dev" ] && maj="`cat "/sys/class/sound/$file/dev" | awk -F ":" '{print $1}'`"
[ -f "$dev/dev" ] && min="`cat "/sys/class/sound/$file/dev" | awk -F ":" '{print $2}'`"
[ -e "$dev" ] && { echo "exists: $dev" ; exit 1 ; }
mknod -m 0660 "$dev" c "$maj" "$min"
chown root:audio "$dev"
done
rm seq ; mknod -m 0660 seq c 116 1 ; chown root:audio seq
i should see this loading module, with a pause
# modprobe snd_intel8x0
Intel ICH ... PCI INT ... -> your interrupt num
Intel ... clock measured ...
Intel ... clocking to n
note: if you have old /dev/pcm* /dev/midi* /dev/audio* you may want to remove them or leave them, i suggest going without loading oss and going without, then adding oss if you find a need
FILE: /etc/modules.conf - what i added/replaced (same as alsa's advice)
#unsure of above, old advice
above snd-pcm snd-pcm-oss
#ALSA portion
alias char-major-116 snd
alias snd-card-0 snd_intel8x0
#alias snd-card-0 snd_emu10k1x
#module options should go here
#OSS/Free portion
alias char-major-14 soundcore
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-8 snd_seq_oss
alias sound-service-0-12 snd_pcm_oss
you'll see this section talk of hda-intel and may be convinced it's for you.
IT ISN"T. THE SAME EXAMPLE IS ON EVERY SOUND CARD PAGE. IGNORE IT. IT'S JUST AN EXPLINATION THAT USES HDA-INTEL AS AN EXAMPLE, NOT INSTRUCTIONS FOR INTEL8X0
Section: modules.conf
This is a short explanation of what happens in the /etc/modules.conf file.
Native devices
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.