Lines Matching refs:effect
167 static int effect_set_state(struct effect_s *effect, uint32_t state) in effect_set_state() argument
170 ALOGV("effect_set_state() id %d, new %d old %d", effect->id, state, effect->state); in effect_set_state()
173 switch(effect->state) { in effect_set_state()
175 session_set_fx_enabled(effect->session, effect->id, false); in effect_set_state()
181 BAD_STATE_ABORT(effect->state, state); in effect_set_state()
185 switch(effect->state) { in effect_set_state()
195 BAD_STATE_ABORT(effect->state, state); in effect_set_state()
199 switch(effect->state) { in effect_set_state()
205 session_set_fx_enabled(effect->session, effect->id, false); in effect_set_state()
211 BAD_STATE_ABORT(effect->state, state); in effect_set_state()
215 switch(effect->state) { in effect_set_state()
225 session_set_fx_enabled(effect->session, effect->id, true); in effect_set_state()
228 BAD_STATE_ABORT(effect->state, state); in effect_set_state()
232 BAD_STATE_ABORT(effect->state, state); in effect_set_state()
236 effect->state = state; in effect_set_state()
241 static int effect_init(struct effect_s *effect, uint32_t id) in effect_init() argument
243 effect->itfe = &effect_interface; in effect_init()
244 effect->id = id; in effect_init()
245 effect->state = EFFECT_STATE_INIT; in effect_init()
249 static int effect_create(struct effect_s *effect, in effect_create() argument
253 effect->session = session; in effect_create()
254 *interface = (effect_handle_t)&effect->itfe; in effect_create()
255 return effect_set_state(effect, EFFECT_STATE_CREATED); in effect_create()
258 static int effect_release(struct effect_s *effect) in effect_release() argument
260 return effect_set_state(effect, EFFECT_STATE_INIT); in effect_release()
481 struct effect_s *effect = (struct effect_s *)self; in fx_process() local
484 if (effect == NULL) { in fx_process()
495 session = (struct session_s *)effect->session; in fx_process()
497 session->processed_msk |= (1<<effect->id); in fx_process()
500 effect->session->processed_msk = 0; in fx_process()
513 struct effect_s *effect = (struct effect_s *)self; in fx_command() local
515 if (effect == NULL) in fx_command()
536 *(int *)pReplyData = session_set_config(effect->session, (effect_config_t *)pCmdData); in fx_command()
540 if (effect->state != EFFECT_STATE_ACTIVE) in fx_command()
541 *(int *)pReplyData = effect_set_state(effect, EFFECT_STATE_CONFIG); in fx_command()
552 session_get_config(effect->session, (effect_config_t *)pReplyData); in fx_command()
596 *(int *)pReplyData = effect_set_state(effect, EFFECT_STATE_ACTIVE); in fx_command()
604 *(int *)pReplyData = effect_set_state(effect, EFFECT_STATE_CONFIG); in fx_command()
640 struct effect_s *effect = (struct effect_s *)self; in fx_get_descriptor() local
642 if (effect == NULL || pDescriptor == NULL) in fx_get_descriptor()
645 *pDescriptor = *descriptors[effect->id]; in fx_get_descriptor()