LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   No sound, /dev/dsp can't be opened. (https://www.linuxquestions.org/questions/linux-hardware-18/no-sound-dev-dsp-cant-be-opened-77390/)

DarkDrive 07-30-2003 03:04 PM

No sound, /dev/dsp can't be opened.
 
I've just installed MDK 9.1 on a DELL Optiplex GX1, and all is great except there is no sound. Initially there was no /dev/dsp, so I installed the alsa rpm I found on rpm.pbone.net. The file is now there:

lr-xr-xr-x 1 root root 9 Jul 30 11:53 dsp -> /dev/dsp0
crwxrwxrwx 1 dave audio 14, 3 Jul 30 11:53 dsp0
crwxrwxrwx 1 dave audio 14, 19 Jul 30 11:53 dsp1
crwxrwxrwx 1 dave audio 14, 35 Jul 30 11:53 dsp2
crwxrwxrwx 1 dave audio 14, 51 Jul 30 11:53 dsp3

but I am still getting the error. The XMMS application acts like it playing a file, but no sound is generated (yes, the volume is up).

I have no soundcard installed (its on the motherboard), and my doco says that its "Integrated Sound Blaster Compatable Sound (AC97 Audio)".

My lsmod:

Module Size Used by Not tainted
soundcore 6276 0 (autoclean)
sg 34636 0 (autoclean) (unused)
st 29488 0 (autoclean) (unused)
sr_mod 16920 0 (autoclean) (unused)
sd_mod 13100 0 (autoclean) (unused)
scsi_mod 103284 4 (autoclean) [sg st sr_mod sd_mod]
ide-cd 33856 0 (autoclean)
cdrom 31648 0 (autoclean) [sr_mod ide-cd]
af_packet 14952 1 (autoclean)
floppy 55132 0
3c59x 29584 1 (autoclean)
supermount 15296 2 (autoclean)
usb-uhci 24652 0 (unused)
usbcore 72992 1 [usb-uhci]
rtc 8060 0 (autoclean)
ext3 59916 2
jbd 38972 2 [ext3]

dmesg generates messagess like this:

_devfs_search_dir(snd): not a directory
_devfs_search_dir(snd): not a directory
_devfs_search_dir(snd): not a directory
devfs_mk_dir(snd): could not append to dir: c12c85c0 "", err: -17
_devfs_append_entry(controlC0): dir: "snd" is not a directory
devfs_register(snd/controlC0): could not append to parent, err: -20
_devfs_append_entry(controlC1): dir: "snd" is not a directory
devfs_register(snd/controlC1): could not append to parent, err: -20


Thanks much for any info!

slakmagik 07-30-2003 03:39 PM

I'm not sure about the dmesg part but my lsmod output includes:

i810_audio 21160 1
ac97_codec 9512 0 [i810_audio]
soundcore 3332 2 [i810_audio]

That's not very helpful because I didn't do anything to get it there that I know of and wouldn't know how to if it wasn't there, but maybe that's some of what you're missing.

On the bright side, the /dev/dsp looks good. :)

quietguy47 07-30-2003 04:50 PM

As root, try chmod 666 /dev/dsp and chmod 666 /dev/mi*

DarkDrive 07-30-2003 05:24 PM

Tried the chmod 666 to those files .... still getting the error.

quietguy47 07-30-2003 09:17 PM

try kmix and check to see if it is muted.

DarkDrive 07-31-2003 09:59 AM

Humm .... Kmix has no menus/buttons/nothing in its window. I just have a grey outline where the menu should be. Strange.

murugesan_n 08-01-2003 08:54 AM

Same error /dev/dsp cannot be opened
 
Hello,
I got the same error as
/dev/dsp cannot be opened at start up.
I tried
ll /dev/dsp
then it displayed
crw------- 1 root root 14, 3 Jan 30 15:54 /dev/dsp
Now I am root user
and for
ps aux | grep 'fuser/dev/dsp'
the result was
root 5531 0.0 0.2 3572 628 pts/1 S 19:10 0:00 grep fuser/dev/dsp
Even I changed /dev/dsp with permissions as 777
Still the error is there
what should I do now?Any one help me.
Thanks in advance

