Lines Matching refs:event

179     struct sound_trigger_phrase_recognition_event *event;  in sound_trigger_event_alloc()  local
186 event = (struct sound_trigger_phrase_recognition_event *)data; in sound_trigger_event_alloc()
187 event->common.status = RECOGNITION_STATUS_SUCCESS; in sound_trigger_event_alloc()
188 event->common.type = SOUND_MODEL_TYPE_KEYPHRASE; in sound_trigger_event_alloc()
189 event->common.model = stdev->model_handle; in sound_trigger_event_alloc()
194 event->num_phrases = stdev->config->num_phrases; in sound_trigger_event_alloc()
195 if (event->num_phrases > SOUND_TRIGGER_MAX_PHRASES) in sound_trigger_event_alloc()
196 event->num_phrases = SOUND_TRIGGER_MAX_PHRASES; in sound_trigger_event_alloc()
197 for (i=0; i < event->num_phrases; i++) in sound_trigger_event_alloc()
198 memcpy(&event->phrase_extras[i], &stdev->config->phrases[i], in sound_trigger_event_alloc()
202 event->num_phrases = 1; in sound_trigger_event_alloc()
203 event->phrase_extras[0].confidence_level = 100; in sound_trigger_event_alloc()
204 event->phrase_extras[0].num_levels = 1; in sound_trigger_event_alloc()
205 event->phrase_extras[0].levels[0].level = 100; in sound_trigger_event_alloc()
206 event->phrase_extras[0].levels[0].user_id = 0; in sound_trigger_event_alloc()
209 event->common.capture_available = true; in sound_trigger_event_alloc()
211 event->common.audio_config = AUDIO_CONFIG_INITIALIZER; in sound_trigger_event_alloc()
212 event->common.audio_config.sample_rate = 16000; in sound_trigger_event_alloc()
213 event->common.audio_config.channel_mask = AUDIO_CHANNEL_IN_MONO; in sound_trigger_event_alloc()
214 event->common.audio_config.format = AUDIO_FORMAT_PCM_16_BIT; in sound_trigger_event_alloc()
304 struct sound_trigger_phrase_recognition_event *event; in callback_thread_loop() local
306 event = (struct sound_trigger_phrase_recognition_event *) in callback_thread_loop()
308 if (event) { in callback_thread_loop()
317 callback(&event->common, cookie); in callback_thread_loop()
320 free(event); in callback_thread_loop()