hal: remove libmdmdetect library dependency

This reverts commit 008aebd15ac8708399ca359ee835d9060e14ceb5.

Original commit breaks the compilation of ASOP code with audio HAL
when proprietary code is not present because libmdmdetect proprietary
library is statically linked.

Change-Id: I8f704b84181c0083e4b84140ff3e1e5ef28469c9
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 3f62164..d8c1fd2 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -33,7 +33,6 @@
 #include "audio_extn.h"
 #include "voice_extn.h"
 #include "sound/compress_params.h"
-#include "mdm_detect.h"
 
 #define MIXER_XML_PATH "/system/etc/mixer_paths.xml"
 #define MIXER_XML_PATH_AUXPCM "/system/etc/mixer_paths_auxpcm.xml"
@@ -627,26 +626,6 @@
     }
 }
 
-static void platform_csd_init(struct platform_data *plat_data)
-{
-    struct dev_info mdm_detect_info;
-    int ret = 0;
-
-    /* Call ESOC API to get the number of modems.
-     * If the number of modems is not zero, load CSD Client specific
-     * symbols. Voice call is handled by MDM and apps processor talks to
-     * MDM through CSD Client
-     */
-    ret = get_system_info(&mdm_detect_info);
-    if (ret > 0) {
-        ALOGE("%s: Failed to get system info, ret %d", __func__, ret);
-    }
-    ALOGD("%s: num_modems %d\n", __func__, mdm_detect_info.num_modems);
-
-    if (mdm_detect_info.num_modems > 0)
-        plat_data->csd = open_csd_client(plat_data->is_i2s_ext_modem);
-}
-
 static bool platform_is_i2s_ext_modem(const char *snd_card_name,
                                       struct platform_data *plat_data)
 {
@@ -665,6 +644,8 @@
 
 void *platform_init(struct audio_device *adev)
 {
+    char platform[PROPERTY_VALUE_MAX];
+    char baseband[PROPERTY_VALUE_MAX];
     char value[PROPERTY_VALUE_MAX];
     struct platform_data *my_data = NULL;
     int retry_num = 0, snd_card_num = 0;
@@ -829,8 +810,18 @@
     else
         platform_info_init(PLATFORM_INFO_XML_PATH);
 
-    /* load csd client */
-    platform_csd_init(my_data);
+    /* If platform is apq8084 and baseband is MDM, load CSD Client specific
+     * symbols. Voice call is handled by MDM and apps processor talks to
+     * MDM through CSD Client
+     */
+    property_get("ro.board.platform", platform, "");
+    property_get("ro.baseband", baseband, "");
+    if (!strncmp("apq8084", platform, sizeof("apq8084")) &&
+        !strncmp("mdm", baseband, (sizeof("mdm")-1))) {
+         my_data->csd = open_csd_client(my_data->is_i2s_ext_modem);
+    } else {
+         my_data->csd = NULL;
+    }
 
     /* init usb */
     audio_extn_usb_init(adev);