board_config.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /********************************************************************
  2. ** File Name: board_config.h
  3. **
  4. ** File Description:
  5. **
  6. ** Copyright(c) 2008 Sunplus Technologies - All Rights Reserved
  7. **
  8. ** History Information Description
  9. ** Date Author Modification
  10. **
  11. ********************************************************************/
  12. #ifndef _CUSTOMER_H_
  13. #define _CUSTOMER_H_
  14. #include "subcustomer_setting.h"
  15. /********************************************************************
  16. Macro
  17. ********************************************************************/
  18. /*Define headphone active(when plug in) GPIO level*/
  19. #define APP_AUDIO_HP_ACTIVE_GPIO_STATUS APP_AUDIO_HP_HIGH_ACTIVE
  20. #define SYSCONF_BOARD_POWER 1//0 AC 220V; 1 DC 12V; 2 AC/DC 12V+5V+5VSTB
  21. /*Param about PowerLimit setting*/
  22. #if (CONFIG_CHIPID == 0x330) //CHIP 330
  23. #define PLC_ENABLE (1) //enable the PLC setting
  24. #define PLC_TIMER (10) //control attack time , unit 1ms, min : 10ms (default) range: 10ms ~ 200ms
  25. #define PLC_ATTACK_RELEASE_RATIO (3) //control attack release ratio , to avoid audio output unsmooth issue.
  26. #define PLC_SP_ATTACK (-30) //Speaker attack 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  27. #define PLC_HP_ATTACK (0) //Headphone attack 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  28. #define PLC_LO_ATTACK (0) //Line out attck 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  29. #else
  30. #define PLC_ENABLE (1) //enable the PLC setting
  31. #define PLC_TIMER (10) //control attack time , unit 1ms, min : 10ms (default) range: 10ms ~ 200ms
  32. #define PLC_ATTACK_RELEASE_RATIO (3) //control attack : release ratio , to avoid audio output unsmooth issue.
  33. #define PLC_SP_ATTACK (-35) //Speaker attack: 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  34. #define PLC_HP_ATTACK (0) //Headphone attack 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  35. #define PLC_LO_ATTACK (0) //Line out attck 0: 0dB, -1 : -0.125dB , 2 : -0.25dB Min = -240(-30dB)
  36. #endif
  37. /* Audio SIF threshold setting*/
  38. #define OP_ATV_MN1ThH 0xb /*Carrier 1 Quality AAOS Threshold High Register (0x4A) */
  39. #define OP_ATV_MN1ThL 0xa /*Carrier 1 Quality AAOS Threshold Low Register (0x4B)*/
  40. #define OP_ATV_MN2ThH 0x34 /*Carrier 2 Quality AAOS Threshold High Register (0x4C)*/
  41. #define OP_ATV_MN2ThL 0x21 /*Carrier 2 Quality AAOS Threshold Low Register (0x4D)*/
  42. #define OP_ATV_PN2ThH 0x80 /*Carrier 1 Phase Noise AAOS Threshold high (0x4E)*/
  43. #define OP_ATV_PN2ThL 0x20 /*Carrier 1 Phase Noise AAOS Threshold low (0x4F)*/
  44. #define OP_ATV_FMSMTh 0x47 /*FM Subcarrier Magnitude AAOS Threshold High Registers (0x50)*/
  45. #define OP_ATV_FMSMTl 0x32 /*FM Subcarrier Magnitude AAOS Threshold Low Registers (0x51)*/
  46. #define OP_ATV_FMSNTh 0x32 /*FM Subcarrier Noise AAOS Threshold High Registers (0x52) */
  47. #define OP_ATV_FMSNTl 0x30 /*FM Subcarrier Noise AAOS Threshold Low Registers (0x53) */
  48. #define OP_ATV_NIERTh 0x60 /*NICAM Error Rate AAOS Threshold High Register (0x54) */
  49. #define OP_ATV_NIERTl 0x55 /*NICAM Error Rate AAOS Threshold Low Register (0x55)*/
  50. #define OP_ATV_PILMTh 0x5b /*Pilot Magnitude AAOS Threshold High Register (0x56)*/
  51. #define OP_ATV_PILMTl 0x55 /*Pilot Magnitude AAOS Threshold Low Register (0x57)*/
  52. #define OP_ATV_ASMTh 0x19 /*Carrier Magnitude ASD Threshold (0x81)*/
  53. #define OP_ATV_ASQTh 0x16 /*Carrier FM Quality ASD Threshold (0x83)*/
  54. #define OP_ATV_AANTh 0x09 /*Carrier AM Noise ASD Threshold (0x84)*/
  55. #define OP_ATV_ANNTh 0x1e /*NICAM Noise ASD Threshold (0x85)*/
  56. #define OP_ATV_SQlTh 0x1a /*Carrier FM Quality SCS Threshold (0x8D)*/
  57. #define OP_ATV_SNsTh 0x1e /*NICAM Noise SCS Threshold (0x8E)*/
  58. #define OP_ATV_ASFTh 0x30 /*Carrier Average Frequency ASD Threshold (0x82) */
  59. #define OP_ATV_AVOLCo 0x0a /*Automatic Volume Correction (0x90): AVCEn[0]¡BAVCDcy[2:1]¡BAVCAtk[4:3]*/
  60. #define OP_ATV_PSCLCh 0x97 /*Prescaler Level Left Channel (0x92)*/
  61. #define OP_ATV_PSCRCh 0x97 /*Prescaler Level Right Channel (0x93)*/
  62. #define OP_ATV_AVCThH 0x7f /*AVC Level Thresholds High (0x96) */
  63. #define OP_ATV_AVCThL 0x7e /*AVC Level Thresholds Low (0x97)*/
  64. #define OP_ATV_NIAMPLe 0x32 /*NICAM Analog Mono Prescaler Level (0x98) */
  65. #define OP_ATV_NIPLe 0xff /*NICAM Prescaler Level (0x99)*/
  66. #define OP_ATV_A2PLe 0x32 /*A2 Prescaler Level (0x9A)*/
  67. #define OP_ATV_IAVCLo 0x05 /*AVC Manual Gain Control (0xDA) */
  68. #define OP_ATV_IAVCRo 0x05 /*AVC Manual Gain Control (0xDB)*/
  69. /* Audio AAOS auto mute setting*/
  70. #define OP_ATV_AUTO_MUTE 1 /*AAOS autom mute 1:enable 0:disable*/
  71. /********************************************************************
  72. Enum
  73. ********************************************************************/
  74. typedef enum {
  75. APP_CUSTOMER_BOARD_DEFINE_RDA_8503= 0,
  76. APP_CUSTOMER_BOARD_DEFINE_MAX,
  77. } APP_Customer_Board_Define_e;
  78. /********************************************************************
  79. Function
  80. ********************************************************************/
  81. extern APP_SourceVolOffset_t g_arAudioVolumeOffset[];
  82. extern const UINT16 g_u16SourceVolOffset_Size;
  83. extern APP_SourceAudioAuxiliaryVolOffset_t g_arAudioAuxiliaryVolumeOffset[];
  84. extern const UINT16 g_arAudioAuxiliaryVolumeOffset_Size;
  85. extern char *CV_CustomrBoardString[];
  86. extern APP_SourceConfigTable_t g_APPSourceConfigTable[APP_CUSTOMER_BOARD_DEFINE_MAX];
  87. extern UINT16 g_400mARange[SUPPORT_ADJUST_PWM_STAGE];
  88. extern UINT16 g_700mARange[SUPPORT_ADJUST_PWM_STAGE];
  89. extern UINT16 g_900mARange[SUPPORT_ADJUST_PWM_STAGE];
  90. extern APP_Board_USB_Port_Maping_t g_arBoardUsbPortMaping[];
  91. extern const UINT16 g_arBoardUsbPortMaping_Size;
  92. #endif