hal: Add provision to select backend based on codec type

SLIMBUS_0 is the backend on 8952 external codec PLs.
Whereas TERT_MI2S is the backend on 8952 internal codec PLs.
Since both these PLs are supported on same code base,
provision is required to select backend based on codec type.

Change-Id: I9c0dd7d952ab9d6b9bf738074d97597622e09590
diff --git a/hal/platform_info.c b/hal/platform_info.c
index 13a314e..b65411f 100644
--- a/hal/platform_info.c
+++ b/hal/platform_info.c
@@ -87,7 +87,7 @@
  * ...
  * </pcm_ids>
  * <interface_names>
- * <device name="Use audio device name here, not sound device name" interface="PRIMARY_I2S"/>
+ * <device name="Use audio device name here, not sound device name" interface="PRIMARY_I2S" codec_type="external/internal"/>
  * ...
  * ...
  * </interface_names>
@@ -262,7 +262,15 @@
         goto done;
     }
 
-    ret = platform_set_audio_device_interface((char *)attr[1], (char *)attr[3]);
+    if (strcmp(attr[4], "codec_type") != 0) {
+        ALOGE("%s: Device %s has no codec type set!",
+              __func__, attr[1]);
+
+        goto done;
+    }
+
+    ret = platform_set_audio_device_interface((char *)attr[1], (char *)attr[3],
+                                              (char *)attr[5]);
     if (ret < 0) {
         ALOGE("%s: Audio Interface not set!", __func__);