Lines Matching refs:model
503 sp<Model> model = mModels.valueAt(i); in detach() local
504 ALOGV("detach() unloading model %d", model->mHandle); in detach()
505 if (model->mState == Model::STATE_ACTIVE) { in detach()
506 mHwDevice->stop_recognition(mHwDevice, model->mHandle); in detach()
508 mHwDevice->unload_sound_model(mHwDevice, model->mHandle); in detach()
565 sp<Model> model = new Model(*handle, session, ioHandle, device, sound_model->type); in loadSoundModel() local
566 mModels.replaceValueFor(*handle, model); in loadSoundModel()
588 sp<Model> model = mModels.valueAt(index); in unloadSoundModel_l() local
590 if (model->mState == Model::STATE_ACTIVE) { in unloadSoundModel_l()
591 mHwDevice->stop_recognition(mHwDevice, model->mHandle); in unloadSoundModel_l()
592 model->mState = Model::STATE_IDLE; in unloadSoundModel_l()
594 AudioSystem::releaseSoundTriggerSession(model->mCaptureSession); in unloadSoundModel_l()
615 sp<Model> model = getModel(handle); in startRecognition() local
616 if (model == 0) { in startRecognition()
624 if (model->mState == Model::STATE_ACTIVE) { in startRecognition()
632 config->capture_handle = model->mCaptureIOHandle; in startRecognition()
633 config->capture_device = model->mCaptureDevice; in startRecognition()
639 model->mState = Model::STATE_ACTIVE; in startRecognition()
640 model->mConfig = *config; in startRecognition()
654 sp<Model> model = getModel(handle); in stopRecognition() local
655 if (model == 0) { in stopRecognition()
659 if (model->mState != Model::STATE_ACTIVE) { in stopRecognition()
663 model->mState = Model::STATE_IDLE; in stopRecognition()
689 sp<Model> model = getModel(recognitionEvent->model); in onCallbackEvent() local
690 if (model == 0) { in onCallbackEvent()
694 if (model->mState != Model::STATE_ACTIVE) { in onCallbackEvent()
695 ALOGV("onCallbackEvent model->mState %d != Model::STATE_ACTIVE", model->mState); in onCallbackEvent()
699 recognitionEvent->capture_session = model->mCaptureSession; in onCallbackEvent()
700 model->mState = Model::STATE_IDLE; in onCallbackEvent()
713 sp<Model> model = getModel(soundmodelEvent->model); in onCallbackEvent() local
714 if (model == 0) { in onCallbackEvent()
742 sp<Model> model; in getModel() local
745 model = mModels.valueAt(index); in getModel()
747 return model; in getModel()
785 sp<Model> model = mModels.valueAt(i); in setCaptureState_l() local
786 if (model->mState == Model::STATE_ACTIVE) { in setCaptureState_l()
787 mHwDevice->stop_recognition(mHwDevice, model->mHandle); in setCaptureState_l()
791 switch (model->mType) { in setCaptureState_l()
793 phraseEvent.num_phrases = model->mConfig.num_phrases; in setCaptureState_l()
795 phraseEvent.phrase_extras[i] = model->mConfig.phrases[i]; in setCaptureState_l()
803 phraseEvent.common.type = model->mType; in setCaptureState_l()
804 phraseEvent.common.model = model->mHandle; in setCaptureState_l()