Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 6dd21efefed9d570d5ce07f602686d01321795eb.
Reason for revert: rolling forward with fix
Change-Id: I07d6c471681abffeb596817dfb00de40c853560c
diff --git a/services/soundtrigger/SoundTriggerHalInterface.h b/services/soundtrigger/SoundTriggerHalInterface.h
index c083195..076ca23 100644
--- a/services/soundtrigger/SoundTriggerHalInterface.h
+++ b/services/soundtrigger/SoundTriggerHalInterface.h
@@ -71,6 +71,14 @@
*/
virtual int stopAllRecognitions() = 0;
+ /* Get the current state of a given model.
+ * Returns 0 or an error code. If successful it also sets indicated the event pointer
+ * and expectes that the caller will free the memory.
+ * Only supported for device api versions SOUND_TRIGGER_DEVICE_API_VERSION_1_2 or above.
+ */
+ virtual int getModelState(sound_model_handle_t handle,
+ struct sound_trigger_recognition_event** event) = 0;
+
protected:
SoundTriggerHalInterface() {}
};