Re: hw_params function and OSS emulation

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

 



On Thu, 23 Aug 2007, Takashi Iwai wrote:
> At Thu, 23 Aug 2007 13:43:40 -0500,
> Timur Tabi wrote:
> >
> > Takashi Iwai wrote:
> >
> > > Err, usually, application = user-space application.  Do you mean
> > > really this?
> >
> > Yes.  The application allocates a buffer, locks it down, and passes it to the
> > kernel.  Since the buffer was allocated in user space, it is virtual
> > contiguous but not physically contiguous, hence the need for a list of
> > physical addresses.  To the hardware, the buffer appears as a collection of
> > scattered buffers.  Hence, scatter/gather.
>
> Hm, then it must be a really special application.  I've never seen
> linux audio apps doing such things...

v4l2 suppoorts both kinds of memory mapped dma.  Normally, the dma buffer
is allocated by the kernel and the user space application is given an
address to memory map.  This way DMA-able memory can be allocated.  For
some device, e.g. zr36060, it might even need to be physically contiguous.

The other kind is called "user pointer" and in this case user space
allocates the memory and passes a pointer to the kernel.  It's defined in
the API, but I think few (any?) driver actually support it. One could use
this to place the dma buffer in a shared memory segment or some other
reason the application wants the buffer at a certain address.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux