Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1486597pxb; Wed, 30 Mar 2022 04:50:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT/id1KFADM0ZsRq0dgZTsvxui1W06wdOC44nxuOYPRHhKQXdqE7ipQtiR53inetTKqMzz X-Received: by 2002:a63:381:0:b0:385:f8e6:bea1 with SMTP id 123-20020a630381000000b00385f8e6bea1mr5997301pgd.120.1648641058084; Wed, 30 Mar 2022 04:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648641058; cv=none; d=google.com; s=arc-20160816; b=PlatRwSmGXXOHD6vGFspe7Z5Uo2+CcdewxUNRX5dCLTWpLm7Us0YzfPxsymO4dAhNb pBxBUxU7Xy9J2fofDZ/NlFtFaD8UB6EIxU834D6hnsP6UN7eFGNWXXalMkscR1fgghi1 A4qn9Nw8PP45qH8ZcnNgI1YbAoz6NNPIxLuLOceHSLBTT9w14NGBH5d75yTW9zs4n5il nqiWex79QsxNYXBoP4DCEeWGq/3HUuOuYPwUTltrmQdTs2hQjCSPUWzBBqhreK1FvPMh wzcdsqE7XZJE/NHxNMrfDOQyTKvKs5EN8oib8VEnN61z1gS3xyDbIDwKKFf+yJ2AiAPp DpnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NUWrxgCHzurIsqxuvbtWFPBwSW5wtoM8Kr1QQ/VeCxE=; b=V3hyh5wbE+7jlTe5Zyv8VuyRf8ERNjqS7qC7tQgDvX6w+DeP5NaxN9g5Wg704Wyc5B epTw0+9WWDdnD0Yg1oBIiysZWNquXkjj/AGpRsHH/4qWsVENqhomDp5znjjYTbkg8Lsw jmoAkIgOOw0euRjyDXpv+3pSPe5GJporoRmL/HiB0GA3B5f+Ns27y01Ji5hwGsUVpCm/ sSyisccneMbAu4j9YVHjmEpDE0Y8pWD3S+PV476YECHM6vTL8ppMcPaTPworlW3B3aRe JgNw2khgBztIlU+pysLTrwkJWaQADCcf6Vuu2l2s2xfTkQiIhbKp5I6n+vDWps1sykfU KCIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Y+HnX3fT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a630715000000b003816043efd1si20397369pgh.454.2022.03.30.04.50.43; Wed, 30 Mar 2022 04:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Y+HnX3fT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243216AbiC3GQP (ORCPT + 99 others); Wed, 30 Mar 2022 02:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241944AbiC3GQN (ORCPT ); Wed, 30 Mar 2022 02:16:13 -0400 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD4A42A09 for ; Tue, 29 Mar 2022 23:14:27 -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-1.canonical.com (Postfix) with ESMTPSA id 1779F3F622; Wed, 30 Mar 2022 06:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1648620865; bh=NUWrxgCHzurIsqxuvbtWFPBwSW5wtoM8Kr1QQ/VeCxE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Y+HnX3fTIop0uCPSVesQeDxtk/RzuUTlrW74fYMDYPs55uEly6ZxXzfnhplRGO6Hl x432Vp3mg/uZna4woUy74o5PLqJKUhqCGvRpaZswhds2OH1WJR4fSRRjg0pcT/4T1R AjpQQhTz1rcSoOodC1YSIoF3PYCbKIOoHuJFpgncKBAnryGaRyLYSGvnqVepmf3AUz yxSKKTutecfTm3Xy5cw4qnSlvwTAodqZQKidxNCO578twleVqLmYBRdA9TUx82Bf7w YhSmhHPBhM4PQk9RQyyAgSNF/1HD92JxI/cBNP6ZF3H0oqLuRMTWGGCIsnhEIikFLF /yGSQnuPaSC5g== From: Kai-Heng Feng To: tiwai@suse.com Cc: Kai-Heng Feng , kernel test robot , Dan Carpenter , 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 v2] ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 Date: Wed, 30 Mar 2022 14:13:33 +0800 Message-Id: <20220330061335.1015533-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Kai-Heng Feng --- v2: Fix wrong comparison, || -> && 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..aace474a899de 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) -- 2.34.1