微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt6735 工厂测试模式下如果调整音量

mt6735 工厂测试模式下如果调整音量

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
Factory Mode下测试音量不够大,如何调大音量
[SOLUTION]
1,Loopback的MIC音量调节:
In AudioLoopbackController.cpp
status_t AudioLoopbackController::OpenAudioLoopbackControlFlow(const audio_devices_t input_device, const
audio_devices_t output_device)
{
...
if (output_device == AUDIO_DEVICE_OUT_SPEAKER) {
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_MICAMPL,
kPreAmpGainMapValue[PREAMP_GAIN_2_DB]); //这里改为PREAMP_GAIN_32_DB
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_MICAMPR,
kPreAmpGainMapValue[PREAMP_GAIN_2_DB]);//这里改为PREAMP_GAIN_32_DB
}
else {
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_MICAMPL,
kPreAmpGainMapValue[PREAMP_GAIN_20_DB]);//这里改为PREAMP_GAIN_32_DB
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_MICAMPR,
kPreAmpGainMapValue[PREAMP_GAIN_20_DB]);//这里改为PREAMP_GAIN_32_DB
}
...
}

2,Loopback的Downlink Volume调节:
AudioLoopbackController.cpp中定义下面这个宏
// for use max gain for audio loopback
#define AUDIO_LOOPBACK_USE_MAX_GAIN
如果还是觉得音量低,可以直接去修改其他相关寄存器..例如直接去写SPK_CON9来提高SPK音量...

3,WAV Playback的音量调节:
Audio_Wave_Playabck_thread
看"AudiomtkVolumeController setMasterVolume v = %f mode = %d devices = 0x%x这条log v已经为1.0,volume已经最大...
Audio_Receiver_Playabck_thread:
In AudioFtm.cpp
void AudioFtm::Audio_Set_Earpiece_On()
{
ALOGD("Audio_Set_Earpiece_On Channel\n");
mAudioAnalogInstance->AnalogOpen(AudioAnalogType:EVICE_OUT_EARPIECER,
AudioAnalogType::DEVICE_PLATFORM_MACHINE);
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_HSOUTR,
OutputGainMap[FTM_OUTPUTGAIN_3]);//这里改为FTM_OUTPUTGAIN_5是最大
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_HSOUTL,
OutputGainMap[FTM_OUTPUTGAIN_3]);//这里改为FTM_OUTPUTGAIN_5是最大
}
void AudioFtm::Audio_Set_Speaker_On(int Channel)
{
ALOGD("Audio_Set_Speaker_On Channel = %d\n", Channel);
mAudioAnalogInstance->AnalogOpen(AudioAnalogType::DEVICE_OUT_SPEAKERR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE);
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_SPKL, OutputGainMap[FTM_OUTPUTGAIN_3]);//这
里改为FTM_OUTPUTGAIN_5是最大
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_SPKR, OutputGainMap[FTM_OUTPUTGAIN_3]);//这
里改为FTM_OUTPUTGAIN_5是最大
}
void AudioFtm::Audio_Set_HeadPhone_On(int Channel)
{
ALOGD("Audio_Set_HeadPhone_On Channel = %d\n", Channel);
mAudioAnalogInstance->AnalogOpen(AudioAnalogType::DEVICE_OUT_HEADSETR,
AudioAnalogType::DEVICE_PLATFORM_MACHINE);
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_HPOUTR,
OutputGainMap[FTM_OUTPUTGAIN_3]);//这里改为FTM_OUTPUTGAIN_5是最大
mAudioAnalogInstance->SetAnalogGain(AudioAnalogType::VOLUME_HPOUTL,
OutputGainMap[FTM_OUTPUTGAIN_3]);//这里改为FTM_OUTPUTGAIN_5是最大
}

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

网站地图

Top