Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp470362rbb; Sat, 24 Feb 2024 08:12:08 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCV7Z584OO22fFa8QLNGiJXgQpxvAm30ksV6xyqRFyj0N6Q9PrHO4KfINPc41cqamm10Tz3rxxFtlokGBqKrh8qJIBIksjGvBlfrnzjDXA== X-Google-Smtp-Source: AGHT+IGaLEp2sf7VeiHxQ2RgvOfCbWcS1llZrCw/aRhh3F4aChn44+BD3lSj7PFGfi1b6y51VmoK X-Received: by 2002:a05:6a20:d393:b0:1a0:de5c:d022 with SMTP id iq19-20020a056a20d39300b001a0de5cd022mr4182001pzb.2.1708791128250; Sat, 24 Feb 2024 08:12:08 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708791128; cv=pass; d=google.com; s=arc-20160816; b=W9YStP5+jLFwFcR+2pMZkqdja1n4s36e+Ar1b9+XHfIGkIJY0FvyzO123I/rrqT20F azi+GDMgkoXwelffKjUwjwiuVycd9QqPzW2IsfU2bfmovRJefYLwHVeMSlbCmnCQi4YT 43j5VJ8S74nhetPHVprZGjqKNJ5jMDsHBAWWhM36C26Teoxi8GIhJzKfzENEnCfHbJxs pIX9hY/6nNgWiVQmvqayxL+8McRdAIKxwbM0MIpHA0v2H3kI3DY1+WgkjhS+vbgL9lQa robyDc5MXKTpG3vyGaplbcBZs1jleR2t3Z+BmZoh69rd+b/WhOwCHBleqTJe44yt0AZB /Z4Q== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:cc:to:from:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:subject :dkim-signature; bh=PbQ4SLsny4bFWDjPuLR76KvUDSBLgo9Lb0WGrwi11bY=; fh=tWkmBujHFef1X0ATKkSEn9rXdWXIzudVyljfLzMu3/4=; b=01rktZHTWJsrjQHkmQnnZwoT7hsA8nCslreF6x+GWUThv9Pe78lJ/1Bz/EqRYuDrQr xiKErJVIlnkoqFThKUUGNPzQX6SoR1M33IGIeuok8D67pA4fctWz2AVX7VgY9l+4eb6M AgMK3ITIpIfOFnD1MC3gySTidfOScMMuOlmdMpYCxNJLbOPqqfibbdif1n1IkecW94Ns 0WP+FvJ993ln8txAKEhdOnDYpv512Fukqc4mX6iXVX5/0PWSGp1pUTmbKDmkRmRaZdm0 rVJ02luCQT3a8QjIEwiE4K8nYLj4lI2HNGDQ/Xjk0oQwOc2XVb5Ae0UYFP6ppFaegUGe rgAA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@willian.wang header.s=dkim header.b=xpgAxafK; arc=pass (i=2 spf=pass spfdomain=willian.wang dkim=pass dkdomain=willian.wang dmarc=pass fromdomain=willian.wang); spf=pass (google.com: domain of linux-kernel+bounces-79735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=willian.wang Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i10-20020a636d0a000000b005dc50616768si1036981pgc.528.2024.02.24.08.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 08:12:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@willian.wang header.s=dkim header.b=xpgAxafK; arc=pass (i=2 spf=pass spfdomain=willian.wang dkim=pass dkdomain=willian.wang dmarc=pass fromdomain=willian.wang); spf=pass (google.com: domain of linux-kernel+bounces-79735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=willian.wang Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EF1B52825D2 for ; Sat, 24 Feb 2024 16:12:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CAAB47A73; Sat, 24 Feb 2024 16:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=willian.wang header.i=@willian.wang header.b="xpgAxafK" Received: from mail-200160.simplelogin.co (mail-200160.simplelogin.co [176.119.200.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0137647F57 for ; Sat, 24 Feb 2024 16:11:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=176.119.200.160 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708791121; cv=pass; b=kCg7Ee0vaIU/Uv4vT1JDNF0zmTiffxrxIumXdMRQIh7/UsCxHcelEyRetiKPgH64op84IiU9K1pgz96mlVgulS6JJzplcO/wEtaxXIrDooSjsJEWZaaOBNo6yYcPNTIhKAEOJs1fNFbK0rfagT4yycDSeyDEWAzCG6pr+Xpt1uk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708791121; c=relaxed/simple; bh=U/wcljAf4AANc6QDw+IQ0KO00PBVdngL7aa7qn719J0=; h=Subject:Date:MIME-Version:From:To:Cc:Message-ID; b=m7NkUTK9+ai8JNW0MnrehbEYC5UHueSEnvP+cQhJM1PuolzPX42kcwNsjS1cUH77YrT22lSi2zFzZcvzuxfLBh6kHSAqI9Kg+zytQkVVnr8ca3NN+9uWSYYOVqknBXAHX8xnSOuUVbJ2N13gQL3fu5q9eWRUdWm08qXSjhPIhVs= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=willian.wang; spf=pass smtp.mailfrom=willian.wang; dkim=pass (1024-bit key) header.d=willian.wang header.i=@willian.wang header.b=xpgAxafK; arc=pass smtp.client-ip=176.119.200.160 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=willian.wang Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=willian.wang ARC-Seal: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1708791118; cv=none; b=dNeApRfHn0PNlCV8M6BJ9lLjVdyrRO/xAa0RqijoKYY68N3jsp5yyHoR0bOmSE4CSn5CdInqPYEASfqTjfTtOZESawDqh9v+NoqyYo9BxaHKsiCbkc4piaKNOrryDRSDRrooakNqvvsqiabUPXDuTn6oReMY8XT3YEIZO758JheYU+NlWf4099NvxlkKcvVb0C0lH4Eged8cPpHbv/rzrFDdJJ8RLOD4aKx/FQsKHUxGHK1jk7ZaPNHM6SsqKLOicIyd3lMg/SeyGO4S+W8vpMX/YSSArfcIuQM8BvdIhjbmMSuRiK2Mq9lWTIpXnguQrx9ZBC1KiCxxOtYaJh3SPQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1708791118; c=relaxed/simple; bh=U/wcljAf4AANc6QDw+IQ0KO00PBVdngL7aa7qn719J0=; h=Subject:Date:From:To:Cc; b=1jR0Om+G9gKkAld5BCGDKroMyIyHpLff5Fu3oAIgwMYfwZWSQgckOYV7eOuvwZQr8fWFmQmzjmm4Oof8psrH7D9YMV6hsfr6cF4S0p30WukosLHUC84EqMvU5HcOaMS2LgxWqGyVpENSoW/XmPboqNZmtPGNFN+EUBHehJHAB8pSo0B9WLl6QT5WpG/6QmaDGTMsWUA+rg09LORcRhwfiPcyU6BA+t5OR+JiqLQUMR/i0IC8L3z4OK2TUZTwOA5NbWb9/ODjLORTRGbIdV7j2VoSYSjo8C3ZqwJMk9w1TovehMVxtCAYBQttZuyKPsf3AcaKcV+TVF+N2BcS/BH5Xw== ARC-Authentication-Results: i=1; mail.protonmail.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=willian.wang; s=dkim; t=1708791118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PbQ4SLsny4bFWDjPuLR76KvUDSBLgo9Lb0WGrwi11bY=; b=xpgAxafKolY3zX2kr0bAvYrk5dun8TyrOIADUi09tmvSNbIefSukYfX9dqWoTPRFVNeBJ5 sdWc74FAo6/8VsFIwn46NT7P85IuO8IZbhtFpd/72uZqsDrdwVViVQq4m/ZyL8eQaL6IS4 ZSW2rceFqM5ztMCT5OoKEDZVO0cDc0E= Subject: [PATCH v3] ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8 Date: Sat, 24 Feb 2024 13:11:49 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Willian Wang To: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org,tiwai@suse.com,perex@perex.cz,stable@vger.kernel.org Message-ID: <170879111795.8.6687687359006700715.273812184@willian.wang> X-SimpleLogin-Type: Reply X-SimpleLogin-EmailLog-ID: 273812189 X-SimpleLogin-Want-Signing: yes Lenovo Slim/Yoga Pro 9 14IRP8 requires a special fixup because there is a collision of its PCI SSID (17aa:3802) with Lenovo Yoga DuetITL 2021 codec SSID. Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555 Link: https://lore.kernel.org/all/d5b42e483566a3815d229270abd668131a0d9f3a.camel@irl.hu Cc: stable@vger.kernel.org Signed-off-by: Willian Wang --- sound/pci/hda/patch_realtek.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0ec1312bffd5..f3b847f38153 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7444,6 +7444,7 @@ enum { ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, ALC298_FIXUP_LENOVO_C940_DUET7, + ALC287_FIXUP_LENOVO_14IRP8_DUETITL, ALC287_FIXUP_13S_GEN2_SPEAKERS, ALC256_FIXUP_SET_COEF_DEFAULTS, ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, @@ -7495,6 +7496,26 @@ static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec, __snd_hda_apply_fixup(codec, id, action, 0); } +/* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021; + * 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID, + * so we need to apply a different fixup in this case. The only DuetITL codec + * SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be + * and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would + * have matched correctly by their codecs. + */ +static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec, + const struct hda_fixup *fix, + int action) +{ + int id; + + if (codec->core.subsystem_id == 0x17aa3802) + id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */ + else + id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */ + __snd_hda_apply_fixup(codec, id, action, 0); +} + static const struct hda_fixup alc269_fixups[] = { [ALC269_FIXUP_GPIO2] = { .type = HDA_FIXUP_FUNC, @@ -9379,6 +9400,10 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc298_fixup_lenovo_c940_duet7, }, + [ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_lenovo_14irp8_duetitl, + }, [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { .type = HDA_FIXUP_VERBS, .v.verbs = (const struct hda_verb[]) { @@ -10247,7 +10272,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC), SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), - SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), + SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL), SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), -- 2.43.2