extcon-madera: not input lineout if have mic

we found that tty device has big impedance of headphone output.
if we report microphone, then LineOut, the headset device will
be disconnected which is handled in WireAccessoryManager.

Change-Id: If1ba3207feff9204a53d46554031faf9be9213e7
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1286085
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
huangys 2018-12-21 14:46:23 +08:00 • committed by Yuesheng Huang
commit 1baeff7ec4

View file

@ -1667,7 +1667,7 @@ int madera_hpdet_reading(struct madera_extcon *info, int val)
madera_set_headphone_imp(info, val);
if (val > MADERA_HPDET_LINEOUT)
if (!info->have_mic && val > MADERA_HPDET_LINEOUT)
madera_extcon_report(info, EXTCON_JACK_LINE_OUT, true);
else
madera_extcon_report(info, EXTCON_JACK_HEADPHONE, true);