[WDMAUD.DRV]
[reactos.git] / reactos / drivers / wdm / audio / legacy / wdmaud / wdmaud.h
1 #ifndef WDMAUD_H__
2 #define WDMAUD_H__
3
4 #include <pseh/pseh2.h>
5 #include <ntddk.h>
6 #include <portcls.h>
7 #include <ks.h>
8 #define NDEBUG
9 #include <debug.h>
10 #include <ksmedia.h>
11 #include <mmsystem.h>
12 #include <stdlib.h>
13 #include <stdio.h>
14 #include <wchar.h>
15
16 #include "interface.h"
17
18 typedef struct
19 {
20 HANDLE Handle;
21 SOUND_DEVICE_TYPE Type;
22 ULONG FilterId;
23 ULONG PinId;
24 }WDMAUD_HANDLE, *PWDMAUD_HANDLE;
25
26
27 typedef struct
28 {
29 HANDLE hProcess;
30 ULONG NumPins;
31 WDMAUD_HANDLE * hPins;
32
33 }WDMAUD_CLIENT, *PWDMAUD_CLIENT;
34
35 typedef struct
36 {
37 LIST_ENTRY Entry;
38 UNICODE_STRING SymbolicLink;
39 }SYSAUDIO_ENTRY, *PSYSAUDIO_ENTRY;
40
41 typedef struct
42 {
43 KSDEVICE_HEADER DeviceHeader;
44 PVOID SysAudioNotification;
45
46 BOOL DeviceInterfaceSupport;
47
48 KSPIN_LOCK Lock;
49 ULONG NumSysAudioDevices;
50 LIST_ENTRY SysAudioDeviceList;
51 HANDLE hSysAudio;
52 PFILE_OBJECT FileObject;
53
54 }WDMAUD_DEVICE_EXTENSION, *PWDMAUD_DEVICE_EXTENSION;
55
56 typedef struct
57 {
58 KSSTREAM_HEADER Header;
59 PIRP Irp;
60 }CONTEXT_WRITE, *PCONTEXT_WRITE;
61
62 NTSTATUS
63 WdmAudRegisterDeviceInterface(
64 IN PDEVICE_OBJECT PhysicalDeviceObject,
65 IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
66
67 NTSTATUS
68 WdmAudOpenSysAudioDevices(
69 IN PDEVICE_OBJECT DeviceObject,
70 IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
71
72 NTSTATUS
73 WdmAudOpenSysaudio(
74 IN PDEVICE_OBJECT DeviceObject,
75 IN PWDMAUD_CLIENT *pClient);
76
77 NTSTATUS
78 NTAPI
79 WdmAudDeviceControl(
80 IN PDEVICE_OBJECT DeviceObject,
81 IN PIRP Irp);
82
83 NTSTATUS
84 NTAPI
85 WdmAudWrite(
86 IN PDEVICE_OBJECT DeviceObject,
87 IN PIRP Irp);
88
89 NTSTATUS
90 WdmAudControlOpenMixer(
91 IN PDEVICE_OBJECT DeviceObject,
92 IN PIRP Irp,
93 IN PWDMAUD_DEVICE_INFO DeviceInfo,
94 IN PWDMAUD_CLIENT ClientInfo);
95
96 ULONG
97 GetNumOfMixerDevices(
98 IN PDEVICE_OBJECT DeviceObject);
99
100 NTSTATUS
101 SetIrpIoStatus(
102 IN PIRP Irp,
103 IN NTSTATUS Status,
104 IN ULONG Length);
105
106 NTSTATUS
107 WdmAudOpenSysAudioDevice(
108 IN LPWSTR DeviceName,
109 OUT PHANDLE Handle);
110
111 NTSTATUS
112 FindProductName(
113 IN LPWSTR PnpName,
114 IN ULONG ProductNameSize,
115 OUT LPWSTR ProductName);
116
117 NTSTATUS
118 WdmAudMixerCapabilities(
119 IN PDEVICE_OBJECT DeviceObject,
120 IN PWDMAUD_DEVICE_INFO DeviceInfo,
121 IN PWDMAUD_CLIENT ClientInfo);
122
123 #endif