ALSA: Follow channel position definitions to alsa-lib mixer
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Aug 2012 12:47:18 +0000 (14:47 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 6 Sep 2012 16:08:34 +0000 (18:08 +0200)
There is already a set of channel position definitions in alsa-lib
mixer.h, and it'd be more practical to keep the same order for the
PCM channel map, too.  The value is shifted with 1 to keep zero for
UNKNOWN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Documentation/sound/alsa/Channel-Mapping-API.txt
include/sound/asound.h

index df930aa4f4d0c53c399d30c14ae5c5e85f3a5853..4bbf12d5553fef59b0870654a4d77fd82ca5e368 100644 (file)
@@ -76,20 +76,22 @@ here is a cut:
 
 /* channel positions */
 enum {
+       /* this follows the alsa-lib mixer channel value + 1 */
        SNDRV_CHMAP_UNKNOWN = 0,
        SNDRV_CHMAP_FL,         /* front left */
-       SNDRV_CHMAP_FC,         /* front center */
        SNDRV_CHMAP_FR,         /* front right */
-       SNDRV_CHMAP_FLC,        /* front left center */
-       SNDRV_CHMAP_FRC,        /* front right center */
        SNDRV_CHMAP_RL,         /* rear left */
-       SNDRV_CHMAP_RC,         /* rear center */
        SNDRV_CHMAP_RR,         /* rear right */
-       SNDRV_CHMAP_RLC,        /* rear left center */
-       SNDRV_CHMAP_RRC,        /* rear right center */
+       SNDRV_CHMAP_FC,         /* front center */
+       SNDRV_CHMAP_LFE,        /* LFE */
        SNDRV_CHMAP_SL,         /* side left */
        SNDRV_CHMAP_SR,         /* side right */
-       SNDRV_CHMAP_LFE,        /* LFE */
+       SNDRV_CHMAP_RC,         /* rear center */
+       /* new definitions */
+       SNDRV_CHMAP_FLC,        /* front left center */
+       SNDRV_CHMAP_FRC,        /* front right center */
+       SNDRV_CHMAP_RLC,        /* rear left center */
+       SNDRV_CHMAP_RRC,        /* rear right center */
        SNDRV_CHMAP_FLW,        /* front left wide */
        SNDRV_CHMAP_FRW,        /* front right wide */
        SNDRV_CHMAP_FLH,        /* front left high */
index 376e75632e079aaa84c3525ae6d15e7c18b72ec0..27686da0f650fd5daf99960ded33042a47f08837 100644 (file)
@@ -474,20 +474,22 @@ enum {
 
 /* channel positions */
 enum {
+       /* this follows the alsa-lib mixer channel value + 1 */
        SNDRV_CHMAP_UNKNOWN = 0,
        SNDRV_CHMAP_FL,         /* front left */
-       SNDRV_CHMAP_FC,         /* front center */
        SNDRV_CHMAP_FR,         /* front right */
-       SNDRV_CHMAP_FLC,        /* front left center */
-       SNDRV_CHMAP_FRC,        /* front right center */
        SNDRV_CHMAP_RL,         /* rear left */
-       SNDRV_CHMAP_RC,         /* rear center */
        SNDRV_CHMAP_RR,         /* rear right */
-       SNDRV_CHMAP_RLC,        /* rear left center */
-       SNDRV_CHMAP_RRC,        /* rear right center */
+       SNDRV_CHMAP_FC,         /* front center */
+       SNDRV_CHMAP_LFE,        /* LFE */
        SNDRV_CHMAP_SL,         /* side left */
        SNDRV_CHMAP_SR,         /* side right */
-       SNDRV_CHMAP_LFE,        /* LFE */
+       SNDRV_CHMAP_RC,         /* rear center */
+       /* new definitions */
+       SNDRV_CHMAP_FLC,        /* front left center */
+       SNDRV_CHMAP_FRC,        /* front right center */
+       SNDRV_CHMAP_RLC,        /* rear left center */
+       SNDRV_CHMAP_RRC,        /* rear right center */
        SNDRV_CHMAP_FLW,        /* front left wide */
        SNDRV_CHMAP_FRW,        /* front right wide */
        SNDRV_CHMAP_FLH,        /* front left high */