wm8785.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef WM8785_H_INCLUDED
  2. #define WM8785_H_INCLUDED
  3. #define WM8785_R0 0
  4. #define WM8785_R1 1
  5. #define WM8785_R2 2
  6. #define WM8785_R7 7
  7. /* R0 */
  8. #define WM8785_MCR_MASK 0x007
  9. #define WM8785_MCR_SLAVE 0x000
  10. #define WM8785_MCR_MASTER_128 0x001
  11. #define WM8785_MCR_MASTER_192 0x002
  12. #define WM8785_MCR_MASTER_256 0x003
  13. #define WM8785_MCR_MASTER_384 0x004
  14. #define WM8785_MCR_MASTER_512 0x005
  15. #define WM8785_MCR_MASTER_768 0x006
  16. #define WM8785_OSR_MASK 0x018
  17. #define WM8785_OSR_SINGLE 0x000
  18. #define WM8785_OSR_DOUBLE 0x008
  19. #define WM8785_OSR_QUAD 0x010
  20. #define WM8785_FORMAT_MASK 0x060
  21. #define WM8785_FORMAT_RJUST 0x000
  22. #define WM8785_FORMAT_LJUST 0x020
  23. #define WM8785_FORMAT_I2S 0x040
  24. #define WM8785_FORMAT_DSP 0x060
  25. /* R1 */
  26. #define WM8785_WL_MASK 0x003
  27. #define WM8785_WL_16 0x000
  28. #define WM8785_WL_20 0x001
  29. #define WM8785_WL_24 0x002
  30. #define WM8785_WL_32 0x003
  31. #define WM8785_LRP 0x004
  32. #define WM8785_BCLKINV 0x008
  33. #define WM8785_LRSWAP 0x010
  34. #define WM8785_DEVNO_MASK 0x0e0
  35. /* R2 */
  36. #define WM8785_HPFR 0x001
  37. #define WM8785_HPFL 0x002
  38. #define WM8785_SDODIS 0x004
  39. #define WM8785_PWRDNR 0x008
  40. #define WM8785_PWRDNL 0x010
  41. #define WM8785_TDM_MASK 0x1c0
  42. #endif