mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
asoc: msm-pcm-routing: Assign default topology when app_type is zero
In normal cases audio hal will sent proper ACDB and APP type values but in some cases if app type becomes zero.Assign default topology when app_type is zero. Change-Id: Id588308650f823f7d94ffb1fd2d7656d4bcf9cb2 Signed-off-by: Arungopal Kondaveeti <quic_kondavee@quicinc.com>
This commit is contained in:
parent
940fa8c34b
commit
1bda71f4ff
1 changed files with 12 additions and 5 deletions
|
|
@ -1721,10 +1721,13 @@ done:
|
|||
EXPORT_SYMBOL(msm_pcm_routing_get_stream_app_type_cfg);
|
||||
|
||||
static struct cal_block_data *msm_routing_find_topology_by_path(int path,
|
||||
int cal_index)
|
||||
int cal_index,
|
||||
int app_type,
|
||||
int acdb_id)
|
||||
{
|
||||
struct list_head *ptr, *next;
|
||||
struct cal_block_data *cal_block = NULL;
|
||||
struct audio_cal_info_adm_top *cal_info;
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
list_for_each_safe(ptr, next,
|
||||
|
|
@ -1735,9 +1738,11 @@ static struct cal_block_data *msm_routing_find_topology_by_path(int path,
|
|||
|
||||
if (cal_utils_is_cal_stale(cal_block))
|
||||
continue;
|
||||
|
||||
if (((struct audio_cal_info_adm_top *)cal_block
|
||||
->cal_info)->path == path) {
|
||||
cal_info = (struct audio_cal_info_adm_top *)
|
||||
cal_block->cal_info;
|
||||
if ((cal_info->path == path) &&
|
||||
(cal_info->app_type == app_type) &&
|
||||
(cal_info->acdb_id == acdb_id)) {
|
||||
return cal_block;
|
||||
}
|
||||
}
|
||||
|
|
@ -1778,7 +1783,9 @@ static struct cal_block_data *msm_routing_find_topology(int path,
|
|||
"acdb_id %d %s\n", __func__, path, app_type, acdb_id,
|
||||
exact ? "fail" : "defaulting to search by path");
|
||||
return exact ? NULL : msm_routing_find_topology_by_path(path,
|
||||
cal_index);
|
||||
cal_index,
|
||||
app_type,
|
||||
acdb_id);
|
||||
}
|
||||
|
||||
static struct cal_block_data *msm_routing_find_topology_by_buf_number(int usecase, int path,
|
||||
|
|
|
|||
Loading…
Reference in a new issue