微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt6735 ALSA中外置2in1 speaker

mt6735 ALSA中外置2in1 speaker

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
在现有PMIC H/W设计,仅能在AU_SPK后外接2in1 speaker;S/W需要作出对应调整(ALSA)
[SOLUTION]
1.projectconfig.mk文件中mtk_2IN1_SPK_SUPPORT=yes
2.Audio_custom_exp.h 文件中进行注释//#define USING_EXTAMP_HP

3.alps/device/mediatek/$platform/audio_device.xml
//添加如下,注意内部顺序
23 <!-- 2-in-1 speaker output-->
24 <path name="two_in_one_speaker_output" value="turnon">
25 <kctl name="Audio_Speaker_class_Switch" value="RECEIVER" />
26 <kctl name="Speaker_Amp_Switch" value="On" />
27 </path>
28 <path name="two_in_one_speaker_output" value="turnoff">
29 <kctl name="Speaker_Amp_Switch" value="Off" />
30 <kctl name="Audio_Speaker_class_Switch" value="CLASSAB" />
31 </path>
//添加如上,注意内部顺序

4.status_t AudioALSAHardwareResourceManagerpenReceiverPath(const uint32_t SampleRate)
{
//添加如下
if (IsAudioSupportFeature(AUDIO_SUPPORT_2IN1_SPEAKER))
{
mDeviceConfigManager->ApplyDeviceTurnonSequenceByName(AUDIO_DEVICE_2IN1_SPEAKER);
}
else
//添加如上
{
mDeviceConfigManager->ApplyDeviceTurnonSequenceByName(AUDIO_DEVICE_RECEIVER);
}
return NO_ERROR;
}

5.status_t AudioALSAHardwareResourceManager::CloseReceiverPath()
{
ALOGD("%s(), AUDIO_DEVICE_OUT_EARPIECE", __FUNCTION__);
//添加如下
if (IsAudioSupportFeature(AUDIO_SUPPORT_2IN1_SPEAKER))
{
mDeviceConfigManager->ApplyDeviceTurnoffSequenceByName(AUDIO_DEVICE_2IN1_SPEAKER);
}
else
//添加如上
{
mDeviceConfigManager->ApplyDeviceTurnoffSequenceByName(AUDIO_DEVICE_RECEIVER);
}
return NO_ERROR;
}

6.status_t AudioALSAVolumeController::setVoiceVolume(float v, audio_mode_t mode,
uint32_t device)

if (device & AUDIO_DEVICE_OUT_EARPIECE)

if (IsAudioSupportFeature(AUDIO_SUPPORT_2IN1_SPEAKER))
{
ApplyMdDlGain(DigitalgradeDb);
ApplyMdDlEhn1Gain(Enh1degradeDb);
//修改如下
#ifndef EXT_SPK_SUPPORT
Set2IN1InternalSpkGain(degradeDb);
#else
Set2IN1ExternalSpkGain(degradeDb);
#endif
//修改如上
}

7.int AudioALSAVolumeController::ApplyAudioGainTuning(int Gain, uint32_t mode, uint32_t
device)

case Audio_Earpiece:

if (IsAudioSupportFeature(AUDIO_SUPPORT_2IN1_SPEAKER))
{
//修改如下
#ifndef EXT_SPK_SUPPORT
Set2IN1InternalSpkGain(degradeDb);
#else
Set2IN1ExternalSpkGain(degradeDb);
#endif
//修改如上
}

你们开发手机产品跟mtk怎么合作的?能介绍一下吗?

这个期待高手解答

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

网站地图

Top