[alsa-devel] question for the snd_pcm_mmap_writen.

Anders Gnistrup agn at datarespons.dk
Tue Oct 11 14:06:41 CEST 2011


Hi

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,
                                                                 snd_pcm_uframes_t  	size)

where *bufs[0] equal to first channel *bufs[1] equals to next etc.
Q1)
Should/must the **bufs be continuations -> bufs[0][size]==bufs[1][0]???

Q2)
Is is possible the set bufs[2] == 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.

Q3)
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 mailing list