PCM: Define MONO and other channel map positions

Follow the new definitions in the kernel side.  MONO and others have
been added, and the order of position table was changed again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2012-09-12 18:43:59 +02:00
parent 58c45b3030
commit f7300682dc
3 changed files with 30 additions and 8 deletions

View file

@ -489,6 +489,8 @@ enum snd_pcm_chmap_type {
/** channel positions */ /** channel positions */
enum snd_pcm_chmap_position { enum snd_pcm_chmap_position {
SND_CHMAP_UNKNOWN = 0, /** unspecified */ SND_CHMAP_UNKNOWN = 0, /** unspecified */
SND_CHMAP_NA, /** N/A, silent */
SND_CHMAP_MONO, /** mono stream */
SND_CHMAP_FL, /** front left */ SND_CHMAP_FL, /** front left */
SND_CHMAP_FR, /** front right */ SND_CHMAP_FR, /** front right */
SND_CHMAP_RL, /** rear left */ SND_CHMAP_RL, /** rear left */
@ -508,8 +510,13 @@ enum snd_pcm_chmap_position {
SND_CHMAP_FCH, /** front center high */ SND_CHMAP_FCH, /** front center high */
SND_CHMAP_FRH, /** front right high */ SND_CHMAP_FRH, /** front right high */
SND_CHMAP_TC, /** top center */ SND_CHMAP_TC, /** top center */
SND_CHMAP_NA, /** N/A, silent */ SND_CHMAP_TFL, /** top front left */
SND_CHMAP_LAST = SND_CHMAP_NA, /** last entry */ 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_LAST = SND_CHMAP_TRC, /** last entry */
}; };
#define SND_CHMAP_POSITION_MASK 0xffff /** bitmask for channel position */ #define SND_CHMAP_POSITION_MASK 0xffff /** bitmask for channel position */

View file

@ -479,8 +479,10 @@ enum {
/* channel positions */ /* channel positions */
enum { enum {
/* this follows the alsa-lib mixer channel value + 1 */
SNDRV_CHMAP_UNKNOWN = 0, SNDRV_CHMAP_UNKNOWN = 0,
SNDRV_CHMAP_NA, /* N/A, silent */
SNDRV_CHMAP_MONO, /* mono stream */
/* this follows the alsa-lib mixer channel value + 3 */
SNDRV_CHMAP_FL, /* front left */ SNDRV_CHMAP_FL, /* front left */
SNDRV_CHMAP_FR, /* front right */ SNDRV_CHMAP_FR, /* front right */
SNDRV_CHMAP_RL, /* rear left */ SNDRV_CHMAP_RL, /* rear left */
@ -501,8 +503,13 @@ enum {
SNDRV_CHMAP_FCH, /* front center high */ SNDRV_CHMAP_FCH, /* front center high */
SNDRV_CHMAP_FRH, /* front right high */ SNDRV_CHMAP_FRH, /* front right high */
SNDRV_CHMAP_TC, /* top center */ SNDRV_CHMAP_TC, /* top center */
SNDRV_CHMAP_NA, /* N/A, silent */ SNDRV_CHMAP_TFL, /* top front left */
SNDRV_CHMAP_LAST = SNDRV_CHMAP_NA, SNDRV_CHMAP_TFR, /* top front right */
SNDRV_CHMAP_TFC, /* top front center */
SNDRV_CHMAP_TRL, /* top rear left */
SNDRV_CHMAP_TRR, /* top rear right */
SNDRV_CHMAP_TRC, /* top rear center */
SNDRV_CHMAP_LAST = SNDRV_CHMAP_TRC,
}; };
#define SNDRV_CHMAP_POSITION_MASK 0xffff #define SNDRV_CHMAP_POSITION_MASK 0xffff

View file

@ -7375,7 +7375,7 @@ const char *snd_pcm_chmap_type_name(enum snd_pcm_chmap_type val)
#define _NAME(n) [SND_CHMAP_##n] = #n #define _NAME(n) [SND_CHMAP_##n] = #n
static const char *chmap_names[SND_CHMAP_LAST + 1] = { static const char *chmap_names[SND_CHMAP_LAST + 1] = {
_NAME(UNKNOWN), _NAME(UNKNOWN), _NAME(NA), _NAME(MONO),
_NAME(FL), _NAME(FR), _NAME(FL), _NAME(FR),
_NAME(RL), _NAME(RR), _NAME(RL), _NAME(RR),
_NAME(FC), _NAME(LFE), _NAME(FC), _NAME(LFE),
@ -7383,7 +7383,8 @@ static const char *chmap_names[SND_CHMAP_LAST + 1] = {
_NAME(RC), _NAME(FLC), _NAME(FRC), _NAME(RLC), _NAME(RRC), _NAME(RC), _NAME(FLC), _NAME(FRC), _NAME(RLC), _NAME(RRC),
_NAME(FLW), _NAME(FRW), _NAME(FLW), _NAME(FRW),
_NAME(FLH), _NAME(FCH), _NAME(FRH), _NAME(TC), _NAME(FLH), _NAME(FCH), _NAME(FRH), _NAME(TC),
_NAME(NA), _NAME(TFL), _NAME(TFR), _NAME(TFC),
_NAME(TRL), _NAME(TRR), _NAME(TRC),
}; };
#undef _NAME #undef _NAME
@ -7397,6 +7398,8 @@ const char *snd_pcm_chmap_name(enum snd_pcm_chmap_position val)
static const char *chmap_long_names[SND_CHMAP_LAST + 1] = { static const char *chmap_long_names[SND_CHMAP_LAST + 1] = {
[SND_CHMAP_UNKNOWN] = "Unknown", [SND_CHMAP_UNKNOWN] = "Unknown",
[SND_CHMAP_NA] = "Unused",
[SND_CHMAP_MONO] = "Mono",
[SND_CHMAP_FL] = "Front Left", [SND_CHMAP_FL] = "Front Left",
[SND_CHMAP_FR] = "Front Right", [SND_CHMAP_FR] = "Front Right",
[SND_CHMAP_RL] = "Rear Left", [SND_CHMAP_RL] = "Rear Left",
@ -7416,7 +7419,12 @@ static const char *chmap_long_names[SND_CHMAP_LAST + 1] = {
[SND_CHMAP_FCH] = "Front Center High", [SND_CHMAP_FCH] = "Front Center High",
[SND_CHMAP_FRH] = "Front Right High", [SND_CHMAP_FRH] = "Front Right High",
[SND_CHMAP_TC] = "Top Center", [SND_CHMAP_TC] = "Top Center",
[SND_CHMAP_NA] = "Unused", [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",
}; };
const char *snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val) const char *snd_pcm_chmap_long_name(enum snd_pcm_chmap_position val)