[PATCH 1/2] ALSA: hda/realtek: Accelerate the front MIC charging and discharging of the 897 codec
wangdich9700 at 163.com
wangdich9700 at 163.com
Sun Aug 3 20:05:17 PDT 2025
From: wangdicheng <wangdicheng at kylinos.cn>
The front MIC capacitance of the Inspur board is too large, resulting in a longer charging and discharging time required,
which in turn prevents recording for 5 seconds before startup.
Therefore, software is used to increase the delay by 2 seconds to avoid this issue.
Signed-off-by: wangdicheng <wangdicheng at kylinos.cn>
---
sound/pci/hda/patch_realtek.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 877137cb09ac..88675eae9447 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1001,6 +1001,14 @@ static int alc_resume(struct hda_codec *codec)
if (!spec->no_depop_delay)
msleep(150); /* to avoid pop noise */
codec->patch_ops.init(codec);
+
+ if (codec->core.subsystem_id == 0x10ec1304) {
+ snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x04);
+ msleep(50);
+ snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x44);
+ msleep(2000);
+ snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80);
+ }
snd_hda_regmap_sync(codec);
hda_call_check_power_status(codec, 0x01);
return 0;
--
2.25.1
More information about the linux-arm-kernel
mailing list