hal: Add check for default backend on RX path

Add additional check for default backend entry in a concurrent
usecase scenario. Without this check there will be a failure
in matching common backend in a usecase involving TTY HCO handset
and speaker-headset combo. This failure leads to audio loss during
TTY HCO usecase.

Change-Id: I5a708551de06781b7c0e56d9973460fe806bf241
CRs-Fixed: 1078299
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 64b5c17..e282849 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -90,6 +90,7 @@
 #define MIN_COMPRESS_OFFLOAD_FRAGMENT_SIZE (2 * 1024)
 #define COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING (2 * 1024)
 #define COMPRESS_OFFLOAD_FRAGMENT_SIZE (32 * 1024)
+#define DEFAULT_RX_BACKEND "SLIMBUS_0_RX"
 
 /*
  * Offload buffer size for compress passthrough
@@ -2205,9 +2206,9 @@
     if (NULL != be_itf1 && NULL != be_itf2) {
         if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
             result = false;
-    } else if (NULL == be_itf1 && NULL != be_itf2) {
+    } else if (NULL == be_itf1 && NULL != be_itf2 && (NULL == strstr(be_itf2, DEFAULT_RX_BACKEND))) {
             result = false;
-    } else if (NULL != be_itf1 && NULL == be_itf2) {
+    } else if (NULL != be_itf1 && NULL == be_itf2 && (NULL == strstr(be_itf1, DEFAULT_RX_BACKEND))) {
             result = false;
     }
 
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 48cd5af..7f681ab 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -66,6 +66,8 @@
 #define COMPRESS_OFFLOAD_FRAGMENT_SIZE_FOR_AV_STREAMING (2 * 1024)
 #define COMPRESS_OFFLOAD_FRAGMENT_SIZE (32 * 1024)
 
+#define DEFAULT_RX_BACKEND "SLIMBUS_0_RX"
+
 /*
  * Offload buffer size for compress passthrough
  */
@@ -1987,9 +1989,9 @@
     if (NULL != be_itf1 && NULL != be_itf2) {
         if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
             result = false;
-    } else if (NULL == be_itf1 && NULL != be_itf2) {
+    } else if (NULL == be_itf1 && NULL != be_itf2 && (NULL == strstr(be_itf2, DEFAULT_RX_BACKEND))) {
             result = false;
-    } else if (NULL != be_itf1 && NULL == be_itf2) {
+    } else if (NULL != be_itf1 && NULL == be_itf2 && (NULL == strstr(be_itf1, DEFAULT_RX_BACKEND))) {
             result = false;
     }