asoc: routing: Pass correct port id to adm close
Currently based on fe_dai index backend dai port id is
selected and passed to adm_close api which is incorrect.
Fix it by using be_dai index to select backend dai port id.
Change-Id: I12affaf7b08d2f69264338d098c30600ed014220
Signed-off-by: Sachin Mohan Gadag <sgadag@codeaurora.org>
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index 6d9ba11..e821717 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -16941,7 +16941,7 @@
if (test_bit(idx, &copp))
break;
fdai->be_srate = bedai->sample_rate;
- port_id = get_port_id(msm_bedais[i].port_id);
+ port_id = get_port_id(bedai->port_id);
topology = adm_get_topology_for_port_copp_idx(port_id,
idx);
adm_close(port_id, fdai->perf_mode, idx);