ReactOS 0.4.16-dev-88-ga65b6ae
hdaudio.h
Go to the documentation of this file.
1#ifndef _HDAUDIO_H_
2#define _HDAUDIO_H_
3
4#ifdef _MSC_VER
5#pragma warning(disable:4201)
6#pragma warning(disable:4214)
7#endif
8
9DEFINE_GUID(GUID_HDAUDIO_BUS_INTERFACE, 0xd2eaf88b, 0xab18, 0x41a8, 0xb6, 0x64, 0x8d, 0x59, 0x21, 0x67, 0x67, 0x1b);
10DEFINE_GUID(GUID_HDAUDIO_BUS_INTERFACE_BDL, 0xb4d65397, 0x5634, 0x40b0, 0xb0, 0x68, 0xf5, 0xb9, 0xf8, 0xb9, 0x67, 0xa5);
11DEFINE_GUID(GUID_HDAUDIO_BUS_INTERFACE_V2, 0xb52af5fb, 0x424b, 0x4bb9, 0xa1, 0x60, 0x5b, 0x38, 0xbe, 0x94, 0xe5, 0x68);
12DEFINE_GUID(GUID_HDAUDIO_BUS_CLASS, 0xbbd1a745, 0xadd6, 0x4575, 0x9c, 0x2e, 0x9b, 0x42, 0x8d, 0x1c, 0x32, 0x66);
13
14#ifndef _HDAUDIO_CODEC_TRANSFER_
15#define _HDAUDIO_CODEC_TRANSFER_
16
17typedef struct _HDAUDIO_CODEC_COMMAND {
18 union {
19 struct {
25 struct {
26 ULONG Data:16;
27 ULONG VerbId:4;
28 ULONG Node:8;
32 };
34
36 union {
37 struct {
38 union {
39 struct {
44 };
47 ULONG :25;
50 };
52 };
54
59
60#endif /* _HDAUDIO_CODEC_TRANSFER_ */
61
62typedef struct _HDAUDIO_STREAM_FORMAT {
68
70 union {
71 struct {
77 };
79 };
81
86 RunState = 2
88
89typedef VOID
92 PVOID);
93
94typedef VOID
97 PVOID);
98
100 USHORT Size; /* size of this structure */
101 USHORT DeviceVersion; /* maj.min (maj is high byte, min is low byte) */
102 USHORT DriverVersion; /* maj.min (maj is high byte, min is low byte) */
103 USHORT CodecsDetected; /* mask of codecs present. Bit number == SDI line number */
104 BOOLEAN IsStripingSupported; /* TRUE if striping (2 SDO lines) is supported */
106
112
113typedef
117 _In_ PVOID _context,
122
123typedef
127 _In_ PVOID _context,
128 _In_ UCHAR CodecAddress,
129 _In_ PHDAUDIO_STREAM_FORMAT StreamFormat,
131 _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat);
132
133typedef
137 _In_ PVOID _context,
138 _In_ PHDAUDIO_STREAM_FORMAT StreamFormat,
139 _In_ BOOLEAN Stripe,
141 _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat);
142
143typedef
147 _In_ PVOID _context,
149 _In_ PHDAUDIO_STREAM_FORMAT StreamFormat,
150 _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat);
151
152typedef
156 _In_ PVOID _context,
158 _In_ SIZE_T RequestedBufferSize,
159 _Out_ PMDL *BufferMdl,
160 _Out_ PSIZE_T AllocatedBufferSize,
161 _Out_ PUCHAR StreamId,
162 _Out_ PULONG FifoSize);
163
164typedef
168 _In_ PVOID _context,
170
171typedef
175 _In_ PVOID _context,
177
178typedef
182 _In_ PVOID _context,
183 _In_ HDAUDIO_STREAM_STATE StreamState,
184 _In_ ULONG NumberOfHandles,
185 _In_reads_(NumberOfHandles) PHANDLE Handles);
186
187typedef VOID
189 _In_ PVOID _context,
190 _Out_ PULONG *Wallclock);
191
192typedef
196 _In_ PVOID _context,
199
200typedef
204 _In_ PVOID _context,
208
209typedef
213 _In_ PVOID _context,
214 _In_ UCHAR Tag);
215
216typedef
220 _In_ PVOID _context,
221 _Out_ PHDAUDIO_DEVICE_INFORMATION DeviceInformation);
222
223typedef VOID
225 _In_ PVOID _context,
226 _Out_ PUCHAR CodecAddress,
227 _Out_ PUCHAR FunctionGroupStartNode);
228
250
251typedef void
254 _In_ ULONG InterruptBitMask);
255
256typedef
260 _In_ PVOID _context,
262 ULONG RequestedBufferSize,
263 _Out_ PVOID *DataBuffer,
265
266typedef
270 _In_ PVOID _context,
272
273typedef
280 _In_ ULONG Lvi,
283 _Out_ PUCHAR StreamId,
284 _Out_ PULONG FifoSize);
285
308
309typedef
313 _In_ PVOID _context,
315 _In_ ULONG NotificationCount,
316 _In_ SIZE_T RequestedBufferSize,
317 _Out_ PMDL *BufferMdl,
318 _Out_ PSIZE_T AllocatedBufferSize,
319 _Out_ PSIZE_T OffsetFromFirstPage,
320 _Out_ PUCHAR StreamId,
321 _Out_ PULONG FifoSize);
322
323typedef
327 _In_ PVOID _context,
329 _In_ PMDL BufferMdl,
331
332typedef
336 _In_ PVOID _context,
339
340typedef
344 _In_ PVOID _context,
347
373
374#ifdef _MSC_VER
375#pragma warning(default:4201)
376#pragma warning(default:4214)
377#endif
378
379#endif /* _HDAUDIO_H_ */
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
#define BufferSize
Definition: mmc.h:75
#define NTSTATUS
Definition: precomp.h:21
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
VOID(WINAPI * PINTERFACE_REFERENCE)(PVOID Context)
Definition: precomp.h:13
static BOOLEAN NTAPI Isr(PKINTERRUPT Interrupt, PVOID ServiceContext)
Definition: floppy.c:581
ULONG Handle
Definition: gdb_input.c:15
enum _HDAUDIO_STREAM_STATE * PHDAUDIO_STREAM_STATE
struct _HDAUDIO_BUS_INTERFACE * PHDAUDIO_BUS_INTERFACE
struct _HDAUDIO_BUS_INTERFACE_BDL HDAUDIO_BUS_INTERFACE_BDL
struct _HDAUDIO_BUS_INTERFACE_BDL * PHDAUDIO_BUS_INTERFACE_BDL
struct _HDAUDIO_CODEC_RESPONSE HDAUDIO_CODEC_RESPONSE
VOID(NTAPI * PHDAUDIO_TRANSFER_COMPLETE_CALLBACK)(HDAUDIO_CODEC_TRANSFER *, PVOID)
Definition: hdaudio.h:90
struct _HDAUDIO_STREAM_FORMAT HDAUDIO_STREAM_FORMAT
_Must_inspect_result_ NTSTATUS(NTAPI * PUNREGISTER_EVENT_CALLBACK)(_In_ PVOID _context, _In_ UCHAR Tag)
Definition: hdaudio.h:212
_Must_inspect_result_ NTSTATUS(NTAPI * PCHANGE_BANDWIDTH_ALLOCATION)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ PHDAUDIO_STREAM_FORMAT StreamFormat, _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat)
Definition: hdaudio.h:146
_Must_inspect_result_ NTSTATUS(NTAPI * PFREE_DMA_BUFFER_WITH_NOTIFICATION)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ PMDL BufferMdl, _In_ SIZE_T BufferSize)
Definition: hdaudio.h:326
_Must_inspect_result_ NTSTATUS(NTAPI * PFREE_DMA_ENGINE)(_In_ PVOID _context, _In_ HANDLE Handle)
Definition: hdaudio.h:174
struct _HDAUDIO_BUS_INTERFACE_V2 HDAUDIO_BUS_INTERFACE_V2
enum _HDAUDIO_STREAM_STATE HDAUDIO_STREAM_STATE
VOID(NTAPI * PGET_RESOURCE_INFORMATION)(_In_ PVOID _context, _Out_ PUCHAR CodecAddress, _Out_ PUCHAR FunctionGroupStartNode)
Definition: hdaudio.h:224
struct _HDAUDIO_CODEC_RESPONSE * PHDAUDIO_CODEC_RESPONSE
_Must_inspect_result_ NTSTATUS(NTAPI * PSETUP_DMA_ENGINE_WITH_BDL)(_In_reads_bytes_(BufferLength) PVOID _context, _In_ HANDLE Handle, _In_ ULONG BufferLength, _In_ ULONG Lvi, _In_ PHDAUDIO_BDL_ISR Isr, _In_ PVOID Context, _Out_ PUCHAR StreamId, _Out_ PULONG FifoSize)
Definition: hdaudio.h:276
struct _HDAUDIO_CONVERTER_FORMAT * PHDAUDIO_CONVERTER_FORMAT
struct _HDAUDIO_BUFFER_DESCRIPTOR * PHDAUDIO_BUFFER_DESCRIPTOR
_Must_inspect_result_ NTSTATUS(NTAPI * PALLOCATE_DMA_BUFFER)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ SIZE_T RequestedBufferSize, _Out_ PMDL *BufferMdl, _Out_ PSIZE_T AllocatedBufferSize, _Out_ PUCHAR StreamId, _Out_ PULONG FifoSize)
Definition: hdaudio.h:155
struct _HDAUDIO_BUS_INTERFACE HDAUDIO_BUS_INTERFACE
_Must_inspect_result_ NTSTATUS(NTAPI * PREGISTER_NOTIFICATION_EVENT)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ PKEVENT NotificationEvent)
Definition: hdaudio.h:335
_Must_inspect_result_ NTSTATUS(NTAPI * PGET_LINK_POSITION_REGISTER)(_In_ PVOID _context, _In_ HANDLE Handle, _Out_ PULONG *Position)
Definition: hdaudio.h:195
struct _HDAUDIO_CODEC_TRANSFER * PHDAUDIO_CODEC_TRANSFER
_Must_inspect_result_ NTSTATUS(NTAPI * PALLOCATE_RENDER_DMA_ENGINE)(_In_ PVOID _context, _In_ PHDAUDIO_STREAM_FORMAT StreamFormat, _In_ BOOLEAN Stripe, _Out_ PHANDLE Handle, _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat)
Definition: hdaudio.h:136
struct _HDAUDIO_DEVICE_INFORMATION HDAUDIO_DEVICE_INFORMATION
_HDAUDIO_STREAM_STATE
Definition: hdaudio.h:82
@ PauseState
Definition: hdaudio.h:85
@ RunState
Definition: hdaudio.h:86
@ StopState
Definition: hdaudio.h:84
@ ResetState
Definition: hdaudio.h:83
_Must_inspect_result_ NTSTATUS(NTAPI * PALLOCATE_CAPTURE_DMA_ENGINE)(_In_ PVOID _context, _In_ UCHAR CodecAddress, _In_ PHDAUDIO_STREAM_FORMAT StreamFormat, _Out_ PHANDLE Handle, _Out_ PHDAUDIO_CONVERTER_FORMAT ConverterFormat)
Definition: hdaudio.h:126
_Must_inspect_result_ NTSTATUS(NTAPI * PTRANSFER_CODEC_VERBS)(_In_ PVOID _context, _In_ ULONG Count, _Inout_updates_(Count) PHDAUDIO_CODEC_TRANSFER CodecTransfer, _In_opt_ PHDAUDIO_TRANSFER_COMPLETE_CALLBACK Callback, _In_opt_ PVOID Context)
Definition: hdaudio.h:116
struct _HDAUDIO_CODEC_COMMAND * PHDAUDIO_CODEC_COMMAND
void(NTAPI * PHDAUDIO_BDL_ISR)(_In_ VOID *Context, _In_ ULONG InterruptBitMask)
Definition: hdaudio.h:252
struct _HDAUDIO_CONVERTER_FORMAT HDAUDIO_CONVERTER_FORMAT
struct _HDAUDIO_STREAM_FORMAT * PHDAUDIO_STREAM_FORMAT
_Must_inspect_result_ NTSTATUS(NTAPI * PFREE_DMA_BUFFER)(_In_ PVOID _context, _In_ HANDLE Handle)
Definition: hdaudio.h:167
_Must_inspect_result_ NTSTATUS(NTAPI * PGET_DEVICE_INFORMATION)(_In_ PVOID _context, _Out_ PHDAUDIO_DEVICE_INFORMATION DeviceInformation)
Definition: hdaudio.h:219
_Must_inspect_result_ NTSTATUS(NTAPI * PREGISTER_EVENT_CALLBACK)(_In_ PVOID _context, _In_ PHDAUDIO_UNSOLICITED_RESPONSE_CALLBACK Routine, _In_opt_ PVOID Context, _Out_ PUCHAR Tag)
Definition: hdaudio.h:203
_Must_inspect_result_ NTSTATUS(NTAPI * PUNREGISTER_NOTIFICATION_EVENT)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ PKEVENT NotificationEvent)
Definition: hdaudio.h:343
_Must_inspect_result_ NTSTATUS(NTAPI * PFREE_CONTIGUOUS_DMA_BUFFER)(_In_ PVOID _context, _In_ HANDLE Handle)
Definition: hdaudio.h:269
VOID(NTAPI * PHDAUDIO_UNSOLICITED_RESPONSE_CALLBACK)(HDAUDIO_CODEC_RESPONSE, PVOID)
Definition: hdaudio.h:95
struct _HDAUDIO_BUS_INTERFACE_V2 * PHDAUDIO_BUS_INTERFACE_V2
struct _HDAUDIO_CODEC_COMMAND HDAUDIO_CODEC_COMMAND
VOID(NTAPI * PGET_WALL_CLOCK_REGISTER)(_In_ PVOID _context, _Out_ PULONG *Wallclock)
Definition: hdaudio.h:188
struct _HDAUDIO_DEVICE_INFORMATION * PHDAUDIO_DEVICE_INFORMATION
_Must_inspect_result_ NTSTATUS(NTAPI * PSET_DMA_ENGINE_STATE)(_In_ PVOID _context, _In_ HDAUDIO_STREAM_STATE StreamState, _In_ ULONG NumberOfHandles, _In_reads_(NumberOfHandles) PHANDLE Handles)
Definition: hdaudio.h:181
struct _HDAUDIO_BUFFER_DESCRIPTOR HDAUDIO_BUFFER_DESCRIPTOR
struct _HDAUDIO_CODEC_TRANSFER HDAUDIO_CODEC_TRANSFER
_Must_inspect_result_ NTSTATUS(NTAPI * PALLOCATE_DMA_BUFFER_WITH_NOTIFICATION)(_In_ PVOID _context, _In_ HANDLE Handle, _In_ ULONG NotificationCount, _In_ SIZE_T RequestedBufferSize, _Out_ PMDL *BufferMdl, _Out_ PSIZE_T AllocatedBufferSize, _Out_ PSIZE_T OffsetFromFirstPage, _Out_ PUCHAR StreamId, _Out_ PULONG FifoSize)
Definition: hdaudio.h:312
_Must_inspect_result_ NTSTATUS(NTAPI * PALLOCATE_CONTIGUOUS_DMA_BUFFER)(_In_ PVOID _context, _In_ HANDLE Handle, ULONG RequestedBufferSize, _Out_ PVOID *DataBuffer, _Out_ PHDAUDIO_BUFFER_DESCRIPTOR *BdlBuffer)
Definition: hdaudio.h:259
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_updates_(size)
Definition: ms_sal.h:387
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _In_reads_(size)
Definition: ms_sal.h:319
int Count
Definition: noreturn.cpp:7
@ NotificationEvent
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
PHYSICAL_ADDRESS Address
Definition: hdaudio.h:108
PINTERFACE_REFERENCE InterfaceReference
Definition: hdaudio.h:290
PTRANSFER_CODEC_VERBS TransferCodecVerbs
Definition: hdaudio.h:292
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: hdaudio.h:291
PUNREGISTER_EVENT_CALLBACK UnregisterEventCallback
Definition: hdaudio.h:304
PGET_RESOURCE_INFORMATION GetResourceInformation
Definition: hdaudio.h:306
PALLOCATE_CONTIGUOUS_DMA_BUFFER AllocateContiguousDmaBuffer
Definition: hdaudio.h:296
PGET_WALL_CLOCK_REGISTER GetWallClockRegister
Definition: hdaudio.h:301
PCHANGE_BANDWIDTH_ALLOCATION ChangeBandwidthAllocation
Definition: hdaudio.h:295
PGET_DEVICE_INFORMATION GetDeviceInformation
Definition: hdaudio.h:305
PSETUP_DMA_ENGINE_WITH_BDL SetupDmaEngineWithBdl
Definition: hdaudio.h:297
PFREE_DMA_ENGINE FreeDmaEngine
Definition: hdaudio.h:299
PSET_DMA_ENGINE_STATE SetDmaEngineState
Definition: hdaudio.h:300
PGET_LINK_POSITION_REGISTER GetLinkPositionRegister
Definition: hdaudio.h:302
PALLOCATE_RENDER_DMA_ENGINE AllocateRenderDmaEngine
Definition: hdaudio.h:294
PALLOCATE_CAPTURE_DMA_ENGINE AllocateCaptureDmaEngine
Definition: hdaudio.h:293
PFREE_CONTIGUOUS_DMA_BUFFER FreeContiguousDmaBuffer
Definition: hdaudio.h:298
PREGISTER_EVENT_CALLBACK RegisterEventCallback
Definition: hdaudio.h:303
PALLOCATE_CAPTURE_DMA_ENGINE AllocateCaptureDmaEngine
Definition: hdaudio.h:355
PALLOCATE_DMA_BUFFER_WITH_NOTIFICATION AllocateDmaBufferWithNotification
Definition: hdaudio.h:368
PFREE_DMA_ENGINE FreeDmaEngine
Definition: hdaudio.h:360
PINTERFACE_REFERENCE InterfaceReference
Definition: hdaudio.h:352
PGET_DEVICE_INFORMATION GetDeviceInformation
Definition: hdaudio.h:366
PCHANGE_BANDWIDTH_ALLOCATION ChangeBandwidthAllocation
Definition: hdaudio.h:357
PFREE_DMA_BUFFER FreeDmaBuffer
Definition: hdaudio.h:359
PUNREGISTER_NOTIFICATION_EVENT UnregisterNotificationEvent
Definition: hdaudio.h:371
PSET_DMA_ENGINE_STATE SetDmaEngineState
Definition: hdaudio.h:361
PREGISTER_EVENT_CALLBACK RegisterEventCallback
Definition: hdaudio.h:364
PREGISTER_NOTIFICATION_EVENT RegisterNotificationEvent
Definition: hdaudio.h:370
PGET_LINK_POSITION_REGISTER GetLinkPositionRegister
Definition: hdaudio.h:363
PUNREGISTER_EVENT_CALLBACK UnregisterEventCallback
Definition: hdaudio.h:365
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: hdaudio.h:353
PTRANSFER_CODEC_VERBS TransferCodecVerbs
Definition: hdaudio.h:354
PGET_WALL_CLOCK_REGISTER GetWallClockRegister
Definition: hdaudio.h:362
PFREE_DMA_BUFFER_WITH_NOTIFICATION FreeDmaBufferWithNotification
Definition: hdaudio.h:369
PALLOCATE_DMA_BUFFER AllocateDmaBuffer
Definition: hdaudio.h:358
PGET_RESOURCE_INFORMATION GetResourceInformation
Definition: hdaudio.h:367
PALLOCATE_RENDER_DMA_ENGINE AllocateRenderDmaEngine
Definition: hdaudio.h:356
PALLOCATE_RENDER_DMA_ENGINE AllocateRenderDmaEngine
Definition: hdaudio.h:237
PUNREGISTER_EVENT_CALLBACK UnregisterEventCallback
Definition: hdaudio.h:246
PSET_DMA_ENGINE_STATE SetDmaEngineState
Definition: hdaudio.h:242
PTRANSFER_CODEC_VERBS TransferCodecVerbs
Definition: hdaudio.h:235
PGET_DEVICE_INFORMATION GetDeviceInformation
Definition: hdaudio.h:247
PREGISTER_EVENT_CALLBACK RegisterEventCallback
Definition: hdaudio.h:245
PINTERFACE_REFERENCE InterfaceReference
Definition: hdaudio.h:233
PALLOCATE_CAPTURE_DMA_ENGINE AllocateCaptureDmaEngine
Definition: hdaudio.h:236
PGET_WALL_CLOCK_REGISTER GetWallClockRegister
Definition: hdaudio.h:243
PFREE_DMA_ENGINE FreeDmaEngine
Definition: hdaudio.h:241
PCHANGE_BANDWIDTH_ALLOCATION ChangeBandwidthAllocation
Definition: hdaudio.h:238
PFREE_DMA_BUFFER FreeDmaBuffer
Definition: hdaudio.h:240
PGET_RESOURCE_INFORMATION GetResourceInformation
Definition: hdaudio.h:248
PALLOCATE_DMA_BUFFER AllocateDmaBuffer
Definition: hdaudio.h:239
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: hdaudio.h:234
PGET_LINK_POSITION_REGISTER GetLinkPositionRegister
Definition: hdaudio.h:244
struct _HDAUDIO_CODEC_COMMAND::@2032::@2035 Verb16
struct _HDAUDIO_CODEC_COMMAND::@2032::@2034 Verb8
ULONGLONG CompleteResponse
Definition: hdaudio.h:51
ULONG IsUnsolicitedResponse
Definition: hdaudio.h:46
struct _HDAUDIO_CODEC_RESPONSE::@2036::@2038::@2040::@2042 Unsolicited
HDAUDIO_CODEC_RESPONSE Input
Definition: hdaudio.h:57
HDAUDIO_CODEC_COMMAND Output
Definition: hdaudio.h:56
USHORT ValidBitsPerSample
Definition: hdaudio.h:64
USHORT NumberOfChannels
Definition: hdaudio.h:66
static COORD Position
Definition: mouse.c:34
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
unsigned char UCHAR
Definition: xmlstorage.h:181