Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2136165iof; Tue, 7 Jun 2022 20:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgst3HHDCbFrbkk5MDATLID/wObRMH6MH6f6DPvarjlnSCN4C5yjhmmSkI4jABC2uyazk5 X-Received: by 2002:a17:90b:4f8d:b0:1e8:38f5:e199 with SMTP id qe13-20020a17090b4f8d00b001e838f5e199mr26698841pjb.64.1654660684070; Tue, 07 Jun 2022 20:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654660684; cv=none; d=google.com; s=arc-20160816; b=s/NFTjJ4Ua4hE2baYP/PELKv4vsNLnySUOQz/K0FumOxuobRlbX+CwL7MbMP8TZqRK YS8omH7582yeENCFMbn7TxdQWRApJNIaBfJekyJHDCIq+Xuh06h0lQPnCpyDXJnF/ttd 7mR6wf77c060X6bqB9YresMKnD6p+j+uJN80iRskX8UhX08DTz9OM3/fItrcS5SruLS1 pzKdhTJH8+4qKTTtbkVzHxQhoO1irPeOdfBPjQt2fRHWgvmE6DXBEsEKVuHWKXNl0sml IQEV+4bUCKBMp4POXUfPvtmroHBxzP850mH3etTOk3r1RShuozUhTQY4HqDXhnZsSPqw QnrA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4ZOgRE8C7VWlWPMzX2xQl16cTLzpt4mIqo91E1T4GXo=; b=bS3MP8Da30u7z2kBiCNq/JhkvzWYqH+FshW5OPQ3EDaeFIHX9pla/OvKP3k74syyup Awldn7bnLahfpNLUj/BFgTNwjt/9/gcXr2oEK3ti87k8QNDnRUcUJf/TJBv8zuLYRyX2 XwQT8qnsfmJDIpfJQoPZZ7RGwFIQshTqx0zKt7cevKdTey9ZPNWnlfVipiz/fKzUdVbO TtlzjA82Xt9WE+kXQjOWmTpEXYuj+hDlY/aJE1fwZYmAV7aHj1jrWrVfOoeENEZxieZP uZyHhbVgdEMzfCrufLNnRDd3Sh31DV7ePUvs7ciEECPBnu3T76jqAy9Rr2ctxVmAL8yB wpDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vroPHW+o; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x16-20020a17090a8a9000b001e3495408d6si27209072pjn.123.2022.06.07.20.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:58:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vroPHW+o; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 44D8E248249; Tue, 7 Jun 2022 20:19:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358995AbiFGUTN (ORCPT + 99 others); Tue, 7 Jun 2022 16:19:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356649AbiFGT2D (ORCPT ); Tue, 7 Jun 2022 15:28:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4AF1A0AD5; Tue, 7 Jun 2022 11:10:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C65F8B82374; Tue, 7 Jun 2022 18:10:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F2C4C385A2; Tue, 7 Jun 2022 18:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654625416; bh=xXLFWftSkAvr+ult2Lpc9PstGpW7d7BWajMASz5VVno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vroPHW+oIL5Ft0PqMLDaxnmMqs5rpz41yxrh8c+/jcWuPj8BMtl6lBydodA0sVUfA RV7CJ83Qd8tVvJteU48tv7lr43ROdhKnUiZkMVQimMcLxlmvKqZJtZoD0Hvi2NEr0y eMhFC3MdW03sI8j5vMPqDz4F5dECTcWFe3KYpbBs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marios Levogiannis , Takashi Iwai Subject: [PATCH 5.17 012/772] ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS Date: Tue, 7 Jun 2022 18:53:24 +0200 Message-Id: <20220607164949.361571625@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Marios Levogiannis commit 9bfa7b36343c7d84370bc61c9ed774635b05e4eb upstream. Set microphone pins 0x18 (rear) and 0x19 (front) to VREF_50 to fix the microphone noise on ASUS TUF B550M-PLUS which uses the ALCS1200A codec. The initial value was VREF_80. The same issue is also present on Windows using both the default Windows driver and all tested Realtek drivers before version 6.0.9049.1. Comparing Realtek driver 6.0.9049.1 (the first one without the microphone noise) to Realtek driver 6.0.9047.1 (the last one with the microphone noise) revealed that the fix is the result of setting pins 0x18 and 0x19 to VREF_50. This fix may also work for other boards that have been reported to have the same microphone issue and use the ALC1150 and ALCS1200A codecs, since these codecs are similar and the fix in the Realtek driver on Windows is common for both. However, it is currently enabled only for ASUS TUF B550M-PLUS as this is the only board that could be tested. Signed-off-by: Marios Levogiannis Cc: Link: https://lore.kernel.org/r/20220530074131.12258-1-marios.levogiannis@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1981,6 +1981,7 @@ enum { ALC1220_FIXUP_CLEVO_PB51ED_PINS, ALC887_FIXUP_ASUS_AUDIO, ALC887_FIXUP_ASUS_HMIC, + ALCS1200A_FIXUP_MIC_VREF, }; static void alc889_fixup_coef(struct hda_codec *codec, @@ -2526,6 +2527,14 @@ static const struct hda_fixup alc882_fix .chained = true, .chain_id = ALC887_FIXUP_ASUS_AUDIO, }, + [ALCS1200A_FIXUP_MIC_VREF] = { + .type = HDA_FIXUP_PINCTLS, + .v.pins = (const struct hda_pintbl[]) { + { 0x18, PIN_VREF50 }, /* rear mic */ + { 0x19, PIN_VREF50 }, /* front mic */ + {} + } + }, }; static const struct snd_pci_quirk alc882_fixup_tbl[] = { @@ -2563,6 +2572,7 @@ static const struct snd_pci_quirk alc882 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), + SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),