On 08/21/2012 01:37 PM, Clemens Ladisch wrote:
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.
Good point! It would be nice if we had better support for devices that simply number their outputs, including standard mixer names for those devices, that would be good.
One of the long-standing bugs in PulseAudio is better support for such hardware, so if we had better possibilities to detect and use these outputs and inputs, it could be worth the effort.
As for routing more than one channel in the map from the same PCM, that seems a bit more complex. Maybe one could do a bitmap of channels instead of just one channel (with say, 32 room channel positions and 32 just numbered positions, that would be 64 bits). But how common is that anyway?
Would it make sense to present a bitmap as the query result anyway? Then we could skip the _VAR and _PAIRED types, right?