Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1976008ybh; Tue, 14 Jul 2020 12:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/QC+uYFgTDZaYBGMhS506thU+i5+HJXtvJvDh0+Ohdjp0/zmpRlpb4FSAFPITnm94Um2s X-Received: by 2002:aa7:c657:: with SMTP id z23mr6079371edr.265.1594753522051; Tue, 14 Jul 2020 12:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594753522; cv=none; d=google.com; s=arc-20160816; b=Kx65Yxv6zSoo0HluzYxGrUK5GFoaFYLDtt0HjNGOFidr4d43BTQhUY0w0mjxJEMFL0 uHfvaRSxU1TQFeHhTCFCYXfvIsNZBHSh6kUzPPNJbjOmqxNiMh/nw1nJG5dfm36UaPRV Z9PgeEUpmF6S6AIbFjcat8ogJ3KuHw1MULBrZbij1IfP3rgbhJUFt2wKpbAKTwns+XZc Ya4hrpwT72SQmZ2c0By51olxXemC8Zj0ypnJiaupxvYV5c4PuZGegn3JP9kin3pZpteX 43enE+WTQLNz7SgMaLXR5fcKNtTW2Z4PdvZ0Nh6aYnSblAQ+cz23QA7ZAvdisx06RvZ8 z97Q== 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=CRhsU+6addnv0k9/ngbsWdbLOZ92RseLZ5BIfJcygIU=; b=A+rT+nBKG5X27cQof/HasZNl0SO7G6xSTuWSxCT1+JUR4WA48SdELpQ653vFtvGXzx /4eYcURLQjS+IKCqaaOBNAtwtLTViO/gk517HuGIGyIeLRw/VDUGI3e8FwngyiVpNFbf b4okpCxRWZPDH5h7fyFMduEjNiXkZSMVgq+OczBBjx/VTfvxUOcFi1wZoay/SjiyLMK/ 0WvlmneB2J1cugjJWOmM34LWYCe+gXQBEYsXgYaQnMdV1Qx4PD6G6K2NOwDb+p2OnMsk muR0YdeBNY0UOB/8e3wAoCg3EGh+nNfiboN1XYoJwnHCmRmeEkHXSZxNSM5uR/ZGg2aI r4vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="k8lH/bKU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx2si10931351ejb.706.2020.07.14.12.04.58; Tue, 14 Jul 2020 12:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="k8lH/bKU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730541AbgGNS6K (ORCPT + 99 others); Tue, 14 Jul 2020 14:58:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:56434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731174AbgGNS6G (ORCPT ); Tue, 14 Jul 2020 14:58:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 BAEBF229CA; Tue, 14 Jul 2020 18:58:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594753085; bh=I70nf84rWZrSCLQ2NFeB75EIdPZPnGNrLbNIid3wd1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k8lH/bKULi/GAywnEI1QP62Uyw0eR7gqkhirCSI/vG2LC/4PehoK+wyFY0WGO8X+9 PW6Leh+52r87xMTrN6FrAsbEXIuAmfdccBQR9IudP3Xcz1C56OxWFpTfUyqMugE+yf GD/WBKHSW10TwNIWmSL6hfaUprSLcOwgeB5MjHMA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jaroslav Kysela , Kailang Yang , Vincent Bernat , Even Brenden , Benjamin Poirier , Takashi Iwai Subject: [PATCH 5.7 113/166] ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id Date: Tue, 14 Jul 2020 20:44:38 +0200 Message-Id: <20200714184121.248208501@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714184115.844176932@linuxfoundation.org> References: <20200714184115.844176932@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Benjamin Poirier commit 9774dc218bb628974dcbc76412f970e9258e5f27 upstream. 1) In snd_hda_pick_fixup(), quirks are first matched by PCI SSID and then, if there is no match, by codec SSID. The Lenovo "ThinkPad X1 Carbon 7th" has an audio chip with PCI SSID 0x2292 and codec SSID 0x2293[1]. Therefore, fix the quirk meant for that device to match on .subdevice == 0x2292. 2) The "Thinkpad X1 Yoga 7th" does not exist. The companion product to the Carbon 7th is the Yoga 4th. That device has an audio chip with PCI SSID 0x2292 and codec SSID 0x2292[2]. Given the behavior of snd_hda_pick_fixup(), it is not possible to have a separate quirk for the Yoga based on SSID. Therefore, merge the quirks meant for the Carbon and Yoga. This preserves the current behavior for the Yoga. [1] This is the case on my own machine and can also be checked here https://github.com/linuxhw/LsPCI/tree/master/Notebook/Lenovo/ThinkPad https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3225701 [2] https://github.com/linuxhw/LsPCI/tree/master/Convertible/Lenovo/ThinkPad https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3176355 Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen") Fixes: 54a6a7dc107d ("ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen") Cc: Jaroslav Kysela Cc: Kailang Yang Tested-by: Vincent Bernat Tested-by: Even Brenden Signed-off-by: Benjamin Poirier Cc: Link: https://lore.kernel.org/r/20200703080005.8942-2-benjamin.poirier@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7536,8 +7536,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), - SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), - SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),