mt6735 [Speaker Customization]添加外置PA等Speaker客制化问题整理
2017-11-22 09:56
811 查看
[DESCRIPTION] 对于MT6589、MT6572、MT6582的Speaker的客制化需求部分的一些整理。 一些可能的配置请参考下面的表格,Solution请根据序号参考对应的Solution. 外置PA的驱动,请参考如下方式完成:也可参考 [FAQ05881] [Audio Driver] 6589、6572、6582喇叭无声,软件上应该如何配置 把CUSTOM_KERNEL_SOUND配置为相应PA驱动的文件夹名,然后实做具体的PA驱动。 例子:使用yad的外部PA,则CUSTOM_KERNEL_SOUND = amp_yad,然后实做\alps\mediatek\custom\common\kernel\sound\ amp_yad\yusu_android_speaker.c 注解:Yes:表示Speaker连接的位置;No:表示与Speaker无关;NC表示不接任何设备; Not Support:表示此种配置无法达到预期效果; 2in1 Speaker: 指的是Speaker+Receiver. [SOLUTION] #1.Compile Option设定: mtk_2IN1_SPK_SUPPORT= no Audio_custom_exp.h (mediatek\custom\[$projectname]\hal\audioflinger\audio) //#define USING_EXTAMP_HP Audio_Customization_Common.h(alps\mediatek\custom\common\hal\audioflinger) //#define ENABLE_STEREO_SPEAKER -------------------------------------------------------------------------------- #2.Compile Option设定: MTK_2IN1_SPK_SUPPORT= no Audio_custom_exp.h (mediatek\custom\[$projectname]\hal\audioflinger\audio) #define USING_EXTAMP_HP Audio_Customization_Common.h(alps\mediatek\custom\common\hal\audioflinger) //#define ENABLE_STEREO_SPEAKER -------------------------------------------------------------------------------- #3.Compile Option设定: MTK_2IN1_SPK_SUPPORT= yes Audio_custom_exp.h (mediatek\custom\[$projectname]\hal\audioflinger\audio) //#define USING_EXTAMP_HP Audio_Customization_Common.h(alps\mediatek\custom\common\hal\audioflinger) //#define ENABLE_STEREO_SPEAKER -------------------------------------------------------------------------------- #4.Compile Option设定: MTK_2IN1_SPK_SUPPORT= no Audio_custom_exp.h (mediatek\custom\[$projectname]\hal\audioflinger\audio) #define USING_EXTAMP_HP Audio_Customization_Common.h(alps\mediatek\custom\common\hal\audioflinger) #define ENABLE_STEREO_SPEAKER -------------------------------------------------------------------------------- #5.Compile Option设定: MTK_2IN1_SPK_SUPPORT= no Audio_custom_exp.h (mediatek\custom\[$projectname]\hal\audioflinger\audio) //#define USING_EXTAMP_HP Audio_Customization_Common.h(alps\mediatek\custom\common\hal\audioflinger) 如果外置PA接在AU_HPL,那么 //#define ENABLE_STEREO_SPEAKER 如果外置PA接在 AU_HPR,那么 #define ENABLE_STEREO_SPEAKER 开启Audio Path所需的改动: AudioResourceManager.cpp(alps\mediatek\platform\[$chip]\hardware\audio\aud_drv) a.增加如下函数 //{@Special_PA /****************************************************************** **a function to reset DL device for using special dual amp:internal PA+ one external PA with AUD_HPL/R **mDlOutputDevice:Ori DL device; **DeviceCount:Ori DL device Count. ********************************************************************/ 4000 void CheckDLForSpDualAMP(unsigned int &mDlOutputDevice,uint32 &DeviceCount){ ALOGD("+Special_PA mDlOutputDevice(0x%x) DeviceCount = %d", mDlOutputDevice, DeviceCount); if((DeviceCount==1)&&(mDlOutputDevice&AUDIO_DEVICE_OUT_SPEAKER)){ mDlOutputDevice |= AUDIO_DEVICE_OUT_WIRED_HEADSET; DeviceCount = PopCount(mDlOutputDevice); } ALOGD("-Special_PA mDlOutputDevice(0x%x) DeviceCount = %d", mDlOutputDevice, DeviceCount); } //end Special_PA} b.在以下三处分别调用新增的函数 CheckDLForSpDualAMP status_t AudioResourceManager::TurnonAudioDevice(unsigned int mDlOutputDevice) { uint32 DeviceCount = PopCount(mDlOutputDevice); ALOGD("TurnonAudioDevice = 0x%x DeviceCount = %d", mDlOutputDevice, DeviceCount); //{@Special_PA CheckDLForSpDualAMP(mDlOutputDevice,DeviceCount); //} if (DeviceCount == 1) ...... } status_t AudioResourceManager::TurnonAudioDeviceIncall(unsigned int mDlOutputDevice) { SetMICInvserse(MMIcInverseSetting); uint32 DeviceCount = PopCount(mDlOutputDevice); ALOGD("TurnonAudioDevice = 0x%x DeviceCount = %d", mDlOutputDevice, DeviceCount); //{@Special_PA CheckDLForSpDualAMP(mDlOutputDevice,DeviceCount); //} if (DeviceCount == 1) ...... } status_t AudioResourceManager::TurnoffAudioDevice(unsigned int mDlOutputDevice) { uint32 DeviceCount = PopCount(mDlOutputDevice); ALOGD("TurnoffAudioDevice = 0x%x DeviceCount = %d", mDlOutputDevice, DeviceCount); //{@Special_PA CheckDLForSpDualAMP(mDlOutputDevice,DeviceCount); //} if (DeviceCount == 1) ...... } Speaker音量的tuning: 请参考FAQ08356『[Audio Volume]来电\闹钟\短信提示\铃声预览\拍照音等,在播放过程中插入或者拔出耳机,外放中 的铃声音异常』,参考其中调整 Headset_LouDSPeaker mode的方式来调整两个Speaker的音量。 -------------------------------------------------------------------------------- #6.只需要在#5的基础上,修改该Compile Option设定: MTK_2IN1_SPK_SUPPORT= yes 其它部分的改动以及音量调整方式与#5完全一样。 -------------------------------------------------------------------------------- PS:#5和#6中的双Speaker连接方式会导致两个Speaker的音质有所 差异,请三思而后行,切忌切忌。 MT6735相关资料参考地址:http://bbs.16rd.com/thread-454398-1-1.html |
相关文章推荐
- cactiEZ 添加PHP扩展模块mssql及相关设置问题整理
- mt6735 [Audio Common] VoiceUI常见客制化问题
- Framework 资源添加时问题整理
- Silverlight应用程序中添加WCF服务的问题(整理)
- 关于QTreeWidget控件添加复选框并客制化的问题
- mt6735 [Audio Common]ALSA中外置2in1 speaker
- 常见问题及解决办法 整理之7(添加远程服务器)
- 添加@Transactional ------spring boot中session中断的问题及其解决
- 添加新驱动模块到BSP里,并且在Catalog Item View里显示的方法整理
- 完美解决Android在listview添加checkbox实现单选多选操作问题
- JScrollPane控件中添加JPanel后滚动条显示问题
- 解决Android Listview添加ImageButton,ListView点击无响应的问题
- Xcode6后手动添加.pch文件,与其常遇到的问题
- android开发中ListView中添加ImageButton控件时,ListView失去焦点问题
- centos用户、组权限、添加删除用户问题总结
- ldap服务器搭建——问题整理
- easyui以及js前端开发常见问题、用法整理
- vs2008添加解决方案及项目几个问题
- Eclipse下开发QT4应用,看不见添加的控件的问题及其解决方法
- 解决 Genymotion无法添加虚拟手机设备问题