[alsa-devel] Duplicated/weird SND_CHMAP_xx positions

Takashi Iwai tiwai at suse.de
Mon Nov 11 17:05:41 CET 2013


At Sun, 10 Nov 2013 18:19:26 +0200,
Anssi Hannula wrote:
> 
> Hi,
> 
> I see we have both:
>         SND_CHMAP_FLH,          /**< front left high */
>         SND_CHMAP_FCH,          /**< front center high */
>         SND_CHMAP_FRH,          /**< front right high */
> and
>         SND_CHMAP_TFL,          /**< top front left */
>         SND_CHMAP_TFR,          /**< top front right */
>         SND_CHMAP_TFC,          /**< top front center */
> 
> However, these are actually exactly the same AFAICS, both are the
> speakers above the front speakers (CEA/HDMI uses "high" and USB audio
> uses "top" nomenclature).

Oh, a good catch.

> I guess we should deprecate one set?
> I can't think of anything else than adding comments saying they are
> deprecated, though...

Yeah, commenting would be the best effort...

> I guess I'd prefer to deprecate the "high" ones since we have many other
> "top" and "bottom" channels.

Indeed, TOP elements are already used in the recent patch in
gstreamer, so we should keep them.

> Also, the only in-kernel use of "high" is by HDA HDMI and it only will
> start working in 3.13-rcX.

Right, and this can be fixed in 3.13 cycle.

> We have also these:
>         SND_CHMAP_BC,           /**< bottom center */
>         SND_CHMAP_BLC,          /**< bottom left center */
>         SND_CHMAP_BRC,          /**< bottom right center */
> 
> I guess "bottom center" is "under the listener" (USB audio v2 spec
> doesn't clarify, but clearly doesn't use the "Front" specifier as in
> "front bottom center").
> 
> However, the last two ones are weird. The descriptions do not make sense
> to me (under the listener to the left? wouldn't that be "bottom side
> left" instead?).
>
> It seems like they were added by mistake - the only user is the USB
> audio driver which wrongly uses them for "back left/right center"
> instead of correct RLC/RRC.

These are taken from gstreamer definitions.  I'm not quite sure about
these distinctions, but added just for completeness in any future use
case.  So, just keep these unused for now.


Takashi


> For reference, the complete current position list is:
> /** channel positions */
> enum snd_pcm_chmap_position {
>         SND_CHMAP_UNKNOWN = 0,  /**< unspecified */
>         SND_CHMAP_NA,           /**< N/A, silent */
>         SND_CHMAP_MONO,         /**< mono stream */
>         SND_CHMAP_FL,           /**< front left */
>         SND_CHMAP_FR,           /**< front right */
>         SND_CHMAP_RL,           /**< rear left */
>         SND_CHMAP_RR,           /**< rear right */
>         SND_CHMAP_FC,           /**< front center */
>         SND_CHMAP_LFE,          /**< LFE */
>         SND_CHMAP_SL,           /**< side left */
>         SND_CHMAP_SR,           /**< side right */
>         SND_CHMAP_RC,           /**< rear center */
>         SND_CHMAP_FLC,          /**< front left center */
>         SND_CHMAP_FRC,          /**< front right center */
>         SND_CHMAP_RLC,          /**< rear left center */
>         SND_CHMAP_RRC,          /**< rear right center */
>         SND_CHMAP_FLW,          /**< front left wide */
>         SND_CHMAP_FRW,          /**< front right wide */
>         SND_CHMAP_FLH,          /**< front left high */
>         SND_CHMAP_FCH,          /**< front center high */
>         SND_CHMAP_FRH,          /**< front right high */
>         SND_CHMAP_TC,           /**< top center */
>         SND_CHMAP_TFL,          /**< top front left */
>         SND_CHMAP_TFR,          /**< top front right */
>         SND_CHMAP_TFC,          /**< top front center */
>         SND_CHMAP_TRL,          /**< top rear left */
>         SND_CHMAP_TRR,          /**< top rear right */
>         SND_CHMAP_TRC,          /**< top rear center */
>         SND_CHMAP_TFLC,         /**< top front left center */
>         SND_CHMAP_TFRC,         /**< top front right center */
>         SND_CHMAP_TSL,          /**< top side left */
>         SND_CHMAP_TSR,          /**< top side right */
>         SND_CHMAP_LLFE,         /**< left LFE */
>         SND_CHMAP_RLFE,         /**< right LFE */
>         SND_CHMAP_BC,           /**< bottom center */
>         SND_CHMAP_BLC,          /**< bottom left center */
>         SND_CHMAP_BRC,          /**< bottom right center */
>         SND_CHMAP_LAST = SND_CHMAP_BRC,
> };
> 
> 
> -- 
> Anssi Hannula
> 


More information about the Alsa-devel mailing list