summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
diff options
context:
space:
mode:
authorPavan Chikkala <pavanc@codeaurora.org>2015-01-09 11:41:50 +0530
committerSteve Kondik <shade@chemlab.org>2015-11-07 13:31:31 -0800
commit710a109d4a7d8b90d15f3f33ba02ccb7b3ed9674 (patch)
tree66fda99ad09c16cd0c587c1c5fec04590e5bf038 /services/audiopolicy
parent272c29b8b7ed2f3dc40ef2367224852b0d87434a (diff)
downloadframeworks_av-710a109d4a7d8b90d15f3f33ba02ccb7b3ed9674.zip
frameworks_av-710a109d4a7d8b90d15f3f33ba02ccb7b3ed9674.tar.gz
frameworks_av-710a109d4a7d8b90d15f3f33ba02ccb7b3ed9674.tar.bz2
audiopolicy: Add DEVICE_IN_COMMUNICATION for VOIP
- On A family, Only DEVICE_IN_COMMUNICATION is supported by voip_tx profile. getDeviceForInputSource should always return DEVICE_IN_COMMUNICATION to load voip_tx profile Change-Id: I3bb2fb70a89eadc35c2ced0c7f717ec15120bfe7
Diffstat (limited to 'services/audiopolicy')
-rwxr-xr-xservices/audiopolicy/enginedefault/src/Engine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp
index 8b4a085..4a42a47 100755
--- a/services/audiopolicy/enginedefault/src/Engine.cpp
+++ b/services/audiopolicy/enginedefault/src/Engine.cpp
@@ -647,6 +647,9 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons
break;
case AUDIO_SOURCE_VOICE_COMMUNICATION:
+#ifdef LEGACY_ALSA_AUDIO
+ device = AUDIO_DEVICE_IN_COMMUNICATION;
+#else
// Allow only use of devices on primary input if in call and HAL does not support routing
// to voice call path.
if ((getPhoneState() == AUDIO_MODE_IN_CALL) &&
@@ -684,6 +687,7 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons
}
break;
}
+#endif
break;
case AUDIO_SOURCE_VOICE_RECOGNITION: