aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/pcxhr/pcxhr_mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/pcxhr/pcxhr_mixer.c')
-rw-r--r--sound/pci/pcxhr/pcxhr_mixer.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c
index d9cc8d2beb6d..5f8d42633b04 100644
--- a/sound/pci/pcxhr/pcxhr_mixer.c
+++ b/sound/pci/pcxhr/pcxhr_mixer.c
@@ -44,8 +44,8 @@
44#define PCXHR_ANALOG_PLAYBACK_LEVEL_MAX 128 /* 0.0 dB */ 44#define PCXHR_ANALOG_PLAYBACK_LEVEL_MAX 128 /* 0.0 dB */
45#define PCXHR_ANALOG_PLAYBACK_ZERO_LEVEL 104 /* -24.0 dB ( 0.0 dB - fix level +24.0 dB ) */ 45#define PCXHR_ANALOG_PLAYBACK_ZERO_LEVEL 104 /* -24.0 dB ( 0.0 dB - fix level +24.0 dB ) */
46 46
47static const DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 0); 47static const DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -9600, 50, 3150);
48static const DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -12800, 100, 0); 48static const DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -10400, 100, 2400);
49 49
50static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, int is_capture, int channel) 50static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, int is_capture, int channel)
51{ 51{
@@ -144,14 +144,7 @@ static struct snd_kcontrol_new pcxhr_control_analog_level = {
144}; 144};
145 145
146/* shared */ 146/* shared */
147static int pcxhr_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 147#define pcxhr_sw_info snd_ctl_boolean_stereo_info
148{
149 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
150 uinfo->count = 2;
151 uinfo->value.integer.min = 0;
152 uinfo->value.integer.max = 1;
153 return 0;
154}
155 148
156static int pcxhr_audio_sw_get(struct snd_kcontrol *kcontrol, 149static int pcxhr_audio_sw_get(struct snd_kcontrol *kcontrol,
157 struct snd_ctl_elem_value *ucontrol) 150 struct snd_ctl_elem_value *ucontrol)
@@ -195,7 +188,7 @@ static struct snd_kcontrol_new pcxhr_control_output_switch = {
195#define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */ 188#define PCXHR_DIGITAL_LEVEL_MAX 0x1ff /* +18 dB */
196#define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */ 189#define PCXHR_DIGITAL_ZERO_LEVEL 0x1b7 /* 0 dB */
197 190
198static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10950, 50, 0); 191static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10975, 25, 1800);
199 192
200#define MORE_THAN_ONE_STREAM_LEVEL 0x000001 193#define MORE_THAN_ONE_STREAM_LEVEL 0x000001
201#define VALID_STREAM_PAN_LEVEL_MASK 0x800000 194#define VALID_STREAM_PAN_LEVEL_MASK 0x800000