diff options
author | Raymond Yau <superquad.vortex2@gmail.com> | 2011-05-20 02:32:04 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-20 03:08:04 -0400 |
commit | bfe9fc8aebc997ce8bcf8ac0586c84a247812064 (patch) | |
tree | f6be5e48ad286c09c0cd0df30a1f5f5e01d9ae48 /sound/pci/emu10k1 | |
parent | df1fe13289eca445b77471c204408bec67313be3 (diff) |
ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live!
As the "Wave", "Wave Surround" or "Front" Playback Volume must be
changed to 70% (i.e. -12 dB) so that distortion won't occur when
increase Bass and Treble from 50% to 100%, so the maximum gain in
Bass and Treble are +12 dB.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 7a9401462c1c..dae4050ede5c 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c | |||
@@ -303,6 +303,9 @@ static const u32 db_table[101] = { | |||
303 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); | 303 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); |
304 | static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); | 304 | static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); |
305 | 305 | ||
306 | /* EMU10K1 bass/treble db gain */ | ||
307 | static const DECLARE_TLV_DB_SCALE(snd_emu10k1_bass_treble_db_scale, -1200, 60, 0); | ||
308 | |||
306 | static const u32 onoff_table[2] = { | 309 | static const u32 onoff_table[2] = { |
307 | 0x00000000, 0x00000001 | 310 | 0x00000000, 0x00000001 |
308 | }; | 311 | }; |
@@ -2163,6 +2166,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) | |||
2163 | ctl->min = 0; | 2166 | ctl->min = 0; |
2164 | ctl->max = 40; | 2167 | ctl->max = 40; |
2165 | ctl->value[0] = ctl->value[1] = 20; | 2168 | ctl->value[0] = ctl->value[1] = 20; |
2169 | ctl->tlv = snd_emu10k1_bass_treble_db_scale; | ||
2166 | ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; | 2170 | ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; |
2167 | ctl = &controls[i + 1]; | 2171 | ctl = &controls[i + 1]; |
2168 | ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 2172 | ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
@@ -2172,6 +2176,7 @@ static int __devinit _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) | |||
2172 | ctl->min = 0; | 2176 | ctl->min = 0; |
2173 | ctl->max = 40; | 2177 | ctl->max = 40; |
2174 | ctl->value[0] = ctl->value[1] = 20; | 2178 | ctl->value[0] = ctl->value[1] = 20; |
2179 | ctl->tlv = snd_emu10k1_bass_treble_db_scale; | ||
2175 | ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; | 2180 | ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; |
2176 | 2181 | ||
2177 | #define BASS_GPR 0x8c | 2182 | #define BASS_GPR 0x8c |