summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da7219-aad.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-08-09 14:47:05 +0100
committerMark Brown <broonie@kernel.org>2018-08-09 14:47:05 +0100
commit4aa5db22d35588e1a5d2ee88472348ea73d9fb23 (patch)
tree67c98488983a71305e24940930d6e27a96d54db2 /sound/soc/codecs/da7219-aad.c
parent6c084839877666d987ff8bc4e0facd3c02d99d61 (diff)
parentf2cf0ef7c0ce141bb38f315c34c56e6ef5667a27 (diff)
downloadlinux-4aa5db22d35588e1a5d2ee88472348ea73d9fb23.tar.bz2
Merge branch 'asoc-4.19' into asoc-next
Diffstat (limited to 'sound/soc/codecs/da7219-aad.c')
-rw-r--r--sound/soc/codecs/da7219-aad.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219-aad.c b/sound/soc/codecs/da7219-aad.c
index a49ab751a036..2c7d5088e6f2 100644
--- a/sound/soc/codecs/da7219-aad.c
+++ b/sound/soc/codecs/da7219-aad.c
@@ -59,6 +59,7 @@ static void da7219_aad_btn_det_work(struct work_struct *work)
container_of(work, struct da7219_aad_priv, btn_det_work);
struct snd_soc_component *component = da7219_aad->component;
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
+ struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
u8 statusa, micbias_ctrl;
bool micbias_up = false;
int retries = 0;
@@ -86,6 +87,8 @@ static void da7219_aad_btn_det_work(struct work_struct *work)
if (retries >= DA7219_AAD_MICBIAS_CHK_RETRIES)
dev_warn(component->dev, "Mic bias status check timed out");
+ da7219->micbias_on_event = true;
+
/*
* Mic bias pulse required to enable mic, must be done before enabling
* button detection to prevent erroneous button readings.
@@ -439,6 +442,8 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
DA7219_BUTTON_CONFIG_MASK, 0);
+ da7219->micbias_on_event = false;
+
/* Disable mic bias */
snd_soc_dapm_disable_pin(dapm, "Mic Bias");
snd_soc_dapm_sync(dapm);