From 7711308ae68900a047782f5fe1bd46196ea8be0e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 30 Sep 2010 15:37:53 -0700 Subject: ASoC: Implement interrupt based jack detection Allow microphone detection on WM8962 to be performed using the interrupt signal, allowing the detection of both microphone presence and button presses with a signal singal from the CODEC to CPU. Currently a 250ms debounce time is applied to both short circuit and presence detection, this has not been optimised. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- sound/soc/codecs/wm8962.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/soc/codecs/wm8962.h') diff --git a/sound/soc/codecs/wm8962.h b/sound/soc/codecs/wm8962.h index fce11998b278..2af6c9371fcc 100644 --- a/sound/soc/codecs/wm8962.h +++ b/sound/soc/codecs/wm8962.h @@ -14,6 +14,7 @@ #define _WM8962_H #include +#include #define WM8962_SYSCLK_MCLK 1 #define WM8962_SYSCLK_FLL 2 @@ -3785,4 +3786,6 @@ struct wm8962_reg_access { extern const struct wm8962_reg_access wm8962_reg_access[WM8962_MAX_REGISTER + 1]; +int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack); + #endif -- cgit v1.2.3