hal: avoid usage of extern functions and tables

If there is any difference in the signature of a function declared
as extern, it will not be reported by the compiler and may result
in unexpected results when executed.
All the API functions should be declared in a header file.

Change-Id: I89662e23da8118c3a9eac728b389498ed52e19c2
diff --git a/hal/voice.c b/hal/voice.c
index 33e0d2c..0e94c35 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -41,8 +41,6 @@
     .format = PCM_FORMAT_S16_LE,
 };
 
-extern const char * const use_case_table[AUDIO_USECASE_MAX];
-
 static struct voice_session *voice_get_session_from_use_case(struct audio_device *adev,
                               audio_usecase_t usecase_id)
 {
@@ -57,7 +55,7 @@
     return session;
 }
 
-int stop_call(struct audio_device *adev, audio_usecase_t usecase_id)
+int voice_stop_usecase(struct audio_device *adev, audio_usecase_t usecase_id)
 {
     int i, ret = 0;
     struct audio_usecase *uc_info;
@@ -108,7 +106,7 @@
     return ret;
 }
 
-int start_call(struct audio_device *adev, audio_usecase_t usecase_id)
+int voice_start_usecase(struct audio_device *adev, audio_usecase_t usecase_id)
 {
     int i, ret = 0;
     struct audio_usecase *uc_info;
@@ -195,7 +193,7 @@
     goto done;
 
 error_start_voice:
-    stop_call(adev, usecase_id);
+    voice_stop_usecase(adev, usecase_id);
 
 done:
     ALOGD("%s: exit: status(%d)", __func__, ret);
@@ -372,7 +370,7 @@
 
     ret = voice_extn_start_call(adev);
     if (ret == -ENOSYS) {
-        ret = start_call(adev, USECASE_VOICE_CALL);
+        ret = voice_start_usecase(adev, USECASE_VOICE_CALL);
     }
     adev->voice.in_call = true;
 
@@ -386,7 +384,7 @@
     adev->voice.in_call = false;
     ret = voice_extn_stop_call(adev);
     if (ret == -ENOSYS) {
-        ret = stop_call(adev, USECASE_VOICE_CALL);
+        ret = voice_stop_usecase(adev, USECASE_VOICE_CALL);
     }
 
     return ret;