aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-02-26 09:36:38 -0500
committerTakashi Iwai <tiwai@suse.de>2018-02-26 09:36:38 -0500
commit71db96ddfa72671bd43cacdcc99ca178d90ba267 (patch)
tree7b3f768e382f52ab1fcb8c8a04d7ab947ce394a5
parent240a8af929c7c57dcde28682725b29cf8474e8e5 (diff)
ALSA: hda - Fix pincfg at resume on Lenovo T470 dock
We've added a quirk to enable the recent Lenovo dock support, where it overwrites the pin configs of NID 0x17 and 19, not only updating the pin config cache. It works right after the boot, but the problem is that the pin configs are occasionally cleared when the machine goes to PM. Meanwhile the quirk writes the pin configs only at the pre-probe, so this won't be applied any longer. For addressing that issue, this patch moves the code to overwrite the pin configs into HDA_FIXUP_ACT_INIT section so that it's always applied at both probe and resume time. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195161 Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ce28f7ce64e6..b9c93fa0a51c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4997,13 +4997,14 @@ static void alc_fixup_tpt470_dock(struct hda_codec *codec,
4997 4997
4998 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4998 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4999 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 4999 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
5000 snd_hda_apply_pincfgs(codec, pincfgs);
5001 } else if (action == HDA_FIXUP_ACT_INIT) {
5000 /* Enable DOCK device */ 5002 /* Enable DOCK device */
5001 snd_hda_codec_write(codec, 0x17, 0, 5003 snd_hda_codec_write(codec, 0x17, 0,
5002 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 5004 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
5003 /* Enable DOCK device */ 5005 /* Enable DOCK device */
5004 snd_hda_codec_write(codec, 0x19, 0, 5006 snd_hda_codec_write(codec, 0x19, 0,
5005 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 5007 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0);
5006 snd_hda_apply_pincfgs(codec, pincfgs);
5007 } 5008 }
5008} 5009}
5009 5010