diff options
Diffstat (limited to 'sound/pci/mixart/mixart_mixer.c')
-rw-r--r-- | sound/pci/mixart/mixart_mixer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/pci/mixart/mixart_mixer.c b/sound/pci/mixart/mixart_mixer.c index ed47b732c103..13de0f71d4b7 100644 --- a/sound/pci/mixart/mixart_mixer.c +++ b/sound/pci/mixart/mixart_mixer.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "mixart_core.h" | 31 | #include "mixart_core.h" |
32 | #include "mixart_hwdep.h" | 32 | #include "mixart_hwdep.h" |
33 | #include <sound/control.h> | 33 | #include <sound/control.h> |
34 | #include <sound/tlv.h> | ||
34 | #include "mixart_mixer.h" | 35 | #include "mixart_mixer.h" |
35 | 36 | ||
36 | static u32 mixart_analog_level[256] = { | 37 | static u32 mixart_analog_level[256] = { |
@@ -388,12 +389,17 @@ static int mixart_analog_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
388 | return changed; | 389 | return changed; |
389 | } | 390 | } |
390 | 391 | ||
392 | static DECLARE_TLV_DB_SCALE(db_scale_analog, -9600, 50, 0); | ||
393 | |||
391 | static struct snd_kcontrol_new mixart_control_analog_level = { | 394 | static struct snd_kcontrol_new mixart_control_analog_level = { |
392 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 395 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
396 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
397 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
393 | /* name will be filled later */ | 398 | /* name will be filled later */ |
394 | .info = mixart_analog_vol_info, | 399 | .info = mixart_analog_vol_info, |
395 | .get = mixart_analog_vol_get, | 400 | .get = mixart_analog_vol_get, |
396 | .put = mixart_analog_vol_put, | 401 | .put = mixart_analog_vol_put, |
402 | .tlv = { .p = db_scale_analog }, | ||
397 | }; | 403 | }; |
398 | 404 | ||
399 | /* shared */ | 405 | /* shared */ |
@@ -866,14 +872,19 @@ static int mixart_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem | |||
866 | return changed; | 872 | return changed; |
867 | } | 873 | } |
868 | 874 | ||
875 | static DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0); | ||
876 | |||
869 | static struct snd_kcontrol_new snd_mixart_pcm_vol = | 877 | static struct snd_kcontrol_new snd_mixart_pcm_vol = |
870 | { | 878 | { |
871 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 879 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
880 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
881 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
872 | /* name will be filled later */ | 882 | /* name will be filled later */ |
873 | /* count will be filled later */ | 883 | /* count will be filled later */ |
874 | .info = mixart_digital_vol_info, /* shared */ | 884 | .info = mixart_digital_vol_info, /* shared */ |
875 | .get = mixart_pcm_vol_get, | 885 | .get = mixart_pcm_vol_get, |
876 | .put = mixart_pcm_vol_put, | 886 | .put = mixart_pcm_vol_put, |
887 | .tlv = { .p = db_scale_digital }, | ||
877 | }; | 888 | }; |
878 | 889 | ||
879 | 890 | ||
@@ -984,10 +995,13 @@ static int mixart_monitor_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ | |||
984 | 995 | ||
985 | static struct snd_kcontrol_new mixart_control_monitor_vol = { | 996 | static struct snd_kcontrol_new mixart_control_monitor_vol = { |
986 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 997 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
998 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
999 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | ||
987 | .name = "Monitoring Volume", | 1000 | .name = "Monitoring Volume", |
988 | .info = mixart_digital_vol_info, /* shared */ | 1001 | .info = mixart_digital_vol_info, /* shared */ |
989 | .get = mixart_monitor_vol_get, | 1002 | .get = mixart_monitor_vol_get, |
990 | .put = mixart_monitor_vol_put, | 1003 | .put = mixart_monitor_vol_put, |
1004 | .tlv = { .p = db_scale_digital }, | ||
991 | }; | 1005 | }; |
992 | 1006 | ||
993 | /* | 1007 | /* |