Adds stop_all_recognitions as an optional method to the sound trigger hal.
Change-Id: I6c905b79673fe21782f5dc5f3abc4c2ac75de805
diff --git a/include/hardware/sound_trigger.h b/include/hardware/sound_trigger.h
index 2a8db87..bfded85 100644
--- a/include/hardware/sound_trigger.h
+++ b/include/hardware/sound_trigger.h
@@ -106,7 +106,12 @@
* The implementation does not have to call the callback when stopped via this method.
*/
int (*stop_recognition)(const struct sound_trigger_hw_device *dev,
- sound_model_handle_t sound_model_handle);
+ sound_model_handle_t sound_model_handle);
+
+ /* Stop recognition on all models.
+ * If no implementation is provided, stop_recognition will be called for each running model.
+ */
+ int (*stop_all_recognitions)(const struct sound_trigger_hw_device* dev);
};
typedef struct sound_trigger_hw_device sound_trigger_hw_device_t;