ReactOS 0.4.15-dev-8245-gd24675b
ichreg.h
Go to the documentation of this file.
1/********************************************************************************
2** Copyright (c) 1998-2000 Microsoft Corporation. All Rights Reserved.
3**
4** Portions Copyright (c) 1998-1999 Intel Corporation
5**
6********************************************************************************/
7
8/* The file ichreg.h was reviewed by LCA in June 2011 and is acceptable for use by Microsoft. */
9
10#ifndef _ICHREG_H_
11#define _ICHREG_H_
12
13// We define the offsets like PI_BDBAR as ULONG (instead of UCHAR) for run
14// time efficiency.
15
16// CoDec AC97 register space offsets
17const ULONG PRIMARY_CODEC = 0x00;
19
20// Native audio bus master control registers (offsets)
21const ULONG PI_BDBAR = 0x00; // PCM In Buffer Descriptor Base Address Register
22const ULONG PI_CIV = 0x04; // PCM In Current Index Value
23const ULONG PI_LVI = 0x05; // PCM In Last Valid Index
24const ULONG PI_SR = 0x06; // PCM In Status Register
25const ULONG PI_PICB = 0x08; // PCM In Position In Current Buffer
26const ULONG PI_PIV = 0x0A; // PCM In Prefetch Index Value
27const ULONG PI_CR = 0x0B; // PCM In Control Register
28const ULONG PO_BDBAR = 0x10; // PCM Out Buffer Descriptor Base Address Register
29const ULONG PO_CIV = 0x14; // PCM Out Current Index Value
30const ULONG PO_LVI = 0x15; // PCM Out Last Valid Index
31const ULONG PO_SR = 0x16; // PCM Out Status Register
32const ULONG PO_PICB = 0x18; // PCM Out Position In Current Buffer
33const ULONG PO_PIV = 0x1A; // PCM Out Prefetch Index Value
34const ULONG PO_CR = 0x1B; // PCM Out Control Register
35const ULONG MC_BDBAR = 0x20; // Mic In Buffer Descriptor Base Address Register
36const ULONG MC_CIV = 0x24; // Mic In Current Index Value
37const ULONG MC_LVI = 0x25; // Mic In Last Valid Index
38const ULONG MC_SR = 0x26; // Mic In Status Register
39const ULONG MC_PICB = 0x28; // Mic In Position In Current Buffer
40const ULONG MC_PIV = 0x2A; // Mic In Prefetch Index Value
41const ULONG MC_CR = 0x2B; // Mic In Control Register
42const ULONG GLOB_CNT = 0x2C; // Global Control
43const ULONG GLOB_STA = 0x30; // Global Status
44const ULONG CAS = 0x34; // Codec Access Semiphore
45
46// Defines for relative accesses (offsets)
47const ULONG X_PI_BASE = 0x00; // PCM In Base
48const ULONG X_PO_BASE = 0x10; // PCM Out Base
49const ULONG X_MC_BASE = 0x20; // Mic In Base
50const ULONG X_BDBAR = 0x00; // Buffer Descriptor Base Address Register
51const ULONG X_CIV = 0x04; // Current Index Value
52const ULONG X_LVI = 0x05; // Last Valid Index
53const ULONG X_SR = 0x06; // Status Register
54const ULONG X_PICB = 0x08; // Position In Current Buffer
55const ULONG X_PIV = 0x0A; // Prefetch Index Value
56const ULONG X_CR = 0x0B; // Control Register
57
58// Bits defined in satatus register (*_SR)
59const USHORT SR_FIFOE = 0x0010; // FIFO error
60const USHORT SR_BCIS = 0x0008; // Buffer Completeion Interrupt Status
61const USHORT SR_LVBCI = 0x0004; // Last Valid Buffer Completion Interrupt
62const USHORT SR_CELV = 0x0002; // Last Valid Buffer Completion Interrupt
63
64// Global Control bit defines (GLOB_CNT)
65const ULONG GLOB_CNT_PCM6 = 0x00200000; // 6 Channel Mode bit
66const ULONG GLOB_CNT_PCM4 = 0x00100000; // 4 Channel Mode bit
67const ULONG GLOB_CNT_SRIE = 0x00000020; // Secondary Resume Interrupt Enable
68const ULONG GLOB_CNT_PRIE = 0x00000010; // Primary Resume Interrupt Enable
69const ULONG GLOB_CNT_ACLOFF = 0x00000008; // ACLINK Off
70const ULONG GLOB_CNT_WARM = 0x00000004; // AC97 Warm Reset
71const ULONG GLOB_CNT_COLD = 0x00000002; // AC97 Cold Reset
72const ULONG GLOB_CNT_GIE = 0x00000001; // GPI Interrupt Enable
73
74// Global Status bit defines (GLOB_STA)
75const ULONG GLOB_STA_MC6 = 0x00200000; // Multichannel Capability 6 channel
76const ULONG GLOB_STA_MC4 = 0x00100000; // Multichannel Capability 4 channel
77const ULONG GLOB_STA_MD3 = 0x00020000; // Modem Power Down Semiphore
78const ULONG GLOB_STA_AD3 = 0x00010000; // Audio Power Down Semiphore
79const ULONG GLOB_STA_RCS = 0x00008000; // Read Completion Status
80const ULONG GLOB_STA_B3S12 = 0x00004000; // Bit 3 Slot 12
81const ULONG GLOB_STA_B2S12 = 0x00002000; // Bit 2 Slot 12
82const ULONG GLOB_STA_B1S12 = 0x00001000; // Bit 1 Slot 12
83const ULONG GLOB_STA_SRI = 0x00000800; // Secondary Resume Interrupt
84const ULONG GLOB_STA_PRI = 0x00000400; // Primary Resume Interrupt
85const ULONG GLOB_STA_SCR = 0x00000200; // Secondary Codec Ready
86const ULONG GLOB_STA_PCR = 0x00000100; // Primary Codec Ready
87const ULONG GLOB_STA_MINT = 0x00000080; // Mic In Interrupt
88const ULONG GLOB_STA_POINT = 0x00000040; // PCM Out Interrupt
89const ULONG GLOB_STA_PIINT = 0x00000020; // PCM In Interrupt
90const ULONG GLOB_STA_MOINT = 0x00000004; // Modem Out Interrupt
91
92// CoDec Access Semiphore bit defines (CAS)
93const UCHAR CAS_CAS = 0x01; // Codec Access Semiphore Bit
94
95// DMA Engine Control Register (*_CR) bit defines
96const UCHAR CR_IOCE = 0x10; // Interrupt On Completion Enable
97const UCHAR CR_FEIE = 0x08; // FIFO Error Interrupt Enable
98const UCHAR CR_LVBIE = 0x04; // Last Valid Buffer Interrupt Enable
99const UCHAR CR_RPBM = 0x01; // Run/Pause Bus Master
100const UCHAR CR_RR = 0x02; // Reset Registers (RR)
101
102// BDL policy bits
103const USHORT IOC_ENABLE = 0x8000;
104const USHORT BUP_SET = 0x4000;
105
106#endif //_ICHREG_H_
107
const ULONG GLOB_STA_SCR
Definition: ichreg.h:85
const ULONG X_CR
Definition: ichreg.h:56
const USHORT IOC_ENABLE
Definition: ichreg.h:103
const ULONG GLOB_STA_MC4
Definition: ichreg.h:76
const ULONG X_PICB
Definition: ichreg.h:54
const ULONG GLOB_STA_PCR
Definition: ichreg.h:86
const ULONG GLOB_STA_B3S12
Definition: ichreg.h:80
const ULONG GLOB_CNT_PCM6
Definition: ichreg.h:65
const USHORT SR_FIFOE
Definition: ichreg.h:59
const UCHAR CR_RPBM
Definition: ichreg.h:99
const UCHAR CR_FEIE
Definition: ichreg.h:97
const ULONG PO_CIV
Definition: ichreg.h:29
const ULONG GLOB_CNT_PRIE
Definition: ichreg.h:68
const ULONG GLOB_CNT
Definition: ichreg.h:42
const ULONG GLOB_CNT_ACLOFF
Definition: ichreg.h:69
const ULONG MC_PICB
Definition: ichreg.h:39
const ULONG GLOB_STA_MOINT
Definition: ichreg.h:90
const ULONG PI_CR
Definition: ichreg.h:27
const ULONG MC_CIV
Definition: ichreg.h:36
const ULONG PRIMARY_CODEC
Definition: ichreg.h:17
const ULONG GLOB_CNT_WARM
Definition: ichreg.h:70
const ULONG X_LVI
Definition: ichreg.h:52
const ULONG X_PIV
Definition: ichreg.h:55
const ULONG SECONDARY_CODEC
Definition: ichreg.h:18
const ULONG PI_PIV
Definition: ichreg.h:26
const ULONG MC_PIV
Definition: ichreg.h:40
const UCHAR CAS_CAS
Definition: ichreg.h:93
const ULONG X_SR
Definition: ichreg.h:53
const UCHAR CR_IOCE
Definition: ichreg.h:96
const ULONG X_MC_BASE
Definition: ichreg.h:49
const ULONG GLOB_CNT_COLD
Definition: ichreg.h:71
const ULONG X_PO_BASE
Definition: ichreg.h:48
const ULONG GLOB_CNT_PCM4
Definition: ichreg.h:66
const UCHAR CR_RR
Definition: ichreg.h:100
const ULONG GLOB_CNT_SRIE
Definition: ichreg.h:67
const ULONG X_CIV
Definition: ichreg.h:51
const ULONG GLOB_STA_MD3
Definition: ichreg.h:77
const ULONG GLOB_STA_AD3
Definition: ichreg.h:78
const USHORT SR_BCIS
Definition: ichreg.h:60
const ULONG MC_CR
Definition: ichreg.h:41
const ULONG MC_SR
Definition: ichreg.h:38
const USHORT BUP_SET
Definition: ichreg.h:104
const ULONG PI_BDBAR
Definition: ichreg.h:21
const ULONG PI_PICB
Definition: ichreg.h:25
const ULONG GLOB_STA_B1S12
Definition: ichreg.h:82
const ULONG PI_SR
Definition: ichreg.h:24
const UCHAR CR_LVBIE
Definition: ichreg.h:98
const ULONG GLOB_STA_PRI
Definition: ichreg.h:84
const USHORT SR_CELV
Definition: ichreg.h:62
const ULONG GLOB_STA_SRI
Definition: ichreg.h:83
const ULONG PO_SR
Definition: ichreg.h:31
const ULONG GLOB_STA_B2S12
Definition: ichreg.h:81
const ULONG PO_PIV
Definition: ichreg.h:33
const ULONG PI_LVI
Definition: ichreg.h:23
const ULONG GLOB_STA_RCS
Definition: ichreg.h:79
const ULONG X_BDBAR
Definition: ichreg.h:50
const ULONG GLOB_STA_MC6
Definition: ichreg.h:75
const ULONG GLOB_CNT_GIE
Definition: ichreg.h:72
const ULONG PO_CR
Definition: ichreg.h:34
const ULONG PO_BDBAR
Definition: ichreg.h:28
const ULONG GLOB_STA_PIINT
Definition: ichreg.h:89
const ULONG PO_PICB
Definition: ichreg.h:32
const ULONG PI_CIV
Definition: ichreg.h:22
const ULONG PO_LVI
Definition: ichreg.h:30
const USHORT SR_LVBCI
Definition: ichreg.h:61
const ULONG GLOB_STA_POINT
Definition: ichreg.h:88
const ULONG GLOB_STA
Definition: ichreg.h:43
const ULONG MC_BDBAR
Definition: ichreg.h:35
const ULONG CAS
Definition: ichreg.h:44
const ULONG MC_LVI
Definition: ichreg.h:37
const ULONG GLOB_STA_MINT
Definition: ichreg.h:87
const ULONG X_PI_BASE
Definition: ichreg.h:47
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181