}
#endif
- ret = drv_ao_load_aef();
- if (ret != AUDIO_SUCCESS) {
- sap_err_log_fun(drv_ao_load_aef, ret);
- return ret;
- }
-
audio_unused(cmd);
audio_unused(file);
return AUDIO_SUCCESS;
td_s32 ret;
td_u32 lib_buf_size = AO_AEF_PARAM_SIZE_MMZ_MAX;
td_u8 *lib_buf = (td_u8 *)malloc(lib_buf_size);
- if (lib_buf == TD_NULL) {
+ if (lib_buf == TD_NULL) {
return ERR_AO_NULL_PTR;
}
td_handle drv_ao;
ao_attr attr = {0};
sap_ao_port_aef_profile *profile = TD_NULL;
-
+
profile = (sap_ao_port_aef_profile *)arg;
drv_ao = profile->h_mod;
+
+ if (profile->aef_profile > AO_AEF_PROFILE_NONE && profile->aef_profile < AO_AEF_PROFILE_MAX)
+ {
+ ret = drv_ao_load_aef();
+ if (ret != AUDIO_SUCCESS) {
+ sap_err_log_fun(drv_ao_load_aef, ret);
+ return ret;
+ }
+ }
+
+
ret = drv_msg_ao_set_aef_profile(drv_ao, profile->aef_profile);
if (ret != AUDIO_SUCCESS) {
sap_err_log_fun(drv_msg_ao_set_aef_profile, ret);
return ret;
}
-
+
if (profile->aef_profile == AO_AEF_PROFILE_NONE || profile->aef_profile == AO_AEF_PROFILE_MAX) {
return AUDIO_SUCCESS;
}