summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDaniel T Chen <crimsun@ubuntu.com>2009-12-13 16:22:58 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-14 11:08:39 +0100
commit01f5966d2f36f08eb6604665eade69c9f38ffaed (patch)
tree09c26e3eab404e16be54fac56f75e6bd232553e0 /sound/pci
parent950200e2ff11daae1c5d9426703bdd494603f38b (diff)
downloadop-kernel-dev-01f5966d2f36f08eb6604665eade69c9f38ffaed.zip
op-kernel-dev-01f5966d2f36f08eb6604665eade69c9f38ffaed.tar.gz
ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
BugLink: https://bugs.launchpad.net/bugs/461062 The original reporter states that PCM maxes at +12 dB and results in very bad distortion. Cap PCM at 0 dB to resolve this symptom. Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
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 447eda1..1a36137 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1789,6 +1789,14 @@ static int patch_ad1981(struct hda_codec *codec)
codec->patch_ops.init = ad1981_hp_init;
codec->patch_ops.unsol_event = ad1981_hp_unsol_event;
+ /* 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_THINKPAD:
spec->mixers[0] = ad1981_thinkpad_mixers;
OpenPOWER on IntegriCloud