summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-04-01 16:04:13 +0200
committerTakashi Iwai <tiwai@suse.de>2010-04-01 16:04:13 +0200
commit7a2e38a555f2b1a20aaaf30f3d8ecad8faa97ea7 (patch)
treec1200e80306c785e5d6713f11470eed8f7ca4d75 /sound/pci
parentMerge branch 'fix/hda' into topic/hda (diff)
parentALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981 (diff)
downloadlinux-7a2e38a555f2b1a20aaaf30f3d8ecad8faa97ea7.tar.xz
linux-7a2e38a555f2b1a20aaaf30f3d8ecad8faa97ea7.zip
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 262f5b5decf1..9cbd80cba122 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1904,6 +1904,14 @@ static int patch_ad1981(struct hda_codec *codec)
case AD1981_THINKPAD:
spec->mixers[0] = ad1981_thinkpad_mixers;
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;
case AD1981_TOSHIBA:
spec->mixers[0] = ad1981_hp_mixers;