Merge "hal: Support for multi-channel      for AFE_PROXY"
diff --git a/hal/audio_extn/hfp.c b/hal/audio_extn/hfp.c
index 73824bd..e0bdc52 100644
--- a/hal/audio_extn/hfp.c
+++ b/hal/audio_extn/hfp.c
@@ -43,10 +43,10 @@
 #ifdef HFP_ENABLED
 #define AUDIO_PARAMETER_HFP_ENABLE      "hfp_enable"
 
-static int32_t audio_extn_start_hfp(struct audio_device *adev,
+static int32_t start_hfp(struct audio_device *adev,
                                struct str_parms *parms);
 
-static int32_t audio_extn_stop_hfp(struct audio_device *adev);
+static int32_t stop_hfp(struct audio_device *adev);
 
 struct hfp_module {
     struct pcm *hfp_sco_rx;
@@ -76,22 +76,7 @@
     .avail_min = 0,
 };
 
-void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *parms)
-{
-    int ret;
-    char value[32]={0};
-
-    ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_ENABLE, value,
-                            sizeof(value));
-    if (ret >= 0) {
-           if(!strncmp(value,"true",sizeof(value)))
-               ret = audio_extn_start_hfp(adev,parms);
-           else
-               audio_extn_stop_hfp(adev);
-    }
-}
-
-static int32_t audio_extn_start_hfp(struct audio_device *adev,
+static int32_t start_hfp(struct audio_device *adev,
                                struct str_parms *parms)
 {
     int32_t i, ret = 0;
@@ -177,12 +162,12 @@
     return 0;
 
 exit:
-    audio_extn_stop_hfp(adev);
+    stop_hfp(adev);
     ALOGE("%s: Problem in HFP start: status(%d)", __func__, ret);
     return ret;
 }
 
-static int32_t audio_extn_stop_hfp(struct audio_device *adev)
+static int32_t stop_hfp(struct audio_device *adev)
 {
     int32_t i, ret = 0;
     struct audio_usecase *uc_info;
@@ -228,4 +213,19 @@
     ALOGD("%s: exit: status(%d)", __func__, ret);
     return ret;
 }
+
+void audio_extn_hfp_set_parameters(struct audio_device *adev, struct str_parms *parms)
+{
+    int ret;
+    char value[32]={0};
+
+    ret = str_parms_get_str(parms, AUDIO_PARAMETER_HFP_ENABLE, value,
+                            sizeof(value));
+    if (ret >= 0) {
+           if(!strncmp(value,"true",sizeof(value)))
+               ret = start_hfp(adev,parms);
+           else
+               stop_hfp(adev);
+    }
+}
 #endif /*HFP_ENABLED*/
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 8518c7d..bac7fc3 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -171,8 +171,8 @@
 #define FM_PLAYBACK_PCM_DEVICE 5
 #define FM_CAPTURE_PCM_DEVICE  6
 #define HFP_PCM_RX 5
-#define HFP_SCO_RX 35
-#define HFP_ASM_RX_TX 36
+#define HFP_SCO_RX 22
+#define HFP_ASM_RX_TX 23
 
 #define INCALL_MUSIC_UPLINK_PCM_DEVICE 1
 #define INCALL_MUSIC_UPLINK2_PCM_DEVICE 16