Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp827505imu; Tue, 11 Dec 2018 08:10:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/UeF6RNrX6wl0VuvKmSWKs8Jr7HhzJDyzjp+t2sJqgqXHWy9rcGAlHwFVdx4yRjbjfim3uy X-Received: by 2002:a17:902:f81:: with SMTP id 1mr16019991plz.174.1544544646557; Tue, 11 Dec 2018 08:10:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544544646; cv=none; d=google.com; s=arc-20160816; b=TvuzsFnC5oc8ripmrBtTMZEq3+OLMFjDpBdVC3eNSg0XQPM51D2pq3fHLNdT5ACa5w xlHPiprNOp68VdVq2qclDTsnar6V+8TRUXc1zD1Qj6ZxaHmmE3gbeijPjyahW4KkrJi/ Hc2syhuAAekgXTruVnps/VrcGvfIagDEx85sI4vA03ovJqPF+ZBDXI65TkZKThqnyyNG aIhu4DJGZqV4HSyITbyAjNnVHWUs4VUJGxrKqvAF5ZVLBtLU8atJpoZhZldvthjT6t7/ j7rhpaaGrxhBmvW/I5/SjgN1rOG8Ijde8JK0ZmuC/JNwUJ7npnyVHRdT3ekupCGCJaj7 0P4Q== 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=xIMdzfFZG7Xrq25DpDZqdJwbRlFCSPcBxC2BtRKWwuc=; b=nMzMi+EVP0te30IZZtHZnhL+Ugg1KDrZaD1ZwK29XVC5+50N0Dyfgielg7f/8j/I0H YzWecoak/9tDibW3pfBatOZiEVOrWmMLQqyEEaF+oG4KwlB9M73bnbMYXqRl8PVc8+cf X6Rv9KK9KcZfUvDqLukmVAvi1Tl3oDhZCtkzpl7JiKAjiJrX9u4gkAImsNqjIdZ1Ibuq XqLqQrUuclk/CtVn2HSCo6IdXe2wZO0X+mlThED2M3Wdd+Jlu0urw/EJCYKtJyoiwNvx e0dQpRa9xtfq7i+6uiGhy4Kt+yz5V5gf868dRz95/RsmM7/tJiK3aFDnSZ3+6SZfYGKP nJ6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mJukAg1I; 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 k17si12444850pgl.62.2018.12.11.08.10.31; Tue, 11 Dec 2018 08:10:46 -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=mJukAg1I; 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 S1729987AbeLKPxl (ORCPT + 99 others); Tue, 11 Dec 2018 10:53:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:42350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729974AbeLKPxi (ORCPT ); Tue, 11 Dec 2018 10:53:38 -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 6C1672146F; Tue, 11 Dec 2018 15:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543617; bh=43OOgzE87EcSaQ0vt6uxA2NgEVK8/ve5p/wCTPUwOCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mJukAg1IbU4oL8VilmeD/SyhWCOPh3uYVTv5uokvExWxUraUG9idQScbOXDi40KSi 7VjBv/oNcts4jrp6UlP/k+G5u2P405j1ajmV/sh0EFsxYuQZlQSNjYpQ3BbQvwlbze XvY9MzMacyhaTMHmAFTsC3ltMCFSdLBor6ZxQllI= 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.14 39/67] ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 Date: Tue, 11 Dec 2018 16:41:39 +0100 Message-Id: <20181211151632.375331752@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151630.378216233@linuxfoundation.org> References: <20181211151630.378216233@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.14-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 @@ -4863,9 +4863,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) {