diff options
-rw-r--r-- | include/sound/tlv.h | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
2 files changed, 4 insertions, 2 deletions
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 @@ | |||
38 | #define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ | 38 | #define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ |
39 | #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ | 39 | #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ |
40 | 40 | ||
41 | #define TLV_DB_SCALE_MASK 0xffff | ||
42 | #define TLV_DB_SCALE_MUTE 0x10000 | ||
41 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ | 43 | #define TLV_DB_SCALE_ITEM(min, step, mute) \ |
42 | SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ | 44 | SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ |
43 | (min), ((step) & 0xffff) | ((mute) ? 0x10000 : 0) | 45 | (min), ((step) & TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE : 0) |
44 | #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ | 46 | #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ |
45 | unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) } | 47 | unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) } |
46 | 48 | ||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8c933c8006f4..ee134a25092c 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1843,7 +1843,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
1843 | val1 += ofs; | 1843 | val1 += ofs; |
1844 | val1 = ((int)val1) * ((int)val2); | 1844 | val1 = ((int)val1) * ((int)val2); |
1845 | if (min_mute) | 1845 | if (min_mute) |
1846 | val2 |= 0x10000; | 1846 | val2 |= TLV_DB_SCALE_MUTE; |
1847 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) | 1847 | if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) |
1848 | return -EFAULT; | 1848 | return -EFAULT; |
1849 | if (put_user(2 * sizeof(unsigned int), _tlv + 1)) | 1849 | if (put_user(2 * sizeof(unsigned int), _tlv + 1)) |