ReactOS 0.4.15-dev-8096-ga0eec98
sysaudio.h
Go to the documentation of this file.
1#ifndef _SYSAUDIO_PCH_
2#define _SYSAUDIO_PCH_
3
4#include <portcls.h>
5
6typedef struct
7{
8 HANDLE PinHandle; // handle to audio irp pin
9 ULONG References; // number of clients having a reference to this audio irp pin
11
12typedef 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
23typedef 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
46typedef 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
93 IN PIRP Irp);
94
97 PSYSAUDIODEVEXT DeviceExtension,
98 BOOL WaveIn);
99
103 PKSPIN_CINSTANCES PinInstances,
104 PKSPIN_CONNECT PinConnect);
105
109 IN ULONG PinId,
110 IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat,
111 OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat);
112
113PVOID
117
118VOID
120 IN PVOID Item);
121
122#endif /* _SYSAUDIO_PCH_ */
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int BOOL
Definition: ntddk_ex.h:94
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
HANDLE hMixerPin
Definition: sysaudio.h:53
HANDLE Handle
Definition: sysaudio.h:49
PKSAUDIO_DEVICE_ENTRY AudioEntry
Definition: sysaudio.h:51
base of all file and directory entries
Definition: entries.h:83
Definition: sysaudio.h:13
PFILE_OBJECT FileObject
Definition: sysaudio.h:18
HANDLE Handle
Definition: sysaudio.h:17
UNICODE_STRING DeviceName
Definition: sysaudio.h:15
LIST_ENTRY Entry
Definition: sysaudio.h:14
ULONG References
Definition: sysaudio.h:9
HANDLE PinHandle
Definition: sysaudio.h:8
KSDEVICE_HEADER KsDeviceHeader
Definition: sysaudio.h:25
PVOID EchoCancelNotificationEntry
Definition: sysaudio.h:32
PVOID KsAudioNotificationEntry
Definition: sysaudio.h:31
LIST_ENTRY KsAudioDeviceList
Definition: sysaudio.h:30
PDEVICE_OBJECT NextDeviceObject
Definition: sysaudio.h:27
KSPIN_LOCK Lock
Definition: sysaudio.h:33
ULONG NumberOfKsAudioDevices
Definition: sysaudio.h:28
PDEVICE_OBJECT PhysicalDeviceObject
Definition: sysaudio.h:26
PFILE_OBJECT KMixerFileObject
Definition: sysaudio.h:35
HANDLE KMixerHandle
Definition: sysaudio.h:36
Definition: typedefs.h:120
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:29
NTSTATUS ComputeCompatibleFormat(IN PKSAUDIO_DEVICE_ENTRY Entry, IN ULONG PinId, IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat, OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat)
Definition: control.c:135
NTSTATUS SysAudioRegisterNotifications(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject)
Definition: deviface.c:172
struct SYSAUDIODEVEXT * PSYSAUDIODEVEXT
NTSTATUS SysAudioHandleProperty(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: control.c:288
ULONG GetDeviceCount(PSYSAUDIODEVEXT DeviceExtension, BOOL WaveIn)
struct DISPATCH_CONTEXT * PDISPATCH_CONTEXT
NTSTATUS SysAudioAllocateDeviceHeader(IN SYSAUDIODEVEXT *DeviceExtension)
Definition: dispatcher.c:104
NTSTATUS GetPinInstanceCount(PKSAUDIO_DEVICE_ENTRY Entry, PKSPIN_CINSTANCES PinInstances, PKSPIN_CONNECT PinConnect)
Definition: control.c:269
NTSTATUS SysAudioOpenKMixer(IN SYSAUDIODEVEXT *DeviceExtension)
Definition: dispatcher.c:132
NTSTATUS NTAPI DispatchCreateSysAudioPin(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pin.c:431
PKSAUDIO_DEVICE_ENTRY GetListEntry(IN PLIST_ENTRY Head, IN ULONG Index)
Definition: control.c:45
NTSTATUS SysAudioRegisterDeviceInterfaces(IN PDEVICE_OBJECT DeviceObject)
Definition: deviface.c:214
struct KSAUDIO_DEVICE_ENTRY * PKSAUDIO_DEVICE_ENTRY
NTSTATUS OpenDevice(IN PUNICODE_STRING DeviceName, IN PHANDLE HandleOut, IN PFILE_OBJECT *FileObjectOut)
Definition: deviface.c:21
VOID FreeItem(IN PVOID Item)
Definition: misc.c:37
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
* PFILE_OBJECT
Definition: iotypes.h:1998
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036