de-dma uaudio

Alexander Leidinger Alexander at
Fri Apr 15 00:53:57 PDT 2005

Julian Elischer <julian at> wrote:

> The low hardware layer already does DMA to move data out of the
> hardware to memory.  The data gets copied from the user layer to an 
> intermediate
> buffer and from there to the DMA buffers. There is no need to 
> allocate DMA capable
> buffers for the intermediate layer.

I understand this as:
  userland-mem -> kernel-mem -> dma-able-mem -> hardware

So there's no zero-copy behavior?
  userland-mem -> in-kernel-dma-able-mem -> hardware
  userland-mem -> if(is_dmaable(userland-mem)) -> hardware
                  else -> in-kernel-dma-able-mem -> hardware

While the amount of memory used as a sound buffer isn't that much for todays
standards, it's still a memory transfer operation which could be avoided. I
don't know how much it would affect the latency (or if it affects it at
all), but not doing things which aren't necesssary/beneficial is always a
win (in some way) in my experience.


--  Alexander @ PGP ID = B0063FE7     netchild @  : PGP ID = 72077137
The problem that we thought was a problem was, indeed,
a problem, but not the problem we thought was the problem.
		-- Mike Smith

More information about the freebsd-multimedia mailing list