Android系統(tǒng)在VOICE_COMMUNICATION模式下視頻通話,如主板沒有語音通話模塊关炼,只有麥克風(fēng)昆淡。這個(gè)時(shí)候app調(diào)用視頻通話 對(duì)方接受不到聲音。需要做如下修改:
--- a/frameworks/av/services/audiopolicy/enginedefault/src/Engine.cpp
+++ b/frameworks/av/services/audiopolicy/enginedefault/src/Engine.cpp
// 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) &&
(availableOutputDevices.types() & AUDIO_DEVICE_OUT_TELEPHONY_TX) == 0) {
sp<AudioOutputDescriptor> primaryOutput = outputs.getPrimaryOutput();
availableDeviceTypes =
- availableInputDevices.getDevicesFromHwModule(primaryOutput->getModuleHandle())
- & ~AUDIO_DEVICE_BIT_IN;
+ availableInputDevices.getDevicesFromHwModule(primaryOutput->getModuleHandle());
}
switch (mForceUse[AUDIO_POLICY_FORCE_FOR_COMMUNICATION]) {