Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93ff7821 authored by Arungopal Kondaveeti's avatar Arungopal Kondaveeti Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarArungopal Kondaveeti <quic_kondavee@quicinc.com>
parent b03e6b4f
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -1166,10 +1166,13 @@ int msm_pcm_routing_get_stream_app_type_cfg(
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,
@@ -1180,9 +1183,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;
		}
	}
@@ -1223,7 +1228,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 int msm_routing_find_topology_on_index(int session_type, int app_type,