4 /// WDMAUD Interface Definition
6 /// History: 12/02/2008 Created
8 // These are now in sndtypes.h
27 KSSTREAM_HEADER Header
;
28 SOUND_DEVICE_TYPE DeviceType
;
29 ULONG_PTR DeviceIndex
;
38 MIXERCONTROLDETAILS MixDetails
;
39 MIXERLINECONTROLSW MixControls
;
41 WAVEFORMATEX WaveFormatEx
;
42 WAVEOUTCAPSW WaveOutCaps
;
44 WAVEINCAPSW WaveInCaps
;
45 MIDIINCAPSW MidiInCaps
;
46 MIDIOUTCAPSW MidiOutCaps
;
50 LPWSTR DeviceInterfaceString
;
51 ULONG DeviceInterfaceStringSize
;
57 ULONG NotificationType
;
67 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
73 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
75 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
76 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
77 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
78 /// Result: is returned in hDevice
79 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
82 #define IOCTL_OPEN_WDMAUD \
83 CTL_CODE(FILE_DEVICE_SOUND, \
86 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
89 /// IOCTL_CLOSE_WDMAUD
91 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
93 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
94 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
95 /// Note: DeviceType, DeviceIndex and hDevice must be set
96 /// ReturnCode: STATUS_SUCCESS indicates success
97 /// Prequsites: openend device
99 #define IOCTL_CLOSE_WDMAUD \
100 CTL_CODE(FILE_DEVICE_SOUND, \
103 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
106 /// IOCTL_GETNUMDEVS_TYPE
108 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
110 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
111 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
112 /// Note: The DeviceType contains the requested device type.
113 /// Result: The result is returned in DeviceCount
114 /// ReturnCode: STATUS_SUCCESS indicates success
117 #define IOCTL_GETNUMDEVS_TYPE \
118 CTL_CODE(FILE_DEVICE_SOUND, \
121 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
124 /// IOCTL_SETDEVICE_STATE
126 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
128 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
129 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
130 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
131 /// ReturnCode: STATUS_SUCCESS indicates success
132 /// Prequsites: opened device
134 #define IOCTL_SETDEVICE_STATE \
135 CTL_CODE(FILE_DEVICE_SOUND, \
138 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
143 /// Description: This IOCTL returns the device index by its provided handle
145 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
146 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
147 /// Note: The DeviceType and hDevice must be set
148 /// Result: The result is returned in DeviceIndex
149 /// ReturnCode: STATUS_SUCCESS indicates success
150 /// Prequsites: opened device
152 #define IOCTL_GETDEVID \
153 CTL_CODE(FILE_DEVICE_SOUND, \
156 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
161 /// Description: This IOCTL returns the volume a device
163 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
164 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
165 /// Note: The DeviceType and hDevice must be set
166 /// Result: The result is returned in Volume
167 /// ReturnCode: STATUS_SUCCESS indicates success
168 /// Prequsites: opened device
170 #define IOCTL_GETVOLUME \
171 CTL_CODE(FILE_DEVICE_SOUND, \
174 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
179 /// Description: This IOCTL sets the volume a device
181 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
182 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
183 /// Note: The DeviceType, hDevice and Volume must be set
184 /// ReturnCode: STATUS_SUCCESS indicates success
185 /// Prequsites: opened device
187 #define IOCTL_SETVOLUME \
188 CTL_CODE(FILE_DEVICE_SOUND, \
191 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
194 /// IOCTL_GETCAPABILTIES
196 /// Description: This IOCTL retrieves the capabilties of an specific device
198 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
199 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
200 /// Note: The DeviceType and DeviceIndex must be set
201 /// ReturnCode: STATUS_SUCCESS indicates success
204 #define IOCTL_GETCAPABILITIES \
205 CTL_CODE(FILE_DEVICE_SOUND, \
208 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
213 /// Description: This IOCTL writes data to specified device
215 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
216 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
217 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
218 /// ReturnCode: STATUS_SUCCESS indicates success
219 /// Prequsites: opened device
221 #define IOCTL_WRITEDATA \
222 CTL_CODE(FILE_DEVICE_SOUND, \
225 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
229 /// Description: This IOCTL retrieves the current playback / write position
231 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
232 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
233 /// Note: The DeviceType and hDevice must be set
234 /// Result: The result is returned in Position
235 /// ReturnCode: STATUS_SUCCESS indicates success
236 /// Prequsites: opened device
238 #define IOCTL_GETPOS \
239 CTL_CODE(FILE_DEVICE_SOUND, \
242 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
244 /// IOCTL_GETFRAMESIZE
246 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
248 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
249 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
250 /// Note: The DeviceType and hDevice must be set
251 /// Result: The result is returned in FrameSize
252 /// ReturnCode: STATUS_SUCCESS indicates success
253 /// Prequsites: opened device
255 #define IOCTL_GETFRAMESIZE \
256 CTL_CODE(FILE_DEVICE_SOUND, \
259 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
261 /// IOCTL_GETLINEINFO
263 /// Description: This IOCTL retrieves information on a mixerline
265 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
266 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
267 /// Note: The hDevice member must be set
268 /// Result: The result is returned in MixLine
269 /// ReturnCode: STATUS_SUCCESS indicates success
270 /// Prequsites: opened device
272 #define IOCTL_GETLINEINFO \
273 CTL_CODE(FILE_DEVICE_SOUND, \
276 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
279 /// IOCTL_GETLINECONTROLS
281 /// Description: This IOCTL retrieves controls of a mixerline
283 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
284 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
285 /// Note: The hDevice member must be set
286 /// Result: The result is returned in MixControls
287 /// ReturnCode: STATUS_SUCCESS indicates success
288 /// Prequsites: opened device
290 #define IOCTL_GETLINECONTROLS \
291 CTL_CODE(FILE_DEVICE_SOUND, \
294 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
297 /// IOCTL_SETCONTROLDETAILS
299 /// Description: This IOCTL sets details of a control of a mixerline
301 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
302 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
303 /// Note: The hDevice member must be set
304 /// ReturnCode: STATUS_SUCCESS indicates success
305 /// Prequsites: opened device
307 #define IOCTL_SETCONTROLDETAILS \
308 CTL_CODE(FILE_DEVICE_SOUND, \
311 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
314 /// IOCTL_GETCONTROLDETAILS
316 /// Description: This IOCTL gets details of a control of a mixerline
318 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
319 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
320 /// Note: The hDevice member must be set
321 /// Result: The result is returned in MixDetails
322 /// ReturnCode: STATUS_SUCCESS indicates success
323 /// Prequsites: opened device
325 #define IOCTL_GETCONTROLDETAILS \
326 CTL_CODE(FILE_DEVICE_SOUND, \
329 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
332 /// IOCTL_QUERYDEVICEINTERFACESTRING
334 /// Description: This IOCTL queries the mixer / playback / recording device for its device interface string
336 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
337 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
338 /// Note: The DeviceType, DeviceIndex must be set
339 /// Result: The size is returned in Interface.DeviceInterfaceStringSize and if a buffer is supplied in Interface.DeviceInterfaceString
340 /// the device interface string is stored
341 /// ReturnCode: STATUS_SUCCESS indicates success
343 #define IOCTL_QUERYDEVICEINTERFACESTRING \
344 CTL_CODE(FILE_DEVICE_SOUND, \
347 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
349 /// IOCTL_GET_MIXER_EVENT
351 /// Description: This IOCTL queries for wdmaud driver if there any new kernel streaming events available
353 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
354 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
355 /// Note: The hDevice member must be set
356 /// Result: The result is returned in the struct MixerInfo
357 /// ReturnCode: STATUS_SUCCESS indicates success
359 #define IOCTL_GET_MIXER_EVENT \
360 CTL_CODE(FILE_DEVICE_SOUND, \
363 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
365 /// IOCTL_RESET_STREAM
367 /// Description: This IOCTL instructs wdmaud to reset a stream
369 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
370 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
371 /// Note: The hDevice member must be set and DeviceType
372 /// ReturnCode: STATUS_SUCCESS indicates success
374 #define IOCTL_RESET_STREAM \
375 CTL_CODE(FILE_DEVICE_SOUND, \
378 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)