update SoundTrigger queryParameter
Update the documentation and usage when HAL implementation wants to
convey the parameter ID is not supported.
Bug: 141929369
Test: build and boot smoke test
&& verify unsupported parameter use case with test app
Change-Id: I2124d8e5e9b136bd0797c16e71aa0b4049c9ed58
diff --git a/soundtrigger/2.3/default/SoundTriggerHw.cpp b/soundtrigger/2.3/default/SoundTriggerHw.cpp
index d3136b9..8fe3108 100644
--- a/soundtrigger/2.3/default/SoundTriggerHw.cpp
+++ b/soundtrigger/2.3/default/SoundTriggerHw.cpp
@@ -889,7 +889,7 @@
int32_t status = mHwDevice->query_parameter(
mHwDevice, client->getHalHandle(), convertModelParameterToHal(modelParam), ¶mRange);
- if (status == 0) {
+ if (status == 0 && paramRange.is_supported) {
optionalParamRange.range({.start = paramRange.start, .end = paramRange.end});
}
_hidl_cb(status, optionalParamRange);