微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt6735 电话接通状态下,关机铃声无法从外放输出

mt6735 电话接通状态下,关机铃声无法从外放输出

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
1.手机接通电话,切换到听筒模式进行通话;
2.此时直接关机,听不到关机铃声的声音;
3.仔细查看,实际上关机铃声是从听筒输出,而没有从外放中输出。
[SOLUTION]
AudiomtkPolicyManager.cpp的startOutput方法中,将在newDevic获取到的后面添加:
if(stream==AudioSystem::BOOT)newDevice|=AUDIO_DEVICE_OUT_SPEAKER;
status_t AudioMTKPolicyManager::startOutput(audio_io_handle_t output,
AudioSystem::stream_type stream,
int session)
{
ALOGD("startOutput() output %d, stream %d, session %d", output, stream, session);
......
if (outputDesc->mRefCount[stream] == 1) {
audio_devices_t newDevice = getNewDevice(output, false /*fROMCache*/);
routing_strategy strategy = getStrategy(stream);
bool shouldWait = (strategy == STRATEGY_SONIFICATION) ||
(strategy == STRATEGY_SONIFICATION_RESPECTFUL);
uint32_t waitMs = 0;
bool force = false;
if(stream==AudioSystem::BOOT) newDevice|=AUDIO_DEVICE_OUT_SPEAKER;
for (size_t i = 0; i < mOutputs.size(); i++) {
AudioOutputDescriptor *desc = mOutputs.valueAt(i);
if (desc != outputDesc) {
// force a device change if any other output is managed by the same hw
// module and has a current device selection that differs from selected device.
// In this case, the audio HAL must receive the new device selection so that it can
// change the device currently selected by the other active output.
if (outputDesc->sharesHwModuleWith(desc) &&
desc->device() != newDevice) {
force = true;
}
// wait for audio on other active outputs to be presented when starting
// a notification so that audio focus effect can propagate.
uint32_t latency = desc->latency();
if (shouldWait && desc->isActive(latency * 2) && (waitMs < latency)) {
waitMs = latency;
}
}
}
......
}
return NO_ERROR;
}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top