ReactOS 0.4.16-dev-91-g764881a
hda_controller Struct Reference

#include <driver.h>

Collaboration diagram for hda_controller:

Public Member Functions

uint8 Read8 (uint32 reg)
 
uint16 Read16 (uint32 reg)
 
uint32 Read32 (uint32 reg)
 
void Write8 (uint32 reg, uint8 value)
 
void Write16 (uint32 reg, uint16 value)
 
void Write32 (uint32 reg, uint32 value)
 
void ReadModifyWrite8 (uint32 reg, uint8 mask, uint8 value)
 
void ReadModifyWrite16 (uint32 reg, uint16 mask, uint16 value)
 
void ReadModifyWrite32 (uint32 reg, uint32 mask, uint32 value)
 

Public Attributes

struct pci_info pci_info
 
int32 opened
 
const chardevfs_path
 
area_id regs_area
 
vuint8 * regs
 
uint32 irq
 
bool msi
 
bool dma_snooping
 
uint16 codec_status
 
uint32 num_input_streams
 
uint32 num_output_streams
 
uint32 num_bidir_streams
 
uint32 corb_length
 
uint32 rirb_length
 
uint32 rirb_read_pos
 
uint32 corb_write_pos
 
area_id corb_rirb_pos_area
 
corb_tcorb
 
rirb_trirb
 
uint32stream_positions
 
hda_codeccodecs [HDA_MAX_CODECS+1]
 
hda_codecactive_codec
 
uint32 num_codecs
 
hda_streamstreams [HDA_MAX_STREAMS]
 
sem_id buffer_ready_sem
 

Detailed Description

This structure describes a single HDA compliant controller. It contains a list of available streams for use by the codecs contained, and the messaging queue (verb/response) buffers for communication.

Definition at line 69 of file driver.h.

Member Function Documentation

◆ Read16()

uint16 hda_controller::Read16 ( uint32  reg)
inline

Definition at line 106 of file driver.h.

107 {
108 return *(vuint16*)(regs + reg);
109 }
static int reg
Definition: i386-dis.c:1290
vuint8 * regs
Definition: driver.h:75

Referenced by hda_stream::Read16(), and ReadModifyWrite16().

◆ Read32()

uint32 hda_controller::Read32 ( uint32  reg)
inline

Definition at line 111 of file driver.h.

112 {
113 return *(vuint32*)(regs + reg);
114 }

Referenced by hda_stream::Read32(), and ReadModifyWrite32().

◆ Read8()

uint8 hda_controller::Read8 ( uint32  reg)
inline

Definition at line 101 of file driver.h.

102 {
103 return *(regs + reg);
104 }

Referenced by hda_stream::Read8(), and ReadModifyWrite8().

◆ ReadModifyWrite16()

void hda_controller::ReadModifyWrite16 ( uint32  reg,
uint16  mask,
uint16  value 
)
inline

Definition at line 139 of file driver.h.

140 {
142 temp &= ~mask;
143 temp |= value;
144 Write16(reg, temp);
145 }
unsigned short uint16
Definition: types.h:30
GLenum GLint GLuint mask
Definition: glext.h:6028
static calc_node_t temp
Definition: rpn_ieee.c:38
void Write16(uint32 reg, uint16 value)
Definition: driver.h:121
uint16 Read16(uint32 reg)
Definition: driver.h:106
Definition: pdh_main.c:94

◆ ReadModifyWrite32()

void hda_controller::ReadModifyWrite32 ( uint32  reg,
uint32  mask,
uint32  value 
)
inline

Definition at line 147 of file driver.h.

148 {
150 temp &= ~mask;
151 temp |= value;
152 Write32(reg, temp);
153 }
unsigned int uint32
Definition: types.h:32
uint32 Read32(uint32 reg)
Definition: driver.h:111
void Write32(uint32 reg, uint32 value)
Definition: driver.h:126

◆ ReadModifyWrite8()

