Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp618364iog; Mon, 13 Jun 2022 09:15:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt4OMhPi24H17WguJpGrHuGpaWromEPIiFGCbtIZDwH9GLMErL/Bn8BRh93OuwAAJeSMyq X-Received: by 2002:a63:8841:0:b0:3fc:704c:24ff with SMTP id l62-20020a638841000000b003fc704c24ffmr358942pgd.116.1655136917205; Mon, 13 Jun 2022 09:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136917; cv=none; d=google.com; s=arc-20160816; b=o7duzmKoDuWsC8xa8HGwLei0RZax3O43m8nG4kXQ3IFeOFpSg79g0pMkIcR92GiBsU oAPS1XK+4YCuJ2rwTSQ6DPY4A6XXoDeNGIFr0q/gWwjmUGMOiSWTeD2cXBVXn+2whauY wfuc4C6iFnjs08A4HgCoDqOYaiPJ6FnnUEp4du2fr5iuk2dP1wOxe6TWOXdIwCEvBSTZ Lse4eP9dgp8dDnXsmD+ZJsdzKxcs8BdBPcB0SvyTLa/kxPpqkq38EsxGY4B87DDKxfWK jBTkpS1VgEMIZy8rdPkHouO3TzRQQhxQDeEooRH4vkwmZP8kj8+gfYxcz1Ui6sERoqd3 Sc/g== 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=CMR5x2zfzvZOAe9R/TOkeGbJlDjNtsK/36YWA1CPCw4=; b=sekiGxp/Z9hdqDS0sY5Wm8Ture47v0NBFdWndXI6a8dUjxt1AA2lceSVL7nrNdPmPI RuBBL8eLQ2UrNiVFSKVn8zY6SpBHBC6ef8R9rwklzQS3/YtA7gy0ckFn6gw2k0YV+Dtj cWFd7HMdLliXmSuJEq6RLbX6BydRtFXUeZaleY3IlsV8AqVbg1Q2xOA0MEjSVT5ordiD iGBzXSaXhNcx+3H4emnfucsW9lieONm0muGwaHHDLQ3DZx/DJo4DsFBuZA6N0N/cTYFE uX4i/v23h5S8Hn1vgIYsoITOIGp+tZcM/YabF5qZk+b0ehNfhqJvMxXdx4QFibwMMCDU jSJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vbIev4Fo; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020a63f358000000b003816043f10bsi9296323pgj.768.2022.06.13.09.15.04; Mon, 13 Jun 2022 09:15:17 -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=@linuxfoundation.org header.s=korg header.b=vbIev4Fo; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355287AbiFMLkR (ORCPT + 99 others); Mon, 13 Jun 2022 07:40:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355254AbiFMLa7 (ORCPT ); Mon, 13 Jun 2022 07:30:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1357F41F92; Mon, 13 Jun 2022 03:47:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 533DF61257; Mon, 13 Jun 2022 10:46:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57F56C34114; Mon, 13 Jun 2022 10:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117218; bh=MPbYGSYDH4oLsp81M+7tzECJbGhkal0aiEE+3tdFE/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vbIev4FoiagObwe4Yw68Iw/8Gt6c6p1eGfrZyjwpyhyt2BL5ATxjOZ34bMjO0I2L+ iVUcnrd14Il0RoohqNkO50362TwPZAD6A1BqSvYflPfc0dGgJGHCagXPGI2Z+RrX9F SZINN1d75yfEdK76NPopX2wRzdMKJZdS4ZobuFw8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marios Levogiannis , Takashi Iwai Subject: [PATCH 4.19 002/287] ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS Date: Mon, 13 Jun 2022 12:07:06 +0200 Message-Id: <20220613094923.913702439@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094923.832156175@linuxfoundation.org> References: <20220613094923.832156175@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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 @@ -1916,6 +1916,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, @@ -2461,6 +2462,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[] = { @@ -2498,6 +2507,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),