[alsa-devel] Complex hw buffer with MMAP_COMPLEX?

Takashi Iwai tiwai at suse.de
Tue Oct 9 16:19:52 CEST 2012


At Tue, 9 Oct 2012 16:09:11 +0200,
Adrian Knoth wrote:
> 
> On Tue, Oct 09, 2012 at 03:49:32PM +0200, Clemens Ladisch wrote:
> 
> > > That is, we're dealing with 25 (or 26 for output) interleaved streams
> > > with two or eight channels each.
> > >
> > > How could we represent such a layout in ALSA, that is, how are we
> > > talking to userspace? Would one create subdevices and rejoin them via
> > > plughw?
> > 
> > Is it possible to start/stop the streams independently?
> 
> No, there's only a single start/stop call for the entire card.
> 
> > > Or use MMAP_COMPLEX and then let every application deal with it
> > > on its own?
> > 
> > Alsa-lib can automatically convert this.
> 
> The only remaining question is how to tell alsa-lib about the buffer
> layout.

Pass SNDRV_PCM_INFO_COMPLEX to hw.info bit flags.
Then set up the channel_info via PCM ioctl ops.

> AFAIKS, there's not even a single driver that uses MMAP_COMPLEX atm.

Right.  So far only in alsa-lib plugins.


Takashi


More information about the Alsa-devel mailing list