Lines Matching refs:effect
269 int AgcInit (preproc_effect_t *effect) in AgcInit() argument
272 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); in AgcInit()
280 int AgcCreate(preproc_effect_t *effect) in AgcCreate() argument
282 webrtc::GainControl *agc = effect->session->apm->gain_control(); in AgcCreate()
288 effect->engine = static_cast<preproc_fx_handle_t>(agc); in AgcCreate()
289 AgcInit(effect); in AgcCreate()
293 int AgcGetParameter(preproc_effect_t *effect, in AgcGetParameter() argument
301 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); in AgcGetParameter()
357 int AgcSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) in AgcSetParameter() argument
362 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); in AgcSetParameter()
399 void AgcEnable(preproc_effect_t *effect) in AgcEnable() argument
401 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); in AgcEnable()
406 void AgcDisable(preproc_effect_t *effect) in AgcDisable() argument
409 webrtc::GainControl *agc = static_cast<webrtc::GainControl *>(effect->engine); in AgcDisable()
434 int AecInit (preproc_effect_t *effect) in AecInit() argument
437 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); in AecInit()
443 int AecCreate(preproc_effect_t *effect) in AecCreate() argument
445 webrtc::EchoControlMobile *aec = effect->session->apm->echo_control_mobile(); in AecCreate()
451 effect->engine = static_cast<preproc_fx_handle_t>(aec); in AecCreate()
452 AecInit (effect); in AecCreate()
456 int AecGetParameter(preproc_effect_t *effect, in AecGetParameter() argument
470 *(uint32_t *)pValue = 1000 * effect->session->apm->stream_delay_ms(); in AecGetParameter()
481 int AecSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) in AecSetParameter() argument
490 status = effect->session->apm->set_stream_delay_ms(value/1000); in AecSetParameter()
501 void AecEnable(preproc_effect_t *effect) in AecEnable() argument
503 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); in AecEnable()
508 void AecDisable(preproc_effect_t *effect) in AecDisable() argument
511 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); in AecDisable()
515 int AecSetDevice(preproc_effect_t *effect, uint32_t device) in AecSetDevice() argument
518 webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine); in AecSetDevice()
559 int NsInit (preproc_effect_t *effect) in NsInit() argument
562 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); in NsInit()
574 effect->session->apm->SetExtraOptions(config); in NsInit()
577 effect->session->apm->SetExtraOptions(config); in NsInit()
578 effect->type = NS_TYPE_SINGLE_CHANNEL; in NsInit()
582 int NsCreate(preproc_effect_t *effect) in NsCreate() argument
584 webrtc::NoiseSuppression *ns = effect->session->apm->noise_suppression(); in NsCreate()
590 effect->engine = static_cast<preproc_fx_handle_t>(ns); in NsCreate()
591 NsInit (effect); in NsCreate()
595 int NsGetParameter(preproc_effect_t *effect __unused, in NsGetParameter()
604 int NsSetParameter (preproc_effect_t *effect, void *pParam, void *pValue) in NsSetParameter() argument
607 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); in NsSetParameter()
623 effect->session->apm->SetExtraOptions(config); in NsSetParameter()
624 effect->type = value; in NsSetParameter()
636 void NsEnable(preproc_effect_t *effect) in NsEnable() argument
638 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); in NsEnable()
641 if (effect->type == NS_TYPE_MULTI_CHANNEL) { in NsEnable()
645 effect->session->apm->SetExtraOptions(config); in NsEnable()
649 void NsDisable(preproc_effect_t *effect) in NsDisable() argument
652 webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine); in NsDisable()
657 effect->session->apm->SetExtraOptions(config); in NsDisable()
691 int Effect_SetState(preproc_effect_t *effect, uint32_t state) in Effect_SetState() argument
694 ALOGV("Effect_SetState proc %d, new %d old %d", effect->procId, state, effect->state); in Effect_SetState()
697 switch(effect->state) { in Effect_SetState()
699 effect->ops->disable(effect); in Effect_SetState()
700 Session_SetProcEnabled(effect->session, effect->procId, false); in Effect_SetState()
707 BAD_STATE_ABORT(effect->state, state); in Effect_SetState()
711 switch(effect->state) { in Effect_SetState()
713 status = effect->ops->create(effect); in Effect_SetState()
722 BAD_STATE_ABORT(effect->state, state); in Effect_SetState()
726 switch(effect->state) { in Effect_SetState()
732 effect->ops->disable(effect); in Effect_SetState()
733 Session_SetProcEnabled(effect->session, effect->procId, false); in Effect_SetState()
739 BAD_STATE_ABORT(effect->state, state); in Effect_SetState()
743 switch(effect->state) { in Effect_SetState()
753 effect->ops->enable(effect); in Effect_SetState()
754 Session_SetProcEnabled(effect->session, effect->procId, true); in Effect_SetState()
757 BAD_STATE_ABORT(effect->state, state); in Effect_SetState()
761 BAD_STATE_ABORT(effect->state, state); in Effect_SetState()
764 effect->state = state; in Effect_SetState()
769 int Effect_Init(preproc_effect_t *effect, uint32_t procId) in Effect_Init() argument
772 effect->itfe = &sEffectInterfaceReverse; in Effect_Init()
774 effect->itfe = &sEffectInterface; in Effect_Init()
776 effect->ops = sPreProcOps[procId]; in Effect_Init()
777 effect->procId = procId; in Effect_Init()
778 effect->state = PREPROC_EFFECT_STATE_INIT; in Effect_Init()
782 int Effect_Create(preproc_effect_t *effect, in Effect_Create() argument
786 effect->session = session; in Effect_Create()
787 *interface = (effect_handle_t)&effect->itfe; in Effect_Create()
788 return Effect_SetState(effect, PREPROC_EFFECT_STATE_CREATED); in Effect_Create()
791 int Effect_Release(preproc_effect_t *effect) in Effect_Release() argument
793 return Effect_SetState(effect, PREPROC_EFFECT_STATE_INIT); in Effect_Release()
1212 preproc_effect_t * effect = (preproc_effect_t *)self; in PreProcessingFx_Process() local
1214 if (effect == NULL){ in PreProcessingFx_Process()
1218 preproc_session_t * session = (preproc_session_t *)effect->session; in PreProcessingFx_Process()
1226 session->processedMsk |= (1<<effect->procId); in PreProcessingFx_Process()
1232 effect->session->processedMsk = 0; in PreProcessingFx_Process()
1337 effect->session->apm->ProcessStream(session->procFrame); in PreProcessingFx_Process()
1403 preproc_effect_t * effect = (preproc_effect_t *) self; in PreProcessingFx_Command() local
1405 if (effect == NULL){ in PreProcessingFx_Command()
1416 if (effect->ops->init) { in PreProcessingFx_Command()
1417 effect->ops->init(effect); in PreProcessingFx_Command()
1434 uint32_t enabledMsk = effect->session->enabledMsk; in PreProcessingFx_Command()
1436 effect->session->enabledMsk = 0; in PreProcessingFx_Command()
1439 *(int *)pReplyData = Session_SetConfig(effect->session, (effect_config_t *)pCmdData); in PreProcessingFx_Command()
1442 effect->session->enabledMsk = enabledMsk; in PreProcessingFx_Command()
1448 if (effect->state != PREPROC_EFFECT_STATE_ACTIVE) { in PreProcessingFx_Command()
1449 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG); in PreProcessingFx_Command()
1461 Session_GetConfig(effect->session, (effect_config_t *)pReplyData); in PreProcessingFx_Command()
1473 *(int *)pReplyData = Session_SetReverseConfig(effect->session, in PreProcessingFx_Command()
1487 Session_GetReverseConfig(effect->session, (effect_config_t *)pCmdData); in PreProcessingFx_Command()
1491 if (effect->ops->reset) { in PreProcessingFx_Command()
1492 effect->ops->reset(effect); in PreProcessingFx_Command()
1514 if (effect->ops->get_parameter) { in PreProcessingFx_Command()
1515 p->status = effect->ops->get_parameter(effect, p->data, in PreProcessingFx_Command()
1538 if (effect->ops->set_parameter) { in PreProcessingFx_Command()
1539 *(int *)pReplyData = effect->ops->set_parameter(effect, in PreProcessingFx_Command()
1550 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_ACTIVE); in PreProcessingFx_Command()
1558 *(int *)pReplyData = Effect_SetState(effect, PREPROC_EFFECT_STATE_CONFIG); in PreProcessingFx_Command()
1569 if (effect->ops->set_device) { in PreProcessingFx_Command()
1570 effect->ops->set_device(effect, *(uint32_t *)pCmdData); in PreProcessingFx_Command()
1590 effect->aux_channels_on = sHasAuxChannels[effect->procId]; in PreProcessingFx_Command()
1592 effect->aux_channels_on = false; in PreProcessingFx_Command()
1594 effect->cur_channel_config = (effect->session->inChannelCount == 1) ? in PreProcessingFx_Command()
1654 !effect->aux_channels_on) { in PreProcessingFx_Command()
1656 " fx %d", effect->procId); in PreProcessingFx_Command()
1695 if (*(uint32_t *)pCmdData != EFFECT_FEATURE_AUX_CHANNELS || !effect->aux_channels_on) { in PreProcessingFx_Command()
1704 &sDualMicConfigs[effect->cur_channel_config], in PreProcessingFx_Command()
1710 gDualMicEnabled, effect->aux_channels_on); in PreProcessingFx_Command()
1724 if (*(uint32_t *)pCmdData != EFFECT_FEATURE_AUX_CHANNELS || !effect->aux_channels_on) { in PreProcessingFx_Command()
1729 *(uint32_t *)pCmdData, effect->aux_channels_on); in PreProcessingFx_Command()
1744 effect->cur_channel_config = i; in PreProcessingFx_Command()
1761 preproc_effect_t * effect = (preproc_effect_t *) self; in PreProcessingFx_GetDescriptor() local
1763 if (effect == NULL || pDescriptor == NULL) { in PreProcessingFx_GetDescriptor()
1767 *pDescriptor = *sDescriptors[effect->procId]; in PreProcessingFx_GetDescriptor()
1776 preproc_effect_t * effect = (preproc_effect_t *)self; in PreProcessingFx_ProcessReverse() local
1778 if (effect == NULL){ in PreProcessingFx_ProcessReverse()
1782 preproc_session_t * session = (preproc_session_t *)effect->session; in PreProcessingFx_ProcessReverse()
1789 session->revProcessedMsk |= (1<<effect->procId); in PreProcessingFx_ProcessReverse()
1796 effect->session->revProcessedMsk = 0; in PreProcessingFx_ProcessReverse()
1860 effect->session->apm->AnalyzeReverseStream(session->revFrame); in PreProcessingFx_ProcessReverse()