15 HANDLE PinHandle
; // handle to audio irp pin
16 ULONG References
; // number of clients having a reference to this audio irp pin
21 LIST_ENTRY Entry
; // device entry for KsAudioDeviceList
22 UNICODE_STRING DeviceName
; // symbolic link of audio device
24 HANDLE Handle
; // handle to audio device
25 PFILE_OBJECT FileObject
; // file objecto to audio device
27 PIN_INFO
* Pins
; // array of PIN_INFO
28 ULONG PinDescriptorsCount
; // number of pin descriptors
29 KSPIN_DESCRIPTOR
*PinDescriptors
; // pin descriptors array
30 }KSAUDIO_DEVICE_ENTRY
, *PKSAUDIO_DEVICE_ENTRY
;
34 KSDEVICE_HEADER KsDeviceHeader
; // ks streaming header - must always be first item in device extension
35 PDEVICE_OBJECT PhysicalDeviceObject
; // pdo
36 PDEVICE_OBJECT NextDeviceObject
; // lower device object
37 ULONG NumberOfKsAudioDevices
; // number of audio devices
39 LIST_ENTRY KsAudioDeviceList
; // audio device list
40 PVOID KsAudioNotificationEntry
; // ks audio notification hook
41 PVOID EchoCancelNotificationEntry
; // ks echo cancel notification hook
42 KSPIN_LOCK Lock
; // audio device list mutex
44 PFILE_OBJECT KMixerFileObject
; // mixer file object
45 HANDLE KMixerHandle
; // mixer file handle
47 }SYSAUDIODEVEXT
, *PSYSAUDIODEVEXT
;
49 // struct DISPATCH_CONTEXT
51 // This structure is used to dispatch read / write / device io requests
52 // It is stored in the file object FsContext2 member
53 // Note: FsContext member is reserved for ks object header
57 KSOBJECT_HEADER ObjectHeader
; // pin object header
58 HANDLE Handle
; // audio irp pin handle
59 ULONG PinId
; // pin id of device
60 PKSAUDIO_DEVICE_ENTRY AudioEntry
; // pointer to audio device entry
62 HANDLE hMixerPin
; // handle to mixer pin
63 }DISPATCH_CONTEXT
, *PDISPATCH_CONTEXT
;
67 PIO_WORKITEM WorkItem
;
68 PKSAUDIO_DEVICE_ENTRY DeviceEntry
;
69 }FILTER_WORKER_CONTEXT
, *PFILTER_WORKER_CONTEXT
;
74 IO_STATUS_BLOCK StatusBlock
;
75 }COMPLETION_CONTEXT
, *PCOMPLETION_CONTEXT
;
80 SysAudioAllocateDeviceHeader(
81 IN SYSAUDIODEVEXT
*DeviceExtension
);
84 SysAudioRegisterDeviceInterfaces(
85 IN PDEVICE_OBJECT DeviceObject
);
88 SysAudioRegisterNotifications(
89 IN PDRIVER_OBJECT DriverObject
,
90 IN PDEVICE_OBJECT DeviceObject
);
93 SysAudioHandleProperty(
94 PDEVICE_OBJECT DeviceObject
,
99 IN SYSAUDIODEVEXT
*DeviceExtension
);
103 IN PUNICODE_STRING DeviceName
,
104 IN PHANDLE HandleOut
,
105 IN PFILE_OBJECT
* FileObjectOut
);
107 PKSAUDIO_DEVICE_ENTRY
114 DispatchCreateSysAudioPin(
115 IN PDEVICE_OBJECT DeviceObject
,
120 PSYSAUDIODEVEXT DeviceExtension
,
125 PKSAUDIO_DEVICE_ENTRY Entry
,
126 PKSPIN_CINSTANCES PinInstances
,
127 PKSPIN_CONNECT PinConnect
);
130 ComputeCompatibleFormat(
131 IN PKSAUDIO_DEVICE_ENTRY Entry
,
133 IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat
,
134 OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat
);