diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-28 07:29:42 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:44:49 -0400 |
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 a55b5fd7da64..24f6fc52f898 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <sound/core.h> | 36 | #include <sound/core.h> |
37 | #include <sound/control.h> | 37 | #include <sound/control.h> |
38 | #include <sound/info.h> | 38 | #include <sound/info.h> |
39 | #include <sound/tlv.h> | ||
39 | #include <sound/ymfpci.h> | 40 | #include <sound/ymfpci.h> |
40 | #include <sound/asoundef.h> | 41 | #include <sound/asoundef.h> |
41 | #include <sound/mpu401.h> | 42 | #include <sound/mpu401.h> |
@@ -1477,11 +1478,15 @@ static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol, | |||
1477 | return change; | 1478 | return change; |
1478 | } | 1479 | } |
1479 | 1480 | ||
1481 | static DECLARE_TLV_DB_LINEAR(db_scale_native, TLV_DB_GAIN_MUTE, 0); | ||
1482 | |||
1480 | #define YMFPCI_DOUBLE(xname, xindex, reg) \ | 1483 | #define YMFPCI_DOUBLE(xname, xindex, reg) \ |
1481 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ | 1484 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \ |
1485 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \ | ||
1482 | .info = snd_ymfpci_info_double, \ | 1486 | .info = snd_ymfpci_info_double, \ |
1483 | .get = snd_ymfpci_get_double, .put = snd_ymfpci_put_double, \ | 1487 | .get = snd_ymfpci_get_double, .put = snd_ymfpci_put_double, \ |
1484 | .private_value = reg } | 1488 | .private_value = reg, \ |
1489 | .tlv = { .p = db_scale_native } } | ||
1485 | 1490 | ||
1486 | static int snd_ymfpci_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1491 | static int snd_ymfpci_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1487 | { | 1492 | { |