diff options
author | Walter Yang <yandongy@codeaurora.org> | 2014-06-04 17:05:13 +0800 |
---|---|---|
committer | Walter Yang <yandongy@codeaurora.org> | 2014-06-16 14:21:58 +0800 |
commit | cdb24895ef03fc80db37d7f8c19431d84f1f6b02 (patch) | |
tree | 9aeef4d3475d3c200318b0a7e023f191b7809f40 /sound/soc | |
parent | 3879d321ab63482198d56bd5e3ba4e3483e672b8 (diff) |
ASoC: msm8x16-wcd: add more strict conditions for extension cable
The current conditions in plug report function for extension cable
insertion are not enough. It will also let in some other scenario,
e.g., the plug type correction from headphone to headset.
Add more strict conditions to just let in electrical insertion
of extension cable and electrical removal detection.
Change-Id: I5bafc0fe12cabb64e559a3fbc23df6657461f3e2
CRs-Fixed: 674500
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wcd-mbhc-v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index eab63d71642d..b958cb4055ab 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -457,6 +457,8 @@ static void wcd_mbhc_report_plug(struct wcd_mbhc *mbhc, int insertion, * removal. */ if (mbhc->mbhc_cfg->detect_extn_cable && + (mbhc->current_plug == MBHC_PLUG_TYPE_HIGH_HPH || + jack_type == SND_JACK_LINEOUT) && (mbhc->hph_status && mbhc->hph_status != jack_type)) { if (mbhc->micbias_enable && |