ASoC: Add support to send voice UI port id to afe

As per the current design in afe, if the
afe_get_cal_topology for AFE_TOPOLOGY_CAL
or send_afe_cal_type for AFE_COMMON_TX_CAL
fails, then the voice UI calblock is fetched/sent.
This is resulting in sending voice UI calblock
on a non voice UI port during concurrent usecase scenario.

Fix is to check if the calblock for get/set is for
a voice UI port or not. Added support to send this
port id info from routing driver to afe when usecase
is enabled via mixer_control.

Change-Id: I356aae61e1b9d11324e7b9f9a57953767a64b71e
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
diff --git a/asoc/msm-pcm-routing-v2.c b/asoc/msm-pcm-routing-v2.c
index 03603a2..37635a8 100644
--- a/asoc/msm-pcm-routing-v2.c
+++ b/asoc/msm-pcm-routing-v2.c
@@ -3033,6 +3033,7 @@
 	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
 	int mux = ucontrol->value.enumerated.item[0];
 	int lsm_port = AFE_PORT_ID_SLIMBUS_MULTI_CHAN_5_TX;
+	int lsm_port_idx = 0;
 	u8 fe_idx = 0;
 
 	if (mux >= e->items) {
@@ -3042,6 +3043,7 @@
 
 	pr_debug("%s: LSM enable %ld\n", __func__,
 			ucontrol->value.integer.value[0]);
+	lsm_port_idx = ucontrol->value.integer.value[0];
 	switch (ucontrol->value.integer.value[0]) {
 	case 1:
 		lsm_port = AFE_PORT_ID_SLIMBUS_MULTI_CHAN_0_TX;
@@ -3098,6 +3100,10 @@
 	set_lsm_port(lsm_port);
 	msm_routing_get_lsm_fe_idx(kcontrol, &fe_idx);
 	lsm_port_index[fe_idx] = ucontrol->value.integer.value[0];
+        /* Set the default AFE LSM Port to 0xffff */
+	if(lsm_port_idx <= 0 || lsm_port_idx >= ARRAY_SIZE(lsm_port_text))
+		lsm_port = 0xffff;
+	afe_set_lsm_afe_port_id(fe_idx, lsm_port);
 
 	return 0;
 }