mt6735 [Speaker Customization]添加外置PA等Speaker客制化问题整理
来源:互联网 发布:怪物猎人2g数据库 编辑:程序博客网 时间:2024/05/29 18:06
[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.
********************************************************************/
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的音质有所
对于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.
********************************************************************/
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
阅读全文
0 0
- mt6735 [Speaker Customization]添加外置PA等Speaker客制化问题整理
- mt6735 [Audio Common]ALSA中外置2in1 speaker
- mt6735 [Audio Common] speaker播第一下触摸提示音时有时无声
- Toastmaster--Icebreaker--Best speaker
- Linux speaker beep
- Speaker、Receiver 基础知识
- Speaker Testing and Analysis
- Speaker Recognition Evaluation 2012
- Speaker Recognition | NIST
- Dolby Virtual Speaker是什么
- android主机强制设置speaker为usb speaker
- BEA广州UserGroup招募Speaker
- Constrained MLLR for Speaker Recognition
- modac HP or Speaker记录
- Linux控制台禁用PC-speaker
- android 关闭和打开Speaker
- 打开关闭android的speaker
- 演示分享网站Speaker Deck
- 饼状统计图
- 创建者模式之工厂方法模式
- saltstack 问题:DNS lookup of 'salt' failed.已解决
- angula的增删改除
- Excel宏——升级说明整理
- mt6735 [Speaker Customization]添加外置PA等Speaker客制化问题整理
- NameNode之DataNode管理
- centos6 安装配置dubbo
- java如何读取txt文本数据并以数组形式一行一行取值
- div圆角,阴影效果。
- IONIC2-查看IONIC2自带的icons图标
- UE4蓝图节点翻译---Get Owner
- yum (download)rpm(force)
- unity属性面板值的显示和隐藏