OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e45ef9
)
sound trigger: stop recognition on sound model unload
author
Eric Laurent
<elaurent@google.com>
Mon, 9 Jun 2014 23:20:05 +0000
(16:20 -0700)
committer
Eric Laurent
<elaurent@google.com>
Mon, 9 Jun 2014 23:20:05 +0000
(16:20 -0700)
Force a stop recognition command to the HAL when
unloading a sound model and recognition is still active.
Change-Id: I7379a64a37bbc3eeea08e0e1d59e427de9544a10
services/soundtrigger/SoundTriggerHwService.cpp
patch
|
blob
|
history
diff --git
a/services/soundtrigger/SoundTriggerHwService.cpp
b/services/soundtrigger/SoundTriggerHwService.cpp
index
f09e79e
..
fa59388
100644
(file)
--- a/
services/soundtrigger/SoundTriggerHwService.cpp
+++ b/
services/soundtrigger/SoundTriggerHwService.cpp
@@
-367,8
+367,12
@@
status_t SoundTriggerHwService::Module::unloadSoundModel(sound_model_handle_t ha
if (index < 0) {
return BAD_VALUE;
}
+ sp<Model> model = mModels.valueAt(index);
mModels.removeItem(handle);
-
+ if (model->mState == Model::STATE_ACTIVE) {
+ mHwDevice->stop_recognition(mHwDevice, model->mHandle);
+ model->deallocateMemory();
+ }
return mHwDevice->unload_sound_model(mHwDevice, handle);
}