mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: es8316: Allow more time for headset mic bias to settle
@ 2026-11-10 14:58 Ilya Muhamadeev
  0 siblings, 0 replies; only message in thread
From: Ilya Muhamadeev @ 2026-11-10 14:58 UTC (permalink / raw)
  To: linux-sound, Mark Brown, Liam Girdwood
  Cc: Ilya Muhamadeev, Jaroslav Kysela, Takashi Iwai, linux-kernel, stable

On the 3Logic Group Graviton N15i-K2, a TRRS headset is detected as
headphones, leaving its microphone unavailable. The driver waits 20 ms
after enabling microphone bias before reading GPIO_FLAG to distinguish
a headset from headphones.

Register reads on this machine show that GM_NOT_SHORTED remains clear
through 40 ms and becomes set at approximately 60 ms after enabling
microphone bias. Reading the bit after only 20 ms therefore incorrectly
identifies the headset microphone as shorted to ground.

Increase the settling delay to 100 ms to cover the observed settling
time with some margin. This adds 80 ms to the microphone bias enable
sequence used for jack detection.

Fixes: 822257661031 ("ASoC: es8316: Add jack-detect support")
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Muhamadeev <nicourced@altlinux.org>
---
 sound/soc/codecs/es8316.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 334ac9119c18f34d51d79fb357c3d82096935c7f..470c503010fc1c02fba9d8e9aaf0ea61b4be3637 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -616,7 +616,7 @@ static void es8316_enable_micbias_for_mic_gnd_short_detect(
 	snd_soc_dapm_sync_unlocked(dapm);
 	snd_soc_dapm_mutex_unlock(dapm);
 
-	msleep(20);
+	msleep(100);
 }
 
 static void es8316_disable_micbias_for_mic_gnd_short_detect(

base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 14:58 [PATCH] ASoC: es8316: Allow more time for headset mic bias to settle Ilya Muhamadeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®