Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
regs-ac97.h
Go to the documentation of this file.
1 /*
2  * PKUnity AC97 Registers
3  */
4 
5 #define PKUNITY_AC97_CONR (PKUNITY_AC97_BASE + 0x0000)
6 #define PKUNITY_AC97_OCR (PKUNITY_AC97_BASE + 0x0004)
7 #define PKUNITY_AC97_ICR (PKUNITY_AC97_BASE + 0x0008)
8 #define PKUNITY_AC97_CRAC (PKUNITY_AC97_BASE + 0x000C)
9 #define PKUNITY_AC97_INTR (PKUNITY_AC97_BASE + 0x0010)
10 #define PKUNITY_AC97_INTRSTAT (PKUNITY_AC97_BASE + 0x0014)
11 #define PKUNITY_AC97_INTRCLEAR (PKUNITY_AC97_BASE + 0x0018)
12 #define PKUNITY_AC97_ENABLE (PKUNITY_AC97_BASE + 0x001C)
13 #define PKUNITY_AC97_OUT_FIFO (PKUNITY_AC97_BASE + 0x0020)
14 #define PKUNITY_AC97_IN_FIFO (PKUNITY_AC97_BASE + 0x0030)
15 
16 #define AC97_CODEC_REG(v) FIELD((v), 7, 16)
17 #define AC97_CODEC_VAL(v) FIELD((v), 16, 0)
18 #define AC97_CODEC_WRITECOMPLETE FIELD(1, 1, 2)
19 
20 /*
21  * VAR PLAY SAMPLE RATE
22  */
23 #define AC97_CMD_VPSAMPLE (FIELD(3, 2, 16) | FIELD(3, 2, 0))
24 
25 /*
26  * FIX CAPTURE SAMPLE RATE
27  */
28 #define AC97_CMD_FCSAMPLE FIELD(7, 3, 0)
29 
30 #define AC97_CMD_RESET FIELD(1, 1, 0)
31 #define AC97_CMD_ENABLE FIELD(1, 1, 0)
32 #define AC97_CMD_DISABLE FIELD(0, 1, 0)