blob: d53db03fd14e63f319b78164e84801032d3d1ca2 [file] [log] [blame]
/*
* All Rights Reserved
*
* MARVELL CONFIDENTIAL
* Copyright 2014 Marvell International Ltd All Rights Reserved.
* The source code contained or described herein and all documents related to
* the source code ("Material") are owned by Marvell International Ltd or its
* suppliers or licensors. Title to the Material remains with Marvell International Ltd
* or its suppliers and licensors. The Material contains trade secrets and
* proprietary and confidential information of Marvell or its suppliers and
* licensors. The Material is protected by worldwide copyright and trade secret
* laws and treaty provisions. No part of the Material may be used, copied,
* reproduced, modified, published, uploaded, posted, transmitted, distributed,
* or disclosed in any way without Marvell's prior express written permission.
*
* No license under any patent, copyright, trade secret or other intellectual
* property right is granted to or conferred upon you by disclosure or delivery
* of the Materials, either expressly, by implication, inducement, estoppel or
* otherwise. Any license under such intellectual property rights must be
* express and approved by Marvell in writing.
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "acm_comm.h"
#include "acmTypes.h"
#include "adsp_ve.h"
/***************************************************************************
Define this macro to set different parameters for VT scenario
***************************************************************************/
#define VT_NOT_SAME_AS_VOICECALL
#ifdef FEATURE_WB_AMR_PS
#define MODEM_PCM_FORMAT MODEM_16_KHz_UNPACKED
#define MODEM_DUALMIC_PCM_FORMAT MODEM_DUAL_MIC_16_KHz_UNPACKED
#else
#define MODEM_PCM_FORMAT MODEM_8_KHz_UNPACKED
#define MODEM_DUALMIC_PCM_FORMAT MODEM_DUAL_MIC_8_KHz_UNPACKED
#endif
#define DEFAULT_GSSP_NB_PARAM { 0, 0xC0C0, 0x001F, 0x6300, 0x1C01, 0x0001, 0x0001, 0x0000, 0x0001, 0x00EA, 0x130B, 0x0008, 0, 0, 0, 0 }
#define DEFAULT_GSSP_WB_PARAM { 0, 0xC0C0, 0x001F, 0x6300, 0x1C01, 0x0001, 0x0001, 0x0000, 0x0001, 0x00EA, 0x130B, 0x0010, 0, 1, 0, 0 }
#ifdef FEATURE_WB_AMR_PS
#define DEFAULT_GSSP_PARAM DEFAULT_GSSP_WB_PARAM
#define DEFAULT_DUALMIC_GSSP_PARAM { 16, 0xC0D0, 0x001F, 0x6300, 0x1C01, 0x0001, 0x0001, 0x0000, 0x0001, 0x00EA, 0x130B, 0x0008, 0, 0, 0, 1 }
#else
#define DEFAULT_GSSP_PARAM DEFAULT_GSSP_NB_PARAM
#define DEFAULT_DUALMIC_GSSP_PARAM { 16, 0xC0D0, 0x001F, 0x6300, 0x1C01, 0x0001, 0x0001, 0x0000, 0x0001, 0x00EA, 0x130B, 0x0010, 0, 1, 0, 1 }
#endif
//-----------------------------------------------------------------------------
//Codec Definitions:
// CODEC_PM812/CODEC_PM805/CODEC_NAU8810/CODEC_ALC5616/CODEC_NONE is defined in openwrt/marvell/lte-telephony/apps/NVM_Proxy/Makefile
//-----------------------------------------------------------------------------
/***********************************************************************************************
* Guide to adjust codec gain and DSP gain
-----------------------------------------------------------------------------------------------
* 1. There are 11 volume levels (0, 10, 20, ..., 100), default is 80
*
* 2. Tx gain keeps same for all volumes
*
* 3. Codec gain follows with codec datasheet
*
* 4. DSP gain is short type. High 8bits: WB gain, Low 8bits: NB gain.
* For example, minimum: -21dB (0xebeb means WB gain = -21dB, NB gain = -21dB); step is 2dB
* { 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }
***********************************************************************************************/
#if defined(CODEC_PM812)
//PM812 is connected
APH_CODEC_ID g_RunningCodec = APH_CODEC_ID_PM812;
const ACMCodec_GainT g_AudioGainDefaultParamsTable[] = {
//AUDIO
{
HIFI_HANDSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x56, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x56, 0xb3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x56, 0xb7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x56, 0xbb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x56, 0xbf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x56, 0xc3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB Volume=50
{ ELBA, 0x56, 0xc7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x56, 0xcb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x56, 0xcf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x56, 0xd3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x56, 0xd7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_SPEAKER, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x58, 0xad, USTICA, 0x4a, 0x30, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-5 dB
{ ELBA, 0x58, 0xaf, USTICA, 0x4a, 0x40, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-4 dB
{ ELBA, 0x58, 0xb1, USTICA, 0x4a, 0x50, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //-3 dB
{ ELBA, 0x58, 0xb3, USTICA, 0x4a, 0x60, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //-2 dB
{ ELBA, 0x58, 0xb5, USTICA, 0x4a, 0x70, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //-1 dB
{ ELBA, 0x58, 0xb7, USTICA, 0x4a, 0x80, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+0 dB Volume=50
{ ELBA, 0x58, 0xb9, USTICA, 0x4a, 0x90, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+1 dB
{ ELBA, 0x58, 0xbb, USTICA, 0x4a, 0xa0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+2 dB
{ ELBA, 0x58, 0xbd, USTICA, 0x4a, 0xb0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+3 dB
{ ELBA, 0x58, 0xbf, USTICA, 0x4a, 0xc0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+4 dB
{ ELBA, 0x58, 0xc1, USTICA, 0x4a, 0xd0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+5 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_HEADSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMHSMIC, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x56, 0x87, ELBA, 0x57, 0x87, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-24 dB
{ ELBA, 0x56, 0x8b, ELBA, 0x57, 0x8b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-22 dB
{ ELBA, 0x56, 0x8f, ELBA, 0x57, 0x8f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //-20 dB
{ ELBA, 0x56, 0x93, ELBA, 0x57, 0x93, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //-18 dB
{ ELBA, 0x56, 0x97, ELBA, 0x57, 0x97, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //-16 dB
{ ELBA, 0x56, 0x9b, ELBA, 0x57, 0x9b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //-14 dB
{ ELBA, 0x56, 0x9f, ELBA, 0x57, 0x9f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //-12 dB
{ ELBA, 0x56, 0xa3, ELBA, 0x57, 0xa3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //-10 dB
{ ELBA, 0x56, 0xa7, ELBA, 0x57, 0xa7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //-8 dB
{ ELBA, 0x56, 0xab, ELBA, 0x57, 0xab, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //-6 dB
{ ELBA, 0x56, 0xaf, ELBA, 0x57, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //-4 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
//VOICE
{
VC_HANDSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ELBA, 0x56, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x56, 0xb3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x56, 0xb7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x56, 0xbb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x56, 0xbf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x56, 0xc3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB
{ ELBA, 0x56, 0xc7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x56, 0xcb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x56, 0xcf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x56, 0xd3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x56, 0xd7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf4f4 //Rx_DSPSideToneGain: -12 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HANDSFREE, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ELBA, 0x58, 0x8d, USTICA, 0x4a, 0x20, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x58, 0x8f, USTICA, 0x4a, 0x30, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x58, 0x91, USTICA, 0x4a, 0x40, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x58, 0x93, USTICA, 0x4a, 0x50, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x58, 0x95, USTICA, 0x4a, 0x60, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x58, 0x97, USTICA, 0x4a, 0x70, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB
{ ELBA, 0x58, 0x99, USTICA, 0x4a, 0x80, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x58, 0x9b, USTICA, 0x4a, 0x90, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x58, 0x9d, USTICA, 0x4a, 0xa0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x58, 0x9f, USTICA, 0x4a, 0xb0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x58, 0xa1, USTICA, 0x4a, 0xc0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HEADSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMHSMIC, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain::WB=0dB, NB=0dB
{
{ ELBA, 0x56, 0x87, ELBA, 0x57, 0x87, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-24 dB
{ ELBA, 0x56, 0x8b, ELBA, 0x57, 0x8b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-22 dB
{ ELBA, 0x56, 0x8f, ELBA, 0x57, 0x8f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //-20 dB
{ ELBA, 0x56, 0x93, ELBA, 0x57, 0x93, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //-18 dB
{ ELBA, 0x56, 0x97, ELBA, 0x57, 0x97, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //-16 dB
{ ELBA, 0x56, 0x9b, ELBA, 0x57, 0x9b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //-14 dB
{ ELBA, 0x56, 0x9f, ELBA, 0x57, 0x9f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //-12 dB
{ ELBA, 0x56, 0xa3, ELBA, 0x57, 0xa3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //-10 dB
{ ELBA, 0x56, 0xa7, ELBA, 0x57, 0xa7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //-8 dB
{ ELBA, 0x56, 0xab, ELBA, 0x57, 0xab, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //-6 dB
{ ELBA, 0x56, 0xaf, ELBA, 0x57, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //-4 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf8f8 //Rx_DSPSideToneGain: -8 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
}
};
#elif defined(CODEC_PM805)
//PM805 is connected
APH_CODEC_ID g_RunningCodec = APH_CODEC_ID_PM805;
const ACMCodec_GainT g_AudioGainDefaultParamsTable[] = {
//AUDIO
{
HIFI_HANDSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x56, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x56, 0xb3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x56, 0xb7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x56, 0xbb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x56, 0xbf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x56, 0xc3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB Volume=50
{ ELBA, 0x56, 0xc7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x56, 0xcb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x56, 0xcf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x56, 0xd3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x56, 0xd7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_SPEAKER, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x58, 0xad, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x58, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x58, 0xb1, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x58, 0xb3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x58, 0xb5, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x58, 0xb7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB Volume=50
{ ELBA, 0x58, 0xb9, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x58, 0xbb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x58, 0xbd, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x58, 0xbf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x58, 0xc1, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_HEADSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMHSMIC, //CodecControl
{ ELBA, 0x12, 0x14, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ELBA, 0x56, 0x87, ELBA, 0x57, 0x87, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-24 dB
{ ELBA, 0x56, 0x8b, ELBA, 0x57, 0x8b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-22 dB
{ ELBA, 0x56, 0x8f, ELBA, 0x57, 0x8f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //-20 dB
{ ELBA, 0x56, 0x93, ELBA, 0x57, 0x93, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //-18 dB
{ ELBA, 0x56, 0x97, ELBA, 0x57, 0x97, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //-16 dB
{ ELBA, 0x56, 0x9b, ELBA, 0x57, 0x9b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //-14 dB
{ ELBA, 0x56, 0x9f, ELBA, 0x57, 0x9f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //-12 dB
{ ELBA, 0x56, 0xa3, ELBA, 0x57, 0xa3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //-10 dB
{ ELBA, 0x56, 0xa7, ELBA, 0x57, 0xa7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //-8 dB
{ ELBA, 0x56, 0xab, ELBA, 0x57, 0xab, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //-6 dB
{ ELBA, 0x56, 0xaf, ELBA, 0x57, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //-4 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
//VOICE
{
VC_HANDSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ELBA, 0x56, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x56, 0xb3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x56, 0xb7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x56, 0xbb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x56, 0xbf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x56, 0xc3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB
{ ELBA, 0x56, 0xc7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x56, 0xcb, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x56, 0xcf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x56, 0xd3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x56, 0xd7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf4f4 //Rx_DSPSideToneGain: -12 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HANDSFREE, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ELBA, 0x58, 0x8d, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-4 dB
{ ELBA, 0x58, 0x8f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-2 dB
{ ELBA, 0x58, 0x91, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //+0 dB
{ ELBA, 0x58, 0x93, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //+2 dB
{ ELBA, 0x58, 0x95, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //+4 dB
{ ELBA, 0x58, 0x97, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //+6 dB
{ ELBA, 0x58, 0x99, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //+8 dB
{ ELBA, 0x58, 0x9b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //+10 dB
{ ELBA, 0x58, 0x9d, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //+12 dB
{ ELBA, 0x58, 0x9f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //+14 dB
{ ELBA, 0x58, 0xa1, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //+16 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HEADSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMHSMIC, //CodecControl
{ ELBA, 0x12, 0x00, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ELBA, 0x56, 0x87, ELBA, 0x57, 0x87, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //0 //-24 dB
{ ELBA, 0x56, 0x8b, ELBA, 0x57, 0x8b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //1 //-22 dB
{ ELBA, 0x56, 0x8f, ELBA, 0x57, 0x8f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //2 //-20 dB
{ ELBA, 0x56, 0x93, ELBA, 0x57, 0x93, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //3 //-18 dB
{ ELBA, 0x56, 0x97, ELBA, 0x57, 0x97, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //4 //-16 dB
{ ELBA, 0x56, 0x9b, ELBA, 0x57, 0x9b, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //5 //-14 dB
{ ELBA, 0x56, 0x9f, ELBA, 0x57, 0x9f, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //6 //-12 dB
{ ELBA, 0x56, 0xa3, ELBA, 0x57, 0xa3, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //7 //-10 dB
{ ELBA, 0x56, 0xa7, ELBA, 0x57, 0xa7, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //8 //-8 dB
{ ELBA, 0x56, 0xab, ELBA, 0x57, 0xab, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 }, //9 //-6 dB
{ ELBA, 0x56, 0xaf, ELBA, 0x57, 0xaf, ELBA, 0xFFFF, 0, ELBA, 0xFFFF, 0 } //10 //-4 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf8f8 //Rx_DSPSideToneGain: -8 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
}
};
#elif defined(CODEC_NAU8810)
//NAU8810 is connected
APH_CODEC_ID g_RunningCodec = APH_CODEC_ID_NAU8810;
const ACMCodec_GainT g_AudioGainDefaultParamsTable[] = {
//AUDIO
{
HIFI_HANDSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_SPEAKER, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_HEADSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMHSMIC, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
//VOICE
{
VC_HANDSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf4f4 //Rx_DSPSideToneGain: -12 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HANDSFREE, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HEADSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMHSMIC, //CodecControl
{ NAU8810, 0x2d, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ NAU8810, 0x36, 0x00, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //0 //(0.75 dB * 0x00)-12 dB = -12 dB
{ NAU8810, 0x36, 0x08, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //1 //(0.75 dB * 0x08)-12 dB = -6 dB
{ NAU8810, 0x36, 0x0B, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //2 //(0.75 dB * 0x0B)-12 dB = -3.75 dB
{ NAU8810, 0x36, 0x0E, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //3 //(0.75 dB * 0x0E)-12 dB = -1.5 dB
{ NAU8810, 0x36, 0x11, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //4 //(0.75 dB * 0x11)-12 dB = 0.75 dB
{ NAU8810, 0x36, 0x14, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //5 //(0.75 dB * 0x14)-12 dB = 3 dB
{ NAU8810, 0x36, 0x17, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //6 //(0.75 dB * 0x17)-12 dB = 5.25 dB
{ NAU8810, 0x36, 0x1A, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //7 //(0.75 dB * 0x1A)-12 dB = 7.5 dB
{ NAU8810, 0x36, 0x1D, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //8 //(0.75 dB * 0x1D)-12 dB = 9.75 dB
{ NAU8810, 0x36, 0x20, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 }, //9 //(0.75 dB * 0x20)-12 dB = 12 dB
{ NAU8810, 0x36, 0x23, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0, NAU8810, 0xFFFF, 0 } //10 //(0.75 dB * 0x23)-12 dB = 14.25 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1 }, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf8f8 //Rx_DSPSideToneGain: -8 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
}
};
#elif defined(CODEC_ALC5616)
//ALC5616 is connected
APH_CODEC_ID g_RunningCodec = APH_CODEC_ID_ALC5616;
ACMCodec_GainT g_AudioGainDefaultParamsTable[] = {
//AUDIO
{
HIFI_HANDSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ALC5616, 0x03, 0x2020, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-36 dB
{ ALC5616, 0x03, 0x1D1D, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-31.5 dB
{ ALC5616, 0x03, 0x1A1A, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-27 dB
{ ALC5616, 0x03, 0x1717, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-22.5 dB
{ ALC5616, 0x03, 0x1414, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-18 dB
{ ALC5616, 0x03, 0x1111, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-13.5 dB
{ ALC5616, 0x03, 0x0E0E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -9 dB
{ ALC5616, 0x03, 0x0B0B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -4.5 dB
{ ALC5616, 0x03, 0x0808, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 0 dB
{ ALC5616, 0x03, 0x0505, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 4.5 dB
{ ALC5616, 0x03, 0x0202, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 9 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_SPEAKER, //Profile_id
APH_PATH_ID_HIFIRECORDFROMMIC1, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ALC5616, 0x03, 0x2020, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-36 dB
{ ALC5616, 0x03, 0x1D1D, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-31.5 dB
{ ALC5616, 0x03, 0x1A1A, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-27 dB
{ ALC5616, 0x03, 0x1717, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-22.5 dB
{ ALC5616, 0x03, 0x1414, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-18 dB
{ ALC5616, 0x03, 0x1111, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-13.5 dB
{ ALC5616, 0x03, 0x0E0E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -9 dB
{ ALC5616, 0x03, 0x0B0B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -4.5 dB
{ ALC5616, 0x03, 0x0808, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 0 dB
{ ALC5616, 0x03, 0x0505, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 4.5 dB
{ ALC5616, 0x03, 0x0202, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 9 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
HIFI_HEADSET, //Profile_id
APH_PATH_ID_HIFIRECORDFROMHSMIC, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain
{
{ ALC5616, 0x02, 0x1E1E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-33 dB
{ ALC5616, 0x02, 0x1B1B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-28.5 dB
{ ALC5616, 0x02, 0x1818, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-24 dB
{ ALC5616, 0x02, 0x1515, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-19.5 dB
{ ALC5616, 0x02, 0x1212, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-15 dB
{ ALC5616, 0x02, 0x0F0F, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-10.5 dB
{ ALC5616, 0x02, 0x0C0C, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -6 dB
{ ALC5616, 0x02, 0x0909, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -1.5 dB
{ ALC5616, 0x02, 0x0606, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 3 dB
{ ALC5616, 0x02, 0x0303, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 7.5 dB
{ ALC5616, 0x02, 0x0000, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 12 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
//VOICE
{
VC_HANDSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ALC5616, 0x03, 0x2020, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-36 dB
{ ALC5616, 0x03, 0x1D1D, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-31.5 dB
{ ALC5616, 0x03, 0x1A1A, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-27 dB
{ ALC5616, 0x03, 0x1717, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-22.5 dB
{ ALC5616, 0x03, 0x1414, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-18 dB
{ ALC5616, 0x03, 0x1111, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-13.5 dB
{ ALC5616, 0x03, 0x0E0E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -9 dB
{ ALC5616, 0x03, 0x0B0B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -4.5 dB
{ ALC5616, 0x03, 0x0808, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 0 dB
{ ALC5616, 0x03, 0x0505, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 4.5 dB
{ ALC5616, 0x03, 0x0202, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 9 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf4f4 //Rx_DSPSideToneGain: -12 dB
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HANDSFREE, //Profile_id
APH_PATH_ID_VOICERECORDFROMMIC1, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ALC5616, 0x03, 0x2020, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-36 dB
{ ALC5616, 0x03, 0x1D1D, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-31.5 dB
{ ALC5616, 0x03, 0x1A1A, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-27 dB
{ ALC5616, 0x03, 0x1717, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-22.5 dB
{ ALC5616, 0x03, 0x1414, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-18 dB
{ ALC5616, 0x03, 0x1111, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-13.5 dB
{ ALC5616, 0x03, 0x0E0E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -9 dB
{ ALC5616, 0x03, 0x0B0B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -4.5 dB
{ ALC5616, 0x03, 0x0808, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 0 dB
{ ALC5616, 0x03, 0x0505, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 4.5 dB
{ ALC5616, 0x03, 0x0202, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 9 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
},
{
VC_HEADSET, //Profile_id
APH_PATH_ID_VOICERECORDFROMHSMIC, //CodecControl
{ ALC5616, 0x1C, 0x4141, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //Tx_CodecGain
0, //Tx_DSPGain:WB=0dB, NB=0dB
{
{ ALC5616, 0x02, 0x1E1E, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //0 //-33 dB
{ ALC5616, 0x02, 0x1B1B, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //1 //-28.5 dB
{ ALC5616, 0x02, 0x1818, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //2 //-24 dB
{ ALC5616, 0x02, 0x1515, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //3 //-19.5 dB
{ ALC5616, 0x02, 0x1212, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //4 //-15 dB
{ ALC5616, 0x02, 0x0F0F, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //5 //-10.5 dB
{ ALC5616, 0x02, 0x0C0C, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //6 // -6 dB
{ ALC5616, 0x02, 0x0909, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //7 // -1.5 dB
{ ALC5616, 0x02, 0x0606, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //8 // 3 dB
{ ALC5616, 0x02, 0x0303, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 }, //9 // 7.5 dB
{ ALC5616, 0x02, 0x0000, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0, ALC5616, 0xFFFF, 0 } //10 // 12 dB
}, //Rx_CodecGain[11]
//{ -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1}, //dB value
{ 0xebeb, 0xeded, 0xefef, 0xf1f1, 0xf3f3, 0xf5f5, 0xf7f7, 0xf9f9, 0xfbfb, 0xfdfd, 0xffff }, //Rx_DSPGain[11]
//0xf8f8 //Rx_DSPSideToneGain: -8 db
0x8080 //Rx_DSPSideToneGain: 0x8080=disable
}
};
#else
APH_CODEC_ID g_RunningCodec = APH_CODEC_ID_NONE;
//only for compile
const ACMCodec_GainT g_AudioGainDefaultParamsTable[1] = {};
#endif
#ifdef TARGET_mmp_asr1901_KSTR901
const EnhanceParmsT g_AudioDefaultVETable[] =
{
{
//MusicStreamControlT MusicParms[MAX_MUSIC_STREAM_NUM];
.MusicParms = { 0 },
//VoiceParmsT VoiceParms;
.VoiceParms = {
.Profile = 0,
.VoiceParmRX = {
{ //8k
/*ns*/ { 0, { -13, -60, 0x3d23, 0 } }, //8k
/*eq*/ { 0, { 0x1, {
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x2000,
{ 0, 0, 0, 0 }
},
{ //16k
/*ns*/ { 0, { -13, -60, 0x2d23, 0 } }, //8k
/*eq*/ { 0, { 0x1, {
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x2000,
{ 0, 0, 0, 0 }
},
{ //32
/*ns*/ { 0, { -13, -60, 0x1d23, 0 } }, //8k
/*eq*/ { 0, { 0x1, {
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x2000,
{ 0, 0, 0, 0 }
}
},
.VoiceParmTX = {
{ //8k
/*dc */ .DCFactor = 3,
/*ec */ .EcConfig = { .Enabled = 1,
{ 0, 16, 6, 0 }
},
/*Nres*/ .NsTxConfig =
{
.Enabled = 1,
{
.NsParams = { -18, -39, 0x3A53, 0x00 },
.NNParams = { 0, 0, 0, 0 },
.ResParams = { 3, -2, -4, -84, 1, 40, 0x1800, 0x4000, 0x3663, 100, 0x467, 0 },
}
},
/*eq*/ .EqConfig =
{
.Enabled = 0,
.EqParams = { .MASK = 0x1,
{
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x2000,
/*res*/ { 0, 0, 0, 0 }
},
{ //16k
/*dc *//*2*/ 0,
/*ec */ { 1, { 0, 16, 6, 0 } },
/*Nres*/ { 1, {
{ -18, -39, 0x2A53, 0x00 /*0x8f*/ },
{ 0, 0, 0, 0 },
{ 1, -2, -4, -89, 1, 40, 0x1800, 0x3000, 0x3266, 100, 0x467, 0 },
}
},
/*eq*/ { 0, { 0x1, {
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x2000,
/*res*/ { 0, 0, 0, 0 }
},
{ //32k
/*dc */ 2,
/*ec */ { 1, { 0, 16, 6, 0 } },
/*Nres*/ { 1, {
{ -18, -39, 0x1A53, 0x00 /*0x8f*/ },
{ 0, 0, 0, 0 },
{ 2, -2, -4, -84, 1, 40, 0x1500, 0x2000, 0x3266, 100, 0x467, 0 },
}
},
/*eq*/ { 0, { 0x1, {
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 },
{ 3, -7247, 3270, 3570, -7140, 3570 }
}
}
},
/*drc*/ { 0, { 9, -1, 0, 65, 0, 0 } },
/*Gain*/ 0x4000,
/*res*/ { 0, 0, 0, 0 }
}
}
},
//VeTxControlT RecordParms;
.RecordParms = 0,
//VeRxControlT FmStreamParm;
.FmStreamParm = 0,
}
};
#endif
#ifdef __cplusplus
}
#endif