wm8766.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef WM8766_H_INCLUDED
  2. #define WM8766_H_INCLUDED
  3. #define WM8766_LDA1 0x00
  4. #define WM8766_RDA1 0x01
  5. #define WM8766_DAC_CTRL 0x02
  6. #define WM8766_INT_CTRL 0x03
  7. #define WM8766_LDA2 0x04
  8. #define WM8766_RDA2 0x05
  9. #define WM8766_LDA3 0x06
  10. #define WM8766_RDA3 0x07
  11. #define WM8766_MASTDA 0x08
  12. #define WM8766_DAC_CTRL2 0x09
  13. #define WM8766_DAC_CTRL3 0x0a
  14. #define WM8766_MUTE1 0x0c
  15. #define WM8766_MUTE2 0x0f
  16. #define WM8766_RESET 0x1f
  17. /* LDAx/RDAx/MASTDA */
  18. #define WM8766_ATT_MASK 0x0ff
  19. #define WM8766_UPDATE 0x100
  20. /* DAC_CTRL */
  21. #define WM8766_MUTEALL 0x001
  22. #define WM8766_DEEMPALL 0x002
  23. #define WM8766_PWDN 0x004
  24. #define WM8766_ATC 0x008
  25. #define WM8766_IZD 0x010
  26. #define WM8766_PL_LEFT_MASK 0x060
  27. #define WM8766_PL_LEFT_MUTE 0x000
  28. #define WM8766_PL_LEFT_LEFT 0x020
  29. #define WM8766_PL_LEFT_RIGHT 0x040
  30. #define WM8766_PL_LEFT_LRMIX 0x060
  31. #define WM8766_PL_RIGHT_MASK 0x180
  32. #define WM8766_PL_RIGHT_MUTE 0x000
  33. #define WM8766_PL_RIGHT_LEFT 0x080
  34. #define WM8766_PL_RIGHT_RIGHT 0x100
  35. #define WM8766_PL_RIGHT_LRMIX 0x180
  36. /* INT_CTRL */
  37. #define WM8766_FMT_MASK 0x003
  38. #define WM8766_FMT_RJUST 0x000
  39. #define WM8766_FMT_LJUST 0x001
  40. #define WM8766_FMT_I2S 0x002
  41. #define WM8766_FMT_DSP 0x003
  42. #define WM8766_LRP 0x004
  43. #define WM8766_BCP 0x008
  44. #define WM8766_IWL_MASK 0x030
  45. #define WM8766_IWL_16 0x000
  46. #define WM8766_IWL_20 0x010
  47. #define WM8766_IWL_24 0x020
  48. #define WM8766_IWL_32 0x030
  49. #define WM8766_PHASE_MASK 0x1c0
  50. /* DAC_CTRL2 */
  51. #define WM8766_ZCD 0x001
  52. #define WM8766_DZFM_MASK 0x006
  53. #define WM8766_DMUTE_MASK 0x038
  54. #define WM8766_DEEMP_MASK 0x1c0
  55. /* DAC_CTRL3 */
  56. #define WM8766_DACPD_MASK 0x00e
  57. #define WM8766_PWRDNALL 0x010
  58. #define WM8766_MS 0x020
  59. #define WM8766_RATE_MASK 0x1c0
  60. #define WM8766_RATE_128 0x000
  61. #define WM8766_RATE_192 0x040
  62. #define WM8766_RATE_256 0x080
  63. #define WM8766_RATE_384 0x0c0
  64. #define WM8766_RATE_512 0x100
  65. #define WM8766_RATE_768 0x140
  66. /* MUTE1 */
  67. #define WM8766_MPD1 0x040
  68. /* MUTE2 */
  69. #define WM8766_MPD2 0x020
  70. #endif