hal: fix Rx path mute issue during incall recording

When MULTI_VOICE_SESSIONS feature flag is not enabled, the state of
incall recording stream is returned incorrectly. Fix the issue by
moving the corresponding piece of code from voice_extn.c to voice.c.

Change-Id: Id350bad65d12a4f165e80ee11cda3a8f342d38ee
diff --git a/hal/voice.c b/hal/voice.c
index 53e3033..964b6f6 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -221,11 +221,11 @@
 bool voice_is_in_call_rec_stream(struct stream_in *in)
 {
     bool in_call_rec = false;
-    int ret = 0;
 
-    ret = voice_extn_is_in_call_rec_stream(in, &in_call_rec);
-    if (ret == -ENOSYS) {
-        in_call_rec = false;
+    if(in->source == AUDIO_SOURCE_VOICE_DOWNLINK ||
+       in->source == AUDIO_SOURCE_VOICE_UPLINK ||
+       in->source == AUDIO_SOURCE_VOICE_CALL) {
+       in_call_rec = true;
     }
 
     return in_call_rec;
diff --git a/hal/voice_extn/voice_extn.c b/hal/voice_extn/voice_extn.c
index e5b979f..00068fe 100644
--- a/hal/voice_extn/voice_extn.c
+++ b/hal/voice_extn/voice_extn.c
@@ -339,19 +339,6 @@
     return 0;
 }
 
-int voice_extn_is_in_call_rec_stream(struct stream_in *in, bool *in_call_rec)
-{
-    *in_call_rec = false;
-
-    if(in->source == AUDIO_SOURCE_VOICE_DOWNLINK ||
-       in->source == AUDIO_SOURCE_VOICE_UPLINK ||
-       in->source == AUDIO_SOURCE_VOICE_CALL) {
-       *in_call_rec = true;
-    }
-
-    return 0;
-}
-
 void voice_extn_init(struct audio_device *adev)
 {
     adev->voice.session[VOICE_SESS_IDX].vsid =  VOICE_VSID;
diff --git a/hal/voice_extn/voice_extn.h b/hal/voice_extn/voice_extn.h
index 15e5248..4a04adb 100644
--- a/hal/voice_extn/voice_extn.h
+++ b/hal/voice_extn/voice_extn.h
@@ -32,7 +32,6 @@
 void voice_extn_get_parameters(const struct audio_device *adev,
                                struct str_parms *query,
                                struct str_parms *reply);
-int voice_extn_is_in_call_rec_stream(struct stream_in *in, bool *in_call_rec);
 int voice_extn_is_call_state_active(struct audio_device *adev,
                                     bool *is_call_active);
 int voice_extn_get_active_session_id(struct audio_device *adev,
@@ -83,11 +82,6 @@
     return -ENOSYS;
 }
 
-static int voice_extn_is_in_call_rec_stream(struct stream_in *in __unused, bool *in_call_rec __unused)
-{
-    return -ENOSYS;
-}
-
 static int voice_extn_get_active_session_id(struct audio_device *adev __unused,
                                             uint32_t *session_id __unused)
 {