ReactOS  0.4.13-dev-651-g5dbc677
sb16.h
Go to the documentation of this file.
1 /*
2  ReactOS Operating System
3  Sound Blaster KS Driver
4 
5  AUTHORS:
6  Andrew Greenwood
7 
8  NOTES:
9  Ah, the Sound Blaster 16. I remember it well...
10 */
11 
12 #include <portcls.h>
13 #include <stdunk.h>
14 
15 #ifndef SB16_H
16 #define SB16_H
17 
18 #define MAX_DMA_BUFFER_SIZE 65536
19 
21 {
22  DspRegCMSD0 = 0x00,
23  DspRegCMSR0 = 0x01,
24  DspRegCMSD1 = 0x02,
25  DspRegCMSR1 = 0x03,
28  DspRegReset = 0x06,
29  DspRegFMD0 = 0x08,
30  DspRegFMR0 = 0x09,
31  DspRegRead = 0x0a,
32  DspRegWrite = 0x0c,
34 
35  DspRegAck8 = 0x0e,
36  DspRegAck16 = 0x0f
37 };
38 
40 {
42  DspWriteWave = 0x14,
44  DspReadWave = 0x24,
53  DspPauseDma = 0xd0,
56  DspInverter = 0xe0,
57  DspGetVersion = 0xe1,
59 
60  /* SB16 only */
61  DspSetDacRate = 0x41,
62  DspSetAdcRate = 0x42,
63  DspStartDac16 = 0xb6,
64  DspStartAdc16 = 0xbe,
65  DspStartDac8 = 0xc6,
66  DspStartAdc8 = 0xc3,
67  DspPauseDma16 = 0xd5,
70 };
71 
73 {
78  /* ... */
81 };
82 
83 
84 #define MPU401_OUTPUT_READY 0x40
85 #define MPU401_INPUT_READY 0x80
86 
87 #define MPU401_RESET 0xff
88 #define MPU401_UART_MODE 0x3f
89 
90 DEFINE_GUID(IID_IWaveMiniportSB16,
91  0xbe23b2d7, 0xa760, 0x43ab, 0xb7, 0x6e, 0xbc, 0x3e, 0x93, 0xe6, 0xff, 0x54);
92 
93 DECLARE_INTERFACE_(IWaveMiniportSB16, IUnknown)
94 {
96 
97  STDMETHOD_(void, RestoreSampleRate)( THIS ) PURE;
98  STDMETHOD_(void, ServiceWaveISR)( THIS ) PURE;
99 };
100 
101 typedef IWaveMiniportSB16 *PWAVEMINIPORTSB16;
102 
103 
104 DEFINE_GUID(IID_IAdapterSB16,
105  0xfba9052c, 0x0544, 0x4bc4, 0x97, 0x3f, 0x70, 0xb7, 0x06, 0x46, 0x81, 0xe5);
106 
108 {
110 
114 
115  STDMETHOD_(PINTERRUPTSYNC, GetInterruptSync)( THIS ) PURE;
116 
118  IN PWAVEMINIPORTSB16 Miniport) PURE;
119 
121 
123  IN BYTE Value) PURE;
124 
125  STDMETHOD_(NTSTATUS, Reset)( THIS ) PURE;
126 
127  STDMETHOD_(void, SetMixerValue)( THIS_
128  IN BYTE Index,
129  IN BYTE Value) PURE;
130 
131  STDMETHOD_(BYTE, GetMixerValue)( THIS_
132  IN BYTE Index) PURE;
133 
134  STDMETHOD_(void, ResetMixer)( THIS ) PURE;
135 
136  /* TODO - Save/load settings */
137 };
138 
139 typedef IAdapterSB16 *PADAPTERSB16;
140 
141 #endif
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define IN
Definition: typedefs.h:38
_In_ BOOLEAN Read
Definition: strmini.h:479
DspMixerRegister
Definition: sb16.h:72
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
DEFINE_GUID(IID_IWaveMiniportSB16, 0xbe23b2d7, 0xa760, 0x43ab, 0xb7, 0x6e, 0xbc, 0x3e, 0x93, 0xe6, 0xff, 0x54)
LONG NTSTATUS
Definition: precomp.h:26
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
IWaveMiniportSB16 * PWAVEMINIPORTSB16
Definition: sb16.h:99
unsigned char BOOLEAN
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned char BYTE
Definition: mem.h:68
DspCommand
Definition: sb16.h:39
IAdapterSB16 * PADAPTERSB16
Definition: sb16.h:137
IResourceList * PRESOURCELIST
Definition: portcls.h:442
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
SetWaveMiniport(IN PWAVEMINIPORTSB16 Miniport)
Definition: adapter.cpp:118
#define PURE
Definition: basetyps.h:64
IInterruptSync * PINTERRUPTSYNC
Definition: portcls.h:878
DspRegister
Definition: sb16.h:20
DECLARE_INTERFACE_(IWaveMiniportSB16, IUnknown)
Definition: sb16.h:93
#define STDMETHOD_(t, m)
Definition: basetyps.h:63