diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-04-23 12:43:44 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-23 12:43:44 +0000 |
commit | cd976f9856923ac5aa5ec4acde2f9f112173b4ad (patch) | |
tree | bbe80af317f03c036395eb3b323f8b6b3357752f | |
parent | 701ab6fad028f56cd5670a8a6e0cbe16f845eed0 (diff) | |
parent | 573b8ee7023d348c7a5735ceb9f13fc510001e20 (diff) | |
download | sound_trigger_hal-cd976f9856923ac5aa5ec4acde2f9f112173b4ad.tar.gz |
Merge "sthal: block event when capture buffering." into rvc-dev am: 573b8ee702
Change-Id: If49a5ffd1753f1f4736629e430636d23d7a8a319
-rw-r--r-- | sound_trigger_hw_iaxxx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c index ca98a50..dbf23ae 100644 --- a/sound_trigger_hw_iaxxx.c +++ b/sound_trigger_hw_iaxxx.c @@ -2458,7 +2458,8 @@ static void *callback_thread_loop(void *context) // We need to send this only once, so reset now stdev->models[idx].is_state_query = false; } - if (stdev->models[idx].type == SOUND_MODEL_TYPE_KEYPHRASE) { + if (stdev->models[idx].type == SOUND_MODEL_TYPE_KEYPHRASE && + stdev->adnc_strm_handle[idx] == 0) { struct sound_trigger_phrase_recognition_event *event; event = (struct sound_trigger_phrase_recognition_event*) stdev_keyphrase_event_alloc( @@ -2483,7 +2484,8 @@ static void *callback_thread_loop(void *context) } else { ALOGE("Failed to allocate memory for the event"); } - } else if (stdev->models[idx].type == SOUND_MODEL_TYPE_GENERIC) { + } else if (stdev->models[idx].type == SOUND_MODEL_TYPE_GENERIC && + stdev->adnc_strm_handle[idx] == 0) { struct sound_trigger_generic_recognition_event *event; event = (struct sound_trigger_generic_recognition_event*) stdev_generic_event_alloc( @@ -2508,6 +2510,8 @@ static void *callback_thread_loop(void *context) } else { ALOGE("Failed to allocate memory for the event"); } + } else if (stdev->adnc_strm_handle[idx] != 0) { + ALOGD("model %d is streaming.", idx); } } else { ALOGE("Invalid id or keyword is not active, Subsume the event"); |