ASoC: wcd-mbhc: correct cross connection check

Schmitt trigger result is wrong if PA is enabled.
So, don't check for cross connection when PA is enabled.

CRs-Fixed: 1061507
Change-Id: Iad71abbed72aa40b5c839260f5c297a885f7d128
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
This commit is contained in:
Yeleswarapu Nagaradhesh 2016-09-15 17:27:21 +05:30 committed by Gerrit - the friendly Code Review server
parent 24d0c1f91e
commit bcbd7e0f16

View file

@ -902,6 +902,11 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc)
return -EINVAL;
}
/* If PA is enabled, dont check for cross-connection */
if (mbhc->mbhc_cb->hph_pa_on_status)
if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->codec))
return false;
WCD_MBHC_REG_READ(WCD_MBHC_ELECT_SCHMT_ISRC, reg1);
/*
* Check if there is any cross connection,