MTK feature phone 音频参数配置

驱动调试中,音频效果的修改和射频修改是两个很重要的部分,针对音频驱动修改,部分修改DEMO如下:


1.aud_common_config.h文件,修改音频参数,由硬件部门提供:

#define DEFAULT_COMPENSATION_FLT_NORMAL 

#define DEFAULT_COMPENSATION_FLT_HEADSET 

#define DEFAULT_COMPENSATION_FLT_LOUDSPEAKER 


#define DEFAULT_BESLOUDNESS_GAINMAP_IN  \
{ -43, -38, -26, -5,  6}

#define DEFAULT_BESLOUDNESS_GAINMAP_OUT \
{   6,  14,  14,  1, -3}


2.nvram_default_audio.c 文件修改音频音量&等级参数,由硬件部门提供。


3.XX_gprs.mak文件修改midi库,库越大,音效越好(具体选择大小根据项目空间限制和音效要求决定):

WAVETABLE_VER = WT70K    ##WT20K


4.audcoeff.c文件修改:

const unsigned short Ext_op_on_delay   = 2;     /* count in frames, 1 frame = 4.615ms */

//modified extern audio PA switch off delay 5*4.615ms
const unsigned short Ext_op_off_delay  = 5;    //0;     /* count in frames, 1 frame = 4.615ms */   //Tiger.Liu 20120508 modified


const unsigned short   DG_DL_Speech    = 0x2027;    //0xE3D;//receiver downlink voice gain.//听筒下行声音增益
const unsigned short   DG_Microphone   = 0x1400;
const unsigned short   DG_DAF          = 32767;
const unsigned short   DG_MIDI         = 496;    //304;//midi 声音增益
const unsigned short   DG_IMY          = 3072;
const unsigned short   DG_IMY_NOTE     = 512;
const unsigned short   DG_SMF_NOTE     = 96;
const unsigned short   DG_JTS_NOTE     = 2048;


5.audcoeff_default.h修改:

/*BesBass Configuration*/
#define DEFAULT_BBAS_LOUDSPK_CUTOFF_FREQ               400    //500


/* The cutoff frequency of loudspeaker. Only 400, 500, 600, 700, 800 are allowed. */
#define DEFAULT_LOUDNESS_RINGTONE_MODE                 2   // for Ringtone 
#define DEFAULT_LOUDNESS_NON_RINGTONE_MODE             5   // for common audio playback


//speech para:

#define DEFAULT_SPEECH_NORMAL_MODE_PARA \
{ \
    96,  253, 16388,    31, 57351,    31,   400,     0, \
    80,  4325,   99,     0, 20488,     0,    0,   8192  \
}


#define DEFAULT_SPEECH_EARPHONE_MODE_PARA \
{ \
     0,   189, 10756,    31, 57351,    31,   400,     0, \
    80,  4325,    99,     0, 20488,     0,     0,     0  \
}


#define DEFAULT_SPEECH_BT_EARPHONE_MODE_PARA \
{ \
     0,   253, 10756,    31, 53255,    31,   400,     0, \
    80,  4325,    99,     0, 20488 | BT_COMP_FILTER,  0,     0, BT_SYNC_DELAY  \
}


#define DEFAULT_SPEECH_LOUDSPK_MODE_PARA \
{ \
    96,   224,  5256,    31, 57351, 24607,   400,   132, \
    80,  4325,    99,     0, 20488,     0,     0,     0  \
}


#define DEFAULT_SPEECH_CARKIT_MODE_PARA \
{ \
    96,   224,  5256,    31, 57351, 24607,   400,   132, \
    80,  4325,    99,     0, 20488,     0,     0,     0  \
}


6.文件AudCoeff.h 修改:

#define SPEECH_INPUT_FIR_COEFF_DEFAULT \
{ \
    SPEECH_INPUT_FIR_COEFF_NORMAL_DEFAULT, \
    SPEECH_INPUT_FIR_COEFF_HEADSET_DEFAULT, \
    SPEECH_INPUT_FIR_COEFF_HANDFREE_DEFAULT, \
    SPEECH_INPUT_FIR_COEFF_BT_DEFAULT, \
    SPEECH_INPUT_FIR_COEFF_VOIP_NORMAL_DEFAULT, \
    SPEECH_INPUT_FIR_COEFF_VOIP_HANDFREE_DEFAULT \
}

#define SPEECH_OUTPUT_FIR_COEFF_DEFAULT \
{ \
    SPEECH_OUTPUT_FIR_COEFF_NORMAL_DEFAULT, \
    SPEECH_OUTPUT_FIR_COEFF_HEADSET_DEFAULT, \
    SPEECH_OUTPUT_FIR_COEFF_HANDFREE_DEFAULT, \
    SPEECH_OUTPUT_FIR_COEFF_BT_DEFAULT, \
    SPEECH_OUTPUT_FIR_COEFF_VOIP_NORMAL_DEFAULT, \
    SPEECH_OUTPUT_FIR_COEFF_VOIP_HANDFREE_DEFAULT \
}


7.afe2.c文件修改:

void AFE_Init( void )
{

   *AFE_VAG_CON       = 0x774/*0x794*/ | RG_VBIRX_ZCD_HYS_EN | RG_VBIRX_ZCD_EN ;

}


#if defined(__DC_COMPENSATION_SUPPORT__)
static kal_uint16 CLASS_D_DELAY_OFF_TICK_CNT = 5;    //1000/4.6;    //Tiger.Liu modified 20120605 for speak noise after dial numbler
#else
static kal_uint16 CLASS_D_DELAY_OFF_TICK_CNT = 1000;
#endif


具体参数修改需要消化吸收。。。

你可能感兴趣的:(MTK feature phone 音频参数配置)