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
;
48 LPWSTR DeviceInterfaceString
;
49 ULONG DeviceInterfaceStringSize
;
55 ULONG NotificationType
;
65 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
71 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
73 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
74 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
75 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
76 /// Result: is returned in hDevice
77 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
80 #define IOCTL_OPEN_WDMAUD \
81 CTL_CODE(FILE_DEVICE_SOUND, \
84 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
87 /// IOCTL_CLOSE_WDMAUD
89 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
91 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
92 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
93 /// Note: DeviceType, DeviceIndex and hDevice must be set
94 /// ReturnCode: STATUS_SUCCESS indicates success
95 /// Prequsites: openend device
97 #define IOCTL_CLOSE_WDMAUD \
98 CTL_CODE(FILE_DEVICE_SOUND, \
101 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
104 /// IOCTL_GETNUMDEVS_TYPE
106 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
108 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
109 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
110 /// Note: The DeviceType contains the requested device type.
111 /// Result: The result is returned in DeviceCount
112 /// ReturnCode: STATUS_SUCCESS indicates success
115 #define IOCTL_GETNUMDEVS_TYPE \
116 CTL_CODE(FILE_DEVICE_SOUND, \
119 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
122 /// IOCTL_SETDEVICE_STATE
124 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
126 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
127 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
128 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
129 /// ReturnCode: STATUS_SUCCESS indicates success
130 /// Prequsites: opened device
132 #define IOCTL_SETDEVICE_STATE \
133 CTL_CODE(FILE_DEVICE_SOUND, \
136 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
141 /// Description: This IOCTL returns the device index by its provided handle
143 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
144 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
145 /// Note: The DeviceType and hDevice must be set
146 /// Result: The result is returned in DeviceIndex
147 /// ReturnCode: STATUS_SUCCESS indicates success
148 /// Prequsites: opened device
150 #define IOCTL_GETDEVID \
151 CTL_CODE(FILE_DEVICE_SOUND, \
154 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
159 /// Description: This IOCTL returns the volume a device
161 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
162 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
163 /// Note: The DeviceType and hDevice must be set
164 /// Result: The result is returned in Volume
165 /// ReturnCode: STATUS_SUCCESS indicates success
166 /// Prequsites: opened device
168 #define IOCTL_GETVOLUME \
169 CTL_CODE(FILE_DEVICE_SOUND, \
172 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
177 /// Description: This IOCTL sets the volume a device
179 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
180 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
181 /// Note: The DeviceType, hDevice and Volume must be set
182 /// ReturnCode: STATUS_SUCCESS indicates success
183 /// Prequsites: opened device
185 #define IOCTL_SETVOLUME \
186 CTL_CODE(FILE_DEVICE_SOUND, \
189 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
192 /// IOCTL_GETCAPABILTIES
194 /// Description: This IOCTL retrieves the capabilties of an specific device
196 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
197 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
198 /// Note: The DeviceType and DeviceIndex must be set
199 /// ReturnCode: STATUS_SUCCESS indicates success
202 #define IOCTL_GETCAPABILITIES \
203 CTL_CODE(FILE_DEVICE_SOUND, \
206 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
211 /// Description: This IOCTL writes data to specified device
213 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
214 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
215 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
216 /// ReturnCode: STATUS_SUCCESS indicates success
217 /// Prequsites: opened device
219 #define IOCTL_WRITEDATA \
220 CTL_CODE(FILE_DEVICE_SOUND, \
223 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
227 /// Description: This IOCTL retrieves the current playback / write position
229 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
230 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
231 /// Note: The DeviceType and hDevice must be set
232 /// Result: The result is returned in Position
233 /// ReturnCode: STATUS_SUCCESS indicates success
234 /// Prequsites: opened device
236 #define IOCTL_GETPOS \
237 CTL_CODE(FILE_DEVICE_SOUND, \
240 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
242 /// IOCTL_GETFRAMESIZE
244 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
246 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
247 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
248 /// Note: The DeviceType and hDevice must be set
249 /// Result: The result is returned in FrameSize
250 /// ReturnCode: STATUS_SUCCESS indicates success
251 /// Prequsites: opened device
253 #define IOCTL_GETFRAMESIZE \
254 CTL_CODE(FILE_DEVICE_SOUND, \
257 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
259 /// IOCTL_GETLINEINFO
261 /// Description: This IOCTL retrieves information on a mixerline
263 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
264 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
265 /// Note: The hDevice member must be set
266 /// Result: The result is returned in MixLine
267 /// ReturnCode: STATUS_SUCCESS indicates success
268 /// Prequsites: opened device
270 #define IOCTL_GETLINEINFO \
271 CTL_CODE(FILE_DEVICE_SOUND, \
274 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
277 /// IOCTL_GETLINECONTROLS
279 /// Description: This IOCTL retrieves controls of a mixerline
281 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
282 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
283 /// Note: The hDevice member must be set
284 /// Result: The result is returned in MixControls
285 /// ReturnCode: STATUS_SUCCESS indicates success
286 /// Prequsites: opened device
288 #define IOCTL_GETLINECONTROLS \
289 CTL_CODE(FILE_DEVICE_SOUND, \
292 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
295 /// IOCTL_SETCONTROLDETAILS
297 /// Description: This IOCTL sets details of a control of a mixerline
299 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
300 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
301 /// Note: The hDevice member must be set
302 /// ReturnCode: STATUS_SUCCESS indicates success
303 /// Prequsites: opened device
305 #define IOCTL_SETCONTROLDETAILS \
306 CTL_CODE(FILE_DEVICE_SOUND, \
309 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
312 /// IOCTL_GETCONTROLDETAILS
314 /// Description: This IOCTL gets details of a control of a mixerline
316 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
317 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
318 /// Note: The hDevice member must be set
319 /// Result: The result is returned in MixDetails
320 /// ReturnCode: STATUS_SUCCESS indicates success
321 /// Prequsites: opened device
323 #define IOCTL_GETCONTROLDETAILS \
324 CTL_CODE(FILE_DEVICE_SOUND, \
327 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
330 /// IOCTL_QUERYDEVICEINTERFACESTRING
332 /// Description: This IOCTL queries the mixer / playback / recording device for its device interface string
334 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
335 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
336 /// Note: The DeviceType, DeviceIndex must be set
337 /// Result: The size is returned in Interface.DeviceInterfaceStringSize and if a buffer is supplied in Interface.DeviceInterfaceString
338 /// the device interface string is stored
339 /// ReturnCode: STATUS_SUCCESS indicates success
341 #define IOCTL_QUERYDEVICEINTERFACESTRING \
342 CTL_CODE(FILE_DEVICE_SOUND, \
345 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
347 /// IOCTL_GET_MIXER_EVENT
349 /// Description: This IOCTL queries for wdmaud driver if there any new kernel streaming events available
351 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
352 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
353 /// Note: The hDevice member must be set
354 /// Result: The result is returned in the struct MixerInfo
355 /// ReturnCode: STATUS_SUCCESS indicates success
357 #define IOCTL_GET_MIXER_EVENT \
358 CTL_CODE(FILE_DEVICE_SOUND, \
361 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
363 /// IOCTL_RESET_STREAM
365 /// Description: This IOCTL instructs wdmaud to reset a stream
367 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
368 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
369 /// Note: The hDevice member must be set and DeviceType
370 /// ReturnCode: STATUS_SUCCESS indicates success
372 #define IOCTL_RESET_STREAM \
373 CTL_CODE(FILE_DEVICE_SOUND, \
376 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)