Enabling sound trigger V2_2
V2_2 has the same functionality as V2_1 except it adds one new
api, getModelState.
Note: V2_1 will be removed in a subsequent cl.
Test: built android and tested using SoundTriggerTestApp
Bug: 70206501
Change-Id: Ia1567bfc988482195b89b8d6a0901d51e870bfbf
diff --git a/soundtrigger/2.2/default/SoundTriggerHw.cpp b/soundtrigger/2.2/default/SoundTriggerHw.cpp
index 3cf72c8..4586544 100644
--- a/soundtrigger/2.2/default/SoundTriggerHw.cpp
+++ b/soundtrigger/2.2/default/SoundTriggerHw.cpp
@@ -704,6 +704,11 @@
}
}
+ if (mHwDevice->common.version < SOUND_TRIGGER_DEVICE_API_VERSION_1_2) {
+ ALOGE("Get model state not supported");
+ return -ENODEV;
+ }
+
if (mHwDevice->get_model_state == NULL) {
ALOGE("Failed to get model state from device, no such method");
return -ENODEV;