ReactOS 0.4.16-dev-91-g764881a
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{
29 DspRegFMD0 = 0x08,
30 DspRegFMR0 = 0x09,
31 DspRegRead = 0x0a,
34
35 DspRegAck8 = 0x0e,
36 DspRegAck16 = 0x0f
37};
38
40{
59
60 /* SB16 only */
69 DspHaltAutoDma16 = 0xd9
70};
71
73{
78 /* ... */
80 DspMixDmaConfig = 0x81
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
90DEFINE_GUID(IID_IWaveMiniportSB16,
91 0xbe23b2d7, 0xa760, 0x43ab, 0xb7, 0x6e, 0xbc, 0x3e, 0x93, 0xe6, 0xff, 0x54);
92
93DECLARE_INTERFACE_(IWaveMiniportSB16, IUnknown)
94{
96
97 STDMETHOD_(void, RestoreSampleRate)( THIS ) PURE;
98 STDMETHOD_(void, ServiceWaveISR)( THIS ) PURE;
99};
100
101typedef IWaveMiniportSB16 *PWAVEMINIPORTSB16;
102
103
104DEFINE_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
139typedef IAdapterSB16 *PADAPTERSB16;
140
141#endif
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
SetWaveMiniport(IN PWAVEMINIPORTSB16 Miniport)
Definition: adapter.cpp:118
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
IInterruptSync * PINTERRUPTSYNC
Definition: portcls.h:888
IResourceList * PRESOURCELIST
Definition: portcls.h:442
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
_In_ BOOLEAN Read
Definition: strmini.h:479
#define IN
Definition: typedefs.h:39
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
DspMixerRegister
Definition: sb16.h:73
@ DspMixVoiceVolumeRight
Definition: sb16.h:77
@ DspMixIrqConfig
Definition: sb16.h:79
@ DspMixMasterVolumeRight
Definition: sb16.h:75
@ DspMixMasterVolumeLeft
Definition: sb16.h:74
@ DspMixDmaConfig
Definition: sb16.h:80
@ DspMixVoiceVolumeLeft
Definition: sb16.h:76
DspRegister
Definition: sb16.h:21
@ DspRegMixerData
Definition: sb16.h:27
@ DspRegCMSD0
Definition: sb16.h:22
@ DspRegCMSD1
Definition: sb16.h:24
@ DspRegRead
Definition: sb16.h:31
@ DspRegFMD0
Definition: sb16.h:29
@ DspRegReset
Definition: sb16.h:28
@ DspRegFMR0
Definition: sb16.h:30
@ DspRegAck8
Definition: sb16.h:35
@ DspRegCMSR0
Definition: sb16.h:23
@ DspRegDataAvailable
Definition: sb16.h:33
@ DspRegAck16
Definition: sb16.h:36
@ DspRegWrite
Definition: sb16.h:32
@ DspRegMixerReg
Definition: sb16.h:26
@ DspRegCMSR1
Definition: sb16.h:25
DspCommand
Definition: sb16.h:40
@ DspSetSampleRate
Definition: sb16.h:48
@ DspReadWave
Definition: sb16.h:44
@ DspSetBlockSize
Definition: sb16.h:49
@ DspWriteWaveProgrammedIo
Definition: sb16.h:41
@ DspSetDacRate
Definition: sb16.h:61
@ DspWriteWave
Definition: sb16.h:42
@ DspStartDac16
Definition: sb16.h:63
@ DspContinueDma
Definition: sb16.h:54
@ DspStartAdc16
Definition: sb16.h:64
@ DspInverter
Definition: sb16.h:56
@ DspPauseDma
Definition: sb16.h:53
@ DspStartAdc8
Definition: sb16.h:66
@ DspWriteWaveAuto
Definition: sb16.h:43
@ DspWriteHighSpeedWave
Definition: sb16.h:46
@ DspHaltAutoDma16
Definition: sb16.h:69
@ DspContinueDma16
Definition: sb16.h:68
@ DspGenerateInterrupt
Definition: sb16.h:58
@ DspStartDac8
Definition: sb16.h:65
@ DspDisableOutput
Definition: sb16.h:51
@ DspOutputStatus
Definition: sb16.h:52
@ DspReadWaveAuto
Definition: sb16.h:45
@ DspReadHighSpeedWave
Definition: sb16.h:47
@ DspPauseDma16
Definition: sb16.h:67
@ DspGetVersion
Definition: sb16.h:57
@ DspHaltAutoDma
Definition: sb16.h:55
@ DspSetAdcRate
Definition: sb16.h:62
@ DspEnableOutput
Definition: sb16.h:50
IWaveMiniportSB16 * PWAVEMINIPORTSB16
Definition: sb16.h:101
IAdapterSB16 * PADAPTERSB16
Definition: sb16.h:139
unsigned char BYTE
Definition: xxhash.c:193