Lines Matching refs:eventMemory
232 sp<IMemory> eventMemory; in prepareRecognitionEvent() local
258 return eventMemory; in prepareRecognitionEvent()
262 eventMemory = mMemoryDealer->allocate(size); in prepareRecognitionEvent()
263 if (eventMemory == 0 || eventMemory->pointer() == NULL) { in prepareRecognitionEvent()
264 eventMemory.clear(); in prepareRecognitionEvent()
265 return eventMemory; in prepareRecognitionEvent()
267 memcpy(eventMemory->pointer(), event, size); in prepareRecognitionEvent()
269 return eventMemory; in prepareRecognitionEvent()
278 sp<IMemory> eventMemory = prepareRecognitionEvent(event); in sendRecognitionEvent() local
279 if (eventMemory == 0) { in sendRecognitionEvent()
284 eventMemory); in sendRecognitionEvent()
308 sp<IMemory> eventMemory; in prepareSoundModelEvent() local
311 eventMemory = mMemoryDealer->allocate(size); in prepareSoundModelEvent()
312 if (eventMemory == 0 || eventMemory->pointer() == NULL) { in prepareSoundModelEvent()
313 eventMemory.clear(); in prepareSoundModelEvent()
314 return eventMemory; in prepareSoundModelEvent()
316 memcpy(eventMemory->pointer(), event, size); in prepareSoundModelEvent()
318 return eventMemory; in prepareSoundModelEvent()
324 sp<IMemory> eventMemory = prepareSoundModelEvent(event); in sendSoundModelEvent() local
325 if (eventMemory == 0) { in sendSoundModelEvent()
329 eventMemory); in sendSoundModelEvent()
338 sp<IMemory> eventMemory; in prepareServiceStateEvent() local
341 eventMemory = mMemoryDealer->allocate(size); in prepareServiceStateEvent()
342 if (eventMemory == 0 || eventMemory->pointer() == NULL) { in prepareServiceStateEvent()
343 eventMemory.clear(); in prepareServiceStateEvent()
344 return eventMemory; in prepareServiceStateEvent()
346 *((sound_trigger_service_state_t *)eventMemory->pointer()) = state; in prepareServiceStateEvent()
347 return eventMemory; in prepareServiceStateEvent()
353 sp<IMemory> eventMemory = prepareServiceStateEvent(state); in sendServiceStateEvent() local
354 if (eventMemory == 0) { in sendServiceStateEvent()
358 eventMemory); in sendServiceStateEvent()
366 sp<IMemory> eventMemory = prepareServiceStateEvent(state); in sendServiceStateEvent() local
367 if (eventMemory == 0) { in sendServiceStateEvent()
371 eventMemory); in sendServiceStateEvent()
775 sp<IMemory> eventMemory = event->mMemory; in onCallbackEvent() local
777 if (eventMemory == 0 || eventMemory->pointer() == NULL) { in onCallbackEvent()
790 (struct sound_trigger_recognition_event *)eventMemory->pointer(); in onCallbackEvent()
810 (struct sound_trigger_model_event *)eventMemory->pointer(); in onCallbackEvent()
900 sp<IMemory> eventMemory = service->prepareRecognitionEvent(&event.common); in setCaptureState_l() local
901 if (eventMemory != 0) { in setCaptureState_l()
902 events.add(eventMemory); in setCaptureState_l()
911 sp<IMemory> eventMemory = service->prepareRecognitionEvent(&event.common); in setCaptureState_l() local
912 if (eventMemory != 0) { in setCaptureState_l()
913 events.add(eventMemory); in setCaptureState_l()
922 sp<IMemory> eventMemory = service->prepareRecognitionEvent(&event.common); in setCaptureState_l() local
923 if (eventMemory != 0) { in setCaptureState_l()
924 events.add(eventMemory); in setCaptureState_l()
1121 sp<IMemory> eventMemory = event->mMemory; in onCallbackEvent() local
1123 if (eventMemory == 0 || eventMemory->pointer() == NULL) { in onCallbackEvent()
1136 client->onRecognitionEvent(eventMemory); in onCallbackEvent()
1139 client->onSoundModelEvent(eventMemory); in onCallbackEvent()
1142 client->onServiceStateChange(eventMemory); in onCallbackEvent()