ReactOS  0.4.14-dev-583-g2a1ba2c
sysaudio.h
Go to the documentation of this file.
1 #ifndef _SYSAUDIO_PCH_
2 #define _SYSAUDIO_PCH_
3 
4 #include <portcls.h>
5 
6 typedef struct
7 {
8  HANDLE PinHandle; // handle to audio irp pin
9  ULONG References; // number of clients having a reference to this audio irp pin
10 }PIN_INFO;
11 
12 typedef struct
13 {
14  LIST_ENTRY Entry; // device entry for KsAudioDeviceList
15  UNICODE_STRING DeviceName; // symbolic link of audio device
16 
17  HANDLE Handle; // handle to audio device
18  PFILE_OBJECT FileObject; // file objecto to audio device
19 
20  //PIN_INFO * Pins; // array of PIN_INFO
22 
23 typedef struct
24 {
25  KSDEVICE_HEADER KsDeviceHeader; // ks streaming header - must always be first item in device extension
27  PDEVICE_OBJECT NextDeviceObject; // lower device object
28  ULONG NumberOfKsAudioDevices; // number of audio devices
29 
30  LIST_ENTRY KsAudioDeviceList; // audio device list
31  PVOID KsAudioNotificationEntry; // ks audio notification hook
32  PVOID EchoCancelNotificationEntry; // ks echo cancel notification hook
33  KSPIN_LOCK Lock; // audio device list mutex
34 
35  PFILE_OBJECT KMixerFileObject; // mixer file object
36  HANDLE KMixerHandle; // mixer file handle
37 
39 
40 // struct DISPATCH_CONTEXT
41 //
42 // This structure is used to dispatch read / write / device io requests
43 // It is stored in the file object FsContext2 member
44 // Note: FsContext member is reserved for ks object header
45 
46 typedef struct
47 {
48  KSOBJECT_HEADER ObjectHeader; // pin object header
49  HANDLE Handle; // audio irp pin handle
50  ULONG PinId; // pin id of device
51  PKSAUDIO_DEVICE_ENTRY AudioEntry; // pointer to audio device entry
52 
53  HANDLE hMixerPin; // handle to mixer pin
55 
58  IN SYSAUDIODEVEXT *DeviceExtension);
59 
63 
68 
72  PIRP Irp);
73 
76  IN SYSAUDIODEVEXT *DeviceExtension);
77 
81  IN PHANDLE HandleOut,
82  IN PFILE_OBJECT * FileObjectOut);
83 
86  IN PLIST_ENTRY Head,
87  IN ULONG Index);
88 
90 NTAPI
93  IN PIRP Irp);
94 
95 ULONG
97  PSYSAUDIODEVEXT DeviceExtension,
98  BOOL WaveIn);
99 
100 NTSTATUS
103  PKSPIN_CINSTANCES PinInstances,
104  PKSPIN_CONNECT PinConnect);
105 
106 NTSTATUS
109  IN ULONG PinId,
110  IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat,
111  OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat);
112 
113 PVOID
117 
118 VOID
119 FreeItem(
120  IN PVOID Item);
121 
122 #endif /* _SYSAUDIO_PCH_ */
#define IN
Definition: typedefs.h:38
HANDLE PinHandle
Definition: sysaudio.h:8
LIST_ENTRY Entry
Definition: sysaudio.h:14
_In_ PIRP Irp
Definition: csq.h:116
struct _PIN_INFO PIN_INFO
LONG NTSTATUS
Definition: precomp.h:26
LIST_ENTRY KsAudioDeviceList
Definition: sysaudio.h:30
PKSAUDIO_DEVICE_ENTRY GetListEntry(IN PLIST_ENTRY Head, IN ULONG Index)
Definition: control.c:45
KSPIN_LOCK Lock
Definition: sysaudio.h:33
struct KSAUDIO_DEVICE_ENTRY * PKSAUDIO_DEVICE_ENTRY
ULONG NumberOfKsAudioDevices
Definition: sysaudio.h:28
KSDEVICE_HEADER KsDeviceHeader
Definition: sysaudio.h:25
WCHAR DeviceName[]
Definition: adapter.cpp:21
HANDLE hMixerPin
Definition: sysaudio.h:53
NTSTATUS SysAudioRegisterDeviceInterfaces(IN PDEVICE_OBJECT DeviceObject)
Definition: deviface.c:214
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
unsigned int BOOL
Definition: ntddk_ex.h:94
PKSAUDIO_DEVICE_ENTRY AudioEntry
Definition: sysaudio.h:51
HANDLE KMixerHandle
Definition: sysaudio.h:36
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
NTSTATUS OpenDevice(IN PUNICODE_STRING DeviceName, IN PHANDLE HandleOut, IN PFILE_OBJECT *FileObjectOut)
Definition: deviface.c:21
PFILE_OBJECT FileObject
Definition: sysaudio.h:18
NTSTATUS SysAudioRegisterNotifications(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject)
Definition: deviface.c:172
PDEVICE_OBJECT NextDeviceObject
Definition: sysaudio.h:27
Definition: sysaudio.h:12
PVOID EchoCancelNotificationEntry
Definition: sysaudio.h:32
INT POOL_TYPE
Definition: typedefs.h:76
PVOID KsAudioNotificationEntry
Definition: sysaudio.h:31
static const UCHAR Index[8]
Definition: usbohci.c:18
PFILE_OBJECT KMixerFileObject
Definition: sysaudio.h:35
NTSTATUS SysAudioAllocateDeviceHeader(IN SYSAUDIODEVEXT *DeviceExtension)
Definition: dispatcher.c:104
* PFILE_OBJECT
Definition: iotypes.h:1955
struct DISPATCH_CONTEXT * PDISPATCH_CONTEXT
NTSTATUS GetPinInstanceCount(PKSAUDIO_DEVICE_ENTRY Entry, PKSPIN_CINSTANCES PinInstances, PKSPIN_CONNECT PinConnect)
Definition: control.c:269
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
Definition: typedefs.h:117
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:30
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
ULONG_PTR SIZE_T
Definition: typedefs.h:78
ULONG References
Definition: sysaudio.h:9
NTSTATUS SysAudioOpenKMixer(IN SYSAUDIODEVEXT *DeviceExtension)
Definition: dispatcher.c:132
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
ULONG GetDeviceCount(PSYSAUDIODEVEXT DeviceExtension, BOOL WaveIn)
NTSTATUS ComputeCompatibleFormat(IN PKSAUDIO_DEVICE_ENTRY Entry, IN ULONG PinId, IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat, OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat)
Definition: control.c:135
NTSTATUS SysAudioHandleProperty(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: control.c:288
#define OUT
Definition: typedefs.h:39
struct SYSAUDIODEVEXT * PSYSAUDIODEVEXT
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
unsigned int ULONG
Definition: retypes.h:1
PDEVICE_OBJECT PhysicalDeviceObject
Definition: sysaudio.h:26
HANDLE Handle
Definition: sysaudio.h:49
NTSTATUS NTAPI DispatchCreateSysAudioPin(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pin.c:431
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
base of all file and directory entries
Definition: entries.h:82
UNICODE_STRING DeviceName
Definition: sysaudio.h:15
HANDLE Handle
Definition: sysaudio.h:17