aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-09-18 08:26:59 -0400
committerTakashi Iwai <tiwai@suse.de>2012-09-18 08:32:42 -0400
commit4b527b6516ab1f0af8aaedd02dbf71ee2c1180f4 (patch)
treec4225546efe5786bf819f113f08dc307e8e831ff /sound/pci
parentd279fae8a41690ec1b20c07be8c6f42f8af27a17 (diff)
ALSA: hda - limit internal mic boost for Asus X202E
When the input gain for the internal mic is set to its maximum level, the background noise becomes so high - and any relevant signal clipped - that the setting becomes unusable. It is better to limit the amplification. BugLink: https://bugs.launchpad.net/bugs/1052460 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@vger.kernel.org> [v3.5+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_via.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index d5f36a179eb5..74fb6fd6768a 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -3666,6 +3666,32 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec)
3666 update_power_state(codec, 0x21, AC_PWRST_D3); 3666 update_power_state(codec, 0x21, AC_PWRST_D3);
3667} 3667}
3668 3668
3669/*
3670 * pin fix-up
3671 */
3672enum {
3673 VIA_FIXUP_INTMIC_BOOST,
3674};
3675
3676static void via_fixup_intmic_boost(struct hda_codec *codec,
3677 const struct hda_fixup *fix, int action)
3678{
3679 if (action == HDA_FIXUP_ACT_PRE_PROBE)
3680 override_mic_boost(codec, 0x30, 0, 2, 40);
3681}
3682
3683static const struct hda_fixup via_fixups[] = {
3684 [VIA_FIXUP_INTMIC_BOOST] = {
3685 .type = HDA_FIXUP_FUNC,
3686 .v.func = via_fixup_intmic_boost,
3687 },
3688};
3689
3690static const struct snd_pci_quirk vt2002p_fixups[] = {
3691 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
3692 {}
3693};
3694
3669/* patch for vt2002P */ 3695/* patch for vt2002P */
3670static int patch_vt2002P(struct hda_codec *codec) 3696static int patch_vt2002P(struct hda_codec *codec)
3671{ 3697{
@@ -3682,6 +3708,9 @@ static int patch_vt2002P(struct hda_codec *codec)
3682 override_mic_boost(codec, 0x29, 0, 3, 40); 3708 override_mic_boost(codec, 0x29, 0, 3, 40);
3683 add_secret_dac_path(codec); 3709 add_secret_dac_path(codec);
3684 3710
3711 snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups);
3712 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
3713
3685 /* automatic parse from the BIOS config */ 3714 /* automatic parse from the BIOS config */
3686 err = via_parse_auto_config(codec); 3715 err = via_parse_auto_config(codec);
3687 if (err < 0) { 3716 if (err < 0) {