diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2014-05-26 11:11:46 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 11:47:12 -0400 |
commit | 033b0a7ca9ca6589003e7cd135d2de490d3848ad (patch) | |
tree | 77b65f4f5c4019c7553e911fd15f465c1078760a /sound/pci | |
parent | e191893830b4698e9036daedd7e5a928d3f0b197 (diff) |
ALSA: hda - Pop noises fix for XPS13 9333
When headphones are plugged in, force AFG and node 0x02
("Headphone Playback Volume") to D0 to avoid pop noises.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 951017168e37..7a800a8ee215 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3986,6 +3986,29 @@ static void alc_fixup_disable_aamix(struct hda_codec *codec, | |||
3986 | } | 3986 | } |
3987 | } | 3987 | } |
3988 | 3988 | ||
3989 | static unsigned int alc_power_filter_xps13(struct hda_codec *codec, | ||
3990 | hda_nid_t nid, | ||
3991 | unsigned int power_state) | ||
3992 | { | ||
3993 | struct alc_spec *spec = codec->spec; | ||
3994 | |||
3995 | /* Avoid pop noises when headphones are plugged in */ | ||
3996 | if (spec->gen.hp_jack_present) | ||
3997 | if (nid == codec->afg || nid == 0x02) | ||
3998 | return AC_PWRST_D0; | ||
3999 | return power_state; | ||
4000 | } | ||
4001 | |||
4002 | static void alc_fixup_dell_xps13(struct hda_codec *codec, | ||
4003 | const struct hda_fixup *fix, int action) | ||
4004 | { | ||
4005 | if (action == HDA_FIXUP_ACT_PROBE) { | ||
4006 | struct alc_spec *spec = codec->spec; | ||
4007 | spec->shutup = alc_no_shutup; | ||
4008 | codec->power_filter = alc_power_filter_xps13; | ||
4009 | } | ||
4010 | } | ||
4011 | |||
3989 | static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, | 4012 | static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, |
3990 | const struct hda_fixup *fix, int action) | 4013 | const struct hda_fixup *fix, int action) |
3991 | { | 4014 | { |
@@ -5482,6 +5505,7 @@ enum { | |||
5482 | ALC662_FIXUP_BASS_CHMAP, | 5505 | ALC662_FIXUP_BASS_CHMAP, |
5483 | ALC668_FIXUP_AUTO_MUTE, | 5506 | ALC668_FIXUP_AUTO_MUTE, |
5484 | ALC668_FIXUP_DELL_DISABLE_AAMIX, | 5507 | ALC668_FIXUP_DELL_DISABLE_AAMIX, |
5508 | ALC668_FIXUP_DELL_XPS13, | ||
5485 | }; | 5509 | }; |
5486 | 5510 | ||
5487 | static const struct hda_fixup alc662_fixups[] = { | 5511 | static const struct hda_fixup alc662_fixups[] = { |
@@ -5648,6 +5672,12 @@ static const struct hda_fixup alc662_fixups[] = { | |||
5648 | .type = HDA_FIXUP_FUNC, | 5672 | .type = HDA_FIXUP_FUNC, |
5649 | .v.func = alc_fixup_inv_dmic_0x12, | 5673 | .v.func = alc_fixup_inv_dmic_0x12, |
5650 | }, | 5674 | }, |
5675 | [ALC668_FIXUP_DELL_XPS13] = { | ||
5676 | .type = HDA_FIXUP_FUNC, | ||
5677 | .v.func = alc_fixup_dell_xps13, | ||
5678 | .chained = true, | ||
5679 | .chain_id = ALC668_FIXUP_DELL_DISABLE_AAMIX | ||
5680 | }, | ||
5651 | [ALC668_FIXUP_DELL_DISABLE_AAMIX] = { | 5681 | [ALC668_FIXUP_DELL_DISABLE_AAMIX] = { |
5652 | .type = HDA_FIXUP_FUNC, | 5682 | .type = HDA_FIXUP_FUNC, |
5653 | .v.func = alc_fixup_disable_aamix, | 5683 | .v.func = alc_fixup_disable_aamix, |
@@ -5714,7 +5744,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
5714 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 5744 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
5715 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5745 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5716 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5746 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5717 | SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_DISABLE_AAMIX), | 5747 | SND_PCI_QUIRK(0x1028, 0x060a, "Dell XPS 13", ALC668_FIXUP_DELL_XPS13), |
5718 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5748 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_AUTO_MUTE), |
5719 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5749 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_AUTO_MUTE), |
5720 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5750 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |