From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: difference between OSS mmap and alsa mmap? [alsa-oss] Date: Mon, 05 Jul 2004 15:19:57 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20040705144251.6a286c94@mango.fruits.de> <200407051313.i65DDlH7023180@localhost.localdomain> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200407051313.i65DDlH7023180@localhost.localdomain> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Paul Davis Cc: Florian Schmidt , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 05 Jul 2004 09:13:46 -0400, Paul Davis wrote: > > >the last thing i can see not working correctly in alsa-oss is the mmap emulati > >on [may closed source apps use OSS with mmap emu]. jcdutton told me on irc tha > >t this is due to the differences in OSS mmaping and ALSA mmaping and it might > >not be possible to resolve these issues.. > > i don't think its possible. the OSS mmap API provides raw ptr access > to the DMA area of the h/w. you cannot intercede when an app just uses > pointer indirection and advance to read/write data. ALSA's API does > the same, of course, but access is bounded by two calls that allow > correct handling for devices where the DMA area is a bit more complex > than the OSS model allows for (e.g. 2 devices, or a device that can't > support mmap in hardware, or a dmix device, or ...) A hack would be to call mmap_avail() in oss's GETSPACE (or similar) ioctls. But, right, I don't think that the "perfect" emulation is possible on all hardwares as it is now, too. Takashi ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com