[alsa-devel] ALSA buffer query

Jaroslav Kysela perex at perex.cz
Thu Nov 11 08:18:06 CET 2010


On Thu, 11 Nov 2010, Irfan Shaikh wrote:

> Hello All,
>
>
>      1) My understanding :  snd_pcm_writei() takes the allocated buffer 
> from applications and passes the buffer beneath to the ASLA library and 
> then to the ALSA driver for rendering Audio.
>
>      2) Query 1 : Instead of me allocating the buffer in ALSA 
> application and passing the pointer in snd_pcm_writei, Can ALSA allocate 
> the buffer and give to my application, so that i can copy my data into 
> it.
>
>      3) Query 2 : Is there any wayto diirectly get hardware ALSA buffer 
> from the ALSA driver to application so that i can copy PCM data to this 
> buffer directly.
>                          If not, is there any way can we do this ?

Read alsa-lib documentation. snd_pcm_mmap_begin/snd_pcm_mmap_commit.

 						Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.



More information about the Alsa-devel mailing list