cs4228.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:3k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __CS4228_H
  2. #define __CS4228_H
  3. // reg 1
  4. // CI: MCLK/LRCK
  5. // BRM/HRM: base-rate mode / high-rate mode
  6. #define CS4228_1_CI_128 (0<<2)
  7. #define CS4228_1_CI_256 (1<<2)
  8. #define CS4228_1_CI_384 (2<<2)
  9. #define CS4228_1_CI_512 (3<<2)
  10. #define CS4228_1_HRM (1<<7)
  11. #define CS4228_1_BRM (0<<7)
  12. // reg 2
  13. // power down control
  14. #define CS4228_2_DPWN (0<<7)
  15. #define CS4228_2_DNRM (1<<7)
  16. #define CS4228_2_APWN (1<<4)
  17. #define CS4228_2_ANRM (0<<4)
  18. #define CS4228_2_A56PWN (1<<3)
  19. #define CS4228_2_A56NRM (0<<3)
  20. #define CS4228_2_A34PWN (1<<2)
  21. #define CS4228_2_A34NRM (0<<2)
  22. #define CS4228_2_A12PWN (1<<1)
  23. #define CS4228_2_A12NRM (0<<1)
  24. // reg 3
  25. // adc control
  26. #define CS4228_3_ADC_MUTEL_NRM (0<<7)
  27. #define CS4228_3_ADC_MUTEL_ON (1<<7)
  28. #define CS4228_3_ADC_MUTER_NRM (0<<6)
  29. #define CS4228_3_ADC_MUTER_ON (1<<6)
  30. #define CS4228_3_ADC_HPF_EN (0<<5)
  31. #define CS4228_3_ADC_HPF_DIS (1<<5)
  32. #define CS4228_3_ADC_HPFZ_NRM (0<<4)
  33. #define CS4228_3_ADC_HPFZ_FRZ (1<<4)
  34. // reg 4 
  35. // mute control
  36. #define CS4228_4_MUT1_ON (1<<2)
  37. #define CS4228_4_MUT2_ON (1<<3)
  38. #define CS4228_4_MUT3_ON (1<<4)
  39. #define CS4228_4_MUT4_ON (1<<5)
  40. #define CS4228_4_MUT5_ON (1<<6)
  41. #define CS4228_4_MUT6_ON (1<<7)
  42. #define CS4228_4_MUT1_OFF (0<<2)
  43. #define CS4228_4_MUT2_OFF (0<<3)
  44. #define CS4228_4_MUT3_OFF (0<<4)
  45. #define CS4228_4_MUT4_OFF (0<<5)
  46. #define CS4228_4_MUT5_OFF (0<<6)
  47. #define CS4228_4_MUT6_OFF (0<<7)
  48. #define CS4228_4_RMP_4LRCK (0<<0) // per 0.5dB
  49. #define CS4228_4_RMP_8LRCK (1<<0)
  50. #define CS4228_4_RMP_16LRCK (2<<0)
  51. #define CS4228_4_RMP_32LRCK (3<<0)
  52. // reg 5
  53. // mute2 control
  54. #define CS4228_5_MUTEC_NRM (0<<7)
  55. #define CS4228_5_MUTEC_LOW (1<<7)
  56. #define CS4228_5_MUTCZ_DIS (0<<6)
  57. #define CS4228_5_MUTCZ_EN (1<<6)
  58. #define CS4228_5_HMUTE56_OFF (0<<3)
  59. #define CS4228_5_HMUTE56_ON (1<<3)
  60. #define CS4228_5_HMUTE34_OFF (0<<2)
  61. #define CS4228_5_HMUTE34_ON (1<<2)
  62. #define CS4228_5_HMUTE12_OFF (0<<1)
  63. #define CS4228_5_HMUTE12_ON (1<<1)
  64. // reg 6
  65. // deemphasis control
  66. #define CS4228_6_DEMS_48K (1<<6)
  67. #define CS4228_6_DEMS_44K (2<<6)
  68. #define CS4228_6_DEMS_32K (3<<6)
  69. #define CS4228_6_DEM1_ON (1<<0)
  70. #define CS4228_6_DEM2_ON (1<<1)
  71. #define CS4228_6_DEM3_ON (1<<2)
  72. #define CS4228_6_DEM4_ON (1<<3)
  73. #define CS4228_6_DEM5_ON (1<<4)
  74. #define CS4228_6_DEM6_ON (1<<5)
  75. #define CS4228_6_DEM1_OFF (0<<0)
  76. #define CS4228_6_DEM2_OFF (0<<1)
  77. #define CS4228_6_DEM3_OFF (0<<2)
  78. #define CS4228_6_DEM4_OFF (0<<3)
  79. #define CS4228_6_DEM5_OFF (0<<4)
  80. #define CS4228_6_DEM6_OFF (0<<5)
  81. // reg 7/8/9/a/b/c
  82. // digital volume control
  83. // 0: maximum volume (no attenuation) 255:muted (maximum attenuation) 
  84. // reg d
  85. #define CS4228_D_DCK_32 (0<<6)
  86. #define CS4228_D_DCK_48 (1<<6)
  87. #define CS4228_D_DCK_64 (2<<6)
  88. #define CS4228_D_DCK_128 (3<<6)
  89. #define CS4228_D_DMS_SLAVE (0<<4)
  90. #define CS4228_D_DMS_MASTER (3<<4)
  91. #define CS4228_D_DDF_RJ24 (0<<0)
  92. #define CS4228_D_DDF_RJ20 (1<<0)
  93. #define CS4228_D_DDF_RJ16 (2<<0)
  94. #define CS4228_D_DDF_LJ (3<<0)
  95. #define CS4228_D_DDF_I2S (4<<0)
  96. #define CS4228_D_DDF_OLDM (5<<0)
  97. #endif/*__CS4228_H*/