[alsa-devel] [RFC] Channel mapping API (take 2)
Takashi Iwai
tiwai at suse.de
Wed Sep 5 08:17:44 CEST 2012
At Wed, 05 Sep 2012 09:00:12 +0300,
Tanu Kaskinen wrote:
>
> On Tue, 2012-09-04 at 17:47 +0200, Takashi Iwai wrote:
> > The rest aren't so much changed. Only slight bug fixes.
>
> I have a couple of comments about "the rest". I haven't been following
> the development of the channel map API very closely, so I'm relying on
> the pcm.h file only.
>
>
> /** channel map list type */
> enum snd_pcm_chmap_type {
> SND_CHMAP_NONE = 0, /** unspecified channel position */
> SND_CHMAP_FIXED, /** fixed channel position */
> SND_CHMAP_VAR, /** freely swappable channel position */
> SND_CHMAP_PAIRED, /** pair-wise swappable channel position */
> };
>
> It's not clear to me what the VAR and PAIRED types actually mean. It
> would be nice to explain in more detail the concepts in the header.
VAR is for devices that allow swapping the channel position in the
stream arbitrarily, such as HDMI or DP on HD-audio. For example, with
4.0 stream, you can set like "RL/FR/RR/FL", "FR/RL/FL/RR" or
whatever you like.
Meanwhile, PAIRED is the case where you can swap the channel positions
but the pair must be retained. That is, you can swap FL/FR and RL/RR
pairs, but not FL and RR.
> The snd_pcm_chmap_position enum doesn't contain an entry for mono. I
> think it would be a useful channel to have. Up/downmixing decisions may
> be different with mono than, for example, a single channel declared as
> front left.
Well, this raises a question "What is mono".
If this is supposed to be a channel position, then we should add the
definition. But is it really so? If it's a mono stream mixed from
front left and front right, isn't it a front center?
I don't mind so much to add more definitions, but I'd like rather hear
whether this gives more confusion than its win from the application
POV (especially PA and gstreamer).
Takashi
More information about the Alsa-devel
mailing list