Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp822367imu; Tue, 11 Dec 2018 08:06:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/WJ+NfvaCGhPKuKnBgPGxTuDYw+vehmXrTPaIjNKy+cu9TjzUIVe352WisANYTa6qNpWJyY X-Received: by 2002:a17:902:66e6:: with SMTP id e93mr16151820plk.92.1544544407177; Tue, 11 Dec 2018 08:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544544407; cv=none; d=google.com; s=arc-20160816; b=oRgBhTTFM9Ek+PPyliFxguTLoL8guj0YpZ83CLtWyopy5Q/2jXbNlNrHnuuyjWSfIu AiW+3AiahPtdQcXf+WUv2TYrHwKV+r7LWlmK0uGhgM5IgR51jW1BB9JSSz1qnftVw98L hSieBxBGU918Ue9zpt95ArajSXOK1lLOxuMOjAdk4ueMMs81SqPp/MAYuCZ6zSuUbjbN gskUevhNdW/8OpwfmWdOXbBif7qlcTC/kMI4j0Zhn5Ux0W6ci+ca7UKgU9lxj5OFJdQf UsdcmZ6uTdjEKp9OQfwB7+/soL044FxaAe6o5osHhyORkvPKF0/EBrZ4UfquOJT73ggz 0dhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jSmmpU9adTwwLFCfxtjew7fP75XXBEaf/ghn3nP+3d4=; b=eX16hS94tQuH674RPO1HDMR42EHjxZYNQG+pLNVN9HxbMYEd/KPrFKZ2Rak4f0trd9 9M97XqXnNDLzc6RJMzX8SwA4HqBOB313JAb0008tDxpPBSI8cnj8CW5I786JQ0rC0Two e6YHwGqGb9D0xkTShs6++8JOhxPADHO05wrtBgKvaRrLBbOUWMbLGBAbNN3XPZijlgcS fahPlj//IuhyWq+Z+nPAQAJpZDOfN1mf6Ypo9xNRr4rwmAjs1YZeJ4kNgDjh/C6No0pm UiNtSxpuszFsu1oKVZuAqRCx5xcsk5/nOUPHuB0ML/Lu74HNVuoRkSH6r6DcI2i6DiBf UIRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MBHL4qy3; 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 z14si11790721pga.349.2018.12.11.08.06.31; Tue, 11 Dec 2018 08:06:47 -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; dkim=pass header.i=@kernel.org header.s=default header.b=MBHL4qy3; 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 S1730926AbeLKQD3 (ORCPT + 99 others); Tue, 11 Dec 2018 11:03:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:45370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730116AbeLKP4g (ORCPT ); Tue, 11 Dec 2018 10:56:36 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6E40205C9; Tue, 11 Dec 2018 15:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543796; bh=oMN39gJY+oW5mJwwdkvf+tU8wHXgMlh4AWt5bQuMe/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MBHL4qy3UGTsutHj2jbKBNHonEvhl7wncj4UYogngKzzpF2QUPrUCl9m5Rp5McsAp Qns6g64TtxFsAUURxNTltKw1msaUzRqmy5Mks8sgnKhQf7c2jB7focQrmJCISReNqU 8UvKX/xc3kq1bgw7DrxP7PUO9C38WethncmreWI0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Jeremy Cline Subject: [PATCH 4.19 066/118] ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 Date: Tue, 11 Dec 2018 16:41:25 +0100 Message-Id: <20181211151646.901919487@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151644.216668863@linuxfoundation.org> References: <20181211151644.216668863@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 54947cd64c1b8290f64bb2958e343c07270e3a58 upstream. We've got a regression report for some Thinkpad models (at least T570s) which shows the too low speaker output volume. The bisection leaded to the commit 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform"), and it's basically adding the two pin configurations for the dock, and looks harmless. The real culprit seems, though, that the DAC assignment for the speaker pin is implicitly assumed on these devices, i.e. pin NID 0x14 to be coupled with DAC NID 0x03. When more pins are configured by the commit above, the auto-parser changes the DAC assignment, and this resulted in the regression. As a workaround, just provide the fixed pin / DAC mapping table for this Thinkpad fixup function. It's no generic solution, but the problem itself is pretty much device-specific, so must be good enough. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554304 Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform") Cc: Reported-and-tested-by: Jeremy Cline Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4988,9 +4988,18 @@ static void alc_fixup_tpt470_dock(struct { 0x19, 0x21a11010 }, /* dock mic */ { } }; + /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise + * the speaker output becomes too low by some reason on Thinkpads with + * ALC298 codec + */ + static hda_nid_t preferred_pairs[] = { + 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, + 0 + }; struct alc_spec *spec = codec->spec; if (action == HDA_FIXUP_ACT_PRE_PROBE) { + spec->gen.preferred_dacs = preferred_pairs; spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; snd_hda_apply_pincfgs(codec, pincfgs); } else if (action == HDA_FIXUP_ACT_INIT) {