summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrioskao <rioskao@google.com>2020-04-23 04:29:17 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-23 04:29:17 +0000
commit0e1a85d48ff3840956f96da07852200bf9e412b7 (patch)
tree30cf2b8c40d7876db63d3556102653109e05ad03
parent16507e2bc1a6d55b99ad1ca9b2569d58a735bc6e (diff)
parent0a62d2622885a833e57c6aea4417188a1b1770a5 (diff)
downloadsound_trigger_hal-0e1a85d48ff3840956f96da07852200bf9e412b7.tar.gz
sthal: ignore get_model_state during call. am: 0a62d26228
Change-Id: Ib80fab9578b1df312c8211981995c1e7f31d232d
-rw-r--r--sound_trigger_hw_iaxxx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c
index 6e39d2b..ca98a50 100644
--- a/sound_trigger_hw_iaxxx.c
+++ b/sound_trigger_hw_iaxxx.c
@@ -3130,11 +3130,16 @@ static int stdev_get_model_state(const struct sound_trigger_hw_device *dev,
goto exit;
}
- if (model->is_active == false) {
+ if (model->is_active == false &&
+ !is_uuid_in_recover_list(stdev, sound_model_handle)) {
ALOGE("%s: ERROR: %d model is not active",
__func__, sound_model_handle);
ret = -ENOSYS;
goto exit;
+ } else if (is_uuid_in_recover_list(stdev, sound_model_handle)) {
+ ALOGD("%s: Ignore %d model request due to call active",
+ __func__, sound_model_handle);
+ goto exit;
}
if (model->is_state_query == true) {