diff options
author | Rhyland Klein <rklein@nvidia.com> | 2012-03-15 18:07:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-01 06:28:24 -0400 |
commit | 9dd90c5db0401061009183e6407feff3724ebc8b (patch) | |
tree | 462b883850965aba52919f438474e5888f7de6a5 /include/sound/max98095.h | |
parent | 5f1cba63a3a65b01a70ac09914176bb3719725d6 (diff) |
ASoC: max98095: add jack detection
This change adds the logic to support using the jack detect mechanism built
in to the codec to detect both when a jack was inserted and what type of
jack is present.
This change also supports the use of an external mechanism for headphone
detection. If this mechanism exists, when the max98095_jack_detect function
is called, the hp_jack is simply passed NULL.
This change supports both simple headphones, powered headphones, microphones
and headsets with both headphones and a mic.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/max98095.h')
-rw-r--r-- | include/sound/max98095.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sound/max98095.h b/include/sound/max98095.h index 7513a42dd4aa..65b1c90f78ab 100644 --- a/include/sound/max98095.h +++ b/include/sound/max98095.h | |||
@@ -49,6 +49,18 @@ struct max98095_pdata { | |||
49 | */ | 49 | */ |
50 | unsigned int digmic_left_mode:1; | 50 | unsigned int digmic_left_mode:1; |
51 | unsigned int digmic_right_mode:1; | 51 | unsigned int digmic_right_mode:1; |
52 | |||
53 | /* Pin5 is the mechanical method of sensing jack insertion | ||
54 | * but it is something that might not be supported. | ||
55 | * 0 = PIN5 not supported | ||
56 | * 1 = PIN5 supported | ||
57 | */ | ||
58 | int jack_detect_pin5en:1; | ||
59 | |||
60 | /* Slew amount for jack detection. Calculated as 4 * (delay + 1). | ||
61 | * Default delay is 24 to get a time of 100ms. | ||
62 | */ | ||
63 | unsigned int jack_detect_delay; | ||
52 | }; | 64 | }; |
53 | 65 | ||
54 | #endif | 66 | #endif |