[d-kernel] [PATCH 10/33] ASoC: codecs: ES8326: Changing the headset detection time
kovalev на altlinux.org
kovalev на altlinux.org
Пн Июл 29 08:09:59 MSK 2024
From: Zhu Ning <zhuning0077 на gmail.com>
commit 8a81491adbd9b25a648704c9825adaefb0c31868 upstream.
The old headset detection time is not enough for the new chip version.
An error occurs with the old detection time.According to tests,
400ms is the best detection time that does not trigger an error.
The delay time after the trigger is reduced by 300ms to
keep the whole detection time unchanged.
Signed-off-by: Zhu Ning <zhuning0077 на gmail.com>
Link: https://lore.kernel.org/r/20231101072702.91316-4-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie на kernel.org>
Signed-off-by: Vasiliy Kovalev <kovalev на altlinux.org>
---
sound/soc/codecs/es8326.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 57c55de69f1923..28522a792d4b89 100755
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -691,14 +691,14 @@ static void es8326_jack_detect_handler(struct work_struct *work)
if (es8326->hp == 0) {
dev_dbg(comp->dev, "First insert, start OMTP/CTIA type check\n");
/*
- * set auto-check mode, then restart jack_detect_work after 100ms.
+ * set auto-check mode, then restart jack_detect_work after 400ms.
* Don't report jack status.
*/
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x01);
usleep_range(50000, 70000);
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x00);
queue_delayed_work(system_wq, &es8326->jack_detect_work,
- msecs_to_jiffies(100));
+ msecs_to_jiffies(400));
es8326->hp = 1;
goto exit;
}
@@ -748,7 +748,7 @@ static irqreturn_t es8326_irq(int irq, void *dev_id)
msecs_to_jiffies(10));
else
queue_delayed_work(system_wq, &es8326->jack_detect_work,
- msecs_to_jiffies(600));
+ msecs_to_jiffies(300));
out:
return IRQ_HANDLED;
--
2.33.8
Подробная информация о списке рассылки devel-kernel