[alsa-devel] Using MMAP feature
clemens at ladisch.de
Mon Jul 23 16:46:44 CEST 2012
(please don't drop the mailing list)
(please configure your mailer to wrap lines)
alberto Villa wrote:
> Il 23/07/2012 12:38, Clemens Ladisch ha scritto:
>> alberto Villa wrote:
>>> I'm going to use the MMAP feature of ALSA.
>> Why do you need to do this?
> I need to use MMAP because we are running on an embedded system and we
> want to optimize its operations.
What exactly do you want to optimize? In most cases, mmap is no faster
than snd_pcm_write; using mmap make sense only if the samples are
generated dynamically without storing them in a userspace buffer.
> It was necessary to use snd_pcm_wait() before snd_pcm_begin(), may be
> this the reason?
If you never wait, the buffer will be filled eventually.
More information about the Alsa-devel