summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-23 13:32:28 -0700
committerSteve Kondik <steve@cyngn.com>2016-04-20 09:25:29 -0700
commitfa2825bec8612d75e25871bea8c0f01243228179 (patch)
treeaf8467e27fe788afbf225d846809bef29428813a
parent526cf00990ec9cbceb18c41ad5f0ee9dc5c17e62 (diff)
downloadandroid_hardware_qcom_audio-fa2825bec8612d75e25871bea8c0f01243228179.tar.gz
android_hardware_qcom_audio-fa2825bec8612d75e25871bea8c0f01243228179.tar.bz2
android_hardware_qcom_audio-fa2825bec8612d75e25871bea8c0f01243228179.zip
audio: Hacks for sound trigger
Change-Id: Ice58e83f731d45be77f69f2810426dd72cfb98f7
-rw-r--r--hal/audio_extn/sound_trigger_prop_intf.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/hal/audio_extn/sound_trigger_prop_intf.h b/hal/audio_extn/sound_trigger_prop_intf.h
new file mode 100644
index 00000000..90a9aa97
--- /dev/null
+++ b/hal/audio_extn/sound_trigger_prop_intf.h
@@ -0,0 +1,61 @@
+/*
+ * Extrapolated / reversed header for Sound Trigger
+ */
+
+#ifndef SOUND_TRIGGER_PROP_INTF_H
+#define SOUND_TRIGGER_PROP_INTF_H
+
+struct sound_trigger_session_info {
+ int capture_handle;
+ struct pcm *pcm;
+ struct pcm_config config;
+};
+
+enum audio_event_type {
+ AUDIO_EVENT_CAPTURE_DEVICE_INACTIVE,
+ AUDIO_EVENT_CAPTURE_DEVICE_ACTIVE,
+ dummy1,
+ dummy2,
+ AUDIO_EVENT_STOP_LAB,
+ AUDIO_EVENT_SSR,
+ AUDIO_EVENT_NUM_ST_SESSIONS,
+ AUDIO_EVENT_READ_SAMPLES,
+};
+
+enum sound_trigger_event_type {
+ ST_EVENT_SESSION_REGISTER,
+ ST_EVENT_SESSION_DEREGISTER
+};
+typedef enum sound_trigger_event_type sound_trigger_event_type_t;
+
+enum ssr_event_status {
+ SND_CARD_STATUS_OFFLINE,
+ SND_CARD_STATUS_ONLINE,
+ CPE_STATUS_OFFLINE,
+ CPE_STATUS_ONLINE
+};
+
+struct sound_trigger_event_info {
+ struct sound_trigger_session_info st_ses;
+};
+typedef struct sound_trigger_event_info sound_trigger_event_info_t;
+
+struct audio_read_samples_info {
+ struct sound_trigger_session_info *ses_info;
+ void *buf;
+ size_t num_bytes;
+};
+
+struct audio_event_info {
+ union {
+ enum ssr_event_status status;
+ int value;
+ struct sound_trigger_session_info ses_info;
+ struct audio_read_samples_info aud_info;
+ }u;
+};
+typedef struct audio_event_info audio_event_info_t;
+
+typedef int (*sound_trigger_hw_call_back_t)(enum audio_event_type,
+ struct audio_event_info*);
+#endif