ReactOS 0.4.16-dev-197-g92996da
driver.h File Reference
#include <KernelExport.h>
#include <Drivers.h>
#include <PCI.h>
#include <PCI_x86.h>
#include <string.h>
#include <stdlib.h>
#include <multi_audio.h>
#include "hda_controller_defs.h"
#include "hda_codec_defs.h"
Include dependency graph for driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hda_controller
 
struct  hda_stream
 
struct  hda_widget
 
struct  hda_association
 
struct  hda_audio_group
 
struct  hda_codec
 
struct  hda_multi_mixer_control
 
struct  hda_multi
 

Macros

#define DEVFS_PATH_FORMAT   "audio/multi/hda/%lu"
 
#define MAX_CARDS   4
 
#define PCI_hd_audio   3
 
#define HDA_MAX_AUDIO_GROUPS   15
 
#define HDA_MAX_CODECS   15
 
#define HDA_MAX_STREAMS   16
 
#define MAX_CODEC_RESPONSES   16
 
#define MAX_CODEC_UNSOL_RESPONSES   16
 
#define MAX_INPUTS   32
 
#define MAX_IO_WIDGETS   8
 
#define MAX_ASSOCIATIONS   16
 
#define MAX_ASSOCIATION_PINS   16
 
#define STREAM_MAX_BUFFERS   10
 
#define STREAM_MIN_BUFFERS   2
 
#define WIDGET_FLAG_OUTPUT_PATH   0x01
 
#define WIDGET_FLAG_INPUT_PATH   0x02
 
#define WIDGET_FLAG_WIDGET_PATH   0x04
 
#define MULTI_CONTROL_FIRSTID   1024
 
#define MULTI_CONTROL_MASTERID   0
 
#define MULTI_MAX_CONTROLS   128
 
#define MULTI_MAX_CHANNELS   128
 

Enumerations

enum  { STREAM_PLAYBACK , STREAM_RECORD }
 

Functions

const charget_widget_location (uint32 location)
 
hda_widgethda_audio_group_get_widget (hda_audio_group *audioGroup, uint32 nodeID)
 
status_t hda_audio_group_get_widgets (hda_audio_group *audioGroup, hda_stream *stream)
 
hda_codechda_codec_new (hda_controller *controller, uint32 cad)
 
void hda_codec_delete (hda_codec *codec)
 
status_t multi_audio_control (void *cookie, uint32 op, void *arg, size_t length)
 
status_t hda_hw_init (hda_controller *controller)
 
void hda_hw_stop (hda_controller *controller)
 
void hda_hw_uninit (hda_controller *controller)
 
status_t hda_send_verbs (hda_codec *codec, corb_t *verbs, uint32 *responses, uint32 count)
 
status_t hda_verb_write (hda_codec *codec, uint32 nid, uint32 vid, uint16 payload)
 
status_t hda_verb_read (hda_codec *codec, uint32 nid, uint32 vid, uint32 *response)
 
hda_streamhda_stream_new (hda_audio_group *audioGroup, int type)
 
void hda_stream_delete (hda_stream *stream)
 
status_t hda_stream_setup_buffers (hda_audio_group *audioGroup, hda_stream *stream, const char *desc)
 
status_t hda_stream_start (hda_controller *controller, hda_stream *stream)
 
status_t hda_stream_stop (hda_controller *controller, hda_stream *stream)
 

Variables

device_hooks gDriverHooks
 
pci_module_info * gPci
 
pci_x86_module_info * gPCIx86Module
 
hda_controller gCards [MAX_CARDS]
 
uint32 gNumCards
 

Macro Definition Documentation

◆ DEVFS_PATH_FORMAT

#define DEVFS_PATH_FORMAT   "audio/multi/hda/%lu"

Definition at line 22 of file driver.h.

◆ HDA_MAX_AUDIO_GROUPS

#define HDA_MAX_AUDIO_GROUPS   15

Definition at line 40 of file driver.h.

◆ HDA_MAX_CODECS

#define HDA_MAX_CODECS   15

Definition at line 41 of file driver.h.

◆ HDA_MAX_STREAMS

#define HDA_MAX_STREAMS   16

Definition at line 42 of file driver.h.

◆ MAX_ASSOCIATION_PINS

#define MAX_ASSOCIATION_PINS   16

Definition at line 48 of file driver.h.

◆ MAX_ASSOCIATIONS

#define MAX_ASSOCIATIONS   16

Definition at line 47 of file driver.h.

◆ MAX_CARDS

#define MAX_CARDS   4

Definition at line 33 of file driver.h.

◆ MAX_CODEC_RESPONSES

