ReactOS  0.4.13-dev-66-gc714b7f
control.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/legacy/wdmaud/deviface.c
5  * PURPOSE: System Audio graph builder
6  * PROGRAMMER: Andrew Greenwood
7  * Johannes Anderwald
8  */
9 
10 #include "wdmaud.h"
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}};
16 
20  IN PIRP Irp,
23 {
24  if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
25  {
27  }
28 
29  if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE || DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
30  {
32  }
33 
34  if (DeviceInfo->DeviceType == MIDI_OUT_DEVICE_TYPE || DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
35  {
37  }
38 
39 
41 }
42 
46  IN PIRP Irp,
49 {
50  ULONG Result = 0;
51 
52  if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
53  {
55  }
56  else if (DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
57  {
59  }
60  else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE)
61  {
63  }
64  else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE)
65  {
67  }
68  else if (DeviceInfo->DeviceType == MIDI_OUT_DEVICE_TYPE)
69  {
71  }
72 
73 
74  /* store result count */
75  DeviceInfo->DeviceCount = Result;
76 
77  DPRINT("WdmAudControlDeviceType Devices %u\n", DeviceInfo->DeviceCount);
79 }
80 
84  IN PIRP Irp,
87 {
89  KSSTATE State;
93 
94  DPRINT("WdmAudControlDeviceState\n");
95 
97  if (!NT_SUCCESS(Status))
98  {
99  DPRINT1("Error: invalid device handle provided %p Type %x\n", DeviceInfo->hDevice, DeviceInfo->DeviceType);
101  }
102 
106 
107  State = DeviceInfo->u.State;
108 
110 
112 
113  DPRINT("WdmAudControlDeviceState Status %x\n", Status);
114  return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
115 }
116 
117 NTSTATUS
120  IN PIRP Irp,
123 {
124  PWDMAUD_DEVICE_EXTENSION DeviceExtension;
126 
127  DPRINT("WdmAudCapabilities entered\n");
128 
130 
131  if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
132  {
134  }
135  else if (DeviceInfo->DeviceType == WAVE_IN_DEVICE_TYPE || DeviceInfo->DeviceType == WAVE_OUT_DEVICE_TYPE)
136  {
138  }
139  else if (DeviceInfo->DeviceType == MIDI_IN_DEVICE_TYPE || DeviceInfo->DeviceType == MIDI_OUT_DEVICE_TYPE)
140  {
142  }
143 
144  return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
145 }
146 
147 NTSTATUS
148 NTAPI
151  IN PIRP Irp,
154 {
155  ULONG Index;
156 
157  for(Index = 0; Index < ClientInfo->NumPins; Index++)
158  {
159  if (ClientInfo->hPins[Index].Handle == DeviceInfo->hDevice && ClientInfo->hPins[Index].Type != MIXER_DEVICE_TYPE)
160  {
161  DPRINT1("Closing device %p\n", DeviceInfo->hDevice);
162  ZwClose(DeviceInfo->hDevice);
163  ClientInfo->hPins[Index].Handle = NULL;
165  return STATUS_SUCCESS;
166  }
167  else if (ClientInfo->hPins[Index].Handle == DeviceInfo->hDevice && ClientInfo->hPins[Index].Type == MIXER_DEVICE_TYPE)
168  {
169  DPRINT1("Closing mixer %p\n", DeviceInfo->hDevice);
171  }
172  }
173 
176 }
177 
178 NTSTATUS
179 NTAPI
182  IN PIRP Irp,
185 {
189  KSALLOCATOR_FRAMING Framing;
191 
192  /* Get sysaudio pin file object */
194  if (!NT_SUCCESS(Status))
195  {
196  DPRINT1("Invalid buffer handle %p\n", DeviceInfo->hDevice);
197  return SetIrpIoStatus(Irp, Status, 0);
198  }
199 
200  /* Setup get framing request */
204 
206  /* Did we succeed */
207  if (NT_SUCCESS(Status))
208  {
209  /* Store framesize */
210  DeviceInfo->u.FrameSize = Framing.FrameSize;
211  }
212 
213  /* Release file object */
215 
216  return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
217 
218 }
219 
220 NTSTATUS
221 NTAPI
224  IN PIRP Irp,
226 {
228  LPWSTR Device;
229  ULONG Size, Length;
230 
231  /* get device interface string input length */
232  Size = DeviceInfo->u.Interface.DeviceInterfaceStringSize;
233 
234  /* get mixer info */
235  Status = WdmAudGetPnpNameByIndexAndType(DeviceInfo->DeviceIndex, DeviceInfo->DeviceType, &Device);
236 
237  /* check for success */
238  if (!NT_SUCCESS(Status))
239  {
240  /* invalid device id */
241  return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
242  }
243 
244  /* calculate length */
245  Length = (wcslen(Device)+1) * sizeof(WCHAR);
246 
247  if (!Size)
248  {
249  /* store device interface size */
250  DeviceInfo->u.Interface.DeviceInterfaceStringSize = Length;
251  }
252  else if (Size < Length)
253  {
254  /* buffer too small */
255  DeviceInfo->u.Interface.DeviceInterfaceStringSize = Length;
257  }
258  else
259  {
260  //FIXME SEH
261  RtlMoveMemory(DeviceInfo->u.Interface.DeviceInterfaceString, Device, Length);
262  }
263 
264  FreeItem(Device);
266 }
267 
268 NTSTATUS
269 NTAPI
272  IN PIRP Irp,
274 {
275  KSRESET ResetStream;
279 
280  DPRINT("WdmAudResetStream\n");
281 
283  if (!NT_SUCCESS(Status))
284  {
285  DPRINT1("Error: invalid device handle provided %p Type %x\n", DeviceInfo->hDevice, DeviceInfo->DeviceType);
287  }
288 
289  ResetStream = DeviceInfo->u.ResetStream;
290  ASSERT(ResetStream == KSRESET_BEGIN || ResetStream == KSRESET_END);
291 
293 
295 
296  DPRINT("WdmAudResetStream Status %x\n", Status);
297  return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
298 }
299 
300 NTSTATUS
301 NTAPI
304  IN PIRP Irp)
305 {
306  PIO_STACK_LOCATION IoStack;
309 
311 
312  DPRINT("WdmAudDeviceControl entered\n");
313 
314  if (IoStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(WDMAUD_DEVICE_INFO))
315  {
316  /* invalid parameter */
317  DPRINT1("Input buffer too small size %u expected %u\n", IoStack->Parameters.DeviceIoControl.InputBufferLength, sizeof(WDMAUD_DEVICE_INFO));
319  }
320 
321  DeviceInfo = (PWDMAUD_DEVICE_INFO)Irp->AssociatedIrp.SystemBuffer;
322 
323  if (DeviceInfo->DeviceType < MIN_SOUND_DEVICE_TYPE || DeviceInfo->DeviceType > MAX_SOUND_DEVICE_TYPE)
324  {
325  /* invalid parameter */
326  DPRINT1("Error: device type not set\n");
328  }
329 
330  if (!IoStack->FileObject || !IoStack->FileObject->FsContext)
331  {
332  /* file object parameter */
333  DPRINT1("Error: file object is not attached\n");
335  }
336  ClientInfo = (PWDMAUD_CLIENT)IoStack->FileObject->FsContext;
337 
338  DPRINT("WdmAudDeviceControl entered\n");
339 
340  switch(IoStack->Parameters.DeviceIoControl.IoControlCode)
341  {
342  case IOCTL_OPEN_WDMAUD:
350  case IOCTL_CLOSE_WDMAUD:
352  case IOCTL_GETFRAMESIZE:
354  case IOCTL_GETLINEINFO:
366  case IOCTL_RESET_STREAM:
368  case IOCTL_GETPOS:
369  case IOCTL_GETDEVID:
370  case IOCTL_GETVOLUME:
371  case IOCTL_SETVOLUME:
372 
373  DPRINT1("Unhandled %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode);
374  break;
375  }
376 
378 }
379 
380 NTSTATUS
381 NTAPI
384  PIRP Irp,
385  PVOID Ctx)
386 {
388  PMDL Mdl, NextMdl;
390 
391  /* get stream header */
392  Header = (PKSSTREAM_HEADER)Irp->AssociatedIrp.SystemBuffer;
393 
394  /* sanity check */
395  ASSERT(Header);
396 
397  /* time to free all allocated mdls */
398  Mdl = Irp->MdlAddress;
399 
400  while(Mdl)
401  {
402  /* get next mdl */
403  NextMdl = Mdl->Next;
404 
405  /* unlock pages */
406  MmUnlockPages(Mdl);
407 
408  /* grab next mdl */
409  Mdl = NextMdl;
410  }
411  //IoFreeMdl(Mdl);
412  /* clear mdl list */
413  Irp->MdlAddress = Context->Mdl;
414 
415 
416 
417  DPRINT("IoCompletion Irp %p IoStatus %lx Information %lx\n", Irp, Irp->IoStatus.Status, Irp->IoStatus.Information);
418 
419  if (!NT_SUCCESS(Irp->IoStatus.Status))
420  {
421  /* failed */
422  Irp->IoStatus.Information = 0;
423  }
424 
425  /* dereference file object */
426  ObDereferenceObject(Context->FileObject);
427 
428  /* free context */
429  FreeItem(Context);
430 
431  return STATUS_SUCCESS;
432 }
433 
434 NTSTATUS
435 NTAPI
438  IN PIRP Irp)
439 {
443  PIO_STACK_LOCATION IoStack;
444  ULONG Length;
445  PMDL Mdl;
446  BOOLEAN Read = TRUE;
448 
449  /* allocate completion context */
451 
452  if (!Context)
453  {
454  /* not enough memory */
455  Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
457 
458  /* done */
460  }
461 
462  /* get current irp stack location */
464 
465  /* store the input buffer in UserBuffer - as KsProbeStreamIrp operates on IRP_MJ_DEVICE_CONTROL */
466  Irp->UserBuffer = MmGetMdlVirtualAddress(Irp->MdlAddress);
467 
468  /* sanity check */
469  ASSERT(Irp->UserBuffer);
470 
471  /* get the length of the request length */
472  Length = IoStack->Parameters.Write.Length;
473 
474  /* store outputbuffer length */
475  IoStack->Parameters.DeviceIoControl.OutputBufferLength = Length;
476 
477  /* setup context */
478  Context->Length = Length;
480  Context->Mdl = Irp->MdlAddress;
481 
482  /* store mdl address */
483  Mdl = Irp->MdlAddress;
484 
485  /* remove mdladdress as KsProbeStreamIrp will interpret it as an already probed audio buffer */
486  Irp->MdlAddress = NULL;
487 
488  if (IoStack->MajorFunction == IRP_MJ_WRITE)
489  {
490  /* probe the write stream irp */
491  Read = FALSE;
492  Status = KsProbeStreamIrp(Irp, KSPROBE_STREAMWRITE | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK, Length);
493  }
494  else
495  {
496  /* probe the read stream irp */
497  Status = KsProbeStreamIrp(Irp, KSPROBE_STREAMREAD | KSPROBE_ALLOCATEMDL | KSPROBE_PROBEANDLOCK, Length);
498  }
499 
500  if (!NT_SUCCESS(Status))
501  {
502  DPRINT1("KsProbeStreamIrp failed with Status %x Cancel %u\n", Status, Irp->Cancel);
503  Irp->MdlAddress = Mdl;
504  FreeItem(Context);
505  return SetIrpIoStatus(Irp, Status, 0);
506  }
507 
508  /* get device info */
509  DeviceInfo = (PWDMAUD_DEVICE_INFO)Irp->AssociatedIrp.SystemBuffer;
511 
512  /* now get sysaudio file object */
514  if (!NT_SUCCESS(Status))
515  {
516  DPRINT1("Invalid pin handle %p\n", DeviceInfo->hDevice);
517  Irp->MdlAddress = Mdl;
518  FreeItem(Context);
519  return SetIrpIoStatus(Irp, Status, 0);
520  }
521 
522  /* store file object whose reference is released in the completion callback */
523  Context->FileObject = FileObject;
524 
525  /* skip current irp stack location */
527 
528  /* get next stack location */
529  IoStack = IoGetNextIrpStackLocation(Irp);
530 
531  /* prepare stack location */
532  IoStack->FileObject = FileObject;
533  IoStack->Parameters.Write.Length = Length;
534  IoStack->MajorFunction = IRP_MJ_WRITE;
535  IoStack->Parameters.DeviceIoControl.IoControlCode = (Read ? IOCTL_KS_READ_STREAM : IOCTL_KS_WRITE_STREAM);
537 
538  /* mark irp as pending */
539 // IoMarkIrpPending(Irp);
540  /* call the driver */
542  return Status;
543 }
NTSTATUS WdmAudControlDeviceType(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:44
MMRESULT WdmAudGetLineInfo(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINEW MixLine, IN ULONG Flags)
Definition: mmixer.c:405
#define IOCTL_SETDEVICE_STATE
Definition: interface.h:134
#define IOCTL_GETCONTROLDETAILS
Definition: interface.h:325
#define IOCTL_KS_PROPERTY
Definition: ks.h:150
#define IN
Definition: typedefs.h:38
_In_ BOOLEAN Read
Definition: strmini.h:479
NTSTATUS WdmAudControlOpenMidi(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: mmixer.c:847
#define IOCTL_KS_WRITE_STREAM
Definition: ks.h:157
#define TRUE
Definition: types.h:120
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
NTSTATUS SetIrpIoStatus(IN PIRP Irp, IN NTSTATUS Status, IN ULONG Length)
Definition: control.c:25
#define IOCTL_QUERYDEVICEINTERFACESTRING
Definition: interface.h:343
#define IOCTL_GETCAPABILITIES
Definition: interface.h:204
_In_ PIRP _In_ PDEVICE_OBJECT Device
Definition: fatprocs.h:2020
struct WDMAUD_CLIENT * PWDMAUD_CLIENT
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define MmGetMdlVirtualAddress(_Mdl)
NTSTATUS WdmAudMixerCapabilities(IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
Definition: mmixer.c:398
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
#define IOCTL_KS_READ_STREAM
Definition: ks.h:164
#define IOCTL_GETLINEINFO
Definition: interface.h:272
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:30
KSDDKAPI NTSTATUS NTAPI KsProbeStreamIrp(IN PIRP Irp, IN ULONG ProbeFlags, IN ULONG HeaderSize)
Definition: irp.c:647
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS WdmAudControlDeviceState(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:82
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
Definition: mdlsup.c:1439
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
Definition: device.c:1538
NTSTATUS WdmAudControlCloseMixer(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN ULONG Index)
Definition: mmixer.c:475
struct KSSTREAM_HEADER * PKSSTREAM_HEADER
NTSTATUS WdmAudCapabilities(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:118
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IOCTL_SETVOLUME
Definition: interface.h:187
#define IOCTL_KS_RESET_STATE
Definition: ks.h:171
ULONG WdmAudGetWaveInDeviceCount()
Definition: mmixer.c:669
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
NTSTATUS NTAPI WdmAudDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:302
KSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice(IN PFILE_OBJECT FileObject, IN KPROCESSOR_MODE RequestorMode, IN ULONG IoControl, IN PVOID InBuffer, IN ULONG InSize, OUT PVOID OutBuffer, IN ULONG OutSize, OUT PULONG BytesReturned)
Definition: api.c:1099
CLIENT_DATA ClientInfo
#define IOCTL_GETDEVID
Definition: interface.h:152
NTSTATUS NTAPI WdmAudResetStream(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo)
Definition: control.c:270
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:496
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
Definition: Header.h:8
#define GENERIC_WRITE
Definition: nt_native.h:90
struct WDMAUD_DEVICE_EXTENSION * PWDMAUD_DEVICE_EXTENSION
#define IOCTL_GETLINECONTROLS
Definition: interface.h:290
ULONG WdmAudGetMidiInDeviceCount()
Definition: mmixer.c:681
MMRESULT WdmAudSetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
Definition: mmixer.c:431
MMRESULT WdmAudGetControlDetails(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERCONTROLDETAILS MixDetails, IN ULONG Flags)
Definition: mmixer.c:445
NTSTATUS WdmAudControlOpenWave(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: mmixer.c:825
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS WdmAudWaveCapabilities(IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
Definition: mmixer.c:721
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
#define IOCTL_OPEN_WDMAUD
Definition: interface.h:82
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
NTSTATUS WdmAudControlOpenMixer(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: mmixer.c:411
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define IOCTL_GETNUMDEVS_TYPE
Definition: interface.h:117
static const UCHAR Index[8]
Definition: usbohci.c:18
struct _DeviceInfo DeviceInfo
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
* PFILE_OBJECT
Definition: iotypes.h:1954
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
MMRESULT WdmAudGetLineControls(IN HANDLE hMixer, IN DWORD MixerId, IN LPMIXERLINECONTROLSW MixControls, IN ULONG Flags)
Definition: mmixer.c:418
#define IOCTL_GETVOLUME
Definition: interface.h:170
static const WCHAR L[]
Definition: oid.c:1250
ULONG WdmAudGetWaveOutDeviceCount()
Definition: mmixer.c:675
NTSTATUS WdmAudGetPnpNameByIndexAndType(IN ULONG DeviceIndex, IN SOUND_DEVICE_TYPE DeviceType, OUT LPWSTR *DevicePath)
Definition: mmixer.c:693
#define GENERIC_READ
Definition: compat.h:124
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
POBJECT_TYPE IoFileObjectType
Definition: iomgr.c:36
Status
Definition: gdiplustypes.h:24
_In_ DWORD Property
Definition: setupapi.h:1545
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
PFILE_OBJECT FileObject
Definition: iotypes.h:2812
enum State_ State
Definition: pofuncs.h:54
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:61
KSSTATE
Definition: ks.h:1244
NTSTATUS NTAPI WdmAudFrameSize(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:180
const GUID KSPROPSETID_Sysaudio
Definition: control.c:15
NTSTATUS WdmAudControlOpen(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:18
NTSTATUS NTAPI WdmAudGetDeviceInterface(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo)
Definition: control.c:222
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
struct WDMAUD_COMPLETION_CONTEXT * PWDMAUD_COMPLETION_CONTEXT
struct WDMAUD_DEVICE_INFO * PWDMAUD_DEVICE_INFO
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define DPRINT1
Definition: precomp.h:8
#define IOCTL_CLOSE_WDMAUD
Definition: interface.h:99
NTSTATUS NTAPI WdmAudGetMixerEvent(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: mmixer.c:620
#define IOCTL_GETPOS
Definition: interface.h:238
NTSTATUS NTAPI WdmAudIoctlClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo)
Definition: control.c:149
struct tagContext Context
Definition: acpixf.h:1012
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
NTSTATUS WdmAudMidiCapabilities(IN PDEVICE_OBJECT DeviceObject, IN PWDMAUD_DEVICE_INFO DeviceInfo, IN PWDMAUD_CLIENT ClientInfo, IN PWDMAUD_DEVICE_EXTENSION DeviceExtension)
Definition: mmixer.c:747
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:565
#define IOCTL_GET_MIXER_EVENT
Definition: interface.h:359
NTSTATUS NTAPI WdmAudReadWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: control.c:436
#define IOCTL_GETFRAMESIZE
Definition: interface.h:255
#define IOCTL_SETCONTROLDETAILS
Definition: interface.h:307
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IOCTL_RESET_STREAM
Definition: interface.h:374
WCHAR * LPWSTR
Definition: xmlstorage.h:184
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2771
const GUID KSPROPSETID_Connection
Definition: control.c:18
return STATUS_SUCCESS
Definition: btrfs.c:2725
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
ULONG WdmAudGetMixerDeviceCount()
Definition: mmixer.c:663
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS NTAPI IoCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Ctx)
Definition: control.c:382
KSRESET
Definition: ks.h:1256
ULONG WdmAudGetMidiOutDeviceCount()
Definition: mmixer.c:687