mt6735 voip通话下,当receiver模式时设置从主mic录音,speaker模...
时间:10-02
整理:3721RD
点击:
[Audio Common]voip通话下,当receiver模式时设置从主MIC录音,speaker模式时设置从副mic录音,再切到receiver时,还是副mic录音
[DESCRIPTION]
VOIP通话下,当receiver模式时设置从主mic录音,speaker模式时设置从副mic录音,再切到
receiver时,还是副mic录音
[SOLUTION]
原因:VOIP下,如果有开USE_REFMIC_IN_LOUDSPK,则从听筒切到免提后,会使用副mic,而再从免
提切到听筒时,却没有将mic设回主mic
修改方法:
在AudioALSAStreamIn.cpp
status_t AudioALSAStreamIn::updateOutputDeviceInfoForInputStream(audio_devices_t
output_devices)
{
...
if (output_devices != mStreamAttributeTarget.output_devices)
{
//only need to modify the input device under VoIP
if (mStreamAttributeTarget.BesRecord_Info.besrecord_voip_enable == true)
{
if (output_devices == AUDIO_DEVICE_OUT_SPEAKER)
//这里只针对Speaker做处理,如果切回到听筒,没有把mic切回来的动作
{
if (inputdevice == AUDIO_DEVICE_IN_BUILTIN_MIC)
{
if (USE_REFMIC_IN_LOUDSPK == 1)
{
inputdevice = AUDIO_DEVICE_IN_BACK_MIC;
ALOGD("%s(), force using back mic", __FUNCTION__);
}
}
}
if (output_devices == AUDIO_DEVICE_OUT_EARPIECE)
//如果切回到听筒,把mic切回到主mic
{
inputdevice = AUDIO_DEVICE_IN_ BUILTIN _MIC;
ALOGD("%s(),using main mic", __FUNCTION__);
}
}
...
}
[DESCRIPTION]
VOIP通话下,当receiver模式时设置从主mic录音,speaker模式时设置从副mic录音,再切到
receiver时,还是副mic录音
[SOLUTION]
原因:VOIP下,如果有开USE_REFMIC_IN_LOUDSPK,则从听筒切到免提后,会使用副mic,而再从免
提切到听筒时,却没有将mic设回主mic
修改方法:
在AudioALSAStreamIn.cpp
status_t AudioALSAStreamIn::updateOutputDeviceInfoForInputStream(audio_devices_t
output_devices)
{
...
if (output_devices != mStreamAttributeTarget.output_devices)
{
//only need to modify the input device under VoIP
if (mStreamAttributeTarget.BesRecord_Info.besrecord_voip_enable == true)
{
if (output_devices == AUDIO_DEVICE_OUT_SPEAKER)
//这里只针对Speaker做处理,如果切回到听筒,没有把mic切回来的动作
{
if (inputdevice == AUDIO_DEVICE_IN_BUILTIN_MIC)
{
if (USE_REFMIC_IN_LOUDSPK == 1)
{
inputdevice = AUDIO_DEVICE_IN_BACK_MIC;
ALOGD("%s(), force using back mic", __FUNCTION__);
}
}
}
if (output_devices == AUDIO_DEVICE_OUT_EARPIECE)
//如果切回到听筒,把mic切回到主mic
{
inputdevice = AUDIO_DEVICE_IN_ BUILTIN _MIC;
ALOGD("%s(),using main mic", __FUNCTION__);
}
}
...
}