diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-03-07 02:37:19 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-03-07 02:37:19 -0500 |
commit | 9b745ab897199c2af9f21ca9681ef86d5b971002 (patch) | |
tree | 256383fb0cc5ec7e4f5c5a4167833e247f6eea33 /sound | |
parent | e805ca8b0a9b6c91099c0eaa4b160a1196a4ae25 (diff) |
ALSA: hda - Fix loud click noise with IdeaPad 410Y
Lenovo IdeaPad 410Y with ALC282 codec makes loud click noises at boot
and shutdown. Also, it wrongly misdetects the acpi_thinkpad hook.
This patch adds a device-specific fixup for disabling the shutup
callback that is the cause of the click noise and also avoiding the
thinpad_helper calls.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71511
Reported-and-tested-by: Guilherme Amadio <guilherme.amadio@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 850296a1e0ff..8d0a84436674 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3616,6 +3616,19 @@ static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec, | |||
3616 | } | 3616 | } |
3617 | } | 3617 | } |
3618 | 3618 | ||
3619 | static void alc_no_shutup(struct hda_codec *codec) | ||
3620 | { | ||
3621 | } | ||
3622 | |||
3623 | static void alc_fixup_no_shutup(struct hda_codec *codec, | ||
3624 | const struct hda_fixup *fix, int action) | ||
3625 | { | ||
3626 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
3627 | struct alc_spec *spec = codec->spec; | ||
3628 | spec->shutup = alc_no_shutup; | ||
3629 | } | ||
3630 | } | ||
3631 | |||
3619 | static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, | 3632 | static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, |
3620 | const struct hda_fixup *fix, int action) | 3633 | const struct hda_fixup *fix, int action) |
3621 | { | 3634 | { |
@@ -3844,6 +3857,7 @@ enum { | |||
3844 | ALC269_FIXUP_HP_GPIO_LED, | 3857 | ALC269_FIXUP_HP_GPIO_LED, |
3845 | ALC269_FIXUP_INV_DMIC, | 3858 | ALC269_FIXUP_INV_DMIC, |
3846 | ALC269_FIXUP_LENOVO_DOCK, | 3859 | ALC269_FIXUP_LENOVO_DOCK, |
3860 | ALC269_FIXUP_NO_SHUTUP, | ||
3847 | ALC286_FIXUP_SONY_MIC_NO_PRESENCE, | 3861 | ALC286_FIXUP_SONY_MIC_NO_PRESENCE, |
3848 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, | 3862 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, |
3849 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | 3863 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
@@ -4020,6 +4034,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4020 | .type = HDA_FIXUP_FUNC, | 4034 | .type = HDA_FIXUP_FUNC, |
4021 | .v.func = alc_fixup_inv_dmic_0x12, | 4035 | .v.func = alc_fixup_inv_dmic_0x12, |
4022 | }, | 4036 | }, |
4037 | [ALC269_FIXUP_NO_SHUTUP] = { | ||
4038 | .type = HDA_FIXUP_FUNC, | ||
4039 | .v.func = alc_fixup_no_shutup, | ||
4040 | }, | ||
4023 | [ALC269_FIXUP_LENOVO_DOCK] = { | 4041 | [ALC269_FIXUP_LENOVO_DOCK] = { |
4024 | .type = HDA_FIXUP_PINS, | 4042 | .type = HDA_FIXUP_PINS, |
4025 | .v.pins = (const struct hda_pintbl[]) { | 4043 | .v.pins = (const struct hda_pintbl[]) { |
@@ -4405,6 +4423,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4405 | SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4423 | SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4406 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4424 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4407 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4425 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4426 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), | ||
4408 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4427 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4409 | SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), | 4428 | SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), |
4410 | SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4429 | SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |