audio: fix audio mode transitions

Allow direct transition from IN_CALL to IN_COMMUNICATION
modes by exiting in call state when transitioning to NORMAL or
IN_COMMUNICATION modes instead of only when transitioning to NORMAL.

Bug: 17591576.
Change-Id: I2a915df0b283b311b8cbec0fa9cd8573f76d4686
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 7d5456f..c14078e 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1327,7 +1327,7 @@
          *       Because select_devices() must be called to switch back the music
          *       playback to headset.
          */
-        if ((adev->mode == AUDIO_MODE_NORMAL) &&
+        if (((adev->mode == AUDIO_MODE_NORMAL) || (adev->mode == AUDIO_MODE_IN_COMMUNICATION)) &&
                 voice_is_in_call(adev) &&
                 output_drives_call(adev, out)) {
             ret = voice_stop_call(adev);