#define MAX_CODEC_RESPONSES   16

Definition at line 43 of file driver.h.

◆ MAX_CODEC_UNSOL_RESPONSES

#define MAX_CODEC_UNSOL_RESPONSES   16

Definition at line 44 of file driver.h.

◆ MAX_INPUTS

#define MAX_INPUTS   32

Definition at line 45 of file driver.h.

◆ MAX_IO_WIDGETS

#define MAX_IO_WIDGETS   8

Definition at line 46 of file driver.h.

◆ MULTI_CONTROL_FIRSTID

#define MULTI_CONTROL_FIRSTID   1024

Definition at line 333 of file driver.h.

◆ MULTI_CONTROL_MASTERID

#define MULTI_CONTROL_MASTERID   0

Definition at line 334 of file driver.h.

◆ MULTI_MAX_CHANNELS

#define MULTI_MAX_CHANNELS   128

Definition at line 336 of file driver.h.

◆ MULTI_MAX_CONTROLS

#define MULTI_MAX_CONTROLS   128

Definition at line 335 of file driver.h.

◆ PCI_hd_audio

#define PCI_hd_audio   3

Definition at line 37 of file driver.h.

◆ STREAM_MAX_BUFFERS

#define STREAM_MAX_BUFFERS   10

Definition at line 50 of file driver.h.

◆ STREAM_MIN_BUFFERS

#define STREAM_MIN_BUFFERS   2

Definition at line 51 of file driver.h.

◆ WIDGET_FLAG_INPUT_PATH

#define WIDGET_FLAG_INPUT_PATH   0x02

Definition at line 270 of file driver.h.

◆ WIDGET_FLAG_OUTPUT_PATH

#define WIDGET_FLAG_OUTPUT_PATH   0x01

Definition at line 269 of file driver.h.

◆ WIDGET_FLAG_WIDGET_PATH

#define WIDGET_FLAG_WIDGET_PATH   0x04

Definition at line 271 of file driver.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
STREAM_PLAYBACK 
STREAM_RECORD 

Definition at line 54 of file driver.h.

54 {
57};
@ STREAM_RECORD
Definition: driver.h:56
@ STREAM_PLAYBACK
Definition: driver.h:55

Function Documentation

◆ get_widget_location()

const char * get_widget_location ( uint32  location)

◆ hda_audio_group_get_widget()

hda_widget * hda_audio_group_get_widget ( hda_audio_group audioGroup,
uint32  nodeID 
)

◆ hda_audio_group_get_widgets()

status_t hda_audio_group_get_widgets ( hda_audio_group audioGroup,
hda_stream stream 
)

◆ hda_codec_delete()

void hda_codec_delete ( hda_codec codec)

◆ hda_codec_new()

hda_codec * hda_codec_new ( hda_controller controller,
uint32  cad 
)

◆ hda_hw_init()

status_t hda_hw_init ( hda_controller controller)

◆ hda_hw_stop()

void hda_hw_stop ( hda_controller controller)

◆ hda_hw_uninit()

void hda_hw_uninit ( hda_controller controller)

◆ hda_send_verbs()

status_t hda_send_verbs ( hda_codec codec,
corb_t verbs,
uint32 responses,
uint32  count 
)

◆ hda_stream_delete()

void hda_stream_delete ( hda_stream stream)

◆ hda_stream_new()

hda_stream * hda_stream_new ( hda_audio_group audioGroup,
int  type 
)

◆ hda_stream_setup_buffers()

status_t hda_stream_setup_buffers ( hda_audio_group audioGroup,
hda_stream stream,
const char desc 
)

◆ hda_stream_start()

status_t hda_stream_start ( hda_controller controller,
hda_stream stream 
)

◆ hda_stream_stop()

status_t hda_stream_stop ( hda_controller controller,
hda_stream stream 
)

◆ hda_verb_read()

status_t hda_verb_read ( hda_codec codec,
uint32  nid,
uint32  vid,
uint32 response 
)

◆ hda_verb_write()

status_t hda_verb_write ( hda_codec codec,
uint32  nid,
uint32  vid,
uint16  payload 
)

◆ multi_audio_control()

status_t multi_audio_control ( void cookie,
uint32  op,
void arg,
size_t  length 
)

Variable Documentation

◆ gCards

hda_controller gCards[MAX_CARDS]
extern

◆ gDriverHooks

device_hooks gDriverHooks
extern

◆ gNumCards

uint32 gNumCards
extern

◆ gPci

pci_module_info* gPci
extern

◆ gPCIx86Module

pci_x86_module_info* gPCIx86Module
extern