JB2 工厂模式FM没有声音
时间:10-02
整理:3721RD
点击:
MT6589+JB2,正常模式FM播放正常,工厂模式FM没有声音。
(1)将mediatek/factory/src/test/ftm_fm.c文件 fm_update_thread中大概540行mute = 1;代码修改 mute = 0;编译测试。
(2)如果修改(1)测试无效,
新增代码测试,带//new add 为新增代码总共4句
alps/mediatek/platform/mt6589/hardware/audio/aud_drv/AudioFtm.cpp
int AudioFtm::Audio_FM_I2S_Play(char bEnable)
{
AudioDigtalI2S mFmI2SOut;
if (bEnable == true) {
.
.
.
mAudioDigitalInstance->SetAfeEnable(true); //new add
mAudioAnalogInstance->AnalogOpen(AudioAnalogType:EVICE_OUT_HEADSETR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE); //new add
}
else {
mAudioAnalogInstance->AnalogClose(AudioAnalogType::DEVICE_OUT_HEADSETR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE); //new add
.
.
.
mAudioDigitalInstance->SetAfeEnable(false); //new add
// clock release
mAudioResourceManager->EnableAudioClock(AudioResourceManagerInterface::CLOCK_AUD_AFE,
false);
mAudioResourceManager->EnableAudioClock(AudioResourceManagerInterface::CLOCK_AUD_ANA,
false);
}
return true;
}
(1)将mediatek/factory/src/test/ftm_fm.c文件 fm_update_thread中大概540行mute = 1;代码修改 mute = 0;编译测试。
(2)如果修改(1)测试无效,
新增代码测试,带//new add 为新增代码总共4句
alps/mediatek/platform/mt6589/hardware/audio/aud_drv/AudioFtm.cpp
int AudioFtm::Audio_FM_I2S_Play(char bEnable)
{
AudioDigtalI2S mFmI2SOut;
if (bEnable == true) {
.
.
.
mAudioDigitalInstance->SetAfeEnable(true); //new add
mAudioAnalogInstance->AnalogOpen(AudioAnalogType:EVICE_OUT_HEADSETR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE); //new add
}
else {
mAudioAnalogInstance->AnalogClose(AudioAnalogType::DEVICE_OUT_HEADSETR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE); //new add
.
.
.
mAudioDigitalInstance->SetAfeEnable(false); //new add
// clock release
mAudioResourceManager->EnableAudioClock(AudioResourceManagerInterface::CLOCK_AUD_AFE,
false);
mAudioResourceManager->EnableAudioClock(AudioResourceManagerInterface::CLOCK_AUD_ANA,
false);
}
return true;
}
谢谢分享