am 5062ccee: alsa_sound: change input device for communication
* commit '5062ccee15e0b9fafb9c1d3edf6ebee3f1b26a96':
alsa_sound: change input device for communication
diff --git a/alsa_sound/alsa_default.cpp b/alsa_sound/alsa_default.cpp
index 40d575c..316921d 100644
--- a/alsa_sound/alsa_default.cpp
+++ b/alsa_sound/alsa_default.cpp
@@ -409,6 +409,11 @@
} else if (devices & AudioSystem::DEVICE_IN_BUILTIN_MIC) {
if (mode == AudioSystem::MODE_IN_CALL) {
devices |= AudioSystem::DEVICE_OUT_EARPIECE;
+ } else if (mode == AudioSystem::MODE_IN_COMMUNICATION) {
+ if (!strncmp(curRxUCMDevice, SND_USE_CASE_DEV_SPEAKER, MAX_LEN(curRxUCMDevice, SND_USE_CASE_DEV_SPEAKER))) {
+ devices &= ~AudioSystem::DEVICE_IN_BUILTIN_MIC;
+ devices |= AudioSystem::DEVICE_IN_BACK_MIC;
+ }
}
} else if (devices & AudioSystem::DEVICE_OUT_EARPIECE) {
devices = devices | AudioSystem::DEVICE_IN_BUILTIN_MIC;