mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ilya Muhamadeev <nicourced@altlinux.org>
To: linux-sound@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: Ilya Muhamadeev <nicourced@altlinux.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] ASoC: es8316: Allow more time for headset mic bias to settle
Date: Tue, 10 Nov 2026 17:58:35 +0300	[thread overview]
Message-ID: <20261110145835.106381-1-nicourced@altlinux.org> (raw)

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

                 reply	other threads:[~2026-11-10 14:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261110145835.106381-1-nicourced@altlinux.org \
    --to=nicourced@altlinux.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®