Browse files

alsa_audio: route call voice to phone when on HDMI

Currently call voice is routed to HDMI rx/tx when HDMI cable is plugging.  So
call voice is muted.  MO/MT call voice routes to speaker/back-mic and
communication routes to HDMI rx/back-mic when HDMI cable is plugging.

Bug: 7218296
Change-Id: I53fc4d5b77ad6502a32c4e8d06e17141e2aa4be2
Signed-off-by: Iliyan Malchev <malchev@google.com>
  • Loading branch information...
1 parent 1af98a6 commit 9f99e382ef161dda2ff137ea8be80f26f150399e @hopemini hopemini committed with The Android Automerger Sep 28, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 alsa_sound/alsa_default.cpp
View
8 alsa_sound/alsa_default.cpp
@@ -399,8 +399,12 @@ void switchDevice(alsa_handle_t *handle, uint32_t devices, uint32_t mode)
AudioSystem::DEVICE_IN_BUILTIN_MIC);
#endif
} else if (devices & AudioSystem::DEVICE_OUT_AUX_DIGITAL) {
- devices = devices | (AudioSystem::DEVICE_OUT_AUX_DIGITAL |
- AudioSystem::DEVICE_IN_AUX_DIGITAL);
+ if (mode == AudioSystem::MODE_IN_CALL)
+ devices = devices | (AudioSystem::DEVICE_IN_BACK_MIC |
+ AudioSystem::DEVICE_OUT_SPEAKER);
+ else
+ devices = devices | (AudioSystem::DEVICE_OUT_AUX_DIGITAL |
+ AudioSystem::DEVICE_IN_BACK_MIC);
#ifdef QCOM_PROXY_DEVICE_ENABLED
} else if ((devices & AudioSystem::DEVICE_OUT_PROXY) ||
(devices & AudioSystem::DEVICE_IN_PROXY)) {

0 comments on commit 9f99e38

Please sign in to comment.