Regards,
Murugesan

sk8guitar 08-01-2003 12:56 PM

looks like your modules aren't loading.

have you gone to mandrakes control center->hardware and then runt he config option on your soundcard?

what does it tell you the default drivers should be?

can you post an #lscpi ?

i don't know what the drivers for your soundcard should be, but
maybe you could try

modprobe emu10k1


i think thats the driver for sound blaster stuff.

my soundcard is also an integreated one on the motherboard with ac97 and mine is i810_audio

so you'd do modprobe i810_audio.

Corin 08-01-2003 09:37 PM

_devfs_search_dir(snd): not a directory

Are you using

CONFIG_DEVFS_FS
This is support for devfs, a virtual file system (like /proc) which
provides the file system interface to device drivers, normally found
in /dev.


rather than the old fashioned /dev directory full of device files?

Looks to me like you are using devfs and it cannot find the device file /dev/snd/whatever with which the sound driver needs to register.

Strike 08-01-2003 09:51 PM

Argh, chmod 666 /dev/dsp is WRONG and EVIL. If you don't believe that it's bad, give me a shell account and I'll make sure you figure out why it's bad :)

Do you want every single potential user and/or program on your machine to be able to pump noise through your speakers? Probably not. The correct solution is to use an "audio" group (or whatever name you want, that's just the default of many distributions) and grant users specific access to playing sounds.

So, chown root.audio /dev/dsp once you've got your audio group. And then chmod 660 /dev/dsp so that the owner and group members have full read and write permission to it. Then, add yourself to the audio group.

Corin 08-01-2003 10:57 PM

Good point there from Strike.

An alternative is to adopt the policy of whoever is logged in on DISPLAY :0 is the only user allowed to access /dev/dsp and associated files during the time they are logged in on DISPLAY :0.

So one has do a chown in the XServer XSetup_0 file to the user and a chown back to root in the XServer XReset_0 file, which the permission being 600 of course.

This policy was used in Sun Solaris and came about in the following manner.

The Sun IPX workstations came with a microphone. Many people connected them up and left them connected. Other people with accounts on the machine could login to a machine in somebody else's office and then read the microphone device because it was world or group readable, and thus hear for example what they were talking about in confidence to their boss, or to what they were saying on the telephone.

So as Strike says, never, never chmod 666 device files.

ksnash 08-04-2003 09:55 AM

You may have a OSS emulated driver. Switch the device to /dev/audio with OSS selected. The other thing to check for is to see if it may be under /dev/sound/dsp. You may need to modprobe your driver in. MDK 9.1 doesn't seem to be doing a good job of loading.

esterling 08-09-2003 02:38 AM

Solution found (for me at least)
 
If you've chmoded /dev/dsp and you still can't hear anything, try to chmod your /dev/sound directory and everything in it. (as root, of course)

chmod -R 666 /dev/sound

This solved the problem for me tonight.

By the way, in my case I had an existing Mandrake 9.0 install which suddenly stopped using sound a few days ago. It wasn't until today that I found an actual error to match my sound problem, which is how I found my way here. I suspect that something I upgraded through ximian's red-carpet may have wreaked havoc with my /dev settings somehow. Has anyone else had this problem?

Strike 08-09-2003 02:58 AM

Re: Solution found (for me at least)
 
Quote:

Originally posted by esterling
If you've chmoded /dev/dsp and you still can't hear anything, try to chmod your /dev/sound directory and everything in it. (as root, of course)

chmod -R 666 /dev/sound

This solved the problem for me tonight.

Bad! Look up at my post for why (and the right solution). Or if you are too lazy, here is a link.

Corin 08-09-2003 11:00 AM

The fundamental question is whether or not the drivers are loaded.

Look at the output from

dmesg | less

and see if the sound card device has been recognised.

Look at the output from

lsmod | less

and see what modules are loaded.


All times are GMT -5. The time now is 07:36 PM.