From nobody Fri Jun 19 21:32:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E783C433EF for ; Tue, 29 Mar 2022 00:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231356AbiC2AVY (ORCPT ); Mon, 28 Mar 2022 20:21:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231299AbiC2AVW (ORCPT ); Mon, 28 Mar 2022 20:21:22 -0400 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C87A51A7722 for ; Mon, 28 Mar 2022 17:19:40 -0700 (PDT) Received: from localhost.localdomain (unknown [10.101.196.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 6A4A53F638; Tue, 29 Mar 2022 00:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1648513177; bh=ygS2Fut88gAAEq1XqjHt8uQhFiDWn3NUXwOVRMP9yrM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=U/zjbJHzD677GkP/zKEm76yg5D86msamJAkKFrtgayrfWXe6XCK8YDsZaSpK9thzn ttB8pD8odhUHORQ77UFKI+cRensCWDRWlg8TM7iuMFg3ng6mdONIWURJAWjO9sbDmt Qw9Q79HxPPmokk/JdZjY4eShEyP+7sVwmWWaLOCAWXkuSGHHGmFAVvxbLTNP0QySzD gPUR8oN7PdqMJhxNyLx0c9rfF8SDLuBt+SOHaXKJYlHWeF6/b6e6DeODTFFevsSvlN OA1BztbNkTVJZW9kR2s5TKbCowv0+pGD0IvJN2vvhb9j+RmCgR+zJFwRTURzgdokPN jcMZIwLhJkpTw== From: Kai-Heng Feng To: tiwai@suse.com Cc: Kai-Heng Feng , Jaroslav Kysela , Jeremy Szu , Werner Sembach , Hui Wang , Lucas Tanure , Cameron Berkenpas , Kailang Yang , Sami Loone , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 Date: Tue, 29 Mar 2022 08:18:43 +0800 Message-Id: <20220329001845.776776-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Commit 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issue") is to solve recording issue met on AL236, by matching codec variant ALC269_TYPE_ALC257 and ALC269_TYPE_ALC256. This match can be too broad and Mi Notebook Pro 2020 is broken by the patch. Instead, use codec ID to be narrow down the scope, in order to make ALC256 unaffected. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=3D215484 Fixes: 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issu= e") Signed-off-by: Kai-Heng Feng Reported-by: Dan Carpenter Reported-by: kernel test robot --- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4c33cb57963db..0d5e6cfa44888 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3617,8 +3617,8 @@ static void alc256_shutup(struct hda_codec *codec) /* If disable 3k pulldown control for alc257, the Mic detection will not = work correctly * when booting with headset plugged. So skip setting it for the codec al= c257 */ - if (spec->codec_variant !=3D ALC269_TYPE_ALC257 && - spec->codec_variant !=3D ALC269_TYPE_ALC256) + if (codec->core.vendor_id !=3D 0x10ec0236 || + codec->core.vendor_id !=3D 0x10ec0257) alc_update_coef_idx(codec, 0x46, 0, 3 << 12); =20 if (!spec->no_shutup_pins) --=20 2.34.1