]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.32.12/alsa-hda-fix-0-db-offset-for-lenovo-thinkpad-models-using-ad1981.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.12 / alsa-hda-fix-0-db-offset-for-lenovo-thinkpad-models-using-ad1981.patch
1 From b8e80cf386419453678b01bef830f53445ebb15d Mon Sep 17 00:00:00 2001
2 From: Daniel T Chen <crimsun@ubuntu.com>
3 Date: Tue, 30 Mar 2010 13:29:28 -0400
4 Subject: ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
5
6 From: Daniel T Chen <crimsun@ubuntu.com>
7
8 commit b8e80cf386419453678b01bef830f53445ebb15d upstream.
9
10 BugLink: https://launchpad.net/bugs/551606
11
12 The OR's hardware distorts at PCM 100% because it does not correspond to
13 0 dB. Fix this in patch_ad1981() for all models using the Thinkpad
14 quirk.
15
16 Reported-by: Jane Silber
17 Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
18 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20
21 ---
22 sound/pci/hda/patch_analog.c | 8 ++++++++
23 1 file changed, 8 insertions(+)
24
25 --- a/sound/pci/hda/patch_analog.c
26 +++ b/sound/pci/hda/patch_analog.c
27 @@ -1789,6 +1789,14 @@ static int patch_ad1981(struct hda_codec
28 case AD1981_THINKPAD:
29 spec->mixers[0] = ad1981_thinkpad_mixers;
30 spec->input_mux = &ad1981_thinkpad_capture_source;
31 + /* set the upper-limit for mixer amp to 0dB for avoiding the
32 + * possible damage by overloading
33 + */
34 + snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT,
35 + (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
36 + (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
37 + (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
38 + (1 << AC_AMPCAP_MUTE_SHIFT));
39 break;
40 case AD1981_TOSHIBA:
41 spec->mixers[0] = ad1981_hp_mixers;