regs-ac97.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * PKUnity AC97 Registers
  3. */
  4. #define PKUNITY_AC97_CONR (PKUNITY_AC97_BASE + 0x0000)
  5. #define PKUNITY_AC97_OCR (PKUNITY_AC97_BASE + 0x0004)
  6. #define PKUNITY_AC97_ICR (PKUNITY_AC97_BASE + 0x0008)
  7. #define PKUNITY_AC97_CRAC (PKUNITY_AC97_BASE + 0x000C)
  8. #define PKUNITY_AC97_INTR (PKUNITY_AC97_BASE + 0x0010)
  9. #define PKUNITY_AC97_INTRSTAT (PKUNITY_AC97_BASE + 0x0014)
  10. #define PKUNITY_AC97_INTRCLEAR (PKUNITY_AC97_BASE + 0x0018)
  11. #define PKUNITY_AC97_ENABLE (PKUNITY_AC97_BASE + 0x001C)
  12. #define PKUNITY_AC97_OUT_FIFO (PKUNITY_AC97_BASE + 0x0020)
  13. #define PKUNITY_AC97_IN_FIFO (PKUNITY_AC97_BASE + 0x0030)
  14. #define AC97_CODEC_REG(v) FIELD((v), 7, 16)
  15. #define AC97_CODEC_VAL(v) FIELD((v), 16, 0)
  16. #define AC97_CODEC_WRITECOMPLETE FIELD(1, 1, 2)
  17. /*
  18. * VAR PLAY SAMPLE RATE
  19. */
  20. #define AC97_CMD_VPSAMPLE (FIELD(3, 2, 16) | FIELD(3, 2, 0))
  21. /*
  22. * FIX CAPTURE SAMPLE RATE
  23. */
  24. #define AC97_CMD_FCSAMPLE FIELD(7, 3, 0)
  25. #define AC97_CMD_RESET FIELD(1, 1, 0)
  26. #define AC97_CMD_ENABLE FIELD(1, 1, 0)
  27. #define AC97_CMD_DISABLE FIELD(0, 1, 0)