From 25cac793e6a3f3c3f6b5234bf7e91bf9f4dd4c87 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 28 Aug 2006 13:20:13 +0200 Subject: [PATCH] --- yaml --- r: 34922 b: refs/heads/master c: 063a40d9111ce7558f2fdfa4f85acfc47eb27353 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/sound/tlv.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 06700dbfbe12..6c800abc63b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f14d167f0233342eab53bb1a429ddad1e848de4 +refs/heads/master: 063a40d9111ce7558f2fdfa4f85acfc47eb27353 diff --git a/trunk/include/sound/tlv.h b/trunk/include/sound/tlv.h index b826e1df1da6..7905841643df 100644 --- a/trunk/include/sound/tlv.h +++ b/trunk/include/sound/tlv.h @@ -33,6 +33,7 @@ #define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ #define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ +#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ unsigned int name[] = { \ @@ -40,4 +41,13 @@ unsigned int name[] = { \ (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) \ } +/* linear volume between min_dB and max_dB (.01dB unit) */ +#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \ +unsigned int name[] = { \ + SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \ + (min_dB), (max_dB) \ +} + +#define TLV_DB_GAIN_MUTE -9999999 + #endif /* __SOUND_TLV_H */