void-packages/srcpkgs/pinebookpro-kernel/patches/0005-sound-soc-codecs-es8316-Run-micdetect-only-if-jack-s.patch
2020-12-03 17:49:48 -03:00

30 lines
1.1 KiB
Diff

From 719cceae6ab58d6d9e168ca7de92eb9e22a2d7ea Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:34:47 +0200
Subject: [PATCH 5/8] sound: soc: codecs: es8316: Run micdetect only if jack
status asserted
Think this is (was?) required to prevent flapping of detection status on
the PBP.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.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 bd5d230c5df2..a2d8bf620b6f 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -688,7 +688,7 @@ static void es8316_disable_jack_detect(struct snd_soc_component *component)
snd_soc_component_update_bits(component, ES8316_GPIO_DEBOUNCE,
ES8316_GPIO_ENABLE_INTERRUPT, 0);
- if (es8316->jack->status & SND_JACK_MICROPHONE) {
+ if (es8316->jack && (es8316->jack->status & SND_JACK_MICROPHONE)) {
es8316_disable_micbias_for_mic_gnd_short_detect(component);
snd_soc_jack_report(es8316->jack, 0, SND_JACK_BTN_0);
}
--
2.28.0