hal: start voip driver independent of voip output stream

- Voip driver requires voip output stream to be opened
to start itself. But it is possible that some applications
may use voip input and normal audio output. Code changes are
done to handle this scenario.
- It is possible that some applications may use different
sample rates for voip input and voip output streams. It is
handled now in such a way that, if the sample rate of the
secondly opening stream does not match with that of the
first one, the second stream will not be allowed to open
voice path for VoIP.

Change-Id: Id9d86181eeee2c4ea0aa49a723ca92c1961a559b
CRs-fixed: 601785
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 4fbf5c4..99cd2c9 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1895,11 +1895,10 @@
                 (voice_extn_compress_voip_is_format_supported(in->format)) &&
                 (in->config.rate == 8000 || in->config.rate == 16000) &&
                 (popcount(in->channel_mask) == 1)) {
-                ret = voice_extn_compress_voip_open_input_stream(in);
-                if (ret != 0) {
+                err = voice_extn_compress_voip_open_input_stream(in);
+                if (err != 0) {
                     ALOGE("%s: Compress voip input cannot be opened, error:%d",
-                          __func__, ret);
-                    goto done;
+                          __func__, err);
                 }
             }
         }