Forums » Linux

/dev/dsp: Input/output error

12»
May 03, 2004 Sheean link
Close vendetta and try again; some times it may take like 4 tries before it works; don't know why. But I also have this problem with other apps here.
May 03, 2004 JayHerrick link
I've opened and closed Vendetta many times that last few days. I've also tried rebooting and not running any other sound apps to give Vendetta a "clean" interface. No change. And if I leave xmms running and start Vendetta the error changes to "/dev/dsp: Device or resource busy". So I sure it's an interface problem. I think...


-Jay
May 03, 2004 JayHerrick link
Anyone else having sound problems with the new 3.4.x versions and a 2.6 kernel? If so have you fixed it? And how? This is not the usual rights problem. And no other app is accessing /dev/dsp. OSS emulation is present and working. That's how xmms works right now. It just seems like Vendetta isn't sending the right stuff to /dev/dsp.

Hum...

Thanks,

-Jay
May 03, 2004 Ciuciu link
check right's to /dev/dsp.. when i add "can write" for all it started to work (even flash in mozilla sterted to make noises :P)
May 03, 2004 JayHerrick link
Err. Wrong answer. I've double checked and tripple checked the rights on both the /dev/dsp1 and the /dev/dsp symlink. Also, other programs running as the same user have no problems with the OSS interface.

Thanks,

-Jay
May 05, 2004 a1k0n link
Input/output error? That's indicative of a much different problem. Does dmesg say anything? What sound card/driver are you using?

Apparently it cannot open in O_WRONLY|O_NONBLOCK mode; that's the only time it would ever print that. But I'm not sure why not. The OSS sound driver hasn't changed since August 2002; it was originally written in May 1998. Yeah, it might be time to write an ALSA driver.
May 05, 2004 JayHerrick link
Hey a1k0n,

dmesg reports thing of relevence, and syslog and messages log files contain nothing new. I'm using the 2.6.5 kernel compiled with gcc 3.4.0. I've got the VIA 82c686A/B, 8233 South Bridge driver compiled in, as will as the OSS emulation. lspci reports that my sound card is 'VIA Technologies, Inc. VT82C686 [Apollo Super AC97/Audio] (rev 20)'

Is there anything I can do to get a more verbose error message?

Let me know if there is any more information I can provide, or if you need help testing anything.

Thanks,

-Jay

P.S. Yes, an ALSA driver would be nice! ;)
May 05, 2004 JayHerrick link
a1k0n,

One more thing. I pulled up the latest source code for xmms, because their OSS driver works on my system, and they are opening the device with only the O_WRONLY flag. Do you have code that might become problematic if you added a switch to remove the O_NONBLOCK flag?

Thanks,

-Jay
May 05, 2004 a1k0n link
Perhaps I could add an environment variable check or something. I use O_NONBLOCK just to perform a nonblocking open - if not, the latest series of OSS drivers will block Vendetta indefinitely if the sound device is in use (which is stupid IMHO but I understand why they did it). Once it's open I set it back to blocking. I loathe that interface.

So anyway, no, there would be no problem optionally not using noblocking opens.
May 05, 2004 JayHerrick link
Sounds like OSS is getting cranky with age! ;) Let me know when I can try out the flag.

Thanks!
May 06, 2004 Icarus link
a1k0n - Take the plunge and switch to ALSA (you know you want to.. hehe...). It took a couple of days to get my head round ALSA, as i'm using an MMAP'd buffer with an asyncronous handler to call my mixer when the ring buffer gets low, but its worth it in the end cos OSS couldn't do that. Still not got ALSA mixer controls (volumes) sorted, but its not a high priority on my list...

I see OSS getting left behind in terms of the drivers from now...
May 06, 2004 a1k0n link
An mmap()ed buffer is exactly what we want. That's cool. I'll get to it.
May 08, 2004 asphyxia link
AWWWW!!! Crap....

Yeah, i got this issue too...

Oh Well,

asphy
May 07, 2004 a1k0n link
Oh, crap. It's not the NONBLOCK thing, it's the mmap() thing I'm doing. I'm opening in O_RDWR|O_NONBLOCK, and the O_RDWR is almost certainly what isn't working, probably because it isn't implemented in that driver. But O_RDWR is required if you're going to do mmap(), even if you're just writing to the device. Yet another stupid OSSism.

Sorry, I'll just have to write an ALSA driver. I'm leaving this for now.
May 13, 2004 jehova link
my 0.02$:
did you check lsof|grep dsp?
maybe some other stuff IS blocking dsp? this stuff may be eg arts demon or other sound server. or even opened bmp (beep-media-player).
May 13, 2004 asphyxia link
yeah checked that, in not an avid user of soundservers and dont have anything like arts, esd or whatever installed.

infact, I have three programs installed that are related to sound... xmms, alsamixer and vendetta

lsof shows the grand total of fu^h^h err.. nothing... using dsp =p

asphy
May 15, 2004 /dev/paladin link
just type:
echo "vendetta 0 0 direct" > /proc/asound/card0/pcm0p/oss

and be happy ;)

That enables the direct oss sound emulation for vendetta.

Regards,
paladin
May 26, 2004 asphyxia link
paladin,

next time you're in the uk... look me up...

iou the biggest, wettest, sloppiest kiss known to mankind =p

heh, j/k

but seriously, iou a pint

asphy
May 31, 2004 randomblast link
"Yeah, it might be time to write an ALSA driver."

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESS!!!!!
Jun 03, 2004 thginkrej link
"just type:
echo "vendetta 0 0 direct" > /proc/asound/card0/pcm0p/oss

and be happy ;)"

Unless ALSA conveniently denies any sort of write access to the oss files in /proc/asound/.../. Bah. I can't even chmod it (worth a try).. Any ideas?

I too am new to the world of ALSA. (I might even try my beloved old Aureal Vortex2 card that I boxed due to lousy Linux support.)

[EDIT] Nevermind.. I got it to work as root.