From patchwork Tue Mar 29 00:18:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 12794342 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1054AC433F5 for ; Tue, 29 Mar 2022 00:20:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 81D3317A2; Tue, 29 Mar 2022 02:19:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 81D3317A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648513244; bh=WAXfTxugyFhJgwqvV5CnKZ9haN3ZeQdMJUmbHac4nB0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Yne3yAJ5fIAg00sKMd1zJOz8TjQ9CtNdOUCwIyMNnh41ftKoWvnMoNtHBV2MoJkME SFqjGBwknb1bKSGBV5GBz1QtBGaEq4J4XGqz2WDRBh+FGvYU8h472En6NOxKV/5iNb A6i8itcCVsTDdXpHi1DTQ1fLHXH3t/cA+A3GZXQQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F37A5F800FA; Tue, 29 Mar 2022 02:19:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B77BF8024C; Tue, 29 Mar 2022 02:19:52 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 27940F800FA for ; Tue, 29 Mar 2022 02:19:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 27940F800FA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="U/zjbJHz" 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 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 Cc: alsa-devel@alsa-project.org, Kailang Yang , Lucas Tanure , Jeremy Szu , linux-kernel@vger.kernel.org, Werner Sembach , Hui Wang , Kai-Heng Feng , Sami Loone , Cameron Berkenpas X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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=215484 Fixes: 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issue") Signed-off-by: Kai-Heng Feng Reported-by: kernel test robot Reported-by: kernel test robot Reported-by: Dan Carpenter --- 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 alc257 */ - if (spec->codec_variant != ALC269_TYPE_ALC257 && - spec->codec_variant != ALC269_TYPE_ALC256) + if (codec->core.vendor_id != 0x10ec0236 || + codec->core.vendor_id != 0x10ec0257) alc_update_coef_idx(codec, 0x46, 0, 3 << 12); if (!spec->no_shutup_pins)