aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2015-05-29 14:06:15 -0400
committerMark Brown <broonie@kernel.org>2015-06-04 04:40:03 -0400
commit932ae8809469770a07ce19d6967d2ce303befa08 (patch)
tree78e7eea9be478698732589de449489f82c18f48f
parent8a9782346dccd82cf912552735bda619de4efd8c (diff)
ALSA: topology: Export ID types for TLV controls.
Make sure userspace can define TLV controls for topology using the correct type numbers and channel mappings. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/tlv.h15
-rw-r--r--include/uapi/sound/tlv.h31
2 files changed, 32 insertions, 14 deletions
diff --git a/include/sound/tlv.h b/include/sound/tlv.h
index e11e179420a1..df97d1966468 100644
--- a/include/sound/tlv.h
+++ b/include/sound/tlv.h
@@ -31,12 +31,7 @@
31 * ~(sizeof(unsigned int) - 1)) .... 31 * ~(sizeof(unsigned int) - 1)) ....
32 */ 32 */
33 33
34#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ 34#include <uapi/sound/tlv.h>
35#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
36#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
37#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */
38#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */
39#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */
40 35
41#define TLV_ITEM(type, ...) \ 36#define TLV_ITEM(type, ...) \
42 (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__ 37 (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__
@@ -90,12 +85,4 @@
90 85
91#define TLV_DB_GAIN_MUTE -9999999 86#define TLV_DB_GAIN_MUTE -9999999
92 87
93/*
94 * channel-mapping TLV items
95 * TLV length must match with num_channels
96 */
97#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */
98#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */
99#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */
100
101#endif /* __SOUND_TLV_H */ 88#endif /* __SOUND_TLV_H */
diff --git a/include/uapi/sound/tlv.h b/include/uapi/sound/tlv.h
new file mode 100644
index 000000000000..ffc4f203146c
--- /dev/null
+++ b/include/uapi/sound/tlv.h
@@ -0,0 +1,31 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __UAPI_SOUND_TLV_H
14#define __UAPI_SOUND_TLV_H
15
16#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */
17#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
18#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
19#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */
20#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */
21#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */
22
23/*
24 * channel-mapping TLV items
25 * TLV length must match with num_channels
26 */
27#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */
28#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */
29#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */
30
31#endif