Received: by 10.223.185.116 with SMTP id b49csp5501351wrg; Wed, 7 Mar 2018 12:54:56 -0800 (PST) X-Google-Smtp-Source: AG47ELs2NwH8TwNs579ttRyY/uLZg4wXo38Ql0xqsSctmOzjJKM8sR0bLtICLD9lg0QEjFYq9ZC0 X-Received: by 2002:a17:902:67c8:: with SMTP id g8-v6mr17416593pln.106.1520456096195; Wed, 07 Mar 2018 12:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520456096; cv=none; d=google.com; s=arc-20160816; b=f0Xibp//zxmjuyWg48gsDGPFFe5PsuOKENvcI1hIfhgUMsPH0mi4m/kNrhC1r87woy Eeg+29kGrsuFoyQmdF4kO6gEUwBf6VyrCQbj2RoPmXgkCmShnpKoXMXHVUEI+thhFWco Z6WgUpsJC5Q2mvHCmbZ/zPsFQB70IXKxsvvXMTOZLHPl5VZtgndIVY9F7inKGkNkcmpJ V553bK9n1h/ceOIbpPAGEBiJj11uYTeHdNLEWWXyccx8twYxYDkE52Jgp/z4ZJn/Ch8f OeyECxoNg/o8gM+lvabqPXvJvRV2UuBnuM9ytLzbHNdV6w+9BA7FoN0Qm6TyQOagdXKs S1OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mTA18Ulo3u5xt8DVptizntyA8ca4FCZOzv/TxxAsbnc=; b=tfS314ZvCBOP6YnKAZ/u5+tqsMqIIcgGP+RoholPMXiaoTlPY6Nd4uc8O5fcd+Klqq dcX4JTg/ceOQtSMcgYxND5CxbJi/59q3d9zizkJM8Mpxo1ZUKivejhzU36PxoRFUQxpG hHx0wrmonpe4wIsF5vpcR4I/kuaDqE3l3LaZwdgCas3KeViGZWXU0AI1BjfvIG5Shkds 8scS0IFyaaC6kLonGwgH/ovvA6+5i/sAsmzyD3ptnlZ3BJgJbThR6yicsk2Q+AeDE/LP Dmx6H8R5XYmkOjEgnjn7PBgv7P0wjqOEi+O1Rv4wus5laENvy2gyvoiT5l5Qoky1MpF7 Q8Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7-v6si4979plo.432.2018.03.07.12.54.41; Wed, 07 Mar 2018 12:54:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934456AbeCGUxk (ORCPT + 99 others); Wed, 7 Mar 2018 15:53:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40412 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934240AbeCGTkB (ORCPT ); Wed, 7 Mar 2018 14:40:01 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7F1D6F05; Wed, 7 Mar 2018 19:40:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.15 017/122] ALSA: hda - Fix pincfg at resume on Lenovo T470 dock Date: Wed, 7 Mar 2018 11:37:09 -0800 Message-Id: <20180307191731.795894637@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191729.190879024@linuxfoundation.org> References: <20180307191729.190879024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 71db96ddfa72671bd43cacdcc99ca178d90ba267 upstream. 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: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4875,13 +4875,14 @@ static void alc_fixup_tpt470_dock(struct if (action == HDA_FIXUP_ACT_PRE_PROBE) { spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; + snd_hda_apply_pincfgs(codec, pincfgs); + } else if (action == HDA_FIXUP_ACT_INIT) { /* Enable DOCK device */ snd_hda_codec_write(codec, 0x17, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); /* Enable DOCK device */ snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); - snd_hda_apply_pincfgs(codec, pincfgs); } }