summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5640.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-05-08 17:35:52 +0200
committerMark Brown <broonie@kernel.org>2018-05-11 11:23:37 +0900
commitb16188a20f62b4d2f2bc7ede2ca3b15253184352 (patch)
tree304d1c798e35237fd90f778730506582bd40669e /sound/soc/codecs/rt5640.h
parent8210804bcf40b837f8560c99efb315c0bbfc8c7b (diff)
ASoC: rt5640: Add button press support
Enable button press detection for headsets by using the ovcd IRQ to get notified of button presses. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5640.h')
-rw-r--r--sound/soc/codecs/rt5640.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h
index 9d08471734b3..e29e3e7d61b0 100644
--- a/sound/soc/codecs/rt5640.h
+++ b/sound/soc/codecs/rt5640.h
@@ -2139,7 +2139,14 @@ struct rt5640_priv {
bool hp_mute;
bool asrc_en;
- /* Jack detect data */
+ /* Jack and button detect data */
+ bool ovcd_irq_enabled;
+ bool pressed;
+ bool press_reported;
+ int press_count;
+ int release_count;
+ int poll_count;
+ struct delayed_work bp_work;
struct work_struct jack_work;
struct snd_soc_jack *jack;
unsigned int jd_src;