void hda_controller::ReadModifyWrite8 ( uint32  reg,
uint8  mask,
uint8  value 
)
inline

Definition at line 131 of file driver.h.

132 {
133 uint8 temp = Read8(reg);
134 temp &= ~mask;
135 temp |= value;
136 Write8(reg, temp);
137 }
unsigned char uint8
Definition: types.h:28
void Write8(uint32 reg, uint8 value)
Definition: driver.h:116
uint8 Read8(uint32 reg)
Definition: driver.h:101

◆ Write16()

void hda_controller::Write16 ( uint32  reg,
uint16  value 
)
inline

Definition at line 121 of file driver.h.

122 {
123 *(vuint16*)(regs + reg) = value;
124 }

Referenced by ReadModifyWrite16().

◆ Write32()

void hda_controller::Write32 ( uint32  reg,
uint32  value 
)
inline

Definition at line 126 of file driver.h.

127 {
128 *(vuint32*)(regs + reg) = value;
129 }

Referenced by ReadModifyWrite32().

◆ Write8()

void hda_controller::Write8 ( uint32  reg,
uint8  value 
)
inline

Definition at line 116 of file driver.h.

117 {
118 *(regs + reg) = value;
119 }

Referenced by ReadModifyWrite8().

Member Data Documentation

◆ active_codec

hda_codec* hda_controller::active_codec

Definition at line 95 of file driver.h.

◆ buffer_ready_sem

sem_id hda_controller::buffer_ready_sem

Definition at line 99 of file driver.h.

◆ codec_status

uint16 hda_controller::codec_status

Definition at line 80 of file driver.h.

◆ codecs

hda_codec* hda_controller::codecs[HDA_MAX_CODECS+1]

Definition at line 94 of file driver.h.

◆ corb

corb_t* hda_controller::corb

Definition at line 90 of file driver.h.

◆ corb_length

uint32 hda_controller::corb_length

Definition at line 85 of file driver.h.

◆ corb_rirb_pos_area

area_id hda_controller::corb_rirb_pos_area

Definition at line 89 of file driver.h.

◆ corb_write_pos

uint32 hda_controller::corb_write_pos

Definition at line 88 of file driver.h.

◆ devfs_path

const char* hda_controller::devfs_path

Definition at line 72 of file driver.h.

◆ dma_snooping

bool hda_controller::dma_snooping

Definition at line 78 of file driver.h.

◆ irq

uint32 hda_controller::irq

Definition at line 76 of file driver.h.

◆ msi

bool hda_controller::msi

Definition at line 77 of file driver.h.

◆ num_bidir_streams

uint32 hda_controller::num_bidir_streams

Definition at line 83 of file driver.h.

◆ num_codecs

uint32 hda_controller::num_codecs

Definition at line 96 of file driver.h.

◆ num_input_streams

uint32 hda_controller::num_input_streams

Definition at line 81 of file driver.h.

◆ num_output_streams

uint32 hda_controller::num_output_streams

Definition at line 82 of file driver.h.

◆ opened

int32 hda_controller::opened

Definition at line 71 of file driver.h.

◆ pci_info

struct pci_info hda_controller::pci_info

Definition at line 70 of file driver.h.

◆ regs

vuint8* hda_controller::regs

◆ regs_area

area_id hda_controller::regs_area

Definition at line 74 of file driver.h.

◆ rirb

rirb_t* hda_controller::rirb

Definition at line 91 of file driver.h.

◆ rirb_length

uint32 hda_controller::rirb_length

Definition at line 86 of file driver.h.

◆ rirb_read_pos

uint32 hda_controller::rirb_read_pos

Definition at line 87 of file driver.h.

◆ stream_positions

uint32* hda_controller::stream_positions

Definition at line 92 of file driver.h.

◆ streams

hda_stream* hda_controller::streams[HDA_MAX_STREAMS]

Definition at line 98 of file driver.h.


The documentation for this struct was generated from the following file: