[alsa-devel] Copy ALSA buffer to the buffer allocated in my driver.

Clemens Ladisch clemens at ladisch.de
Mon Aug 1 11:28:08 CEST 2011


`/ET!-i1S!-i wrote:
> 1. I guess pulse audio inturn calls Alsa and  i want to write a Alsa driver.

But the sound cards on the networked PCs already have drivers.

> The problem i am facing is receiving Alsa buffer to my buffer

Your driver's buffer _is_ the ALSA buffer.

> and updating the buffer position to middle layer.

The hardware position is returned by the pointer callback.
The software position should be of no concern to the driver.

> 2. Is it substream->runtime->dma_area or substream->dma_buffer.area holds
> the audio data? What is the difference between them?

These fields are controlled by your driver, although typically they are
set by ALSA helper functions.

substream->dma_buffer is the preallocated buffer; if your driver doesn't
do preallocation, it is not set.  The actual buffer, if it exists and is
accessible by the CPU from kernel space, is in substream->runtime->dma_area.


Regards,
Clemens


More information about the Alsa-devel mailing list