diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-07-27 12:27:00 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-06 12:01:16 -0400 |
commit | 2d3391ec0ecca37efb6bc995906292f47522b471 (patch) | |
tree | 129e8bce7b18bb9de48d6bc0e63806d22b40ad99 /include/sound/asound.h | |
parent | a8d372f171db9b90a64778fbcd9237c9bc256e06 (diff) |
ALSA: PCM: channel mapping API implementation
This patch implements the basic data types for the standard channel
mapping API handling.
- The definitions of the channel positions and the new TLV types are
added in sound/asound.h and sound/tlv.h, so that they can be
referred from user-space.
- Introduced a new helper function snd_pcm_add_chmap_ctls() to create
control elements representing the channel maps for each PCM
(sub)stream.
- Some standard pre-defined channel maps are provided for
convenience.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/asound.h')
-rw-r--r-- | include/sound/asound.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 0876a1e76aef..376e75632e07 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -472,6 +472,36 @@ enum { | |||
472 | SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, | 472 | SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, |
473 | }; | 473 | }; |
474 | 474 | ||
475 | /* channel positions */ | ||
476 | enum { | ||
477 | SNDRV_CHMAP_UNKNOWN = 0, | ||
478 | SNDRV_CHMAP_FL, /* front left */ | ||
479 | SNDRV_CHMAP_FC, /* front center */ | ||
480 | SNDRV_CHMAP_FR, /* front right */ | ||
481 | SNDRV_CHMAP_FLC, /* front left center */ | ||
482 | SNDRV_CHMAP_FRC, /* front right center */ | ||
483 | SNDRV_CHMAP_RL, /* rear left */ | ||
484 | SNDRV_CHMAP_RC, /* rear center */ | ||
485 | SNDRV_CHMAP_RR, /* rear right */ | ||
486 | SNDRV_CHMAP_RLC, /* rear left center */ | ||
487 | SNDRV_CHMAP_RRC, /* rear right center */ | ||
488 | SNDRV_CHMAP_SL, /* side left */ | ||
489 | SNDRV_CHMAP_SR, /* side right */ | ||
490 | SNDRV_CHMAP_LFE, /* LFE */ | ||
491 | SNDRV_CHMAP_FLW, /* front left wide */ | ||
492 | SNDRV_CHMAP_FRW, /* front right wide */ | ||
493 | SNDRV_CHMAP_FLH, /* front left high */ | ||
494 | SNDRV_CHMAP_FCH, /* front center high */ | ||
495 | SNDRV_CHMAP_FRH, /* front right high */ | ||
496 | SNDRV_CHMAP_TC, /* top center */ | ||
497 | SNDRV_CHMAP_NA, /* N/A, silent */ | ||
498 | SNDRV_CHMAP_LAST = SNDRV_CHMAP_NA, | ||
499 | }; | ||
500 | |||
501 | #define SNDRV_CHMAP_POSITION_MASK 0xffff | ||
502 | #define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16) | ||
503 | #define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16) | ||
504 | |||
475 | #define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) | 505 | #define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) |
476 | #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) | 506 | #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) |
477 | #define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) | 507 | #define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) |