⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adsp.c

📁 MTK 1389E SOURCE CODE
💻 C
字号:
/**********************************************************************/
/***************    MTK CONFIDENTIAL & COPYRIGHTED     ****************/
/***************                                       ****************/
/***************  $Modtime:: 05/07/06 3:49p    $       ****************/
/***************  $Revision:: 7                $       ****************/
/***************                                       ****************/
/***************   Description :                       ****************/
/***************                                       ****************/
/***************                                       ****************/
/***************       Company : MediaTek Inc.         ****************/
/***************    Programmer :                       ****************/
/**********************************************************************/

#ifndef _ADSP_C
#define _ADSP_C

#define VOLUME_BASE (0x20000/MAX_VOL_LEVEL)

#ifdef TRACE_WRONG_VOL
  #define VOL_ZERO_BASE         1
#else /* normal case */
  #ifdef VOL_ZERO_AS_MUTE
    #define VOL_ZERO_BASE       0
  #else /* volume zero no mute */
    #ifdef USE_LINEAR_VLOUME
      #define VOL_ZERO_BASE     (VOLUME_BASE/2)
    #else
      #define VOL_ZERO_BASE     0x150
    #endif
  #endif /* volume zero no mute */
#endif /* normal case */

#ifdef USE_LINEAR_VLOUME
code DWRD VOLUME[MAX_VOL_LEVEL + 1] =
{
  VOL_ZERO_BASE,
  VOLUME_BASE *  1, VOLUME_BASE *  2, VOLUME_BASE *  3, VOLUME_BASE *  4, VOLUME_BASE *  5,
  VOLUME_BASE *  6, VOLUME_BASE *  7, VOLUME_BASE *  8, VOLUME_BASE *  9, VOLUME_BASE * 10,
  VOLUME_BASE * 11, VOLUME_BASE * 12, VOLUME_BASE * 13, VOLUME_BASE * 14, VOLUME_BASE * 15,
  VOLUME_BASE * 16, VOLUME_BASE * 17, VOLUME_BASE * 18, VOLUME_BASE * 19, 0x20000
};

#else
// 2.5dB per step
code DWRD VOLUME[MAX_VOL_LEVEL + 1] =
{
  VOL_ZERO_BASE,
  0x00000229,0x000002E1,0x000003D7,0x0000051F,0x000006D4,
  0x0000091B,0x00000C24,0x00001031,0x00001597,0x00001CCB,
  0x00002665,0x00003333,0x00004447,0x00005B0C,0x0000796A,
  0x0000A1E9,0x0000D7E9,0x00011FEB,0x00017FF2,0x00020000
};
#endif


code DWRD GAINDRY[GAIN_DRY_MAX] =
{
  0x00003314,0x0000394F,0x0000404D,0x00004826,0x000050F4,0x00005AD5,0x000065EA,0x00007259,
  0x0000804D,0x00008FF5,0x0000A186,0x0000B53B,0x0000CB59,0x0000E429,0x00010000,0x00011F3C,
  0x00014248,0x0001699C,0x000195BB,0x0001C73D,0x0001FEC9,0x00023D1C,0x0002830A,0x0002D181,
  0x0003298B,0x00038C52,0x0003FB27,0x00047782,0x0005030A
};

code DWRD GAINBAND[GAIN_BAND_MAX] =
{
  0xFFFF3315,0xFFFF3950,0xFFFF404E,0xFFFF4827,0xFFFF50F5,0xFFFF5AD6,0xFFFF65EB,0xFFFF725A,
  0xFFFF804E,0xFFFF8FF6,0xFFFFA187,0xFFFFB53C,0xFFFFCB5A,0xFFFFE42A,0x00000000,0x00001F3C,
  0x00004248,0x0000699C,0x000095BB,0x0000C73D,0x0000FEC9,0x00013D1C,0x0001830A,0x0001D181,
  0x0002298B,0x00028C52,0x0002FB27,0x00037782,0x0004030A
};

// original
/*code DWRD MICGAIN[GAIN_MIC_MAX] =
{
  0,
  0x000005C9,0x0000082C,0x00000B8B,0x0000104E,0x00001709,0x00002089,0x00002DF5,0x000040EB,
  0x00005BB3,0x00008187,0x0000B6F6,0x00010271,0x00016D0E,0x000203A8,0x0002D862,0x000404DE,
  0x0005AD51,0x000804DD,0x000B53BF,0x000FFFFE
};*/

// by peichen
/*code DWRD MICGAIN[GAIN_MIC_MAX] =
{
  0,
  0x000002e4,0x00000416,0x000005c5,0x00000827,0x00000b84,0x00001044,
  0x000016fa,0x00002075,0x00002dd9,0x000040c3,0x00005b7b,0x00008138,0x0000b687,
  0x000101d3,0x00016c31,0x0002026f,0x0002d6a8,0x0004026e,0x0005a9df,0x00080000
};*/

// by hjwei, (fix bug: 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -