From 516ddee934f3bdb343153ccd4d50e465bcb9fb64 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 26 Jun 2008 14:49:58 +0200 Subject: [PATCH] --- yaml --- r: 99143 b: refs/heads/master c: 031005f78c8d0aebc17ddf7a34af9ffd48034d7d h: refs/heads/master i: 99141: 3d2a3ccdfd1657dfcb9753a26b56d853114e0532 99139: e9a2965822405b915306c114b3dcdbc81e581eaa 99135: 95dbf9cbc2a9461a16fb2eb8b65f3f0c7ea2ea87 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_conexant.c | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 68a382d7d3ed..723515364b1f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a3b6983232cd296ea260e06461d031f10065d63 +refs/heads/master: 031005f78c8d0aebc17ddf7a34af9ffd48034d7d diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index e3df8ac37076..64df8100593d 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -1005,15 +1005,19 @@ static int patch_cxt5045(struct hda_codec *codec) #endif } - /* - * Fix max PCM level to 0 dB - * (originall it has 0x2b steps with 0dB offset 0x14) - */ - snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, - (0x14 << AC_AMPCAP_OFFSET_SHIFT) | - (0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) | - (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | - (1 << AC_AMPCAP_MUTE_SHIFT)); + switch (codec->subsystem_id >> 16) { + case 0x103c: + /* HP laptop has a really bad sound over 0dB on NID 0x17. + * Fix max PCM level to 0 dB + * (originall it has 0x2b steps with 0dB offset 0x14) + */ + snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, + (0x14 << AC_AMPCAP_OFFSET_SHIFT) | + (0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) | + (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | + (1 << AC_AMPCAP_MUTE_SHIFT)); + break; + } return 0; }