could not mmap /dev/dsp

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium

LoRd_CJ
New Member
Posts: 3
Joined: Sun Feb 22, 2004 7:31 pm

could not mmap /dev/dsp

Postby LoRd_CJ » Sun Nov 20, 2005 1:27 pm

Another problem, trying to start wolfenstein: enemy territory with sound and I get:

/dev/dsp: Invalid argument
Could not mmap /dev/dsp

Again, latest drivers and FreeBSD 6.

Also, I had an issue with permission denied to all device nodes right after installing OSS. I had to chmod 666 /dev/dsp* and /dev/mixer*

adamk
Member
Posts: 78
Joined: Fri Jun 11, 2004 1:50 pm

Postby adamk » Thu Aug 27, 2009 12:21 pm

FYI, I am also getting the same error with Return to Castle Wolfenstein and OSS4.2 on both a soundblaster live and ich.

Adam

cesium
Developer
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Postby cesium » Thu Aug 27, 2009 9:28 pm

I wish you didn't resurrect a 4 year old thread...

Anyway, the problem is that the per-fd data storing api (cdev_set_priv() or something like that) is mostly incompatible with mmap()**, so OSSv4 can't do mmap() unless the per-fd code is disabled (i.e. OSSv4 is recompiled with VDEV_SUPPORT undefined. One would have to edit kernel/OS/FreeBSD/wrapper/bsddef.h to do this properly). This would have the effect of preventing vmix from being able to get multiple clients on /dev/dsp...

** IIRC, they did a sort-of an hack where it works only for a certain type of accesses...

*** The permissions issue in the original post is probably due to some crazy umask? Latest OSS clears umask before creating the nodes.


Return to “BSD”

Who is online

Users browsing this forum: No registered users and 3 guests