aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/tlv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/tlv.h b/include/sound/tlv.h
index b826e1df1da6..7905841643df 100644
--- a/include/sound/tlv.h
+++ b/include/sound/tlv.h
@@ -33,6 +33,7 @@
33 33
34#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ 34#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */
35#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ 35#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
36#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
36 37
37#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ 38#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
38unsigned int name[] = { \ 39unsigned int name[] = { \
@@ -40,4 +41,13 @@ unsigned int name[] = { \
40 (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) \ 41 (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) \
41} 42}
42 43
44/* linear volume between min_dB and max_dB (.01dB unit) */
45#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \
46unsigned int name[] = { \
47 SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \
48 (min_dB), (max_dB) \
49}
50
51#define TLV_DB_GAIN_MUTE -9999999
52
43#endif /* __SOUND_TLV_H */ 53#endif /* __SOUND_TLV_H */