diff options
author | Nikesh Oswal <noswal@nvidia.com> | 2012-06-29 16:26:33 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-12 08:32:28 -0700 |
commit | 328ca1a833b594b574b9f4f82a25ba8613bad3e5 (patch) | |
tree | fdd0ee0b539347315e4037f915b7161eb3e2bdb2 /sound/soc/codecs/max98088.h | |
parent | 8f751e925da2510ded1003976186a379853b134e (diff) |
asoc: codecs: max98088: Headset Detection
Add code for headset detection according to that
state transitions mentioned for JKSNS field in the
max98088 codec datasheet
Bug: 110529
Bug: 1008246
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: http://git-master/r/112127
(cherry picked from commit 12a2259e0e9cf7da4bf64bad2a97c32cec41477c)
Change-Id: I7d45b210dd02f181e71a08d9b3de7cff109dd88b
Reviewed-on: http://git-master/r/114445
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc/codecs/max98088.h')
-rw-r--r-- | sound/soc/codecs/max98088.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98088.h b/sound/soc/codecs/max98088.h index cf4b04d2d07a..81ccf4b4caee 100644 --- a/sound/soc/codecs/max98088.h +++ b/sound/soc/codecs/max98088.h @@ -222,6 +222,11 @@ #define M98088_BYTE1(w) ((w >> 8) & 0xff) #define M98088_BYTE0(w) (w & 0xff) +/* HeadPhone and HeadSet detection Bitmasks */ +#define M98088_HP 0 +#define M98088_HS M98088_JKSNS_6 +#define M98088_NONE (M98088_JKSNS_7 | M98088_JKSNS_6) + int max98088_headset_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, enum snd_jack_types type); |