ASoC: WCD9310: Perform microphone polling to correct plug type

During slow insertion of headset, it may be possible that the
headset is wrongly detected as a headphone. This results in
the headset mic being non-functional.

Fix by polling the microphone voltage after a plug is detected
as a valid Headphone. In case the microphone voltage settles to
a valid headset voltage, correct the plug type from Headphone to
Headset.

CRs-fixed: 370332
Change-Id: I5280542e857940f8d228c5f0ded1d2fde301168f
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
1 file changed