[alsa-devel] question for the snd_pcm_mmap_writen.
agn at datarespons.dk
Tue Oct 11 14:06:41 CEST 2011
First post to the mail list.
I have been reading through the Alsa API and tutorials and it all seems fairly simple.
But I still have some questions for the sample format possible to send using the mmap method.
First a short description of my problem.
I have a embedded device with a 8 channel audio chip.
I only have to use 5 of these channels
My goal is not to use any cpu cycles on the 3 unused channels
I have decided to use the non-interleaved method (application specific, streams comes from different sources in a correct hardware specific format).
For this, the function snd_pcm_mmap_writen could be used.
When sending data to the device the format should/could be done using a 5 seperate buffers.
snd_pcm_sframes_t snd_pcm_mmap_writen (snd_pcm_t * pcm,
void ** bufs,
where *bufs equal to first channel *bufs equals to next etc.
Should/must the **bufs be continuations -> bufs[size]==bufs???
Is is possible the set bufs == NULL, to signal that the channel is unused?
I think I know the answers.
Yes, it should be continues, No data can be set to NULL.
I have tried to find some information about the SND_PCM_ACCESS_MMAP_COMPLEX. What is this???
My best gees is that it is some entirely hardware specific access format?
Regards Anders Gnistrup
More information about the Alsa-devel