[alsa-devel] [RFC] Channel mapping API

Clemens Ladisch clemens at ladisch.de
Tue Aug 21 13:37:58 CEST 2012

Takashi Iwai wrote:
> this is a progress report of my longstanding TODO, the channel map API
> implementation.  I'm going to cover this at Plumbers audio uconf, so
> we can discuss details there, too.

I won't be there, so ...

> The channel mapping API provides a method for user-space to query, get
> and set the channel map of a PCM stream.  It's required for assigning
> channels properly for multi-channel streams.

This doesn't handle devices with simply numbered outputs (such as many
ICE1712-based devices), or cases where one PCM channel can be routed to
multiple outputs.  However, those devices typically have their own mixer
applets, and generic applications aren't interested in configuring them.

> snd_pcm_get_chmap() returns the currently assigned channel map for the
> given PCM stream.  If the PCM is before prepared, it fills UNKNOWN.

So channel maps are reset when a device is reopened?

> This operation is allowed only at PCM PREPARED state.  When called in
> other states, it shall return an error.

This sounds like an hda-intel HDMI restriction; other chips allow
rerouting at any time.  (And the route plugin could allow that, too.)


More information about the Alsa-devel mailing list