diff options
author | Andrew Chant <achant@google.com> | 2019-06-06 00:50:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-06-06 00:50:51 +0000 |
commit | e844ab1acefa7f7050511285d99c36fb3e3cc133 (patch) | |
tree | d61fda78560876c5fa32419b161650829e7f6279 /cvq_util.c | |
parent | 427ada72083221ef7e7c79930f841ad992d4aef0 (diff) | |
parent | f9dbaf763267a55bfd39bdab2788e86f86f04931 (diff) | |
download | android_hardware_knowles_athletico_sound_trigger_hal-e844ab1acefa7f7050511285d99c36fb3e3cc133.tar.gz android_hardware_knowles_athletico_sound_trigger_hal-e844ab1acefa7f7050511285d99c36fb3e3cc133.tar.bz2 android_hardware_knowles_athletico_sound_trigger_hal-e844ab1acefa7f7050511285d99c36fb3e3cc133.zip |
Merge "sthal: delayed core shutdown logic to optimize route switching" into qt-r1-dev
Diffstat (limited to 'cvq_util.c')
-rw-r--r-- | cvq_util.c | 143 |
1 files changed, 0 insertions, 143 deletions
@@ -1683,149 +1683,6 @@ int set_default_apll_clk(struct mixer *mixer) { return ret; } -int power_down_all_non_ctrl_proc_mem(struct mixer *mixer) -{ - int ret = 0; - struct mixer_ctl* ctl; - - ALOGD("+Entering %s+", __func__); - - if (!mixer) { - ALOGE("%s mixer is NULL", __func__); - return -EINVAL; - } - - ctl = mixer_get_ctl_by_name(mixer, "SSP Core Boot"); - if (ctl) { - ret = mixer_ctl_set_enum_by_string(ctl, "CoreMemOff"); - if (ret) - ALOGE("%s: update SSP fail! ret = %d", __func__, ret); - } else { - ALOGE("%s: get SSP control fail", __func__); - ret = -ENODEV; - } - - ctl = mixer_get_ctl_by_name(mixer, "HMD Core Boot"); - if (ctl) { - ret = mixer_ctl_set_enum_by_string(ctl, "CoreMemOff"); - if (ret) - ALOGE("%s: update HMD fail! ret = %d", __func__, ret); - } else { - ALOGE("%s: get HMD control fail", __func__); - ret = -ENODEV; - } - - ctl = mixer_get_ctl_by_name(mixer, "DMX Core Boot"); - if (ctl) { - ret = mixer_ctl_set_enum_by_string(ctl, "CoreMemOff"); - if (ret) - ALOGE("%s: update DMX fail! ret = %d", __func__, ret); - } else { - ALOGE("%s: get DMX control fail", __func__); - ret = -ENODEV; - } - - ALOGD("-Exiting %s-", __func__); - return ret; -} - -int power_on_proc_mem(struct audio_route *route_hdl, int enable, int core) -{ - ALOGD("+Entering %s+", __func__); - if (enable) { - if (core == IAXXX_SSP_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_SSP_PROC_MEM); - } else if (core == IAXXX_HMD_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_HMD_PROC_MEM); - } else if (core == IAXXX_DMX_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_DMX_PROC_MEM); - } - } else { - if (core == IAXXX_SSP_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_SSP_PROC_MEM); - } else if (core == IAXXX_HMD_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_HMD_PROC_MEM); - } else if (core == IAXXX_DMX_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_DMX_PROC_MEM); - } - } - ALOGD("-Exiting %s-", __func__); - return 0; -} - -int power_off_proc_mem(struct audio_route *route_hdl, int enable, int core) -{ - ALOGD("+Entering %s+", __func__); - if (enable) { - if (core == IAXXX_SSP_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_SSP_PROC_MEM); - } else if (core == IAXXX_HMD_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_HMD_PROC_MEM); - } else if (core == IAXXX_DMX_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_DMX_PROC_MEM); - } - } else { - if (core == IAXXX_SSP_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_SSP_PROC_MEM); - } else if (core == IAXXX_HMD_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_HMD_PROC_MEM); - } else if (core == IAXXX_DMX_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_DMX_PROC_MEM); - } - } - ALOGD("-Exiting %s-", __func__); - return 0; -} - -int power_off_proc_mem_in_retn(struct audio_route *route_hdl, int enable, int core) -{ - ALOGD("+Entering %s+", __func__); - if (enable) { - if (core == IAXXX_SSP_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_SSP_PROC_MEM_IN_RETN); - } else if (core == IAXXX_HMD_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_HMD_PROC_MEM_IN_RETN); - } else if (core == IAXXX_DMX_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_OFF_DMX_PROC_MEM_IN_RETN); - } - } else { - if (core == IAXXX_SSP_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_SSP_PROC_MEM_IN_RETN); - } else if (core == IAXXX_HMD_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_HMD_PROC_MEM_IN_RETN); - } else if (core == IAXXX_DMX_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_OFF_DMX_PROC_MEM_IN_RETN); - } - } - ALOGD("-Exiting %s-", __func__); - return 0; -} - -int power_on_proc_mem_out_off_retn(struct audio_route *route_hdl, int enable, int core) -{ - ALOGD("+Entering %s+", __func__); - if (enable) { - if (core == IAXXX_SSP_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_SSP_PROC_MEM_OUT_OFF_RETN); - } else if (core == IAXXX_HMD_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_HMD_PROC_MEM_OUT_OFF_RETN); - } else if (core == IAXXX_DMX_ID) { - audio_route_apply_and_update_path(route_hdl, POWER_ON_DMX_PROC_MEM_OUT_OFF_RETN); - } - - } else { - if (core == IAXXX_SSP_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_SSP_PROC_MEM_OUT_OFF_RETN); - } else if (core == IAXXX_HMD_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_HMD_PROC_MEM_OUT_OFF_RETN); - } else if (core == IAXXX_DMX_ID) { - audio_route_reset_and_update_path(route_hdl, POWER_ON_DMX_PROC_MEM_OUT_OFF_RETN); - } - } - ALOGD("-Exiting %s-", __func__); - return 0; -} - int get_fw_status(struct iaxxx_odsp_hw *odsp_hdl, unsigned int *status) { int err; |