I met a similar issue before, but the difference is both sof driver and legacy hda driver can't detect mic, please see that commit header below:
commit 3f74249057827c5f6676c41c18f6be12ce1469ce
Author: Hui Wang <email address hidden>
Date: Mon Sep 14 14:51:18 2020 +0800
ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged
We found a Mic detection issue on many Lenovo laptops, those laptops
belong to differnt models and they have different audio design like
internal mic connects to the codec or PCH, they all have this problem,
the problem is if plugging a headset before powerup/reboot the
machine, after booting up, the headphone could be detected but Mic
couldn't. If we plug out and plug in the headset, both headphone and
Mic could be detected then.
Maybe it could fix your machine too with a similar fix, add spec->codec_variant != ALC269_TYPE_ALC255 like below:
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3532,7 +3532,8 @@ static void alc256_shutup(struct hda_codec *codec)
* 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)
+ spec->codec_variant != ALC269_TYPE_ALC256 &&
+ spec->codec_variant != ALC269_TYPE_ALC255) alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
If you couldn't build the testing kernel, let me know, I will build a kernel with that change.
I met a similar issue before, but the difference is both sof driver and legacy hda driver can't detect mic, please see that commit header below: f6676c41c18f6be 12ce1469ce
commit 3f74249057827c5
Author: Hui Wang <email address hidden>
Date: Mon Sep 14 14:51:18 2020 +0800
ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged
We found a Mic detection issue on many Lenovo laptops, those laptops
belong to differnt models and they have different audio design like
internal mic connects to the codec or PCH, they all have this problem,
the problem is if plugging a headset before powerup/reboot the
machine, after booting up, the headphone could be detected but Mic
couldn't. If we plug out and plug in the headset, both headphone and
Mic could be detected then.
Maybe it could fix your machine too with a similar fix, add spec->codec_variant != ALC269_TYPE_ALC255 like below: pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c shutup( struct hda_codec *codec) codec_variant != ALC269_TYPE_ALC257 &&
alc_update_ coef_idx( codec, 0x46, 0, 3 << 12);
--- a/sound/
+++ b/sound/
@@ -3532,7 +3532,8 @@ static void alc256_
* when booting with headset plugged. So skip setting it for the codec alc257
*/
if (spec->
- spec->codec_variant != ALC269_TYPE_ALC256)
+ spec->codec_variant != ALC269_TYPE_ALC256 &&
+ spec->codec_variant != ALC269_TYPE_ALC255)
If you couldn't build the testing kernel, let me know, I will build a kernel with that change.