summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max98088.h
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2011-09-30 17:27:08 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:19 -0800
commit7510bbfe31a983590f61c381d2a3be13b4a30d49 (patch)
tree7785a1ed19b412dff7d06c220ebd061f28ff29fd /sound/soc/codecs/max98088.h
parent4762c4d4a011fe734d39be9b2a83596ee1ee1553 (diff)
asoc: max98088: add headset/headphone detection code
Bug: 862023 Change-Id: Ieb9247cef5feecf3e241d8980f9c4376cadf2965 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/55465 Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Rebase-Id: Rf725fad369dbbe4d5f6eaa7b667170a127fa0a08
Diffstat (limited to 'sound/soc/codecs/max98088.h')
-rw-r--r--sound/soc/codecs/max98088.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98088.h b/sound/soc/codecs/max98088.h
index be89a4f4aab8..cf4b04d2d07a 100644
--- a/sound/soc/codecs/max98088.h
+++ b/sound/soc/codecs/max98088.h
@@ -194,6 +194,25 @@
#define M98088_PWRSV8K (1<<1)
#define M98088_PWRSV (1<<0)
+/* M98088_REG_4E_BIAS_CNTL */
+ #define M98088_JDWK (1<<1)
+
+/* M98088_REG_4B_CFG_JACKDET */
+ #define M98088_JDETEN (1<<7)
+ #define M98088_JDEB (3<<0)
+ #define M98088_JDEB_25 (0<<0)
+ #define M98088_JDEB_50 (1<<0)
+ #define M98088_JDEB_100 (2<<0)
+ #define M98088_JDEB_200 (3<<0)
+
+
+/* M98088_REG_0F_IRQ_ENABLE */
+ #define M98088_IJDET (1<<1)
+
+/* M98088_REG_02_JACK_STAUS */
+ #define M98088_JKSNS_7 (1<<7)
+ #define M98088_JKSNS_6 (1<<6)
+
/* Line inputs */
#define LINE_INA 0
#define LINE_INB 1
@@ -203,4 +222,7 @@
#define M98088_BYTE1(w) ((w >> 8) & 0xff)
#define M98088_BYTE0(w) (w & 0xff)
+int max98088_headset_detect(struct snd_soc_codec *codec,
+ struct snd_soc_jack *jack, enum snd_jack_types type);
+
#endif