Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 4023

Summary: devfsd config for alsa
Product: Gentoo Linux Reporter: Matthieu Sozeau (RETIRED) <mattam>
Component: [OLD] Core systemAssignee: Jeremy Huddleston (RETIRED) <eradicator>
Status: RESOLVED WORKSFORME    
Severity: minor CC: azarah, charlie, Florian.Steinel, folken, sound
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Matthieu Sozeau (RETIRED) gentoo-dev 2002-06-22 09:11:59 UTC
There are incomplete lines for /etc/devfsd.conf in the alsa portion:
just changing these to

LOOKUP          dsp          MODLOAD ACTION snd-pcm-oss
LOOKUP          mixer        MODLOAD ACTION snd-mixer-oss
LOOKUP          midi         MODLOAD ACTION snd-seq-oss

will do the trick
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-24 12:46:32 UTC
Not really, as it is *too* alsa specific.  Add a file to /etc/modules.d/
which contain:


#---------------snip-------------------------
alias dsp snd-pcm-oss
alias mixer snd-mixer-oss
alias midi snd-seq-oss
#---------------snip-------------------------

I for instance use OSS, and have:

#----------------snip------------------------
alias sound-slot-0 es1371
options sound dmabuf=1
alias midi opl3
options opl3 io=0x388
options es1371 amplifier=1
#----------------snip------------------------

which only need to define midi ....
Comment 2 Arcady Genkin (RETIRED) gentoo-dev 2002-06-24 13:08:23 UTC
alsa-driver ebuild already installs a file in modules.d with aliases for
/dev/dsp and and /dev/mixer.  I've just added the line with the alias for
/dev/mixer.  IMO this should do the trick for most people, and allows us to
avoid littering devfsd.conf with alsa-specific stuff.
Comment 3 Matthieu Sozeau (RETIRED) gentoo-dev 2002-06-24 13:12:34 UTC
You're all right.
Comment 4 Steve Arnold archtester gentoo-dev 2003-06-07 14:29:18 UTC
Wait a minute, I don't think it's fixed.  I just did a system/world update yesterday (including alsa) and my /dev/dsp disappeared, which of course horked up gnomemeeting, among other things...

I still think more alsa stuff needs to be added to devfsd.conf (maybe in a comment block for those who need it) to straighten this out.  Since this is a year later, I'd say this bug should be re-opened.  Or enter a new one :)

http://forums.gentoo.org/viewtopic.php?p=356849#356849

Please read my forum post above and correct my where I'm wrong.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-07 14:31:35 UTC
apparently, the problem still exists.
Comment 6 Nick "folken" Matthews 2003-06-07 19:15:26 UTC
I too am having this problem. I'm not having any sucess getting this to be automagically created though. 
I don't know why, but following any of the suggestions that I have seen, I can't seem to get devfs to create a /dev/dsp
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-09 10:08:35 UTC
Below should be an ok for /etc/modules.d/alsa (if you uncomment the
required lines) to auto load needed when just accessing /dev/dsp,
or whatever:

-------------------------------------------------
# Alsa 0.9.X kernel modules' configuration file.
# $Header: $

                                                                                                                            # 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-mycard    #snd-intel8x0
#alias snd-card-1 snd-ens1371  # NOTE for a second card, you need to change
                               # cards_limit=1 below ....
# OSS/Free portion
alias sound-slot-0 snd-card-0
#alias sound-slot-1 snd-card-1
                                                                                                                            
# 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 /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
alias /dev/adsp snd-pcm-oss
alias /dev/audio snd-pcm-oss
                                                                                                                            
# Set this to the correct number of cards.
options snd snd_major=116 cards_limit=1
Comment 8 Charles Goodwin 2003-12-13 16:27:55 UTC
Has this changed with later versions of ALSA?
Comment 9 Matthieu Sozeau (RETIRED) gentoo-dev 2003-12-14 04:58:58 UTC
No, it hasn't changed, AFAIK.
Comment 10 Matthieu Sozeau (RETIRED) gentoo-dev 2004-01-19 13:19:47 UTC
Shouldn't we close this bug, there has been no error reports for a while now.
Comment 11 Colin Tinker 2004-01-27 14:15:04 UTC
After the devfs update over the weekend this has reaed its ugly head again at least with the 2.6 kernel on my system.  I think it has something to do with the fact /dev/snd and /dev/sound are directories not files and in modules,devfs we have:-

# Soundcard
alias     /dev/sound            sound-slot-0
alias     /dev/audio            /dev/sound
alias     /dev/mixer            /dev/sound
alias     /dev/dsp              /dev/sound
alias     /dev/dspW             /dev/sound
alias     /dev/midi             /dev/sound

which also appears in modules.devfs but I am afraid I do not know enought about devfs to resolve this.
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 02:56:28 UTC
This is working for me... is it still broken for you?
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-16 10:23:42 UTC
closing as this appears to have been fixed for a while...
Comment 14 Florian Steinel 2004-03-28 09:20:32 UTC
Hhm, using alsa-driver-0.9.8 amixer can't open /dev/controlC0. it doesn't exist.
But using the snddevice script from alsa-driver-0.9.8.tar.bz2 fixed it.

So now my /etc/devfs.d/alsa look like:
---
# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP          snd          MODLOAD ACTION snd
LOOKUP          dsp          MODLOAD
LOOKUP          mixer        MODLOAD
LOOKUP          midi         MODLOAD
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660
REGISTER       ^snd/controlC0 CFUNCTION GLOBAL symlink /proc/asound/oss/sndstat /dev/sndstat
---
please add this file to the alsa package (0.9.8) or fix 
http://www.gentoo.org/doc/en/alsa-guide.xml#doc_chap2 Listing 2.11

Stuff like aload could be also symlinked..., or is this fixed with newer alsa-driver releases?

(code taken from http://lists.debian.org/debian-user/2003/debian-user-200308/msg05421.html )
Comment 15 Florian Steinel 2004-03-28 09:52:01 UTC
After reading
http://www.simon-vollmer.de/public/lynx/big/linux_module.html
i'm i little bit confused, snd-via86xx was already loaded but no /dev/controllC0!
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-28 16:41:41 UTC
it's best to reopen a bug if you want a dev to check it out again... otherwise we'll just miss it...
Comment 17 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-30 17:27:27 UTC
F. Steinel: amixer is provided by alsa-utils... not alsa-driver.  Do you have a version mismatch between them?
Comment 18 Florian Steinel 2004-03-31 12:42:42 UTC
alsa-utils 0.9.8
alsa-driver 0.9.8 (2.4.23-grsec-1.9.13)
xfs-sources 2.4.24-rc3
Do you need any other versions?

BTW: My problem was fixed by the 
REGISTER       ^snd/controlC0 CFUNCTION GLOBAL symlink /proc/asound/oss/sndstat /dev/sndstat
line...
should i delete above line an the dev files created by snddevice to trigger the bug again?
Comment 19 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-04 14:54:45 UTC
Please update to alsa-*-1.0.3 and try to trigger the bug...
Comment 20 Jeremy Huddleston (RETIRED) gentoo-dev 2004-04-11 23:52:52 UTC
no response and works for me...
Comment 21 Florian Steinel 2004-04-12 05:58:43 UTC
worksforme (busy doing a ppc gentoo install) .-)