ReactOS 0.4.15-dev-5669-g09dde2c
hdaudbus.h
Go to the documentation of this file.
1#pragma once
2
3#define YDEBUG
4#include <ntddk.h>
5#include <debug.h>
6#include <initguid.h>
7#include <hdaudio.h>
8#include <stdio.h>
9#include <ntstrsafe.h>
10
11#define TAG_HDA 'bADH'
12
13
14// include Haiku headers
15#include "driver.h"
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
32
33typedef struct {
37
38typedef struct
39{
44
45typedef struct
46{
54
58
61
63
64
65typedef struct
66{
69
73
81
83
85
86typedef struct
87{
94
95
96typedef struct {
109
110
111PVOID
115
116VOID
118 IN PVOID Item);
119
120/* fdo.cpp */
121KSERVICE_ROUTINE HDA_InterruptService;
122IO_DPC_ROUTINE HDA_DpcForIsr;
123
125NTAPI
128 IN PIRP Irp);
129
131NTAPI
135
137NTAPI
140 IN PIRP Irp);
141
145 IN PHDA_CODEC_ENTRY Codec,
146 IN PULONG Verbs,
147 OUT PULONG Responses,
148 IN ULONG Count);
149
150/* pdo.cpp*/
151
155
158 IN PIRP Irp);
159
161NTAPI
164 IN PIRP Irp);
165
168 IN PIRP Irp);
169
172 IN PIRP Irp);
173
176 IN PIRP Irp);
177
178/* businterface.cpp */
179
183 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:30
IO_DPC_ROUTINE HDA_DpcForIsr
Definition: hdaudbus.h:122
NTSTATUS NTAPI HDA_FDOStartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fdo.cpp:578
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:692
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:760
VOID FreeItem(IN PVOID Item)
Definition: misc.c:43
NTSTATUS HDA_SendVerbs(IN PDEVICE_OBJECT DeviceObject, IN PHDA_CODEC_ENTRY Codec, IN PULONG Verbs, OUT PULONG Responses, IN ULONG Count)
Definition: fdo.cpp:138
NTSTATUS NTAPI HDA_PDOQueryId(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pdo.cpp:62
KSERVICE_ROUTINE HDA_InterruptService
Definition: hdaudbus.h:121
#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:100
ULONG _reserved1
Definition: hdaudbus.h:105
ULONG _reserved0
Definition: hdaudbus.h:103
ULONG _reserved2
Definition: hdaudbus.h:107
ULONG stepping
Definition: hdaudbus.h:99
ULONG vendor
Definition: hdaudbus.h:98
ULONG device
Definition: hdaudbus.h:97
PDEVICE_OBJECT ChildPDO
Definition: hdaudbus.h:40
Definition: hdaudbus.h:46
UCHAR Revision
Definition: hdaudbus.h:51
UCHAR Stepping
Definition: hdaudbus.h:52
ULONG ResponseCount
Definition: hdaudbus.h:56
USHORT ProductId
Definition: hdaudbus.h:48
UCHAR Major
Definition: hdaudbus.h:49
USHORT VendorId
Definition: hdaudbus.h:47
KSEMAPHORE ResponseSemaphore
Definition: hdaudbus.h:57
UCHAR Minor
Definition: hdaudbus.h:50
ULONG AudioGroupCount
Definition: hdaudbus.h:60
UCHAR Addr
Definition: hdaudbus.h:53
PRIRB_RESPONSE RirbBase
Definition: hdaudbus.h:77
PDEVICE_OBJECT LowerDevice
Definition: hdaudbus.h:68
PKINTERRUPT Interrupt
Definition: hdaudbus.h:72
PHDA_CODEC_AUDIO_GROUP AudioGroup
Definition: hdaudbus.h:91
PHDA_CODEC_ENTRY Codec
Definition: hdaudbus.h:90
PDEVICE_OBJECT FDO
Definition: hdaudbus.h:92
ULONG response
Definition: hdaudbus.h:34
ULONG flags
Definition: hdaudbus.h:35
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