diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-12-10 17:30:43 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-12-15 09:06:14 -0500 |
commit | 157f0b7f6c0cc0bc88647390006e959e267a0143 (patch) | |
tree | ba3715313a6c86539d70cc82e3159a60d5080f0a | |
parent | c04017ea81dc1eccae87be7ac7b82b2972f9931f (diff) |
ALSA: hda - Apply click noise workaround for Thinkpads generically
It seems that a workaround for Thinkpad T440s crackling noise can be
applied generically to all Thinkpad models: namely, disabling the
default alc269 shutup callback. This patch moves it to the existing
alc_fixup_tpt440_dock() while also replacing the rest code with
another existing alc_fixup_disable_aamix(). It resulted in a good
code reduction.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=958439
Reported-and-tested-by: Benjamin Poirier <bpoirier@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b745a721c363..531065eaac1b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4198,24 +4198,13 @@ static void alc_fixup_tpt440_dock(struct hda_codec *codec, | |||
4198 | struct alc_spec *spec = codec->spec; | 4198 | struct alc_spec *spec = codec->spec; |
4199 | 4199 | ||
4200 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | 4200 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
4201 | spec->shutup = alc_no_shutup; /* reduce click noise */ | ||
4201 | spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; | 4202 | spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; |
4202 | codec->power_save_node = 0; /* avoid click noises */ | 4203 | codec->power_save_node = 0; /* avoid click noises */ |
4203 | snd_hda_apply_pincfgs(codec, pincfgs); | 4204 | snd_hda_apply_pincfgs(codec, pincfgs); |
4204 | } | 4205 | } |
4205 | } | 4206 | } |
4206 | 4207 | ||
4207 | /* additional fixup for Thinkpad T440s noise problem */ | ||
4208 | static void alc_fixup_tpt440(struct hda_codec *codec, | ||
4209 | const struct hda_fixup *fix, int action) | ||
4210 | { | ||
4211 | struct alc_spec *spec = codec->spec; | ||
4212 | |||
4213 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
4214 | spec->shutup = alc_no_shutup; /* reduce click noise */ | ||
4215 | spec->gen.mixer_nid = 0; /* reduce background noise */ | ||
4216 | } | ||
4217 | } | ||
4218 | |||
4219 | static void alc_shutup_dell_xps13(struct hda_codec *codec) | 4208 | static void alc_shutup_dell_xps13(struct hda_codec *codec) |
4220 | { | 4209 | { |
4221 | struct alc_spec *spec = codec->spec; | 4210 | struct alc_spec *spec = codec->spec; |
@@ -5067,7 +5056,7 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5067 | }, | 5056 | }, |
5068 | [ALC292_FIXUP_TPT440] = { | 5057 | [ALC292_FIXUP_TPT440] = { |
5069 | .type = HDA_FIXUP_FUNC, | 5058 | .type = HDA_FIXUP_FUNC, |
5070 | .v.func = alc_fixup_tpt440, | 5059 | .v.func = alc_fixup_disable_aamix, |
5071 | .chained = true, | 5060 | .chained = true, |
5072 | .chain_id = ALC292_FIXUP_TPT440_DOCK, | 5061 | .chain_id = ALC292_FIXUP_TPT440_DOCK, |
5073 | }, | 5062 | }, |