summaryrefslogtreecommitdiffstats
path: root/hal/audio_extn/sound_trigger_prop_intf.h
diff options
context:
space:
mode:
Diffstat (limited to 'hal/audio_extn/sound_trigger_prop_intf.h')
-rw-r--r--hal/audio_extn/sound_trigger_prop_intf.h66
1 files changed, 66 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..bde563f5
--- /dev/null
+++ b/hal/audio_extn/sound_trigger_prop_intf.h
@@ -0,0 +1,66 @@
+/*
+ * 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;
+ void* p_ses;
+ struct pcm_config config;
+};
+
+enum audio_event_type {
+ AUDIO_EVENT_CAPTURE_DEVICE_INACTIVE,
+ AUDIO_EVENT_CAPTURE_DEVICE_ACTIVE,
+ AUDIO_EVENT_PLAYBACK_STREAM_INACTIVE,
+ AUDIO_EVENT_PLAYBACK_STREAM_ACTIVE,
+ AUDIO_EVENT_STOP_LAB,
+ AUDIO_EVENT_SSR,
+ AUDIO_EVENT_NUM_ST_SESSIONS,
+ AUDIO_EVENT_READ_SAMPLES,
+ AUDIO_EVENT_DEVICE_CONNECT,
+ AUDIO_EVENT_DEVICE_DISCONNECT,
+ AUDIO_EVENT_SVA_EXEC_MODE,
+ AUDIO_EVENT_SVA_EXEC_MODE_STATUS,
+};
+
+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;
+ void *str_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