summaryrefslogtreecommitdiffstats
path: root/soundtrigger
diff options
context:
space:
mode:
authormike dooley <mdooley@google.com>2018-12-18 19:59:14 +0100
committermike dooley <mdooley@google.com>2019-01-17 20:49:38 +0100
commit2f0da26cd5f1261d5c9408def4012eba54c6fe16 (patch)
tree481856988257e27db1bc202b3cf96a728adf0eb6 /soundtrigger
parentb82cc11dca2c21c75b6c90abae49c35603a46261 (diff)
downloadplatform_hardware_interfaces-2f0da26cd5f1261d5c9408def4012eba54c6fe16.tar.gz
platform_hardware_interfaces-2f0da26cd5f1261d5c9408def4012eba54c6fe16.tar.bz2
platform_hardware_interfaces-2f0da26cd5f1261d5c9408def4012eba54c6fe16.zip
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
Diffstat (limited to 'soundtrigger')
-rw-r--r--soundtrigger/2.2/default/SoundTriggerHw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/soundtrigger/2.2/default/SoundTriggerHw.cpp b/soundtrigger/2.2/default/SoundTriggerHw.cpp
index 3cf72c8d8e..4586544406 100644
--- a/soundtrigger/2.2/default/SoundTriggerHw.cpp
+++ b/soundtrigger/2.2/default/SoundTriggerHw.cpp
@@ -704,6 +704,11 @@ Return<int32_t> SoundTriggerHw::getModelState(int32_t modelHandle) {
}
}
+ 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;