alsa/0006-Define-channel-map-position-enum-in-pcm.h.patch
Takashi Iwai 8a90d87ca6 Accepting request 138456 from home:tiwai:branches:multimedia:libs
- backport from upstream tree:
  * lots of patches to support the new chmap API
  * fix segfault in rate plugin error path
  * add a couple of test programs
  * fix inifinte loop in htimestamp of dmix & co

OBS-URL: https://build.opensuse.org/request/show/138456
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=113
2012-10-17 08:17:46 +00:00

57 lines
1.9 KiB
Diff

From 915b26bfe8af876d467a37c336c6bf22d5e370fe Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 21 Aug 2012 12:16:39 +0200
Subject: [PATCH 06/30] Define channel map position enum in pcm.h
The original definition is in sound/asound.h, but we need to export to
alsa-lib users, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/pcm.h | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -474,13 +474,39 @@ int snd_pcm_wait(snd_pcm_t *pcm, int tim
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2);
int snd_pcm_unlink(snd_pcm_t *pcm);
-enum {
+/** channel map list type */
+enum snd_pcm_chmap_type {
SND_CHMAP_NONE = 0, /** unspecified channel position */
SND_CHMAP_FIXED, /** fixed channel position */
SND_CHMAP_VAR, /** freely swappable channel position */
SND_CHMAP_PAIRED, /** pair-wise swappable channel position */
};
+/** channel positions */
+enum snd_pcm_chmap_position {
+ SND_CHMAP_UNKNOWN = 0, /** unspecified */
+ SND_CHMAP_FL, /** front left */
+ SND_CHMAP_FC, /** front center */
+ SND_CHMAP_FR, /** front right */
+ SND_CHMAP_FLC, /** front left center */
+ SND_CHMAP_FRC, /* front right center */
+ SND_CHMAP_RL, /** rear left */
+ SND_CHMAP_RC, /** rear center */
+ SND_CHMAP_RR, /** rear right */
+ SND_CHMAP_RLC, /** rear left center */
+ SND_CHMAP_RRC, /** rear right center */
+ SND_CHMAP_SL, /** side left */
+ SND_CHMAP_SR, /** side right */
+ SND_CHMAP_LFE, /** LFE */
+ 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_LAST = SND_CHMAP_TC, /** last entry */
+};
+
int **snd_pcm_query_chmaps(snd_pcm_t *pcm);
void snd_pcm_free_chmaps(int **maps);
int *snd_pcm_get_chmap(snd_pcm_t *pcm);