ReactOS 0.4.16-dev-122-g325d74c
hdaudbus.h
Go to the documentation of this file.
1#pragma once
2
3#include <ntddk.h>
4#include <initguid.h>
5#include <hdaudio.h>
6#include <stdio.h>
7#include <ntstrsafe.h>
8
9// Include Haiku headers
10#include "driver.h"
11
12#define NDEBUG
13#include <debug.h>
14
15#define TAG_HDA 'bADH'
16
17#define MAKE_RATE(base, multiply, divide) \
18 ((base == 44100 ? FORMAT_44_1_BASE_RATE : 0) \
19 | ((multiply - 1) << FORMAT_MULTIPLY_RATE_SHIFT) \
20 | ((divide - 1) << FORMAT_DIVIDE_RATE_SHIFT))
21
22#define HDAC_INPUT_STREAM_OFFSET(index) \
23 ((index) * HDAC_STREAM_SIZE)
24#define HDAC_OUTPUT_STREAM_OFFSET(num_input_streams, index) \
25 ((num_input_streams + (index)) * HDAC_STREAM_SIZE)
26#define HDAC_BIDIR_STREAM_OFFSET(num_input_streams, num_output_streams, index) \
27 ((num_input_streams + num_output_streams \
28 + (index)) * HDAC_STREAM_SIZE)
29
30#define ALIGN(size, align) (((size) + align - 1) & ~(align - 1))
31
32typedef struct {
36
37typedef struct
38{
43
44typedef struct
45{
53
57
60
62
63typedef struct
64{
67
71
79
81
83
84typedef struct
85{
92
93typedef struct {
106
107PVOID
111
112VOID
114 IN PVOID Item);
115
116/* fdo.cpp */
117
118KSERVICE_ROUTINE HDA_InterruptService;
119IO_DPC_ROUTINE HDA_DpcForIsr;
120
122NTAPI
125 IN PIRP Irp);
126
128NTAPI
132
134NTAPI
137 IN PIRP Irp);
138
142 IN PHDA_CODEC_ENTRY Codec,
143 IN PULONG Verbs,
144 OUT PULONG Responses,
145 IN ULONG Count);
146
147/* pdo.cpp*/
148
152
155 IN PIRP Irp);
156
158NTAPI
161 IN PIRP Irp);
162
165 IN PIRP Irp);
166
169 IN PIRP Irp);
170
173 IN PIRP Irp);
174
175/* businterface.cpp */
176
180 IN PIRP Irp);
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define HDA_MAX_AUDIO_GROUPS
Definition: driver.h:40
#define MAX_CODEC_RESPONSES
Definition: driver.h:43
#define HDA_MAX_CODECS
Definition: driver.h:41
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:29
IO_DPC_ROUTINE HDA_DpcForIsr
Definition: hdaudbus.h:119
NTSTATUS NTAPI HDA_FDOStartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.cpp:579
struct HDA_CODEC_AUDIO_GROUP * PHDA_CODEC_AUDIO_GROUP
NTSTATUS HDA_PDOHandleQueryDeviceText(IN PIRP Irp)
Definition: pdo.cpp:154
struct HDA_CODEC_ENTRY * PHDA_CODEC_ENTRY
struct RIRB_RESPONSE * PRIRB_RESPONSE
NTSTATUS NTAPI HDA_FDORemoveDevice(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
Definition: fdo.cpp:693
NTSTATUS HDA_PDOHandleQueryInterface(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS HDA_PDORemoveDevice(_In_ PDEVICE_OBJECT DeviceObject)
Definition: pdo.cpp:11
struct HDA_PDO_DEVICE_EXTENSION * PHDA_PDO_DEVICE_EXTENSION
struct HDA_FDO_DEVICE_EXTENSION * PHDA_FDO_DEVICE_EXTENSION
NTSTATUS HDA_PDOQueryBusDeviceCapabilities(IN PIRP Irp)
Definition: pdo.cpp:199
struct CODEC_RESPONSE * PCODEC_RESPONSE
NTSTATUS HDA_PDOQueryBusDevicePnpState(IN PIRP Irp)
Definition: pdo.cpp:227
NTSTATUS HDA_PDOQueryBusInformation(IN PIRP Irp)
Definition: pdo.cpp:33
NTSTATUS NTAPI HDA_FDOQueryBusRelations(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.cpp:761
VOID FreeItem(IN PVOID Item)
Definition: misc.c:37
NTSTATUS HDA_SendVerbs(IN PDEVICE_OBJECT DeviceObject, IN PHDA_CODEC_ENTRY Codec, IN PULONG Verbs, OUT PULONG Responses, IN ULONG Count)
Definition: fdo.cpp:139
NTSTATUS NTAPI HDA_PDOQueryId(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.cpp:62
KSERVICE_ROUTINE HDA_InterruptService
Definition: hdaudbus.h:118
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
int Count
Definition: noreturn.cpp:7
unsigned short USHORT
Definition: pedump.c:61
ULONG revision
Definition: hdaudbus.h:97
ULONG _reserved1
Definition: hdaudbus.h:102
ULONG _reserved0
Definition: hdaudbus.h:100
ULONG _reserved2
Definition: hdaudbus.h:104
ULONG minor
Definition: hdaudbus.h:98
ULONG stepping
Definition: hdaudbus.h:96
ULONG vendor
Definition: hdaudbus.h:95
ULONG major
Definition: hdaudbus.h:99
ULONG device
Definition: hdaudbus.h:94
PDEVICE_OBJECT ChildPDO
Definition: hdaudbus.h:39
Definition: hdaudbus.h:45
UCHAR Revision
Definition: hdaudbus.h:50
UCHAR Stepping
Definition: hdaudbus.h:51
ULONG ResponseCount
Definition: hdaudbus.h:55
USHORT ProductId
Definition: hdaudbus.h:47
UCHAR Major
Definition: hdaudbus.h:48
USHORT VendorId
Definition: hdaudbus.h:46
KSEMAPHORE ResponseSemaphore
Definition: hdaudbus.h:56
UCHAR Minor
Definition: hdaudbus.h:49
ULONG AudioGroupCount
Definition: hdaudbus.h:59
UCHAR Addr
Definition: hdaudbus.h:52
PRIRB_RESPONSE RirbBase
Definition: hdaudbus.h:75
PDEVICE_OBJECT LowerDevice
Definition: hdaudbus.h:66
PKINTERRUPT Interrupt
Definition: hdaudbus.h:70
PHDA_CODEC_AUDIO_GROUP AudioGroup
Definition: hdaudbus.h:89
PHDA_CODEC_ENTRY Codec
Definition: hdaudbus.h:88
PDEVICE_OBJECT FDO
Definition: hdaudbus.h:90
ULONG response
Definition: hdaudbus.h:33
ULONG flags
Definition: hdaudbus.h:34
uint32_t * PULONG
Definition: typedefs.h:59
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
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_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_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
unsigned char UCHAR
Definition: xmlstorage.h:181