diff options
author | rioskao <rioskao@google.com> | 2019-06-17 23:20:50 -0700 |
---|---|---|
committer | Rios Kao <rioskao@google.com> | 2019-06-19 01:35:18 +0000 |
commit | 19a03502b08922bf6b338803988c395c41cd40ff (patch) | |
tree | 565abbb20554e98256297bb14c5ae56303fd546d | |
parent | 629ba3e02279bf95099f2e1ec49f85e65753ee8e (diff) | |
download | android_hardware_knowles_athletico_sound_trigger_hal-19a03502b08922bf6b338803988c395c41cd40ff.tar.gz android_hardware_knowles_athletico_sound_trigger_hal-19a03502b08922bf6b338803988c395c41cd40ff.tar.bz2 android_hardware_knowles_athletico_sound_trigger_hal-19a03502b08922bf6b338803988c395c41cd40ff.zip |
sthal: close active tunneling during stop recognition
note: The application layer abnormal behavior will stop active
tunneling streaming. That will cause codec problem.
So we close active tunneling when the application try to stop
the recognition.
Test: verify the ambient fetching data and on/off stress.
Bug: 135360204
Change-Id: Iec990897ad023ce3c336cebe3672b74bac0dee95
-rw-r--r-- | sound_trigger_hw_iaxxx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound_trigger_hw_iaxxx.c b/sound_trigger_hw_iaxxx.c index e8ad4c0..b6ec400 100644 --- a/sound_trigger_hw_iaxxx.c +++ b/sound_trigger_hw_iaxxx.c @@ -2002,6 +2002,13 @@ static int stop_recognition(struct knowles_sound_trigger_device *stdev, goto exit; } + if (stdev->adnc_strm_handle[handle] != 0) { + ALOGD("%s: stop tunnling for index:%d", __func__, handle); + stdev->adnc_strm_close(stdev->adnc_strm_handle[handle]); + stdev->adnc_strm_handle[handle] = 0; + stdev->is_streaming--; + } + model->is_active = false; tear_package_route(stdev, model->uuid, stdev->is_bargein_route_enabled); |