mtk6572 用内部功放,怎么把音频声音调节大些
status_t AudioMachineDevice::SetAmpGain(AudioAnalogType::VOLUME_TYPE volume_Type, int volume)
{
// this will base on hw spec, use 15dB for
uint32 index = 13;
// condition for gainb not mute
if(volume > 11){
volume = 11;
}
//const int HWgain[] = {-60,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
index -= volume;
if (index < 1) {
index= 1; // min to 0dB
}
ALOGD("jianghuiyan SetAmpGain volume_Type = %d volume = %d,index=%d",volume_Type,volume,index);
index = 15; //SPK 17dB jianghuiyan 20130528
if(volume_Type == AudioAnalogType::VOLUME_SPKL ||volume_Type == AudioAnalogType::VOLUME_SPKR)
{
mAudioAnalogReg->SetAnalogReg(SPK_CON9,index<<8,0x00000f00);
}
return NO_ERROR;
}
