diff options
Diffstat (limited to 'sound/pci/vx222/vx222_ops.c')
-rw-r--r-- | sound/pci/vx222/vx222_ops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index 9b6d345b83a6..5e51950e05f9 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <sound/core.h> | 29 | #include <sound/core.h> |
30 | #include <sound/control.h> | 30 | #include <sound/control.h> |
31 | #include <sound/tlv.h> | ||
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
32 | #include "vx222.h" | 33 | #include "vx222.h" |
33 | 34 | ||
@@ -845,6 +846,8 @@ static void vx2_set_input_level(struct snd_vx222 *chip) | |||
845 | 846 | ||
846 | #define MIC_LEVEL_MAX 0xff | 847 | #define MIC_LEVEL_MAX 0xff |
847 | 848 | ||
849 | static DECLARE_TLV_DB_SCALE(db_scale_mic, -6450, 50, 0); | ||
850 | |||
848 | /* | 851 | /* |
849 | * controls API for input levels | 852 | * controls API for input levels |
850 | */ | 853 | */ |
@@ -922,18 +925,24 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v | |||
922 | 925 | ||
923 | static struct snd_kcontrol_new vx_control_input_level = { | 926 | static struct snd_kcontrol_new vx_control_input_level = { |
924 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 927 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
928 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
929 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
925 | .name = "Capture Volume", | 930 | .name = "Capture Volume", |
926 | .info = vx_input_level_info, | 931 | .info = vx_input_level_info, |
927 | .get = vx_input_level_get, | 932 | .get = vx_input_level_get, |
928 | .put = vx_input_level_put, | 933 | .put = vx_input_level_put, |
934 | .tlv = { .p = db_scale_mic }, | ||
929 | }; | 935 | }; |
930 | 936 | ||
931 | static struct snd_kcontrol_new vx_control_mic_level = { | 937 | static struct snd_kcontrol_new vx_control_mic_level = { |
932 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 938 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
939 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
940 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
933 | .name = "Mic Capture Volume", | 941 | .name = "Mic Capture Volume", |
934 | .info = vx_mic_level_info, | 942 | .info = vx_mic_level_info, |
935 | .get = vx_mic_level_get, | 943 | .get = vx_mic_level_get, |
936 | .put = vx_mic_level_put, | 944 | .put = vx_mic_level_put, |
945 | .tlv = { .p = db_scale_mic }, | ||
937 | }; | 946 | }; |
938 | 947 | ||
939 | /* | 948 | /* |