]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ALSA: tlv - Define numbers in sound/tlv.h
authorTakashi Iwai <tiwai@suse.de>
Sun, 17 Oct 2010 08:40:53 +0000 (10:40 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 17 Oct 2010 08:46:14 +0000 (10:46 +0200)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/tlv.h
sound/pci/hda/hda_codec.c

index 9fd5b19ccf5c05a7002440588041e49b3e9a8e18..7067e2dfb0b992abc09840c1c58c23a4d4d7e351 100644 (file)
 #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) }
 
index 8c933c8006f4a34172837b1a7a12c1e8eeaf14f0..ee134a25092c51f05f22e5ee4c10b622300469ec 100644 (file)
@@ -1843,7 +1843,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
        val1 += ofs;
        val1 = ((int)val1) * ((int)val2);
        if (min_mute)
-               val2 |= 0x10000;
+               val2 |= TLV_DB_SCALE_MUTE;
        if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv))
                return -EFAULT;
        if (put_user(2 * sizeof(unsigned int), _tlv + 1))