Click to See Complete Forum and Search --> : don't understand why there is no sound in Gentoo
EugeneTSWong
10-18-2002, 08:53 PM
Hi.
I just installed Gentoo 1.4 the other day. It seems to work okay. However, I can't get RealPlayer 8 or mpg123 to work.
mpg123 error message is: "Can't open /dev/dsp!"
RealPlayer 8 error message is, "Cannot open the audio device. Another application may be using it.".
I am using devfs.
I looked in /dev and there is no /dev/dsp. There is only /dev/dsp- & /dev/dsp1- & /dev/dspW.
I read the thread about sound in Slackware. Anytime I run MAKEDEV or try to rename things, it says, "Operation not permitted". I am doing this as root.
I searched the Internet with Google using 'Gentoo "Can't open /dev/dsp!"', without the single quotes, and couldn't find anything that I could understand.
Do you have any suggestions?
are you in the audio group?
EugeneTSWong
10-18-2002, 09:53 PM
Originally posted by Cybr099
are you in the audio group?
I wasn't but I added myself, now that you asked.
I logged in and out, and still the same error messages. Anything else?
Thanks for the suggestion. I appreciate your time.
bwkaz
10-18-2002, 11:52 PM
If you're using devfs, then don't run MAKEDEV! MAKEDEV is only for the older style /dev directories where the files always exist. devfs creates the device files that are required when modules are loaded.
But as for why you don't have a /dev/dsp, hmm... Do you have a /dev/sound/dsp? Are you using OSS or Alsa for your sound? If you're using Alsa, then you'll need to make sure you've loaded the snd-pcm-oss module before you'll get a /dev/sound/dsp device.
Is there any way to get either RP8 or mpg123 to use a different device file? I believe there's a command line option for mpg123 that will make it do so.
EugeneTSWong
10-19-2002, 12:52 AM
Originally posted by bwkaz
If you're using devfs, then don't run MAKEDEV! MAKEDEV is only for the older style /dev directories where the files always exist. devfs creates the device files that are required when modules are loaded.
Okay. It's a bit late, but I won't do it again. I am running a monolithic kernel. I hope that this won't cause problems. Even when I ran a modular kernel, there were still problems when I used insmod.
But as for why you don't have a /dev/dsp, hmm... Do you have a /dev/sound/dsp?
No. In the /dev/sound/ directory, there is dspW, audio, sequencer, and sequencer2.
Are you using OSS or Alsa for your sound?
I don't know. How do I check?
If you're using Alsa, then you'll need to make sure you've loaded the snd-pcm-oss module before you'll get a /dev/sound/dsp device.
I'll look at the Alsa web site for some info, but I'm not sure that I'll understand what they are talking about. I read some already. It seemed quite far above my head.
I forgot to mention that I am using a SoundBlaster 16 ISA card.
Thank you also for your suggestions.
bwkaz
10-19-2002, 07:46 PM
To check to see whether Alsa is running, check lsmod's output for a bunch of modules named "snd-<something>-<something else>". If they're there, then you (as of the time you run the lsmod) have the Alsa drivers loaded. If not, you don't.
You can try manually symlinking /dev/dsp to /dev/sound/dspW, that might work. ln -s sound/dspW /dev/dsp
RudeCat7
10-19-2002, 10:09 PM
I'm jealous that you got that far!
I have Gento Envy:D
sarah31
10-19-2002, 11:11 PM
well if you don't know if you have alsa or oss installed then likely you only have sound compiled into the kernel.
and by the sound of it you just need to change ownership of the contents of the /dev/sound directory. if you have an /etc/rc.local you can add the following line:
chown -R <yourusername>.users /dev/sound/*
if that does not work there are examples online on how to add user permissions to sound for devfs
EugeneTSWong
10-25-2002, 03:01 AM
Hi all.
I hope that I didn't keep anybody waiting.
I've been ill for the last few days, and had quite a bit of things to do.
bwkaz, I checked to see what I drivers I have, and none are loaded by default with my modular kernel. I can manually load uart401.o, and then sb_lib.o, and then I have problems with sb.o. Alsa hasn't even been installed on my computer. As far as I can recall I never used it on RH 6.2.
sarah31, I checked to see what was compiled in, and I do have OSS sound drivers compiled. I tried running, "chown -R <yourusername>.users /dev/sound/*" from the command line. It executed without errors, but still no luck. I think that there a much more fundemental problem.
RudeCat7, why don't you share your problem with us, and see if we can help you? Have you even installed Gentoo yet?
sarah31
10-25-2002, 04:23 PM
modprobe sound
do that first of all.
next what sound card do you have?
once that is know we can give you a better idea what other modules to install.
once you have found the correct set of modules then add the necessary alias entires to /etc/modules.conf (if i remember correctly gentoo does have a modules.conf) in the form:
alias modulename (.o is not necessary)
or
alias device module name
of course if gentoo uses /etc/rc.local you can just put the necessary modprobe commands and chown line in there (or in devfs if you are using that for setting sound permissions)
EugeneTSWong
10-25-2002, 08:49 PM
Hi sarah31, & all.
I've solved the problem, and I'll explain how in just a bit, but 1st I want to answer sarah31's questions.
Originally posted by sarah31
modprobe sound
do that first of all.
Okay. Tried it, but it didn't work. I can't recall the exact error messages. I'll try to elaborate on the error messages in a moment.
next what sound card do you have?
I have a Sound Blaster 16 ISA card that is not PNP--at least I don't think so. I think that it came out before PNP, but I don't know hardware history well enough to know for sure.
<snip>once you have found the correct set of modules then add the necessary alias entires to /etc/modules.conf (if i remember correctly gentoo does have a modules.conf) in the form:
alias modulename (.o is not necessary)
or
alias device module name
Yes, it does have /etc/modules.conf. It is configured automatically, according to some comments at the beginning of the file. It seems that "update-modules" updates and adds to it, by doing some kind of modules probing with "ksyms" and /etc/modules.d. I don't quite understand how this all applies the casual user, so I'll leave it for a while and try other avenues.
of course if gentoo uses /etc/rc.local you can just put the necessary modprobe commands and chown line in there (or in devfs if you are using that for setting sound permissions)
Actually, Gentoo does not seem to have /etc/rc.local. I thought that it did. Maybe I'm mixing things up with RH7.2 & 6.* [or an equivalent file that they may have]. For future reference, Gentoo does have /etc/conf.d/local.start. If I understand correctly, this is meant to be the last thing called before login, and you can put anything you want in there.
Right now I won't put the command in any boot up scripts, so that I won't have the module sitting in memory. It sits in memory even when not being used, doesn't it? Maybe I'll put the command in the script later.
The way that I solved the problem, is by editing /lib/modules/2.4.19-gentoo-r9/modules.dep In that file, there was a line:/lib/modules/2.4.19-gentoo-r9/kernel/drivers/sound/sb.o: /lib/modules/2.4
.19-gentoo-r9/kernel/drivers/sound/sb_lib.o \
/lib/modules/2.4.19-gentoo-r9/kernel/drivers/pnp/isa-pnp.o
For future newbie readers, I'd like to point out that I seemed to recall that listing one module after another, means that the 1st will depend on the others. If I understand correctly, the above quote could be interpreted in layman's English as:
"/lib/modules/2.4.19-gentoo-r9/kernel/drivers/sound/sb.o" depends on "/lib/modules/2.4.19-gentoo-r9/kernel/drivers/sound/sb_lib.o" & "\" means to add the next line to this one, & "/lib/modules/2.4.19-gentoo-r9/kernel/drivers/pnp/isa-pnp.o" is also one of the modules that the 1st one depends on.
The thing is I don't want it to depend on isa-pnp.o, so I removed that and replaced it with one of the other modules in the .../drivers/sound directory. I'm going to look into this a lot more. I think that I may have miscompiled something. Maybe I didn't type "make modules_install" or an equivalent when I first created this module. Perhaps, I used isa-pnp when I shouldn't have. I'll try to keep you posted.
Unless anybody has any questions, I'll get back to you next week.