Merge "asoc: msm-pcm-routing: add msm_pcm_routing_get_pp_ch_cnt"

This commit is contained in:
Linux Build Service Account
2018-06-20 21:13:50 -07:00
committad av Gerrit - the friendly Code Review server
förälder 353ea8a466 3b1c926e42
incheckning 5cf0f89294
2 ändrade filer med 34 tillägg och 0 borttagningar

Visa fil

@@ -1197,6 +1197,39 @@ static bool route_check_fe_id_adm_support(int fe_id)
return rc; return rc;
} }
/*
* msm_pcm_routing_get_pp_ch_cnt:
* Read the processed channel count
*
* @fe_id: Front end ID
* @session_type: Inidicates RX or TX session type
*/
int msm_pcm_routing_get_pp_ch_cnt(int fe_id, int session_type)
{
struct msm_pcm_stream_app_type_cfg cfg_data;
int be_id = 0, app_type_idx = 0, app_type = 0;
int ret;
memset(&cfg_data, 0, sizeof(cfg_data));
if (!is_mm_lsm_fe_id(fe_id)) {
pr_err("%s: bad MM ID\n", __func__);
return -EINVAL;
}
ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, session_type,
&be_id, &cfg_data);
if (ret) {
pr_err("%s: cannot get stream app type cfg\n");
return ret;
}
app_type = cfg_data.app_type;
app_type_idx = msm_pcm_routing_get_lsm_app_type_idx(app_type);
return lsm_app_type_cfg[app_type_idx].num_out_channels;
}
EXPORT_SYMBOL(msm_pcm_routing_get_pp_ch_cnt);
int msm_pcm_routing_reg_phy_compr_stream(int fe_id, int perf_mode, int msm_pcm_routing_reg_phy_compr_stream(int fe_id, int perf_mode,
int dspst_id, int stream_type, int dspst_id, int stream_type,
uint32_t passthr_mode) uint32_t passthr_mode)

Visa fil

@@ -549,4 +549,5 @@ int msm_pcm_routing_get_stream_app_type_cfg(
int msm_pcm_routing_send_chmix_cfg(int fe_id, int ip_channel_cnt, int msm_pcm_routing_send_chmix_cfg(int fe_id, int ip_channel_cnt,
int op_channel_cnt, int *ch_wght_coeff, int op_channel_cnt, int *ch_wght_coeff,
int session_type, int stream_type); int session_type, int stream_type);
int msm_pcm_routing_get_pp_ch_cnt(int fe_id, int session_type);
#endif /*_MSM_PCM_H*/ #endif /*_MSM_PCM_H*/