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
This commit is contained in:
Nicholas Ambur
2020-02-12 11:19:48 -08:00
parent 2797c113c8
commit 2b43a5debe
3 changed files with 6 additions and 4 deletions

View File

@@ -693,5 +693,5 @@ a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardwar
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
0006ab8e8b0910cbd3bbb08d5f17d5fac7d65a2bdad5f2334e4851db9d1e6fa8 android.hardware.radio.config@1.3::IRadioConfigResponse
4a6517ea4ad807855428b0101d8e1a486497bd88ab4300ba3b2be43d46d32580 android.hardware.soundtrigger@2.3::types
12d7533ff0754f45bf59ab300799074570a99a676545652c2c23abc73cb4515d android.hardware.soundtrigger@2.3::ISoundTriggerHw
b37f78e3fdc79af8b32a545b2b426f1fd1355b359d9e7835f3bf1ed0aa4518d8 android.hardware.soundtrigger@2.3::ISoundTriggerHw
7746fda1fbf9c7c132bae701cc5a161309e4f5e7f3e8065811045975ee86196d android.hardware.usb.gadget@1.1::IUsbGadget

View File

@@ -114,8 +114,10 @@ interface ISoundTriggerHw extends @2.2::ISoundTriggerHw {
* @return status Operation completion status: 0 in case of success
* -ENODEV if the native service cannot be reached
* -EINVAL invalid input parameter
* @return retval ModelParameter structure indicating supported attributes
* of the parameter for the given model handle
* @return retval OptionalModelParameterRange safe union structure wrapping
* ModelParameterRange. This structure indicates supported attributes
* of the parameter for the given model handle. If the parameter is not
* supported the Monostate of the union is used.
*/
queryParameter(SoundModelHandle modelHandle, ModelParameter modelParam)
generates (int32_t status, OptionalModelParameterRange retval);

View File

@@ -889,7 +889,7 @@ Return<void> SoundTriggerHw::queryParameter(V2_0::SoundModelHandle modelHandle,
int32_t status = mHwDevice->query_parameter(
mHwDevice, client->getHalHandle(), convertModelParameterToHal(modelParam), &paramRange);
if (status == 0) {
if (status == 0 && paramRange.is_supported) {
optionalParamRange.range({.start = paramRange.start, .end = paramRange.end});
}
_hidl_cb(status, optionalParamRange);