lkml.org 
[lkml]   [1997]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible sound driver bug...?
On Mon, 7 Jul 1997, Chris Evans wrote:

>
> Hi,
>
> I'm messing about with the relatively new mmap()'able DMA sound buffers,
> with linux-2.0.31-pre2.
>
> Basically, I have opened /dev/dsp O_WRONLY. However, when I try to mmap
> the thing with PROT_WRITE only, the mmap call fails. If I open /dev/dsp
> with O_RDWR, the mmap call will succeed.
This is not a bug but a feature. Linux (kernel) doesn't allow mmapping for
write without opening the device with O_RDWR. Some other operating systems
don't even allow mmapping the device with plain PROT_WRITE but require
using PROT_WRITE|PROT_READ.

Best regards,

Hannu
-----
Hannu Savolainen (hannu@voxware.pp.fi, hannu@4front-tech.com)
http://www.4Front-Tech.com/oss.html (Open Sound System (OSS))
http://personal.eunet.fi/pp/voxware (OSS Free/TASD/VoxWare)


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.033 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site