]> git.alsa-project.org Git - alsa-lib.git/commitdiff
PCM: Add more chmap definitions for UAC2
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Nov 2012 17:10:26 +0000 (18:10 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 26 Nov 2012 17:10:26 +0000 (18:10 +0100)
The new PCM chmap positions have been added in (to be) 3.8-rc1 kernel,
and now updated alsa-lib, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/pcm.h
include/sound/asound.h
src/pcm/pcm.c

index 1ce91e7df3afbbc340db278cca3fb55d8f08eb93..22356784e078390d8e10da1867b213e0fe5a6dab 100644 (file)
@@ -475,7 +475,7 @@ int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2);
 int snd_pcm_unlink(snd_pcm_t *pcm);
 
 /** channel mapping API version number */
-#define SND_CHMAP_API_VERSION  ((1 << 16) | (0 << 8) | 0)
+#define SND_CHMAP_API_VERSION  ((1 << 16) | (0 << 8) | 1)
 
 /** channel map list type */
 enum snd_pcm_chmap_type {
@@ -516,7 +516,16 @@ enum snd_pcm_chmap_position {
        SND_CHMAP_TRL,          /** top rear left */
        SND_CHMAP_TRR,          /** top rear right */
        SND_CHMAP_TRC,          /** top rear center */
-       SND_CHMAP_LAST = SND_CHMAP_TRC, /** last entry */
+       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,
 };
 
 /** bitmask for channel position */
index 515b8fcd1ca9a1cb6ea85b51ca530a9bb8428473..1774a5c3ef102354de2808899c5ce73c8ff47b0e 100644 (file)
@@ -492,7 +492,17 @@ enum {
        SNDRV_CHMAP_TRL,        /* top rear left */
        SNDRV_CHMAP_TRR,        /* top rear right */
        SNDRV_CHMAP_TRC,        /* top rear center */
-       SNDRV_CHMAP_LAST = SNDRV_CHMAP_TRC,
+       /* new definitions for UAC2 */
+       SNDRV_CHMAP_TFLC,       /* top front left center */
+       SNDRV_CHMAP_TFRC,       /* top front right center */
+       SNDRV_CHMAP_TSL,        /* top side left */
+       SNDRV_CHMAP_TSR,        /* top side right */
+       SNDRV_CHMAP_LLFE,       /* left LFE */
+       SNDRV_CHMAP_RLFE,       /* right LFE */
+       SNDRV_CHMAP_BC,         /* bottom center */
+       SNDRV_CHMAP_BLC,        /* bottom left center */
+       SNDRV_CHMAP_BRC,        /* bottom right center */
+       SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC,
 };
 
 #define SNDRV_CHMAP_POSITION_MASK      0xffff
index e16b07f4e38ce685cfd162d3feb742eb6efe6dde..d61670554b9f34d01171b11790feb9b3fd34863c 100644 (file)
@@ -7434,6 +7434,9 @@ static const char *chmap_names[SND_CHMAP_LAST + 1] = {
        _NAME(FLH), _NAME(FCH), _NAME(FRH), _NAME(TC),
        _NAME(TFL), _NAME(TFR), _NAME(TFC),
        _NAME(TRL), _NAME(TRR), _NAME(TRC),
+       _NAME(TFLC), _NAME(TFRC), _NAME(TSL), _NAME(TSR),
+       _NAME(LLFE), _NAME(RLFE),
+       _NAME(BC), _NAME(BLC), _NAME(BRC),
 };
 #undef _NAME
 #endif
@@ -7480,6 +7483,15 @@ static const char *chmap_long_names[SND_CHMAP_LAST + 1] = {
        [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",
 };
 
 /**