diff options
author | Daniel T Chen <crimsun@ubuntu.com> | 2010-03-21 18:34:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 19:01:25 -0400 |
commit | abeb14b4b0db8d303e407705a42bafafef65180e (patch) | |
tree | 5deb545f1119dca5c4e6903b2a89d31dc1b5945a /sound/pci/hda/patch_conexant.c | |
parent | 408fdc3e050451c81719eaa949d9d2082a8f9ecd (diff) |
ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
commit 025f206c9e0f96cc41567b01c07fb852d8900da1 upstream.
BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).
Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index c578c28f368e..71b7a96b185f 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1570,6 +1570,21 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1570 | #endif | 1570 | #endif |
1571 | } | 1571 | } |
1572 | spec->vmaster_nid = 0x13; | 1572 | spec->vmaster_nid = 0x13; |
1573 | |||
1574 | switch (codec->subsystem_id >> 16) { | ||
1575 | case 0x103c: | ||
1576 | /* HP laptops have really bad sound over 0 dB on NID 0x10. | ||
1577 | * Fix max PCM level to 0 dB (originally it has 0x1e steps | ||
1578 | * with 0 dB offset 0x17) | ||
1579 | */ | ||
1580 | snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, | ||
1581 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1582 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1583 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1584 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1585 | break; | ||
1586 | } | ||
1587 | |||
1573 | return 0; | 1588 | return 0; |
1574 | } | 1589 | } |
1575 | 1590 | ||