summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2022-03-30 14:13:33 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-15 14:14:40 +0200
commit51f393c1a17d3dad1a5eb41893445b797a3e30fe (patch)
tree1828172c123491aec253850bc518a5cb53ffe1b2 /sound
parent71f13a1449b135b07a02c8a85aa8647f448e3ab0 (diff)
downloadlinux-stable-51f393c1a17d3dad1a5eb41893445b797a3e30fe.tar.gz
linux-stable-51f393c1a17d3dad1a5eb41893445b797a3e30fe.tar.bz2
linux-stable-51f393c1a17d3dad1a5eb41893445b797a3e30fe.zip
ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020
commit f30741cded62f87bb4b1cc58bc627f076abcaba8 upstream. 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> Cc: <stable@vger.kernel.org> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20220330061335.1015533-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 459f629fa0a8..3f9c2b1e3be6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3400,8 +3400,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)