From a876a87b6f223d30e5c60617ea0453b5c4ddb2d1 Mon Sep 17 00:00:00 2001 From: Daniel T Chen Date: Sun, 21 Mar 2010 18:34:43 -0400 Subject: [PATCH] --- yaml --- r: 188941 b: refs/heads/master c: 025f206c9e0f96cc41567b01c07fb852d8900da1 h: refs/heads/master i: 188939: b68d5bb3c3263e98c20704a61fc29d005e0870c8 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_conexant.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cbbdc33c1dce..240f6006a13a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e3d2530a6cea80987f77b75d8784a00f3aaf22ff +refs/heads/master: 025f206c9e0f96cc41567b01c07fb852d8900da1 diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 194a28c54992..61682e1d09da 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec) #endif } spec->vmaster_nid = 0x13; + + switch (codec->subsystem_id >> 16) { + case 0x103c: + /* HP laptops have really bad sound over 0 dB on NID 0x10. + * Fix max PCM level to 0 dB (originally it has 0x1e steps + * with 0 dB offset 0x17) + */ + snd_hda_override_amp_caps(codec, 0x10, 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; + } + return 0; }