[alsa-devel] non-interleaved mode

Steve Longerbeam stevel at embeddedalley.com
Wed Jul 11 20:12:49 CEST 2007

Jaroslav Kysela wrote:
> On Wed, 11 Jul 2007, Steve Longerbeam wrote:
>> Last night I ran an experiment.  I created a 16-bit stereo .wav file 
>> with all left samples = 0x5555, and all right samples = 0xAAAA. I then 
>> played the .wav using aplay, and just before trigger start in my driver 
>> I searched the DMA buffer for the first occurrence of 0xAAAA. The right 
>> samples didn't start until exactly half-way through the entire DMA buffer!
> Yes, it's the right non-interleaved behaviour. You can imagine this layout 
> as separate "mono" ring buffers for each channels - see 
> snd_pcm_lib_ioctl_channel_info() in pcm_lib.c . Driver might modify 
> info->offset if required (see hdsp.c driver for example).

thanks, that cleared everything up for me.


More information about the Alsa-devel mailing list