Commit b8e80cf3 authored by Daniel T Chen's avatar Daniel T Chen Committed by Takashi Iwai

ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981

BugLink: https://launchpad.net/bugs/551606

The OR's hardware distorts at PCM 100% because it does not correspond to
0 dB. Fix this in patch_ad1981() for all models using the Thinkpad
quirk.

Reported-by: Jane Silber
Cc: <stable@kernel.org>
Signed-off-by: default avatarDaniel T Chen <crimsun@ubuntu.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1f85d72d
...@@ -1896,6 +1896,14 @@ static int patch_ad1981(struct hda_codec *codec) ...@@ -1896,6 +1896,14 @@ static int patch_ad1981(struct hda_codec *codec)
case AD1981_THINKPAD: case AD1981_THINKPAD:
spec->mixers[0] = ad1981_thinkpad_mixers; spec->mixers[0] = ad1981_thinkpad_mixers;
spec->input_mux = &ad1981_thinkpad_capture_source; spec->input_mux = &ad1981_thinkpad_capture_source;
/* set the upper-limit for mixer amp to 0dB for avoiding the
* possible damage by overloading
*/
snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT,
(0x17 << AC_AMPCAP_OFFSET_SHIFT) |
(0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(1 << AC_AMPCAP_MUTE_SHIFT));
break; break;
case AD1981_TOSHIBA: case AD1981_TOSHIBA:
spec->mixers[0] = ad1981_hp_mixers; spec->mixers[0] = ad1981_hp_mixers;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment