Loading dsp/q6adm.c +43 −0 Original line number Diff line number Diff line Loading @@ -4568,6 +4568,49 @@ int adm_set_ffecns_effect(int effect) } EXPORT_SYMBOL(adm_set_ffecns_effect); /** * adm_set_ffecns_freeze_event - * command to set event for ffecns module * * @event: send ffecns freeze event true or false * * Returns 0 on success or error on failure */ int adm_set_ffecns_freeze_event(bool ffecns_freeze_event) { struct ffv_spf_freeze_param_t ffv_param; struct param_hdr_v3 param_hdr; int rc = 0; int copp_idx = 0; memset(¶m_hdr, 0, sizeof(param_hdr)); memset(&ffv_param, 0, sizeof(ffv_param)); ffv_param.freeze = ffecns_freeze_event ? 1 : 0; ffv_param.source_id = 0; /*default value*/ copp_idx = adm_get_default_copp_idx(this_adm.ffecns_port_id); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s, no active copp to query rms copp_idx:%d\n", __func__, copp_idx); return -EINVAL; } param_hdr.module_id = FFECNS_MODULE_ID; param_hdr.instance_id = INSTANCE_ID_0; param_hdr.param_id = PARAM_ID_FFV_SPF_FREEZE; param_hdr.param_size = sizeof(ffv_param); rc = adm_pack_and_set_one_pp_param(this_adm.ffecns_port_id, copp_idx, param_hdr, (uint8_t *) &ffv_param); if (rc) pr_err("%s: Failed to set ffecns imc event, err %d\n", __func__, rc); return rc; } EXPORT_SYMBOL(adm_set_ffecns_freeze_event); /** * adm_param_enable - * command to send params to ADM for given module Loading include/dsp/apr_audio-v2.h +1 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,7 @@ struct audproc_softvolume_params { */ #define AUDPROC_MODULE_ID_MFC_EC_REF 0x0001092C #define PARAM_ID_FFV_SPF_FREEZE 0x00010960 struct adm_cmd_set_pp_params_v5 { struct apr_hdr hdr; Loading include/dsp/q6adm-v2.h +6 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,11 @@ struct msm_pcm_channel_mixer { bool override_out_ch_map; }; struct ffv_spf_freeze_param_t { uint16_t freeze; uint16_t source_id; }; int srs_trumedia_open(int port_id, int copp_idx, __s32 srs_tech_id, void *srs_params); Loading Loading @@ -221,4 +226,5 @@ int adm_programable_channel_mixer(int port_id, int copp_idx, int session_id, void msm_dts_srs_acquire_lock(void); void msm_dts_srs_release_lock(void); void adm_set_native_mode(int mode); int adm_set_ffecns_freeze_event(bool ffecns_freeze_event); #endif /* __Q6_ADM_V2_H__ */ Loading
dsp/q6adm.c +43 −0 Original line number Diff line number Diff line Loading @@ -4568,6 +4568,49 @@ int adm_set_ffecns_effect(int effect) } EXPORT_SYMBOL(adm_set_ffecns_effect); /** * adm_set_ffecns_freeze_event - * command to set event for ffecns module * * @event: send ffecns freeze event true or false * * Returns 0 on success or error on failure */ int adm_set_ffecns_freeze_event(bool ffecns_freeze_event) { struct ffv_spf_freeze_param_t ffv_param; struct param_hdr_v3 param_hdr; int rc = 0; int copp_idx = 0; memset(¶m_hdr, 0, sizeof(param_hdr)); memset(&ffv_param, 0, sizeof(ffv_param)); ffv_param.freeze = ffecns_freeze_event ? 1 : 0; ffv_param.source_id = 0; /*default value*/ copp_idx = adm_get_default_copp_idx(this_adm.ffecns_port_id); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s, no active copp to query rms copp_idx:%d\n", __func__, copp_idx); return -EINVAL; } param_hdr.module_id = FFECNS_MODULE_ID; param_hdr.instance_id = INSTANCE_ID_0; param_hdr.param_id = PARAM_ID_FFV_SPF_FREEZE; param_hdr.param_size = sizeof(ffv_param); rc = adm_pack_and_set_one_pp_param(this_adm.ffecns_port_id, copp_idx, param_hdr, (uint8_t *) &ffv_param); if (rc) pr_err("%s: Failed to set ffecns imc event, err %d\n", __func__, rc); return rc; } EXPORT_SYMBOL(adm_set_ffecns_freeze_event); /** * adm_param_enable - * command to send params to ADM for given module Loading
include/dsp/apr_audio-v2.h +1 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,7 @@ struct audproc_softvolume_params { */ #define AUDPROC_MODULE_ID_MFC_EC_REF 0x0001092C #define PARAM_ID_FFV_SPF_FREEZE 0x00010960 struct adm_cmd_set_pp_params_v5 { struct apr_hdr hdr; Loading
include/dsp/q6adm-v2.h +6 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,11 @@ struct msm_pcm_channel_mixer { bool override_out_ch_map; }; struct ffv_spf_freeze_param_t { uint16_t freeze; uint16_t source_id; }; int srs_trumedia_open(int port_id, int copp_idx, __s32 srs_tech_id, void *srs_params); Loading Loading @@ -221,4 +226,5 @@ int adm_programable_channel_mixer(int port_id, int copp_idx, int session_id, void msm_dts_srs_acquire_lock(void); void msm_dts_srs_release_lock(void); void adm_set_native_mode(int mode); int adm_set_ffecns_freeze_event(bool ffecns_freeze_event); #endif /* __Q6_ADM_V2_H__ */