hal: HFP device id change due to reorder of dai link in kernel

- Front end Dai link for HFP was moved to group with all the
Front End Dai in kernel. Hence the device id would change.

Also cleanup of the code to match up other implementations

Change-Id: I0b5444190ddb8610c234a9608d53c3e845d86fd5
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*/