hal: avoid stopping VoIP mistakenly when VoIP standby

When VoIP standby, VoIP usecase and TX device both are
disabled mistakenly. Then VoIP RX would maintain active
even if VoIP call disconnect. Because VoIP output still is
active, subsequent VoIP call cannot set up again.

Fix by avoid calling stop_input_stream() for compress voip
from in_standby().

CRs-Fixed: 2104812
Change-Id: I319da17f4f4e706f4aae240e6edb2539ac5cbad0
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 4b04f0b..7154141 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4501,6 +4501,7 @@
         pthread_mutex_lock(&adev->lock);
         in->standby = true;
         if (in->usecase == USECASE_COMPRESS_VOIP_CALL) {
+            do_stop = false;
             voice_extn_compress_voip_close_input_stream(stream);
             ALOGD("VOIP input entered standby");
         } else if (in->usecase == USECASE_AUDIO_RECORD_MMAP) {
@@ -4509,20 +4510,15 @@
         } else {
             if (audio_extn_cin_attached_usecase(in->usecase))
                 audio_extn_cin_stop_input_stream(in);
+        }
+
+        if (do_stop) {
             if (in->pcm) {
                 pcm_close(in->pcm);
                 in->pcm = NULL;
             }
             status = stop_input_stream(in);
         }
-        if (in->pcm) {
-            pcm_close(in->pcm);
-            in->pcm = NULL;
-        }
-
-        if (do_stop) {
-            status = stop_input_stream(in);
-        }
         pthread_mutex_unlock(&adev->lock);
     }
     pthread_mutex_unlock(&in->lock);