diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-28 13:29:42 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 10:44:49 +0200 |
commit | 33925186d843e7004288cd3d87843c5a1dbf55a4 (patch) | |
tree | 56f7eaa2106ef7fd46c7eea7e9b4a9d8ff4fa656 /sound/pci | |
parent | 063a40d9111ce7558f2fdfa4f85acfc47eb27353 (diff) |
[ALSA] ymfpci - Add TLV entries for native volume controls
Added the linear volume TLV entries for YMFPCI native volume controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index a55b5fd7da6..24f6fc52f89 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -36,6 +36,7 @@ #include <sound/core.h> #include <sound/control.h> #include <sound/info.h> +#include <sound/tlv.h> #include <sound/ymfpci.h> #include <sound/asoundef.h> #include <sound/mpu401.h> @@ -1477,11 +1478,15 @@ static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol, return change; } +static DECLARE_TLV_DB_LINEAR(db_scale_native, TLV_DB_GAIN_MUTE, 0); + #define YMFPCI_DOUBLE(xname, xindex, reg) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ + .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \ .info = snd_ymfpci_info_double, \ .get = snd_ymfpci_get_double, .put = snd_ymfpci_put_double, \ - .private_value = reg } + .private_value = reg, \ + .tlv = { .p = db_scale_native } } static int snd_ymfpci_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { |