ASoC: WCD9304: Fix MBHC 8 button detection
On WCD9304, the bandgap reference voltage is configurable. With
bandgap in MBHC mode, this adjustment factor was incorrect causing
button voltages to be beyond the expected thresholds.
Fix by appropriately configuring the bandgap reference voltage
Change-Id: I17184bedc64a424b639187fd9358506c29a44495
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
diff --git a/sound/soc/msm/msm8930.c b/sound/soc/msm/msm8930.c
index 9061dec..72bb9b5 100644
--- a/sound/soc/msm/msm8930.c
+++ b/sound/soc/msm/msm8930.c
@@ -42,7 +42,7 @@
#define DEFAULT_PMIC_SPK_GAIN 0x0D
#define SITAR_EXT_CLK_RATE 12288000
-#define SITAR_MBHC_DEF_BUTTONS 3
+#define SITAR_MBHC_DEF_BUTTONS 8
#define SITAR_MBHC_DEF_RLOADS 5
static int msm8930_spk_control;
@@ -668,7 +668,7 @@
}
err = snd_soc_jack_new(codec, "Button Jack",
- SND_JACK_BTN_0, &button_jack);
+ SITAR_JACK_BUTTON_MASK, &button_jack);
if (err) {
pr_err("failed to create new jack\n");
return err;