微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt6735 6572平台FM外放模式下噪声很大;在耳机模式下则是正常的

mt6735 6572平台FM外放模式下噪声很大;在耳机模式下则是正常的

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
客户MT6572平台项目上报如下问题:
FM采用的是短天线的配置; 外放模式下噪声很大; 在耳机模式下则是正常的。
root cause : 外放模式采用 class D ,如果 Layout 不好, FM 短天线被 speaker 干扰到导致噪声
如果要切换到 AB 类功放则需要先关闭掉 PA ,然后才能切换到 AB 类功放,否则切换不过去
[SOLUTION]
Solution :在不改动 PCB 的情况下建议 FM 外放采用 Class AB
请check alps\mediatek\platform\mt6572\hardware\audio\aud_drv下面的AudioMachineDevice.cpp
主要是要在切换到功放AB之前先关闭掉PA。
需要添加mAudioAnalogReg->SetAnalogReg(SPK_CON0,0X3000,0xffff); // disable amp before switch to ClassAB
两处需要check位置如下:
status_t AudioMachineDevice::AnalogOpen(AudioAnalogType:EVICE_TYPE DeviceType)
case AudioAnalogType::DEVICE_OUT_SPEAKERR:
case AudioAnalogType::DEVICE_OUT_SPEAKERL:
#ifdef USING_EXTAMP_HP
mLock.unlock ();
AnalogOpen(AudioAnalogType::DEVICE_OUT_HEADSETR);
mLock.lock ();
#else
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON7, 0x2400, 0xffff); // Set voice buffer to smallest -22dB.
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON6, 0xB7F6, 0xffff); // enable input short of HP to prevent voice
signal leakage . Enable 2.4V.
// Depop. Enable audio clock
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON0, 0x7000, 0xf000); // enable clean 1.35VCM buffer in audioUL
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON4, 0x0014, 0xffff); // enable audio bias. enable LCH DAC
usleep(10 * 1000);
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON7, 0x35B0, 0xffff); // enable voice buffer and -1dB gain. Inter-
connect voice buffer to SPK AMP
mAudioAnalogReg->SetAnalogReg(TOP_CKPDN1_CLR, 0x000E, 0x000E); // Speaker clock
mAudioAnalogReg->SetAnalogReg(SPK_CON2, 0x0214, 0xffff); // enable classAB OC function
mAudioAnalogReg->SetAnalogReg(SPK_CON9,0x0400,0xffff); // Set Spk 6dB gain
mAudioAnalogReg->SetAnalogReg(SPK_CON0, 0x3008, 0xffff); // enable SPK-Amp with 0dB gain, enable SPK amp
offset triming, select class D mode
mAudioAnalogReg->SetAnalogReg(SPK_CON0, 0x3009, 0xffff); // Enable Class ABD
usleep(5 * 1000);
#ifdef USING_CLASSD_AMP
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3001,0xffff); // enable SPK AMP with 0dB gain, select Class D.
enable Amp.
#else
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3000,0xffff); // disable amp before switch to ClassAB
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3005,0xffff); // enable SPK AMP with 0dB gain, select Class AB.
enable Amp.
#endif
mAudioAnalogReg->SetAnalogReg(SPK_CON12,0x0A00,0xffff); // spk output stage enable and enable
#endif //USING_EXTAMP_HP
// tell kernel to open device
ioctl(mFd,SET_SPEAKER_ON,NULL);
break;
case AudioAnalogType::DEVICE_OUT_SPEAKER_HEADSET_R:
case AudioAnalogType::DEVICE_OUT_SPEAKER_HEADSET_L:
#ifdef USING_EXTAMP_HP
mLock.unlock ();
AnalogOpen(AudioAnalogType::DEVICE_OUT_HEADSETR);
mLock.lock ();
#else
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON6, 0xF7F2, 0xffff); // enable input short of HP to prevent voice
signal leakage . Enable 2.4V.
// Depop. Enable audio clock
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON0, 0x7000, 0xf000); // enable clean 1.35VCM buffer in audioUL
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON5, 0x0014, 0xffff); // set RCH/LCH buffer gain to smallest -5dB
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON4, 0x007C, 0xffff); // enable audio bias. enable audio DAC, HP
buffers
usleep(10 * 1000);
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON6, 0xF5BA, 0xffff); // HP pre-charge function release, disable
depop mux of HP drivers. Disable depop VCM gen.
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON5, 0x2214, 0xffff); // set RCH/LCH buffer gain to -1dB
mAudioAnalogReg->SetAnalogReg(AUDTOP_CON7, 0x35B0, 0xffff); // enable voice buffer and -1dB gain. Inter-
connect voice buffer to SPK AMP
mAudioAnalogReg->SetAnalogReg(TOP_CKPDN1_CLR, 0x000E, 0x000E); // Speaker clock
mAudioAnalogReg->SetAnalogReg(SPK_CON2, 0x0214, 0xffff); // enable classAB OC function
mAudioAnalogReg->SetAnalogReg(SPK_CON9, 0x0400, 0xffff); // disable fast VCM function, set PGA gain 6dB
mAudioAnalogReg->SetAnalogReg(SPK_CON0, 0x3008, 0xffff); // enable SPK-Amp with 0dB gain, enable SPK amp
offset triming, select class D mode
mAudioAnalogReg->SetAnalogReg(SPK_CON0, 0x3009, 0xffff); // Enable Class ABD
usleep(5 * 1000);
#ifdef USING_CLASSD_AMP
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3001,0xffff); // enable SPK AMP with 0dB gain, select Class D.
enable Amp.
#else
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3000,0xffff); // disable amp before switch to ClassAB
mAudioAnalogReg->SetAnalogReg(SPK_CON0,0x3005,0xffff); // enable SPK AMP with 0dB gain, select Class AB.
enable Amp.
#endif
mAudioAnalogReg->SetAnalogReg(SPK_CON12,0x0A00,0xffff); // spk output stage enable and enable spk amp
#endif
// tell kernel to open device
ioctl(mFd,SET_SPEAKER_ON,NULL);
ioctl(mFd,SET_HEADPHONE_ON,NULL);
break;
如果上述修改,测试有效。可以申请patch:alps00757913

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

网站地图

Top