Lines Matching refs:model

503             sp<Model> model = mModels.valueAt(i);
504 ALOGV("detach() unloading model %d", model->mHandle);
505 if (model->mState == Model::STATE_ACTIVE) {
506 mHwDevice->stop_recognition(mHwDevice, model->mHandle);
508 mHwDevice->unload_sound_model(mHwDevice, model->mHandle);
565 sp<Model> model = new Model(*handle, session, ioHandle, device, sound_model->type);
566 mModels.replaceValueFor(*handle, model);
573 ALOGV("unloadSoundModel() model handle %d", handle);
588 sp<Model> model = mModels.valueAt(index);
590 if (model->mState == Model::STATE_ACTIVE) {
591 mHwDevice->stop_recognition(mHwDevice, model->mHandle);
592 model->mState = Model::STATE_IDLE;
594 AudioSystem::releaseSoundTriggerSession(model->mCaptureSession);
601 ALOGV("startRecognition() model handle %d", handle);
615 sp<Model> model = getModel(handle);
616 if (model == 0) {
624 if (model->mState == Model::STATE_ACTIVE) {
632 config->capture_handle = model->mCaptureIOHandle;
633 config->capture_device = model->mCaptureDevice;
639 model->mState = Model::STATE_ACTIVE;
640 model->mConfig = *config;
648 ALOGV("stopRecognition() model handle %d", handle);
654 sp<Model> model = getModel(handle);
655 if (model == 0) {
659 if (model->mState != Model::STATE_ACTIVE) {
663 model->mState = Model::STATE_IDLE;
689 sp<Model> model = getModel(recognitionEvent->model);
690 if (model == 0) {
691 ALOGW("%s model == 0", __func__);
694 if (model->mState != Model::STATE_ACTIVE) {
695 ALOGV("onCallbackEvent model->mState %d != Model::STATE_ACTIVE", model->mState);
699 recognitionEvent->capture_session = model->mCaptureSession;
700 model->mState = Model::STATE_IDLE;
713 sp<Model> model = getModel(soundmodelEvent->model);
714 if (model == 0) {
715 ALOGW("%s model == 0", __func__);
742 sp<Model> model;
745 model = mModels.valueAt(index);
747 return model;
785 sp<Model> model = mModels.valueAt(i);
786 if (model->mState == Model::STATE_ACTIVE) {
787 mHwDevice->stop_recognition(mHwDevice, model->mHandle);
788 // keep model in ACTIVE state so that event is processed by onCallbackEvent()
790 switch (model->mType) {
792 phraseEvent.num_phrases = model->mConfig.num_phrases;
794 phraseEvent.phrase_extras[i] = model->mConfig.phrases[i];
802 phraseEvent.common.type = model->mType;
803 phraseEvent.common.model = model->mHandle;