LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-02-2005, 08:33 AM   #1
webdevel
Member
 
Registered: Jan 2005
Location: Moldova
Distribution: Gentoo / Athlon 3200 / RAM 512
Posts: 60

Rep: Reputation: 15
ALSA problem on intel8x0


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) = ?


root # ls -l /dev/dsp*
crwxrwxrwx 1 goody audio 14, 19 Mar 10 19:51 /dev/dsp1
crwxrwxrwx 1 goody audio 14, 35 Mar 10 19:51 /dev/dsp2
crwxrwxrwx 1 goody audio 14, 51 Mar 10 19:51 /dev/dsp3
crwxrwxrwx 1 goody audio 14, 5 Apr 28 02:00 /dev/dspW

root # ls -l /dev/sound
total 0
crwxrwxrwx 1 goody audio 14, 16 Apr 28 02:00 mixer1


root # lsmod
Module Size Used by
snd_pcm_oss 48288 0
snd_mixer_oss 17664 1 snd_pcm_oss
snd_seq_oss 32384 0
snd_seq_midi_event 6464 1 snd_seq_oss
snd_seq 50768 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 6988 2 snd_seq_oss,snd_seq
snd_intel8x0 28800 0
snd_ac97_codec 74040 1 snd_intel8x0
snd_pcm 83528 3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer 21828 2 snd_seq,snd_pcm
snd 46820 9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd _timer
snd_page_alloc 7620 2 snd_intel8x0,snd_pcm
nvidia 3464668 12
loop 13192 2


Why required devices does not exist in /dev after alsaconf completed without errors?
Does anybody have any idea how to run sound in my case?

Last edited by webdevel; 08-02-2005 at 08:36 AM.
 
Old 08-02-2005, 09:25 PM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
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.
 
Old 08-03-2005, 02:59 AM   #3
webdevel
Member
 
Registered: Jan 2005
Location: Moldova
Distribution: Gentoo / Athlon 3200 / RAM 512
Posts: 60

Original Poster
Rep: Reputation: 15
Yes, I'm running udevd (devfs disabled), but as you can see there are all modules loaded but no devices
 
Old 08-03-2005, 03:42 AM   #4
webdevel
Member
 
Registered: Jan 2005
Location: Moldova
Distribution: Gentoo / Athlon 3200 / RAM 512
Posts: 60

Original Poster
Rep: Reputation: 15
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)


But there is exist 'controlC1' device:

root # ls -l /dev/snd/controlC1
crwxrwxrwx 1 goody audio 116, 32 Apr 28 02:00 /dev/snd/controlC1

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 ?

Last edited by webdevel; 08-03-2005 at 03:45 AM.
 
Old 08-03-2005, 07:35 AM   #5
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
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?).
 
Old 08-03-2005, 03:14 PM   #6
webdevel
Member
 
Registered: Jan 2005
Location: Moldova
Distribution: Gentoo / Athlon 3200 / RAM 512
Posts: 60

Original Poster
Rep: Reputation: 15
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?
 
Old 10-18-2014, 07:46 PM   #7
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
-m 0666 is ok (everyone rw, no x) but if you have pam / audio groups then -m 0660 should work (oner and group rw, other no)
 
Old 10-18-2014, 07:59 PM   #8
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
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.

Last edited by debguy; 10-18-2014 at 08:32 PM.
 
Old 10-18-2014, 08:05 PM   #9
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
i know laptop cards can go in power down mode. hopefully i don't need a driver to wake up a soundcard stuck in low power mode
 
Old 10-19-2014, 10:46 AM   #10
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
advice for ALSA, intel8x0, dell latitude d510

go to alsa site and find intel8x0 in "matrix"
http://www.alsa-project.org/main/index.php/Main_Page

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


# $lspci
# 0000:00:1e.2 Multimedia audio controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
# soundcard on dell latitude d510, SoundBlaster, SigmaTel STA9753, ICH6

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
 
Old 10-19-2014, 10:53 AM   #11
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
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

------------------------------
!!!!!!!!!!! NOTE !!!!!!!!!!!
!!!!!!!!!!! NOTE !!!!!!!!!!!
!!!!!!!!!!! NOTE !!!!!!!!!!!

http://www.alsa-project.org/main/ind...odule-intel8x0

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

After the main multiplexer is loaded, its code

!!!!!!!!!!! NOTE !!!!!!!!!!!
!!!!!!!!!!! NOTE !!!!!!!!!!!
!!!!!!!!!!! NOTE !!!!!!!!!!!

==========================

FILE: ~/.asoundrc

pcm.intel8x0 {
type hw
card 0
}

ctl.intel8x0 {
type hw
card 0
}

==========================

alsamixer
you see text based mixer
make sure use key ">" to turn on/off mute
use up arrow for volume on both master and pcm

aplay /usr/share/sounds/phone.wav
you should hear a ring
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Alsa so close yet so far (intel8x0) Zugwalt Linux - Hardware 1 10-21-2004 05:37 PM
ALSA and intel8x0 problem jcrcabre Linux - Software 3 05-09-2004 01:28 AM
Alsa intel8x0 modprobe problem evkos Linux - Newbie 1 02-19-2004 06:59 PM
peculiar sound problem (MDK90, Intel8x0, ALSA) deputyjim Linux - General 3 11-26-2002 03:56 PM
ALSA 5.1 sound with intel8x0 Tomasfuego Linux - General 0 11-11-2002 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration