diff options
author | Daniel T Chen <crimsun@ubuntu.com> | 2010-03-30 13:29:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 10:47:50 -0400 |
commit | 6658958a7f9a980b50037d721ea248232821e72c (patch) | |
tree | 573c485b0c37c99acb2a8a9d842bbd90a86a4449 | |
parent | c352b9625ae8fcf8b9c7f2c6bb8aee14ef5af9b6 (diff) |
ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
commit b8e80cf386419453678b01bef830f53445ebb15d upstream.
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
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 706944126d11..263bf3bd4793 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1805,6 +1805,14 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1805 | case AD1981_THINKPAD: | 1805 | case AD1981_THINKPAD: |
1806 | spec->mixers[0] = ad1981_thinkpad_mixers; | 1806 | spec->mixers[0] = ad1981_thinkpad_mixers; |
1807 | spec->input_mux = &ad1981_thinkpad_capture_source; | 1807 | spec->input_mux = &ad1981_thinkpad_capture_source; |
1808 | /* set the upper-limit for mixer amp to 0dB for avoiding the | ||
1809 | * possible damage by overloading | ||
1810 | */ | ||
1811 | snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT, | ||
1812 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1813 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1814 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1815 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1808 | break; | 1816 | break; |
1809 | case AD1981_TOSHIBA: | 1817 | case AD1981_TOSHIBA: |
1810 | spec->mixers[0] = ad1981_hp_mixers; | 1818 | spec->mixers[0] = ad1981_hp_mixers; |