Merge "ASoC: wcd-mbhc: Add support for hph auto pull down"

This commit is contained in:
Linux Build Service Account 2015-09-05 08:09:22 -07:00 committed by Gerrit - the friendly Code Review server
commit cf5c649159
2 changed files with 9 additions and 0 deletions

View file

@ -1162,6 +1162,10 @@ exit:
}
if (mbhc->mbhc_cb->set_cap_mode)
mbhc->mbhc_cb->set_cap_mode(codec, micbias1, micbias2);
if (mbhc->mbhc_cb->hph_pull_down_ctrl)
mbhc->mbhc_cb->hph_pull_down_ctrl(codec, true);
mbhc->mbhc_cb->lock_sleep(mbhc, false);
pr_debug("%s: leave\n", __func__);
}
@ -1177,6 +1181,10 @@ static void wcd_mbhc_detect_plug_type(struct wcd_mbhc *mbhc)
pr_debug("%s: enter\n", __func__);
WCD_MBHC_RSC_ASSERT_LOCKED(mbhc);
if (mbhc->mbhc_cb->hph_pull_down_ctrl)
mbhc->mbhc_cb->hph_pull_down_ctrl(codec, false);
if (mbhc->mbhc_cb->micbias_enable_status)
micbias1 = mbhc->mbhc_cb->micbias_enable_status(mbhc,
MIC_BIAS_1);

View file

@ -320,6 +320,7 @@ struct wcd_mbhc_cb {
bool (*extn_use_mb)(struct snd_soc_codec *);
int (*mbhc_micb_ctrl_thr_mic)(struct snd_soc_codec *, int, bool);
void (*mbhc_gnd_det_ctrl)(struct snd_soc_codec *, bool);
void (*hph_pull_down_ctrl)(struct snd_soc_codec *, bool);
};
struct wcd_mbhc {