hal: Sound card detection changes

Add changes for loading the sound card path on sdm429w

Change-Id: I78d7e59540f7272320436070ce50043ef3c3b5ad
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index bf919c4..cfe5f18 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -836,6 +836,10 @@
         strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
     } else if (!strcmp(snd_card_name, "sdm439-snd-card-mtp")) {
         strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
+    /* Wearbles LW and LAW uses different sound card name on sdm429w
+       so use strstr instead of strcmp  to make it generic */
+    } else if (strstr(snd_card_name, "sdm429w")) {
+        strlcpy(hw_info->name, "sdm429w", sizeof(hw_info->name));
     } else {
         ALOGW("%s: Not an SDM439 device", __func__);
     }
@@ -965,7 +969,7 @@
     } else if(strstr(snd_card_name, "holi")) {
         ALOGV("HOLI - variant soundcard");
         update_hardware_info_holi(hw_info, snd_card_name);
-    } else if(strstr(snd_card_name, "sdm439")) {
+    } else if(strstr(snd_card_name, "sdm439") || strstr(snd_card_name, "sdm429w")) {
         ALOGV("SDM439 - variant soundcard");
         update_hardware_info_sdm439(hw_info, snd_card_name);
     } else if (strstr(snd_card_name, "msm8937")) {
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 323e51a..53c345a 100755
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1870,6 +1870,7 @@
                    sizeof("msm8953-sku4-snd-card")) ||
          !strncmp(snd_card_name, "lito-lagoonmtp-snd-card",
                    sizeof("lito-lagoonmtp-snd-card")) ||
+         strstr(snd_card_name, "sdm429w") ||
          !strncmp(snd_card_name, "lito-lagoonqrd-snd-card",
                    sizeof("lito-lagoonqrd-snd-card"))) {
          ALOGI("%s: snd_card_name: %s",__func__,snd_card_name);
@@ -3500,7 +3501,7 @@
                sizeof("bengal-scubaqrd-snd-card"))) {
         platform_info_init(get_xml_file_path(PLATFORM_INFO_XML_PATH_SCUBA_QRD),
             my_data, PLATFORM);
-    } else if (my_data->is_internal_codec) {
+    } else if (my_data->is_internal_codec && (strstr(snd_card_name, "sdm429w") == NULL)) {
         platform_info_init(get_xml_file_path(PLATFORM_INFO_XML_PATH_INTCODEC_NAME),
             my_data, PLATFORM);
     } else {