From c08d91695b2a3349254a62b60f03f7971bd90fa0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 17 Oct 2010 10:40:53 +0200 Subject: ALSA: tlv - Define numbers in sound/tlv.h Signed-off-by: Takashi Iwai --- include/sound/tlv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/sound/tlv.h') diff --git a/include/sound/tlv.h b/include/sound/tlv.h index 9fd5b19ccf5c..7067e2dfb0b9 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -38,9 +38,11 @@ #define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ +#define TLV_DB_SCALE_MASK 0xffff +#define TLV_DB_SCALE_MUTE 0x10000 #define TLV_DB_SCALE_ITEM(min, step, mute) \ SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ - (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) + (min), ((step) & TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE : 0) #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) } -- cgit v1.2.3