ASoC: wcd9310: Add high impedance headphone detection support
If HPHL and HPHR have relatively high impedance, internal MBHC HPHL
trigger cannot trigger so results in headphone/headset detection
failure.
Utilize MIC trigger as well as HPHL trigger in order to detect headphone
and headset which have high impedance on headphone line.
CRs-fixed: 339390, 337590, 336847, 334339
Change-Id: Ibfd4ba254197233f2b5e253f5d1fa2a98c848c97
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
diff --git a/sound/soc/msm/apq8064.c b/sound/soc/msm/apq8064.c
index cca0abc..9a8fdba 100644
--- a/sound/soc/msm/apq8064.c
+++ b/sound/soc/msm/apq8064.c
@@ -840,11 +840,11 @@
codec_clk = clk_get(cpu_dai->dev, "osr_clk");
- tabla_hs_detect(codec, &hs_jack, &button_jack, tabla_mbhc_cal,
- TABLA_MICBIAS2, msm_enable_codec_ext_clk, 0,
- TABLA_EXT_CLK_RATE);
+ err = tabla_hs_detect(codec, &hs_jack, &button_jack, tabla_mbhc_cal,
+ TABLA_MICBIAS2, msm_enable_codec_ext_clk, 0,
+ TABLA_EXT_CLK_RATE);
- return 0;
+ return err;
}
static struct snd_soc_dsp_link lpa_fe_media = {
diff --git a/sound/soc/msm/msm8960.c b/sound/soc/msm/msm8960.c
index 0854dff..a8aa05d 100644
--- a/sound/soc/msm/msm8960.c
+++ b/sound/soc/msm/msm8960.c
@@ -753,11 +753,11 @@
codec_clk = clk_get(cpu_dai->dev, "osr_clk");
- tabla_hs_detect(codec, &hs_jack, &button_jack, tabla_mbhc_cal,
- TABLA_MICBIAS2, msm8960_enable_codec_ext_clk, 0,
- TABLA_EXT_CLK_RATE);
+ err = tabla_hs_detect(codec, &hs_jack, &button_jack, tabla_mbhc_cal,
+ TABLA_MICBIAS2, msm8960_enable_codec_ext_clk, 0,
+ TABLA_EXT_CLK_RATE);
- return 0;
+ return err;
}
static struct snd_soc_dsp_link lpa_fe_media = {