void-packages/srcpkgs/pinebookpro-kernel/patches/0005-sound-soc-codecs-es831...

31 lines
1.1 KiB
Diff

From bdf0ad5977e37d8415f53011f8f8495e0ebce152 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 f9ec5cf82599..04bba9442060 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.29.2