1
0
Fork 0

extcon: arizona: Declare 3-pole jack if we detect open circuit on mic

Detecting an open-circuit on the microphone pin, usually means the
headset has a microphone but the cable is faulty. Currently the code
will simply stop detecting and declare nothing in this situation. It is
better to declare this as headphones such that the user can still use
their headset as plain headphones even if the microphone is faulty.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
hifive-unleashed-5.1
Charles Keepax 2015-06-25 16:47:02 +01:00 committed by Chanwoo Choi
parent 7eae43aeab
commit 57f70ef9bd
1 changed files with 3 additions and 0 deletions

View File

@ -829,7 +829,10 @@ static void arizona_micd_detect(struct work_struct *work)
/* Due to jack detect this should never happen */
if (!(val & ARIZONA_MICD_STS)) {
dev_warn(arizona->dev, "Detected open circuit\n");
info->mic = false;
arizona_stop_mic(info);
info->detecting = false;
arizona_identify_headphone(info);
goto handled;
}