All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extcon: arizona: Declare 3-pole jack if we detect open circuit on mic
@ 2015-06-25 15:47 Charles Keepax
  2015-06-26  1:07 ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2015-06-25 15:47 UTC (permalink / raw)
  To: cw00.choi; +Cc: myungjoo.ham, linux-kernel, patches

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>
---
 drivers/extcon/extcon-arizona.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 4c47eb2..e216a97 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;
 	}
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-26  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 15:47 [PATCH] extcon: arizona: Declare 3-pole jack if we detect open circuit on mic Charles Keepax
2015-06-26  1:07 ` Chanwoo Choi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.