Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygensb16.h
Go to the documentation of this file.
00001 /* 00002 ReactOS Operating System 00003 Sound Blaster KS Driver 00004 00005 AUTHORS: 00006 Andrew Greenwood 00007 00008 NOTES: 00009 Ah, the Sound Blaster 16. I remember it well... 00010 */ 00011 00012 #include <portcls.h> 00013 #include <stdunk.h> 00014 00015 #ifndef SB16_H 00016 #define SB16_H 00017 00018 #define MAX_DMA_BUFFER_SIZE 65536 00019 00020 enum DspRegister 00021 { 00022 DspRegCMSD0 = 0x00, 00023 DspRegCMSR0 = 0x01, 00024 DspRegCMSD1 = 0x02, 00025 DspRegCMSR1 = 0x03, 00026 DspRegMixerReg = 0x04, 00027 DspRegMixerData = 0x05, 00028 DspRegReset = 0x06, 00029 DspRegFMD0 = 0x08, 00030 DspRegFMR0 = 0x09, 00031 DspRegRead = 0x0a, 00032 DspRegWrite = 0x0c, 00033 DspRegDataAvailable = 0x0e, 00034 00035 DspRegAck8 = 0x0e, 00036 DspRegAck16 = 0x0f 00037 }; 00038 00039 enum DspCommand 00040 { 00041 DspWriteWaveProgrammedIo = 0x10, 00042 DspWriteWave = 0x14, 00043 DspWriteWaveAuto = 0x1c, 00044 DspReadWave = 0x24, 00045 DspReadWaveAuto = 0x2C, 00046 DspWriteHighSpeedWave = 0x90, 00047 DspReadHighSpeedWave = 0x98, 00048 DspSetSampleRate = 0x40, 00049 DspSetBlockSize = 0x48, 00050 DspEnableOutput = 0xd1, 00051 DspDisableOutput = 0xd3, 00052 DspOutputStatus = 0xd8, 00053 DspPauseDma = 0xd0, 00054 DspContinueDma = 0xd4, 00055 DspHaltAutoDma = 0xda, 00056 DspInverter = 0xe0, 00057 DspGetVersion = 0xe1, 00058 DspGenerateInterrupt = 0xf2, 00059 00060 /* SB16 only */ 00061 DspSetDacRate = 0x41, 00062 DspSetAdcRate = 0x42, 00063 DspStartDac16 = 0xb6, 00064 DspStartAdc16 = 0xbe, 00065 DspStartDac8 = 0xc6, 00066 DspStartAdc8 = 0xc3, 00067 DspPauseDma16 = 0xd5, 00068 DspContinueDma16 = 0xd6, 00069 DspHaltAutoDma16 = 0xd9 00070 }; 00071 00072 enum DspMixerRegister 00073 { 00074 DspMixMasterVolumeLeft = 0x00, 00075 DspMixMasterVolumeRight = 0x01, 00076 DspMixVoiceVolumeLeft = 0x02, 00077 DspMixVoiceVolumeRight = 0x03, 00078 /* ... */ 00079 DspMixIrqConfig = 0x80, 00080 DspMixDmaConfig = 0x81 00081 }; 00082 00083 00084 #define MPU401_OUTPUT_READY 0x40 00085 #define MPU401_INPUT_READY 0x80 00086 00087 #define MPU401_RESET 0xff 00088 #define MPU401_UART_MODE 0x3f 00089 00090 DEFINE_GUID(IID_IWaveMiniportSB16, 00091 0xbe23b2d7, 0xa760, 0x43ab, 0xb7, 0x6e, 0xbc, 0x3e, 0x93, 0xe6, 0xff, 0x54); 00092 00093 DECLARE_INTERFACE_(IWaveMiniportSB16, IUnknown) 00094 { 00095 DEFINE_ABSTRACT_UNKNOWN() 00096 00097 STDMETHOD_(void, RestoreSampleRate)( THIS ) PURE; 00098 STDMETHOD_(void, ServiceWaveISR)( THIS ) PURE; 00099 }; 00100 00101 typedef IWaveMiniportSB16 *PWAVEMINIPORTSB16; 00102 00103 00104 DEFINE_GUID(IID_IAdapterSB16, 00105 0xfba9052c, 0x0544, 0x4bc4, 0x97, 0x3f, 0x70, 0xb7, 0x06, 0x46, 0x81, 0xe5); 00106 00107 DECLARE_INTERFACE_(IAdapterSB16, IUnknown) 00108 { 00109 DEFINE_ABSTRACT_UNKNOWN() 00110 00111 STDMETHOD_(NTSTATUS, Init)( THIS_ 00112 IN PRESOURCELIST ResourceList, 00113 IN PDEVICE_OBJECT DeviceObject) PURE; 00114 00115 STDMETHOD_(PINTERRUPTSYNC, GetInterruptSync)( THIS ) PURE; 00116 00117 STDMETHOD_(void, SetWaveMiniport)( THIS_ 00118 IN PWAVEMINIPORTSB16 Miniport) PURE; 00119 00120 STDMETHOD_(BYTE, Read)( THIS ) PURE; 00121 00122 STDMETHOD_(BOOLEAN, Write)( THIS_ 00123 IN BYTE Value) PURE; 00124 00125 STDMETHOD_(NTSTATUS, Reset)( THIS ) PURE; 00126 00127 STDMETHOD_(void, SetMixerValue)( THIS_ 00128 IN BYTE Index, 00129 IN BYTE Value) PURE; 00130 00131 STDMETHOD_(BYTE, GetMixerValue)( THIS_ 00132 IN BYTE Index) PURE; 00133 00134 STDMETHOD_(void, ResetMixer)( THIS ) PURE; 00135 00136 /* TODO - Save/load settings */ 00137 }; 00138 00139 typedef IAdapterSB16 *PADAPTERSB16; 00140 00141 #endif Generated on Sun May 27 2012 04:28:01 for ReactOS by
1.7.6.1
|