Loading sound/soc/codecs/wcd_cpe_core.c +28 −22 Original line number Diff line number Diff line Loading @@ -757,7 +757,7 @@ static unsigned int wcd_cpe_state_poll(struct snd_info_entry *entry, * wcd_cpe_is_online_state - return true if card is online state * @core: core offline to query */ bool wcd_cpe_is_online_state(void *core_handle) static bool wcd_cpe_is_online_state(void *core_handle) { struct wcd_cpe_core *core = core_handle; if (core_handle) { Loading Loading @@ -984,7 +984,7 @@ static void wcd_cpe_set_and_complete(struct wcd_cpe_core *core, * @work: work that is scheduled to perform CPE shutdown * and restart */ void wcd_cpe_ssr_work(struct work_struct *work) static void wcd_cpe_ssr_work(struct work_struct *work) { int rc = 0; Loading Loading @@ -1217,7 +1217,7 @@ static irqreturn_t svass_exception_irq(int irq, void *data) * Process the request to the command sent to CPE and wakeup the * command send wait. */ void wcd_cpe_cmi_afe_cb(const struct cmi_api_notification *param) static void wcd_cpe_cmi_afe_cb(const struct cmi_api_notification *param) { struct cmi_hdr *hdr; struct wcd_cmi_afe_port_data *afe_port_d; Loading Loading @@ -2064,7 +2064,7 @@ EXPORT_SYMBOL(wcd_cpe_init); * This callback is registered with cpe services while registering * the LSM service */ void wcd_cpe_cmi_lsm_callback(const struct cmi_api_notification *param) static void wcd_cpe_cmi_lsm_callback(const struct cmi_api_notification *param) { struct cmi_hdr *hdr; struct cpe_lsm_session *lsm_session; Loading Loading @@ -2174,6 +2174,7 @@ static int wcd_cpe_cmi_send_lsm_msg( if (CMI_HDR_GET_OBM_FLAG(hdr)) wcd_cpe_bus_vote_max_bw(core, true); reinit_completion(&session->cmd_comp); ret = cmi_send_msg(message); if (ret) { pr_err("%s: msg opcode (0x%x) send failed (%d)\n", Loading Loading @@ -2204,8 +2205,6 @@ static int wcd_cpe_cmi_send_lsm_msg( rel_bus_vote: reinit_completion(&session->cmd_comp); if (CMI_HDR_GET_OBM_FLAG(hdr)) wcd_cpe_bus_vote_max_bw(core, false); Loading Loading @@ -3124,7 +3123,7 @@ err_ret: return ret; } int wcd_cpe_lsm_set_data(void *core_handle, static int wcd_cpe_lsm_set_data(void *core_handle, struct cpe_lsm_session *session, enum lsm_detection_mode detect_mode, bool detect_failure) Loading Loading @@ -3161,7 +3160,6 @@ int wcd_cpe_lsm_set_data(void *core_handle, err_ret: return ret; } EXPORT_SYMBOL(wcd_cpe_lsm_set_data); /* * wcd_cpe_lsm_reg_snd_model: register the sound model for listen Loading Loading @@ -3545,13 +3543,13 @@ static int wcd_cpe_lsm_config_lab_latency( lab_lat->param.param_id, PARAM_SIZE_LSM_LATENCY_SIZE, pld_size); WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &cpe_lab_latency); if (ret != 0) { if (ret != 0) pr_err("%s: lsm_set_params failed, error = %d\n", __func__, ret); return -EINVAL; } return 0; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); return ret; } /* Loading Loading @@ -3594,16 +3592,22 @@ static int wcd_cpe_lsm_lab_control( __func__, lab_enable->param.module_id, lab_enable->param.param_id, PARAM_SIZE_LSM_CONTROL_SIZE, pld_size); WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &cpe_lab_enable); if (ret != 0) { pr_err("%s: lsm_set_params failed, error = %d\n", __func__, ret); return -EINVAL; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); goto done; } WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); if (lab_enable->enable) wcd_cpe_lsm_config_lab_latency(core, session, ret = wcd_cpe_lsm_config_lab_latency(core, session, WCD_CPE_LAB_MAX_LATENCY); return 0; done: return ret; } /* Loading @@ -3622,12 +3626,14 @@ static int wcd_cpe_lsm_eob( 0, CPE_LSM_SESSION_CMD_EOB)) { return -EINVAL; } WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &lab_eob); if (ret != 0) { if (ret != 0) pr_err("%s: lsm_set_params failed\n", __func__); return -EINVAL; } return 0; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); return ret; } /* Loading sound/soc/codecs/wcd_cpe_services.c +2 −2 Original line number Diff line number Diff line Loading @@ -1319,12 +1319,12 @@ static enum cpe_process_result cpe_mt_process_cmd( service = CMI_HDR_GET_SERVICE(hdr); pr_debug("%s: msg send success, notifying clients\n", __func__); cpe_command_cleanup(command_node); t_info->pending = NULL; cpe_change_state(t_info, CPE_STATE_IDLE, CPE_SS_IDLE); cpe_notify_cmi_client(t_info, t_info->tgt->outbox, CPE_SVC_SUCCESS); cpe_command_cleanup(command_node); t_info->pending = NULL; break; case CPE_CMD_PROC_INCOMING_MSG: Loading Loading
sound/soc/codecs/wcd_cpe_core.c +28 −22 Original line number Diff line number Diff line Loading @@ -757,7 +757,7 @@ static unsigned int wcd_cpe_state_poll(struct snd_info_entry *entry, * wcd_cpe_is_online_state - return true if card is online state * @core: core offline to query */ bool wcd_cpe_is_online_state(void *core_handle) static bool wcd_cpe_is_online_state(void *core_handle) { struct wcd_cpe_core *core = core_handle; if (core_handle) { Loading Loading @@ -984,7 +984,7 @@ static void wcd_cpe_set_and_complete(struct wcd_cpe_core *core, * @work: work that is scheduled to perform CPE shutdown * and restart */ void wcd_cpe_ssr_work(struct work_struct *work) static void wcd_cpe_ssr_work(struct work_struct *work) { int rc = 0; Loading Loading @@ -1217,7 +1217,7 @@ static irqreturn_t svass_exception_irq(int irq, void *data) * Process the request to the command sent to CPE and wakeup the * command send wait. */ void wcd_cpe_cmi_afe_cb(const struct cmi_api_notification *param) static void wcd_cpe_cmi_afe_cb(const struct cmi_api_notification *param) { struct cmi_hdr *hdr; struct wcd_cmi_afe_port_data *afe_port_d; Loading Loading @@ -2064,7 +2064,7 @@ EXPORT_SYMBOL(wcd_cpe_init); * This callback is registered with cpe services while registering * the LSM service */ void wcd_cpe_cmi_lsm_callback(const struct cmi_api_notification *param) static void wcd_cpe_cmi_lsm_callback(const struct cmi_api_notification *param) { struct cmi_hdr *hdr; struct cpe_lsm_session *lsm_session; Loading Loading @@ -2174,6 +2174,7 @@ static int wcd_cpe_cmi_send_lsm_msg( if (CMI_HDR_GET_OBM_FLAG(hdr)) wcd_cpe_bus_vote_max_bw(core, true); reinit_completion(&session->cmd_comp); ret = cmi_send_msg(message); if (ret) { pr_err("%s: msg opcode (0x%x) send failed (%d)\n", Loading Loading @@ -2204,8 +2205,6 @@ static int wcd_cpe_cmi_send_lsm_msg( rel_bus_vote: reinit_completion(&session->cmd_comp); if (CMI_HDR_GET_OBM_FLAG(hdr)) wcd_cpe_bus_vote_max_bw(core, false); Loading Loading @@ -3124,7 +3123,7 @@ err_ret: return ret; } int wcd_cpe_lsm_set_data(void *core_handle, static int wcd_cpe_lsm_set_data(void *core_handle, struct cpe_lsm_session *session, enum lsm_detection_mode detect_mode, bool detect_failure) Loading Loading @@ -3161,7 +3160,6 @@ int wcd_cpe_lsm_set_data(void *core_handle, err_ret: return ret; } EXPORT_SYMBOL(wcd_cpe_lsm_set_data); /* * wcd_cpe_lsm_reg_snd_model: register the sound model for listen Loading Loading @@ -3545,13 +3543,13 @@ static int wcd_cpe_lsm_config_lab_latency( lab_lat->param.param_id, PARAM_SIZE_LSM_LATENCY_SIZE, pld_size); WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &cpe_lab_latency); if (ret != 0) { if (ret != 0) pr_err("%s: lsm_set_params failed, error = %d\n", __func__, ret); return -EINVAL; } return 0; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); return ret; } /* Loading Loading @@ -3594,16 +3592,22 @@ static int wcd_cpe_lsm_lab_control( __func__, lab_enable->param.module_id, lab_enable->param.param_id, PARAM_SIZE_LSM_CONTROL_SIZE, pld_size); WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &cpe_lab_enable); if (ret != 0) { pr_err("%s: lsm_set_params failed, error = %d\n", __func__, ret); return -EINVAL; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); goto done; } WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); if (lab_enable->enable) wcd_cpe_lsm_config_lab_latency(core, session, ret = wcd_cpe_lsm_config_lab_latency(core, session, WCD_CPE_LAB_MAX_LATENCY); return 0; done: return ret; } /* Loading @@ -3622,12 +3626,14 @@ static int wcd_cpe_lsm_eob( 0, CPE_LSM_SESSION_CMD_EOB)) { return -EINVAL; } WCD_CPE_GRAB_LOCK(&session->lsm_lock, "lsm"); ret = wcd_cpe_cmi_send_lsm_msg(core, session, &lab_eob); if (ret != 0) { if (ret != 0) pr_err("%s: lsm_set_params failed\n", __func__); return -EINVAL; } return 0; WCD_CPE_REL_LOCK(&session->lsm_lock, "lsm"); return ret; } /* Loading
sound/soc/codecs/wcd_cpe_services.c +2 −2 Original line number Diff line number Diff line Loading @@ -1319,12 +1319,12 @@ static enum cpe_process_result cpe_mt_process_cmd( service = CMI_HDR_GET_SERVICE(hdr); pr_debug("%s: msg send success, notifying clients\n", __func__); cpe_command_cleanup(command_node); t_info->pending = NULL; cpe_change_state(t_info, CPE_STATE_IDLE, CPE_SS_IDLE); cpe_notify_cmi_client(t_info, t_info->tgt->outbox, CPE_SVC_SUCCESS); cpe_command_cleanup(command_node); t_info->pending = NULL; break; case CPE_CMD_PROC_INCOMING_MSG: Loading