Received: by 10.223.185.111 with SMTP id b44csp913630wrg; Fri, 9 Mar 2018 16:43:07 -0800 (PST) X-Google-Smtp-Source: AG47ELv1yhgeWsy06pAS0NMSosKfSpg20xgjlC79bdT7epHjvkyajQ/De+1AmMkk+xojCjoNhQxj X-Received: by 10.101.65.71 with SMTP id x7mr302764pgp.203.1520642587248; Fri, 09 Mar 2018 16:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520642587; cv=none; d=google.com; s=arc-20160816; b=P/AL+/EyhYEImPqHLBqncGYov6AWjAHcNLoUSVJI/4yEeCn81Zn+g+772lE5k9koCu ZiLSaTdcFfQ418pVLeoqH5sFcLErUn/a04YQOCv2YcQOaHwNWKEgA1TbfutUbZARWCBv K4k7PiHKFG493ffM4tjtbYvS2VnR/77Np09ZqjNGR4LFgvk5wDT+dSUH6y3RyDvjWWs1 Yom0g/tduc/2HKf8mN0ngDxxZBr8H7L3SXIdMzKjhjrQhT6pHMLDeeRkNtYMWx/OcyTB Y99y9uTlEZBArMcVQ4vTnWCX2QKFqapRV5kStBXkkQ+nEUdLJlZbdu30JmhOUbGSJ1Kn +rpQ== 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=xcn3qDca0UAdTpAvX07M6GJBw0aFgORArIgz/nDCI98=; b=rwt56jbM5ESQ05iSS2kSPVfwDifeqPDHuYMUxb/p3Wq+Djecam+7/YLGO2mIoL0D8K qrufJnjlmv1uV5LftvgvqjN/Ak0byS0bvY4wCjVnA7nypsKAf/SHfB3Mow/M3NnyAhrd delc1fEe3VN+sHLq/JWejP2oYuBpE7YvNlO16fOGcHileQOKaKj9GiMnuCeq/OnD/XFH EEjWKOfTLgm8Ff1IFudxY8gRI+x3AFmtuBf4QAvABH8KeFPhwj3z8LbtyKasnVjPpk8B tIAahBLEpYquebBacV6u/M4D/n6B9NnPyiACXQjKGugi/UeVPUnSQjwM7IfGoV4SBcBk sX+Q== 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 f29si1703460pff.364.2018.03.09.16.42.53; Fri, 09 Mar 2018 16:43:07 -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 S933567AbeCJAmH (ORCPT + 99 others); Fri, 9 Mar 2018 19:42:07 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39360 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933565AbeCJAU6 (ORCPT ); Fri, 9 Mar 2018 19:20:58 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 23E63FD0; Sat, 10 Mar 2018 00:20:58 +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.9 10/65] ALSA: hda - Fix pincfg at resume on Lenovo T470 dock Date: Fri, 9 Mar 2018 16:18:10 -0800 Message-Id: <20180310001825.741472068@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180310001824.927996722@linuxfoundation.org> References: <20180310001824.927996722@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.9-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 @@ -4480,13 +4480,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); } }