diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-21 12:44:54 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:42:56 -0400 |
commit | 7058c042001e111c601e1b031d9bcb8b5d392b74 (patch) | |
tree | 2ceb87b23ef88ec3b39b69b583ab809830e6152e /sound/pci/via82xx.c | |
parent | 2f3482fbbd5dac7d0e86fe5b7ac5c1e51d52b084 (diff) |
[ALSA] Added TLV support to VIA82xx driver
Added the TLV support to VIA82xx driver for addition of
dB range information.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index e0e3bfd7a2db..6db3d4cc4d8d 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <sound/pcm.h> | 59 | #include <sound/pcm.h> |
60 | #include <sound/pcm_params.h> | 60 | #include <sound/pcm_params.h> |
61 | #include <sound/info.h> | 61 | #include <sound/info.h> |
62 | #include <sound/tlv.h> | ||
62 | #include <sound/ac97_codec.h> | 63 | #include <sound/ac97_codec.h> |
63 | #include <sound/mpu401.h> | 64 | #include <sound/mpu401.h> |
64 | #include <sound/initval.h> | 65 | #include <sound/initval.h> |
@@ -1698,21 +1699,29 @@ static int snd_via8233_pcmdxs_volume_put(struct snd_kcontrol *kcontrol, | |||
1698 | return change; | 1699 | return change; |
1699 | } | 1700 | } |
1700 | 1701 | ||
1702 | static DECLARE_TLV_DB_SCALE(db_scale_dxs, -9450, 150, 1); | ||
1703 | |||
1701 | static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = { | 1704 | static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = { |
1702 | .name = "PCM Playback Volume", | 1705 | .name = "PCM Playback Volume", |
1703 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1706 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1707 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
1708 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
1704 | .info = snd_via8233_dxs_volume_info, | 1709 | .info = snd_via8233_dxs_volume_info, |
1705 | .get = snd_via8233_pcmdxs_volume_get, | 1710 | .get = snd_via8233_pcmdxs_volume_get, |
1706 | .put = snd_via8233_pcmdxs_volume_put, | 1711 | .put = snd_via8233_pcmdxs_volume_put, |
1712 | .tlv = { .p = db_scale_dxs } | ||
1707 | }; | 1713 | }; |
1708 | 1714 | ||
1709 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { | 1715 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { |
1710 | .name = "VIA DXS Playback Volume", | 1716 | .name = "VIA DXS Playback Volume", |
1711 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1717 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1718 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
1719 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
1712 | .count = 4, | 1720 | .count = 4, |
1713 | .info = snd_via8233_dxs_volume_info, | 1721 | .info = snd_via8233_dxs_volume_info, |
1714 | .get = snd_via8233_dxs_volume_get, | 1722 | .get = snd_via8233_dxs_volume_get, |
1715 | .put = snd_via8233_dxs_volume_put, | 1723 | .put = snd_via8233_dxs_volume_put, |
1724 | .tlv = { .p = db_scale_dxs } | ||
1716 | }; | 1725 | }; |
1717 | 1726 | ||
1718 | /* | 1727 | /* |