audio: Fix incall device switch handling
authorChristopher N. Hesse <raymanfx@gmail.com>
Fri, 17 Nov 2017 19:27:50 +0000 (20:27 +0100)
committerChristopher N. Hesse <raymanfx@gmail.com>
Tue, 21 Nov 2017 20:23:33 +0000 (20:23 +0000)
The whole code block was no-op, since we would override
(in|out)_snd_device at a later point anyways.

Change-Id: Ieb2b0918c9c72f18d195d6b34b5c9768fce130b3

audio/audio_hw.c

index cc9e622b353f9b9b717f51cc5459cd113ce8e403..0f8a2a6fd556375b2cb4d77b593a1dd97698d450 100644 (file)
@@ -1060,8 +1060,11 @@ static int select_devices(struct audio_device *adev,
         if (vc_usecase == NULL) {
             ALOGE("%s: Could not find the voice call usecase", __func__);
         } else {
-            in_snd_device = vc_usecase->in_snd_device;
-            out_snd_device = vc_usecase->out_snd_device;
+            ALOGV("%s: in call, reusing devices (rx: %s, tx: %s)", __func__,
+                  get_snd_device_display_name(vc_usecase->out_snd_device),
+                  get_snd_device_display_name(vc_usecase->in_snd_device));
+            usecase->devices = vc_usecase->devices;
+            return 0;
         }
     }