From e4b5e5ad484e0245912cb4b2192f44e2f2ae4c1a Mon Sep 17 00:00:00 2001 From: AngeloGioacchino Del Regno Date: Tue, 10 Aug 2021 13:34:05 +0200 Subject: [PATCH] ASoC: codecs: wcd9335: Fix headphone jack commit for new upstream kernel --- sound/soc/codecs/wcd9335.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 46f493754fe4..fd75898310c2 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -3977,7 +3977,7 @@ static irqreturn_t wcd9335_mbhc_sw_irq(int irq, void *data) struct snd_soc_component *component = wcd->component; bool ins = false; - if (snd_soc_component_read32(component, WCD9335_ANA_MBHC_MECH) & + if (snd_soc_component_read(component, WCD9335_ANA_MBHC_MECH) & WCD9335_MBHC_MECH_DETECT_TYPE_MASK) ins = true; @@ -3993,7 +3993,7 @@ static irqreturn_t wcd9335_mbhc_sw_irq(int irq, void *data) * If no micbias is enabled, then enable 100uA internal * current source for Button detection */ - if (snd_soc_component_read32(component, WCD9335_ANA_MICB2) & + if (snd_soc_component_read(component, WCD9335_ANA_MICB2) & WCD9335_ANA_MICB2_ENABLE) btndet_curr_src = WCD9335_ANA_MBHC_BD_ISRC_OFF; else @@ -4041,7 +4041,7 @@ static irqreturn_t wcd9335_mbhc_btn_press_irq(int irq, void *data) if (wcd->accessory_type == SND_JACK_HEADPHONE) return IRQ_HANDLED; - result = snd_soc_component_read32(comp, WCD9335_ANA_MBHC_RESULT_3); + result = snd_soc_component_read(comp, WCD9335_ANA_MBHC_RESULT_3); btn_result = result & WCD9335_MBHC_BTN_RESULT_MASK; switch (btn_result) { @@ -4081,7 +4081,7 @@ static irqreturn_t wcd9335_mbhc_bt_rel_irq(int irq, void *data) if (wcd->detect_accessory_type) { - u32 result = snd_soc_component_read32(wcd->component, + u32 result = snd_soc_component_read(wcd->component, WCD9335_ANA_MBHC_RESULT_3); /* check if its BTN0 thats released */