summaryrefslogtreecommitdiff
path: root/sound_trigger_hw_iaxxx.c
diff options
context:
space:
mode:
authorRios Kao <rioskao@google.com>2020-10-19 08:34:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-10-19 08:34:59 +0000
commit7db6baa1a75ddef0e98891390bc6927e4da110e0 (patch)
tree83cfb0836788dab6e9a2a0c9fc649c031ce9d9d5 /sound_trigger_hw_iaxxx.c
parentc30d34012aa045594e53577c7d1b89cfed0f4ca4 (diff)
parent4d8ab90a88aa630612a4d0eda8734f5ac3bf4197 (diff)
downloadsound_trigger_hal-7db6baa1a75ddef0e98891390bc6927e4da110e0.tar.gz
Diffstat (limited to 'sound_trigger_hw_iaxxx.c')
-rw-r--r--sound_trigger_hw_iaxxx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c
index fbbfa79..e3d34ff 100644
--- a/sound_trigger_hw_iaxxx.c
+++ b/sound_trigger_hw_iaxxx.c
@@ -2632,6 +2632,10 @@ static int stop_recognition(struct knowles_sound_trigger_device *stdev,
model->is_active = false;
goto exit;
}
+ if (model->is_active == false) {
+ ALOGW("%s: the model was disabled already", __func__);
+ goto exit;
+ }
if (stdev->adnc_strm_handle[handle] != 0) {
ALOGD("%s: stop tunnling for index:%d", __func__, handle);