Re: [linux-audio-dev] mmap problems

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] mmap problems
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Wed Jun 21 2000 - 17:54:23 EEST


>I'm trying to teach myself how to use mmap. So, I downloaded the
      [ ... ]

>So, my questions are:
>Does anyone familiar with the sample code know what's wrong with it (or
>is it a driver problem?)
>
>Does anyone have any sample code for mmap that's simple and is known to
>work?
>
>What is mmap really used for? I've been told that mmap is only useful
>for occasional short samples (as in sound effects for a video game), and
>that continuous playing is just as efficient using the standard read and
>write calls.

>
>My system:
   ...

>Commercial OSS sound drivers

1) If you're using the commercial drivers, you should probably ask
   4Front, since nobody here has any access to the source of their
   drivers.

2) I used mmap_test a couple of years ago with the OSS/Free drivers,
   and it worked fine on the soundcard I used (a Tropez+). However, I
   haven't use OSS or OSS derived drivers in a couple of years (I use
   ALSA), so I have no idea on the current usability of the sample code.

3) Its very likely that some soundcard drivers have never had their
   mmap support tested.

4) mmap is much more efficient than read/write, but is only of use
   in applications that require low-latency, high-efficiency
   operation. There are very few such applications on Linux right now,
   and unless you are writing one (e.g. a real-time FX processor,
   a multichannel hard disk recorder, etc.) there is no reason to
   use mmap mode. In fact, by using it, you will also make you code
   unusable on cards whose h/w cannot support mmap.
   
--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jun 21 2000 - 18:26:31 EEST