Messages in this thread | | | Date | Mon, 7 Jul 1997 23:06:25 +0300 (EET DST) | From | Hannu Savolainen <> | Subject | Re: 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)
| |