diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-28 07:20:13 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:44:44 -0400 |
commit | 063a40d9111ce7558f2fdfa4f85acfc47eb27353 (patch) | |
tree | 66b1d91583d6fa1c4596c349bebc03a0363273cb /include/sound/tlv.h | |
parent | 1f14d167f0233342eab53bb1a429ddad1e848de4 (diff) |
[ALSA] Add the definition of linear volume TLV
Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'include/sound/tlv.h')
-rw-r--r-- | include/sound/tlv.h | 10 |
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) \ |
38 | unsigned int name[] = { \ | 39 | unsigned 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) \ | ||
46 | unsigned 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 */ |