Lines Matching defs:handle
142 sound_model_handle_t *handle)
144 if (handle == NULL) {
226 *handle = (sound_model_handle_t)modelId;
227 sp<SoundModel> model = new SoundModel(*handle, callback, cookie, halHandle);
228 mSoundModels.add(*handle, model);
238 int SoundTriggerHalHidl::unloadSoundModel(sound_model_handle_t handle)
245 sp<SoundModel> model = removeModel(handle);
247 ALOGE("unloadSoundModel model not found for handle %u", handle);
265 int SoundTriggerHalHidl::startRecognition(sound_model_handle_t handle,
275 sp<SoundModel> model = getModel(handle);
277 ALOGE("startRecognition model not found for handle %u", handle);
292 hidlReturn = soundtrigger->startRecognition(model->mHalHandle, halConfig, this, handle);
300 model->mHalHandle, halConfig, this, handle);
313 int SoundTriggerHalHidl::stopRecognition(sound_model_handle_t handle)
320 sp<SoundModel> model = getModel(handle);
322 ALOGE("stopRecognition model not found for handle %u", handle);
391 sp<SoundTriggerHalHidl::SoundModel> SoundTriggerHalHidl::getModel(sound_model_handle_t handle)
394 return mSoundModels.valueFor(handle);
397 sp<SoundTriggerHalHidl::SoundModel> SoundTriggerHalHidl::removeModel(sound_model_handle_t handle)
400 sp<SoundModel> model = mSoundModels.valueFor(handle);
401 mSoundModels.removeItem(handle);