From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: tiwai@suse.com Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>, kernel test robot <lkp@intel.com>, Dan Carpenter <dan.carpenter@oracle.com>, Jaroslav Kysela <perex@perex.cz>, Jeremy Szu <jeremy.szu@canonical.com>, Werner Sembach <wse@tuxedocomputers.com>, Hui Wang <hui.wang@canonical.com>, Lucas Tanure <tanureal@opensource.cirrus.com>, Cameron Berkenpas <cam@neo-zeon.de>, Kailang Yang <kailang@realtek.com>, Sami Loone <sami@loone.fi>, 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 [thread overview] Message-ID: <20220330061335.1015533-1-kai.heng.feng@canonical.com> (raw) 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 <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: tiwai@suse.com Cc: alsa-devel@alsa-project.org, Kailang Yang <kailang@realtek.com>, kernel test robot <lkp@intel.com>, Lucas Tanure <tanureal@opensource.cirrus.com>, Jeremy Szu <jeremy.szu@canonical.com>, linux-kernel@vger.kernel.org, Werner Sembach <wse@tuxedocomputers.com>, Hui Wang <hui.wang@canonical.com>, Kai-Heng Feng <kai.heng.feng@canonical.com>, Sami Loone <sami@loone.fi>, Cameron Berkenpas <cam@neo-zeon.de>, Dan Carpenter <dan.carpenter@oracle.com> Subject: [PATCH v2] ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 Date: Wed, 30 Mar 2022 14:13:33 +0800 [thread overview] Message-ID: <20220330061335.1015533-1-kai.heng.feng@canonical.com> (raw) 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 <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> --- 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
next reply other threads:[~2022-03-30 6:14 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-30 6:13 Kai-Heng Feng [this message] 2022-03-30 6:13 ` [PATCH v2] ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 Kai-Heng Feng 2022-03-30 8:17 ` Takashi Iwai 2022-03-30 8:17 ` Takashi Iwai
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220330061335.1015533-1-kai.heng.feng@canonical.com \ --to=kai.heng.feng@canonical.com \ --cc=alsa-devel@alsa-project.org \ --cc=cam@neo-zeon.de \ --cc=dan.carpenter@oracle.com \ --cc=hui.wang@canonical.com \ --cc=jeremy.szu@canonical.com \ --cc=kailang@realtek.com \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=perex@perex.cz \ --cc=sami@loone.fi \ --cc=tanureal@opensource.cirrus.com \ --cc=tiwai@suse.com \ --cc=wse@tuxedocomputers.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.