mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
ALSA: tlv - Define numbers in sound/tlv.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
de8c85f784
commit
c08d91695b
@ -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) }
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user