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

Commit 0a9ad4c3 authored by ftong's avatar ftong
Browse files

ASoC: msm: Fix ASRC port type mismatch



Dir is empty when assign value to TX path port type
Fix port type assignment.

Change-Id: If6c3f7d2cb5785e02a5cde1538b1e394c0e8e8e5
Signed-off-by: default avatarftong <ftong@codeaurora.org>
parent 4f7c9992
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -42365,8 +42365,7 @@ static int asrc_get_module_location(struct asrc_module_config_params *params,
	unsigned long copp = -1;
	bool copp_is_found = false;
	struct msm_pcm_routing_bdai_data *bedai = NULL;
	int port_type = (dir == SESSION_TYPE_RX) ? MSM_AFE_PORT_TYPE_RX :
			       MSM_AFE_PORT_TYPE_TX;
	int port_type = -1;
	mutex_lock(&routing_lock);
@@ -42380,6 +42379,10 @@ static int asrc_get_module_location(struct asrc_module_config_params *params,
	dir = params->dir;
	be_id = params->be_id;
	bedai = &msm_bedais[be_id];
	port_type = (dir == SESSION_TYPE_RX) ? MSM_AFE_PORT_TYPE_RX :
			  MSM_AFE_PORT_TYPE_TX;
	if (afe_get_port_type(bedai->port_id) != port_type) {
		pr_err("%s: port_type not match: be_dai %d type %d\n",
			__func__, be_id, port_type);