hal: enable sidetone after voice call usecase routing

In voice call, during device switch from headset to handset
sidetone is enabled first and then routing. Due to which wsa881x
is configured before coming out of reset state and hence no
audio on speaker. Change the sequence to resolve this.

CRs-Fixed: 1054544
Change-Id: I763a9d9f3c6fba7e1bcdad365671de8ad5d21677
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 69d5cce..bce5cea 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1362,10 +1362,6 @@
                                                         out_snd_device,
                                                         in_snd_device);
         enable_audio_route_for_voice_usecases(adev, usecase);
-        /* Enable sidetone only if voice/voip call already exists */
-        if (voice_is_call_state_active(adev) ||
-            voice_extn_compress_voip_is_started(adev))
-            voice_set_sidetone(adev, out_snd_device, true);
     }
 
     usecase->in_snd_device = in_snd_device;
@@ -1386,6 +1382,13 @@
 
     enable_audio_route(adev, usecase);
 
+    if (usecase->type == VOICE_CALL || usecase->type == VOIP_CALL) {
+        /* Enable sidetone only if other voice/voip call already exists */
+        if (voice_is_call_state_active(adev) ||
+            voice_extn_compress_voip_is_started(adev))
+            voice_set_sidetone(adev, out_snd_device, true);
+    }
+
     /* Applicable only on the targets that has external modem.
      * Enable device command should be sent to modem only after
      * enabling voice call mixer controls