tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Audio device mmap and kevents



At Mon, 21 Jan 2019 17:05:38 -0500 (EST),
Mouse wrote:
> > [...], mmap'ing audio device does not lead to improve any performance
> > or latency.
> 
> Then something is wrong.
> 
> (a) It's the rare port on which copying to mmap()ped memory is no
> faster than a user/kernel crossing plus a copyin.

I understand it.  What I wanted to say is that mmap may be
faster from such point of view but that difference may not make
observable impact especially for application like audioplay(1).

> Of course, if you're just playing a canned audio data stream and doing
> nothing else, the latency issue doesn't matter;

audioplay(1) is just such application.  I want to keep it simple
as possible.

> Writing into an mmap()ped ring buffer takes advantage of the speed
> differential and fixes the latency issue without requiring real-time
> behaviour out of userland.

Please let me confirm.  Current audio mmap no longer points
the hardware buffer.  Is our understanding the same?

Thanks.
---
Tetsuya Isaki <isaki%pastel-flower.jp@localhost / isaki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index