5 /// WDMAUD Interface Definition
7 /// History: 12/02/2008 Created
9 // These are now in sndtypes.h
28 KSSTREAM_HEADER Header
;
29 SOUND_DEVICE_TYPE DeviceType
;
39 MIXERCONTROLDETAILS MixDetails
;
40 MIXERLINECONTROLSW MixControls
;
42 WAVEFORMATEX WaveFormatEx
;
43 WAVEOUTCAPSW WaveOutCaps
;
45 WAVEINCAPSW WaveInCaps
;
49 LPWSTR DeviceInterfaceString
;
50 ULONG DeviceInterfaceStringSize
;
56 ULONG NotificationType
;
66 }WDMAUD_DEVICE_INFO
, *PWDMAUD_DEVICE_INFO
;
72 /// Description: This IOCTL informs wdmaud that an application whats to use wdmsys for a waveOut / waveIn / aux operation
74 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
75 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
76 /// Note: DeviceType identifies the device type, DeviceIndex the index, WaveFormatEx the device details
77 /// Result: is returned in hDevice
78 /// Return Code: STATUS_SUCCESS indicates success, otherwise appropiate error code
81 #define IOCTL_OPEN_WDMAUD \
82 CTL_CODE(FILE_DEVICE_SOUND, \
85 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
88 /// IOCTL_CLOSE_WDMAUD
90 /// Description: This IOCTL informs that an application has finished with wdmsys and closes the connection
92 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
93 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
94 /// Note: DeviceType, DeviceIndex and hDevice must be set
95 /// ReturnCode: STATUS_SUCCESS indicates success
96 /// Prequsites: openend device
98 #define IOCTL_CLOSE_WDMAUD \
99 CTL_CODE(FILE_DEVICE_SOUND, \
102 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS) \
105 /// IOCTL_GETNUMDEVS_TYPE
107 /// Description: This IOCTL queries the number of devices currently present of a specific type. The caller passes a WDMAUD_DEVICE_INFO structure.
109 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
110 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
111 /// Note: The DeviceType contains the requested device type.
112 /// Result: The result is returned in DeviceCount
113 /// ReturnCode: STATUS_SUCCESS indicates success
116 #define IOCTL_GETNUMDEVS_TYPE \
117 CTL_CODE(FILE_DEVICE_SOUND, \
120 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
123 /// IOCTL_SETDEVICE_STATE
125 /// Description: This IOCTL sets an opened waveOut / waveIn / midiIn / midiOut / aux device to specific state
127 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
128 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
129 /// Note: The DeviceType, DeviceIndex, hDevice and State member must be set. State determines the new state
130 /// ReturnCode: STATUS_SUCCESS indicates success
131 /// Prequsites: opened device
133 #define IOCTL_SETDEVICE_STATE \
134 CTL_CODE(FILE_DEVICE_SOUND, \
137 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
142 /// Description: This IOCTL returns the device index by its provided handle
144 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
145 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
146 /// Note: The DeviceType and hDevice must be set
147 /// Result: The result is returned in DeviceIndex
148 /// ReturnCode: STATUS_SUCCESS indicates success
149 /// Prequsites: opened device
151 #define IOCTL_GETDEVID \
152 CTL_CODE(FILE_DEVICE_SOUND, \
155 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
160 /// Description: This IOCTL returns the volume a device
162 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
163 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
164 /// Note: The DeviceType and hDevice must be set
165 /// Result: The result is returned in Volume
166 /// ReturnCode: STATUS_SUCCESS indicates success
167 /// Prequsites: opened device
169 #define IOCTL_GETVOLUME \
170 CTL_CODE(FILE_DEVICE_SOUND, \
173 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
178 /// Description: This IOCTL sets the volume a device
180 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
181 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
182 /// Note: The DeviceType, hDevice and Volume must be set
183 /// ReturnCode: STATUS_SUCCESS indicates success
184 /// Prequsites: opened device
186 #define IOCTL_SETVOLUME \
187 CTL_CODE(FILE_DEVICE_SOUND, \
190 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
193 /// IOCTL_GETCAPABILTIES
195 /// Description: This IOCTL retrieves the capabilties of an specific device
197 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
198 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
199 /// Note: The DeviceType and DeviceIndex must be set
200 /// ReturnCode: STATUS_SUCCESS indicates success
203 #define IOCTL_GETCAPABILITIES \
204 CTL_CODE(FILE_DEVICE_SOUND, \
207 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
212 /// Description: This IOCTL writes data to specified device
214 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
215 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
216 /// Note: The DeviceType, DeviceIndex, hDevice, BufferSize and Buffer must be set
217 /// ReturnCode: STATUS_SUCCESS indicates success
218 /// Prequsites: opened device
220 #define IOCTL_WRITEDATA \
221 CTL_CODE(FILE_DEVICE_SOUND, \
224 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
228 /// Description: This IOCTL retrieves the current playback / write position
230 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
231 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
232 /// Note: The DeviceType and hDevice must be set
233 /// Result: The result is returned in Position
234 /// ReturnCode: STATUS_SUCCESS indicates success
235 /// Prequsites: opened device
237 #define IOCTL_GETPOS \
238 CTL_CODE(FILE_DEVICE_SOUND, \
241 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
243 /// IOCTL_GETFRAMESIZE
245 /// Description: This IOCTL retrieves the frame size requirements for an audio pin
247 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
248 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
249 /// Note: The DeviceType and hDevice must be set
250 /// Result: The result is returned in FrameSize
251 /// ReturnCode: STATUS_SUCCESS indicates success
252 /// Prequsites: opened device
254 #define IOCTL_GETFRAMESIZE \
255 CTL_CODE(FILE_DEVICE_SOUND, \
258 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
260 /// IOCTL_GETLINEINFO
262 /// Description: This IOCTL retrieves information on a mixerline
264 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
265 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
266 /// Note: The hDevice member must be set
267 /// Result: The result is returned in MixLine
268 /// ReturnCode: STATUS_SUCCESS indicates success
269 /// Prequsites: opened device
271 #define IOCTL_GETLINEINFO \
272 CTL_CODE(FILE_DEVICE_SOUND, \
275 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
278 /// IOCTL_GETLINECONTROLS
280 /// Description: This IOCTL retrieves controls of a mixerline
282 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
283 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
284 /// Note: The hDevice member must be set
285 /// Result: The result is returned in MixControls
286 /// ReturnCode: STATUS_SUCCESS indicates success
287 /// Prequsites: opened device
289 #define IOCTL_GETLINECONTROLS \
290 CTL_CODE(FILE_DEVICE_SOUND, \
293 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
296 /// IOCTL_SETCONTROLDETAILS
298 /// Description: This IOCTL sets details of a control of a mixerline
300 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
301 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
302 /// Note: The hDevice member must be set
303 /// ReturnCode: STATUS_SUCCESS indicates success
304 /// Prequsites: opened device
306 #define IOCTL_SETCONTROLDETAILS \
307 CTL_CODE(FILE_DEVICE_SOUND, \
310 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
313 /// IOCTL_GETCONTROLDETAILS
315 /// Description: This IOCTL gets details of a control of a mixerline
317 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
318 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
319 /// Note: The hDevice member must be set
320 /// Result: The result is returned in MixDetails
321 /// ReturnCode: STATUS_SUCCESS indicates success
322 /// Prequsites: opened device
324 #define IOCTL_GETCONTROLDETAILS \
325 CTL_CODE(FILE_DEVICE_SOUND, \
328 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
331 /// IOCTL_QUERYDEVICEINTERFACESTRING
333 /// Description: This IOCTL queries the mixer / playback / recording device for its device interface string
335 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
336 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
337 /// Note: The DeviceType, DeviceIndex must be set
338 /// Result: The size is returned in Interface.DeviceInterfaceStringSize and if a buffer is supplied in Interface.DeviceInterfaceString
339 /// the device interface string is stored
340 /// ReturnCode: STATUS_SUCCESS indicates success
342 #define IOCTL_QUERYDEVICEINTERFACESTRING \
343 CTL_CODE(FILE_DEVICE_SOUND, \
346 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
348 /// IOCTL_GET_MIXER_EVENT
350 /// Description: This IOCTL queries for wdmaud driver if there any new kernel streaming events available
352 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
353 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
354 /// Note: The hDevice member must be set
355 /// Result: The result is returned in the struct MixerInfo
356 /// ReturnCode: STATUS_SUCCESS indicates success
358 #define IOCTL_GET_MIXER_EVENT \
359 CTL_CODE(FILE_DEVICE_SOUND, \
362 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)
364 /// IOCTL_RESET_STREAM
366 /// Description: This IOCTL instructs wdmaud to reset a stream
368 /// Arguments: InputBuffer is a pointer to a WDMAUD_DEVICE_INFO structure,
369 /// InputBufferSize is size of WDMAUD_DEVICE_INFO structure
370 /// Note: The hDevice member must be set and DeviceType
371 /// ReturnCode: STATUS_SUCCESS indicates success
373 #define IOCTL_RESET_STREAM \
374 CTL_CODE(FILE_DEVICE_SOUND, \
377 FILE_CREATE_TREE_CONNECTION | FILE_ANY_ACCESS)