FreeBSD kernel sound device code
emu10kx.c File Reference
#include <sys/param.h>
#include <sys/types.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <sys/systm.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysctl.h>
#include <sys/kdb.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <machine/clock.h>
#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
#include <dev/sound/pci/emuxkireg.h>
#include <dev/sound/pci/emu10kx.h>
Include dependency graph for emu10kx.c:

Go to the source code of this file.

Data Structures

struct  emu_voice
 
struct  emu_memblk
 
struct  emu_mem
 
struct  emu_rm
 
struct  emu_intr_handler
 
struct  emu_sc_info
 
struct  emu_hwinfo
 

Macros

#define HAS_51   0x0001
 
#define HAS_71   0x0002
 
#define HAS_AC97   0x0004
 
#define IS_EMU10K1   0x0008
 
#define IS_EMU10K2   0x0010
 
#define IS_CA0102   0x0020
 
#define IS_CA0108   0x0040
 
#define IS_UNKNOWN   0x0080
 
#define BROKEN_DIGITAL   0x0100
 
#define DIGITAL_ONLY   0x0200
 
#define IS_CARDBUS   0x0400
 
#define MODE_ANALOG   1
 
#define MODE_DIGITAL   2
 
#define SPDIF_MODE_PCM   1
 
#define SPDIF_MODE_AC3   2
 
#define MACS   0x0
 
#define MACS1   0x1
 
#define MACW   0x2
 
#define MACW1   0x3
 
#define MACINTS   0x4
 
#define MACINTW   0x5
 
#define ACC3   0x6
 
#define MACMV   0x7
 
#define ANDXOR   0x8
 
#define TSTNEG   0x9
 
#define LIMIT   0xA
 
#define LIMIT1   0xB
 
#define LOG   0xC
 
#define EXP   0xD
 
#define INTERP   0xE
 
#define SKIP   0xF
 
#define GPR(i)   (sc->gpr_base+(i))
 
#define INP(i)   (sc->input_base+(i))
 
#define OUTP(i)   (sc->output_base+(i))
 
#define FX(i)   (i)
 
#define FX2(i)   (sc->efxc_base+(i))
 
#define DSP_CONST(i)   (sc->dsp_zero+(i))
 
#define COND_NORMALIZED   DSP_CONST(0x1)
 
#define COND_BORROW   DSP_CONST(0x2)
 
#define COND_MINUS   DSP_CONST(0x3)
 
#define COND_LESS_ZERO   DSP_CONST(0x4)
 
#define COND_EQ_ZERO   DSP_CONST(0x5)
 
#define COND_SATURATION   DSP_CONST(0x6)
 
#define COND_NEQ_ZERO   DSP_CONST(0x8)
 
#define DSP_ACCUM   DSP_CONST(0x16)
 
#define DSP_CCR   DSP_CONST(0x17)
 
#define IN_AC97_L   0x00
 
#define IN_AC97_R   0x01
 
#define IN_AC97   IN_AC97_L
 
#define IN_SPDIF_CD_L   0x02
 
#define IN_SPDIF_CD_R   0x03
 
#define IN_SPDIF_CD   IN_SPDIF_CD_L
 
#define IN_ZOOM_L   0x04
 
#define IN_ZOOM_R   0x05
 
#define IN_ZOOM   IN_ZOOM_L
 
#define IN_TOSLINK_L   0x06
 
#define IN_TOSLINK_R   0x07
 
#define IN_TOSLINK   IN_TOSLINK_L
 
#define IN_LINE1_L   0x08
 
#define IN_LINE1_R   0x09
 
#define IN_LINE1   IN_LINE1_L
 
#define IN_COAX_SPDIF_L   0x0a
 
#define IN_COAX_SPDIF_R   0x0b
 
#define IN_COAX_SPDIF   IN_COAX_SPDIF_L
 
#define IN_LINE2_L   0x0c
 
#define IN_LINE2_R   0x0d
 
#define IN_LINE2   IN_LINE2_L
 
#define IN_0E   0x0e
 
#define IN_0F   0x0f
 
#define OUT_AC97_L   0x00
 
#define OUT_AC97_R   0x01
 
#define OUT_AC97   OUT_AC97_L
 
#define OUT_A_FRONT   OUT_AC97
 
#define OUT_TOSLINK_L   0x02
 
#define OUT_TOSLINK_R   0x03
 
#define OUT_TOSLINK   OUT_TOSLINK_L
 
#define OUT_D_CENTER   0x04
 
#define OUT_D_SUB   0x05
 
#define OUT_HEADPHONE_L   0x06
 
#define OUT_HEADPHONE_R   0x07
 
#define OUT_HEADPHONE   OUT_HEADPHONE_L
 
#define OUT_REAR_L   0x08
 
#define OUT_REAR_R   0x09
 
#define OUT_REAR   OUT_REAR_L
 
#define OUT_ADC_REC_L   0x0a
 
#define OUT_ADC_REC_R   0x0b
 
#define OUT_ADC_REC   OUT_ADC_REC_L
 
#define OUT_MIC_CAP   0x0c
 
#define OUT_A_CENTER   0x11
 
#define OUT_A_SUB   0x12
 
#define A_IN_AC97_L   0x00
 
#define A_IN_AC97_R   0x01
 
#define A_IN_AC97   A_IN_AC97_L
 
#define A_IN_SPDIF_CD_L   0x02
 
#define A_IN_SPDIF_CD_R   0x03
 
#define A_IN_SPDIF_CD   A_IN_SPDIF_CD_L
 
#define A_IN_O_SPDIF_L   0x04
 
#define A_IN_O_SPDIF_R   0x05
 
#define A_IN_O_SPDIF   A_IN_O_SPDIF_L
 
#define A_IN_LINE2_L   0x08
 
#define A_IN_LINE2_R   0x09
 
#define A_IN_LINE2   A_IN_LINE2_L
 
#define A_IN_R_SPDIF_L   0x0a
 
#define A_IN_R_SPDIF_R   0x0b
 
#define A_IN_R_SPDIF   A_IN_R_SPDIF_L
 
#define A_IN_AUX2_L   0x0c
 
#define A_IN_AUX2_R   0x0d
 
#define A_IN_AUX2   A_IN_AUX2_L
 
#define A_OUT_D_FRONT_L   0x00
 
#define A_OUT_D_FRONT_R   0x01
 
#define A_OUT_D_FRONT   A_OUT_D_FRONT_L
 
#define A_OUT_D_CENTER   0x02
 
#define A_OUT_D_SUB   0x03
 
#define A_OUT_D_SIDE_L   0x04
 
#define A_OUT_D_SIDE_R   0x05
 
#define A_OUT_D_SIDE   A_OUT_D_SIDE_L
 
#define A_OUT_D_REAR_L   0x06
 
#define A_OUT_D_REAR_R   0x07
 
#define A_OUT_D_REAR   A_OUT_D_REAR_L
 
#define A_OUT_HPHONE_L   0x04
 
#define A_OUT_HPHONE_R   0x05
 
#define A_OUT_HPHONE   A_OUT_HPHONE_L
 
#define A_OUT_A_FRONT_L   0x08
 
#define A_OUT_A_FRONT_R   0x09
 
#define A_OUT_A_FRONT   A_OUT_A_FRONT_L
 
#define A_OUT_A_CENTER   0x0a
 
#define A_OUT_A_SUB   0x0b
 
#define A_OUT_A_SIDE_L   0x0c
 
#define A_OUT_A_SIDE_R   0x0d
 
#define A_OUT_A_SIDE   A_OUT_A_SIDE_L
 
#define A_OUT_A_REAR_L   0x0e
 
#define A_OUT_A_REAR_R   0x0f
 
#define A_OUT_A_REAR   A_OUT_A_REAR_L
 
#define A_OUT_AC97_L   0x10
 
#define A_OUT_AC97_R   0x11
 
#define A_OUT_AC97   A_OUT_AC97_L
 
#define A_OUT_ADC_REC_L   0x16
 
#define A_OUT_ADC_REC_R   0x17
 
#define A_OUT_ADC_REC   A_OUT_ADC_REC_L
 
#define EMU_DATA2   0x24
 
#define EMU_IPR2   0x28
 
#define EMU_INTE2   0x2c
 
#define EMU_IPR3   0x38
 
#define EMU_INTE3   0x3c
 
#define EMU_A2_SRCSel   0x60
 
#define EMU_A2_SRCMULTI_ENABLE   0x6e
 
#define EMU_A_I2S_CAPTURE_96000   0x00000400
 
#define EMU_A2_MIXER_I2S_ENABLE   0x7B
 
#define EMU_A2_MIXER_SPDIF_ENABLE   0x7A
 
#define C_FRONT_L   0
 
#define C_FRONT_R   1
 
#define C_REC_L   2
 
#define C_REC_R   3
 
#define C_REAR_L   4
 
#define C_REAR_R   5
 
#define C_CENTER   6
 
#define C_SUB   7
 
#define C_SIDE_L   8
 
#define C_SIDE_R   9
 
#define NUM_CACHES   10
 
#define CDSPDIFMUTE   0
 
#define ANALOGMUTE   1
 
#define NUM_MUTE   2
 
#define EMU_MAX_GPR   512
 
#define EMU_MAX_IRQ_CONSUMERS   32
 
#define EMU_MTX_DEBUG()
 
#define EMU_RWLOCK()
 
#define EMU_RWUNLOCK()
 
#define EFX_CACHE(CACHE_IDX)
 
#define EFX_ROUTE(TITLE, INP_NR, IN_GPR_IDX, OUT_CACHE_IDX, DEF)
 
#define EFX_OUTPUT(TITLE, OUT_CACHE_IDX, OUT_GPR_IDX, OUTP_NR, DEF)
 
#define EFX_OUTPUTD(OUT_CACHE_IDX, OUT_GPR_IDX, OUTP_NR)
 
#define EFX_SKIP(OPCOUNT, FLAG_GPR)
 
#define EFX_COPY(TO, FROM)
 
#define L2L_POINTS   10
 

Functions

static void emu_setmap (void *arg, bus_dma_segment_t *segs, int nseg, int error)
 
static void * emu_malloc (struct emu_mem *mem, uint32_t sz, bus_addr_t *addr, bus_dmamap_t *map)
 
static void emu_free (struct emu_mem *mem, void *dmabuf, bus_dmamap_t map)
 
static void * emu_memalloc (struct emu_mem *mem, uint32_t sz, bus_addr_t *addr, const char *owner)
 
static int emu_memfree (struct emu_mem *mem, void *membuf)
 
static int emu_memstart (struct emu_mem *mem, void *membuf)
 
static int emu10kx_dev_init (struct emu_sc_info *sc)
 
static int emu10kx_dev_uninit (struct emu_sc_info *sc)
 
static int emu10kx_prepare (struct emu_sc_info *sc, struct sbuf *s)
 
static void emumix_set_mode (struct emu_sc_info *sc, int mode)
 
static void emumix_set_spdif_mode (struct emu_sc_info *sc, int mode)
 
static void emumix_set_fxvol (struct emu_sc_info *sc, unsigned gpr, int32_t vol)
 
static void emumix_set_gpr (struct emu_sc_info *sc, unsigned gpr, int32_t val)
 
static int sysctl_emu_mixer_control (SYSCTL_HANDLER_ARGS)
 
static int emu_rm_init (struct emu_sc_info *sc)
 
static int emu_rm_uninit (struct emu_sc_info *sc)
 
static int emu_rm_gpr_alloc (struct emu_rm *rm, int count)
 
static unsigned int emu_getcard (device_t dev)
 
static uint32_t emu_rd_nolock (struct emu_sc_info *sc, unsigned int regno, unsigned int size)
 
static void emu_wr_nolock (struct emu_sc_info *sc, unsigned int regno, uint32_t data, unsigned int size)
 
static void emu_wr_cbptr (struct emu_sc_info *sc, uint32_t data)
 
static void emu_vstop (struct emu_sc_info *sc, char channel, int enable)
 
static void emu_intr (void *p)
 
static void emu_wrefx (struct emu_sc_info *sc, unsigned int pc, unsigned int data)
 
static void emu_addefxop (struct emu_sc_info *sc, unsigned int op, unsigned int z, unsigned int w, unsigned int x, unsigned int y, uint32_t *pc)
 
static void emu_initefx (struct emu_sc_info *sc)
 
static int emu_cardbus_init (struct emu_sc_info *sc)
 
static int emu_init (struct emu_sc_info *sc)
 
static int emu_uninit (struct emu_sc_info *sc)
 
static int emu_read_ivar (device_t bus __unused, device_t dev, int ivar_index, uintptr_t *result)
 
static int emu_write_ivar (device_t bus __unused, device_t dev __unused, int ivar_index, uintptr_t value __unused)
 
static int emu_pci_probe (device_t dev)
 
static int emu_pci_attach (device_t dev)
 
static int emu_pci_detach (device_t dev)
 
static int emu_modevent (module_t mod __unused, int cmd, void *data __unused)
 
uint32_t emu_rdptr (struct emu_sc_info *sc, unsigned int chn, unsigned int reg)
 
void emu_wrptr (struct emu_sc_info *sc, unsigned int chn, unsigned int reg, uint32_t data)
 
uint32_t emu_rd_p16vptr (struct emu_sc_info *sc, uint16_t chn, uint16_t reg)
 
void emu_wr_p16vptr (struct emu_sc_info *sc, uint16_t chn, uint16_t reg, uint32_t data)
 
void emu_wr (struct emu_sc_info *sc, unsigned int regno, uint32_t data, unsigned int size)
 
uint32_t emu_rd (struct emu_sc_info *sc, unsigned int regno, unsigned int size)
 
void emu_enable_ir (struct emu_sc_info *sc)
 
int emu_timer_create (struct emu_sc_info *sc)
 
int emu_timer_set (struct emu_sc_info *sc, int timer, int delay)
 
int emu_timer_enable (struct emu_sc_info *sc, int timer, int go)
 
int emu_timer_clear (struct emu_sc_info *sc, int timer)
 
int emu_intr_register (struct emu_sc_info *sc, uint32_t inte_mask, uint32_t intr_mask, uint32_t(*func)(void *softc, uint32_t irq), void *isc)
 
int emu_intr_unregister (struct emu_sc_info *sc, int hnumber)
 
bus_dma_tag_t emu_gettag (struct emu_sc_info *sc)
 
static uint32_t emu_rate_to_pitch (uint32_t rate)
 
static uint32_t emu_rate_to_linearpitch (uint32_t rate)
 
struct emu_voiceemu_valloc (struct emu_sc_info *sc)
 
void emu_vfree (struct emu_sc_info *sc, struct emu_voice *v)
 
int emu_vinit (struct emu_sc_info *sc, struct emu_voice *m, struct emu_voice *s, uint32_t sz, struct snd_dbuf *b)
 
void emu_vsetup (struct emu_voice *v, int fmt, int spd)
 
void emu_vroute (struct emu_sc_info *sc, struct emu_route *rt, struct emu_voice *v)
 
void emu_vwrite (struct emu_sc_info *sc, struct emu_voice *v)
 
void emu_vtrigger (struct emu_sc_info *sc, struct emu_voice *v, int go)
 
int emu_vpos (struct emu_sc_info *sc, struct emu_voice *v)
 
static int emu_addefxmixer (struct emu_sc_info *sc, const char *mix_name, const int mix_id, uint32_t defvolume)
 
static int sysctl_emu_digitalswitch_control (SYSCTL_HANDLER_ARGS)
 
static void emu_digitalswitch (struct emu_sc_info *sc)
 
static int emu10kx_open (struct cdev *i_dev, int flags __unused, int mode __unused, struct thread *td __unused)
 
static int emu10kx_close (struct cdev *i_dev, int flags __unused, int mode __unused, struct thread *td __unused)
 
static int emu10kx_read (struct cdev *i_dev, struct uio *buf, int flag __unused)
 
static int log2lin (int log_t)
 
void emumix_set_volume (struct emu_sc_info *sc, int mixer_idx, int volume)
 
int emumix_get_volume (struct emu_sc_info *sc, int mixer_idx)
 
 DRIVER_MODULE (snd_emu10kx, pci, emu_driver, emu_devclass, emu_modevent, NULL)
 
 MODULE_VERSION (snd_emu10kx, SND_EMU10KX_PREFVER)
 

Variables

static struct emu_hwinfo emu_cards []
 
static struct emu_hwinfo emu_bad_cards []
 
static d_open_t emu10kx_open
 
static d_close_t emu10kx_close
 
static d_read_t emu10kx_read
 
static struct cdevsw emu10kx_cdevsw
 
static int l2l_df [L2L_POINTS]
 
static int l2l_f [L2L_POINTS]
 
static device_method_t emu_methods []
 
static driver_t emu_driver
 
static devclass_t emu_devclass
 

Macro Definition Documentation

◆ A_IN_AC97

#define A_IN_AC97   A_IN_AC97_L

Definition at line 170 of file emu10kx.c.

◆ A_IN_AC97_L

#define A_IN_AC97_L   0x00

Definition at line 168 of file emu10kx.c.

◆ A_IN_AC97_R

#define A_IN_AC97_R   0x01

Definition at line 169 of file emu10kx.c.

◆ A_IN_AUX2

#define A_IN_AUX2   A_IN_AUX2_L

Definition at line 185 of file emu10kx.c.

◆ A_IN_AUX2_L

#define A_IN_AUX2_L   0x0c

Definition at line 183 of file emu10kx.c.

◆ A_IN_AUX2_R

#define A_IN_AUX2_R   0x0d

Definition at line 184 of file emu10kx.c.

◆ A_IN_LINE2

#define A_IN_LINE2   A_IN_LINE2_L

Definition at line 179 of file emu10kx.c.

◆ A_IN_LINE2_L

#define A_IN_LINE2_L   0x08

Definition at line 177 of file emu10kx.c.

◆ A_IN_LINE2_R

#define A_IN_LINE2_R   0x09

Definition at line 178 of file emu10kx.c.

◆ A_IN_O_SPDIF

#define A_IN_O_SPDIF   A_IN_O_SPDIF_L

Definition at line 176 of file emu10kx.c.

◆ A_IN_O_SPDIF_L

#define A_IN_O_SPDIF_L   0x04

Definition at line 174 of file emu10kx.c.

◆ A_IN_O_SPDIF_R

#define A_IN_O_SPDIF_R   0x05

Definition at line 175 of file emu10kx.c.

◆ A_IN_R_SPDIF

#define A_IN_R_SPDIF   A_IN_R_SPDIF_L

Definition at line 182 of file emu10kx.c.

◆ A_IN_R_SPDIF_L

#define A_IN_R_SPDIF_L   0x0a

Definition at line 180 of file emu10kx.c.

◆ A_IN_R_SPDIF_R

#define A_IN_R_SPDIF_R   0x0b

Definition at line 181 of file emu10kx.c.

◆ A_IN_SPDIF_CD

#define A_IN_SPDIF_CD   A_IN_SPDIF_CD_L

Definition at line 173 of file emu10kx.c.

◆ A_IN_SPDIF_CD_L

#define A_IN_SPDIF_CD_L   0x02

Definition at line 171 of file emu10kx.c.

◆ A_IN_SPDIF_CD_R

#define A_IN_SPDIF_CD_R   0x03

Definition at line 172 of file emu10kx.c.

◆ A_OUT_A_CENTER

#define A_OUT_A_CENTER   0x0a

Definition at line 208 of file emu10kx.c.

◆ A_OUT_A_FRONT

#define A_OUT_A_FRONT   A_OUT_A_FRONT_L

Definition at line 207 of file emu10kx.c.

◆ A_OUT_A_FRONT_L

#define A_OUT_A_FRONT_L   0x08

Definition at line 205 of file emu10kx.c.

◆ A_OUT_A_FRONT_R

#define A_OUT_A_FRONT_R   0x09

Definition at line 206 of file emu10kx.c.

◆ A_OUT_A_REAR

#define A_OUT_A_REAR   A_OUT_A_REAR_L

Definition at line 215 of file emu10kx.c.

◆ A_OUT_A_REAR_L

#define A_OUT_A_REAR_L   0x0e

Definition at line 213 of file emu10kx.c.

◆ A_OUT_A_REAR_R

#define A_OUT_A_REAR_R   0x0f

Definition at line 214 of file emu10kx.c.

◆ A_OUT_A_SIDE

#define A_OUT_A_SIDE   A_OUT_A_SIDE_L

Definition at line 212 of file emu10kx.c.

◆ A_OUT_A_SIDE_L

#define A_OUT_A_SIDE_L   0x0c

Definition at line 210 of file emu10kx.c.

◆ A_OUT_A_SIDE_R

#define A_OUT_A_SIDE_R   0x0d

Definition at line 211 of file emu10kx.c.

◆ A_OUT_A_SUB

#define A_OUT_A_SUB   0x0b

Definition at line 209 of file emu10kx.c.

◆ A_OUT_AC97

#define A_OUT_AC97   A_OUT_AC97_L

Definition at line 218 of file emu10kx.c.

◆ A_OUT_AC97_L

#define A_OUT_AC97_L   0x10

Definition at line 216 of file emu10kx.c.

◆ A_OUT_AC97_R

#define A_OUT_AC97_R   0x11

Definition at line 217 of file emu10kx.c.

◆ A_OUT_ADC_REC

#define A_OUT_ADC_REC   A_OUT_ADC_REC_L

Definition at line 221 of file emu10kx.c.

◆ A_OUT_ADC_REC_L

#define A_OUT_ADC_REC_L   0x16

Definition at line 219 of file emu10kx.c.

◆ A_OUT_ADC_REC_R

#define A_OUT_ADC_REC_R   0x17

Definition at line 220 of file emu10kx.c.

◆ A_OUT_D_CENTER

#define A_OUT_D_CENTER   0x02

Definition at line 191 of file emu10kx.c.

◆ A_OUT_D_FRONT

#define A_OUT_D_FRONT   A_OUT_D_FRONT_L

Definition at line 190 of file emu10kx.c.

◆ A_OUT_D_FRONT_L

#define A_OUT_D_FRONT_L   0x00

Definition at line 188 of file emu10kx.c.

◆ A_OUT_D_FRONT_R

#define A_OUT_D_FRONT_R   0x01

Definition at line 189 of file emu10kx.c.

◆ A_OUT_D_REAR

#define A_OUT_D_REAR   A_OUT_D_REAR_L

Definition at line 198 of file emu10kx.c.

◆ A_OUT_D_REAR_L

#define A_OUT_D_REAR_L   0x06

Definition at line 196 of file emu10kx.c.

◆ A_OUT_D_REAR_R

#define A_OUT_D_REAR_R   0x07

Definition at line 197 of file emu10kx.c.

◆ A_OUT_D_SIDE

#define A_OUT_D_SIDE   A_OUT_D_SIDE_L

Definition at line 195 of file emu10kx.c.

◆ A_OUT_D_SIDE_L

#define A_OUT_D_SIDE_L   0x04

Definition at line 193 of file emu10kx.c.

◆ A_OUT_D_SIDE_R

#define A_OUT_D_SIDE_R   0x05

Definition at line 194 of file emu10kx.c.

◆ A_OUT_D_SUB

#define A_OUT_D_SUB   0x03

Definition at line 192 of file emu10kx.c.

◆ A_OUT_HPHONE

#define A_OUT_HPHONE   A_OUT_HPHONE_L

Definition at line 203 of file emu10kx.c.

◆ A_OUT_HPHONE_L

#define A_OUT_HPHONE_L   0x04

Definition at line 201 of file emu10kx.c.

◆ A_OUT_HPHONE_R

#define A_OUT_HPHONE_R   0x05

Definition at line 202 of file emu10kx.c.

◆ ACC3

#define ACC3   0x6

Definition at line 88 of file emu10kx.c.

◆ ANALOGMUTE

#define ANALOGMUTE   1

Definition at line 250 of file emu10kx.c.

◆ ANDXOR

#define ANDXOR   0x8

Definition at line 90 of file emu10kx.c.

◆ BROKEN_DIGITAL

#define BROKEN_DIGITAL   0x0100

Definition at line 72 of file emu10kx.c.

◆ C_CENTER

#define C_CENTER   6

Definition at line 243 of file emu10kx.c.

◆ C_FRONT_L

#define C_FRONT_L   0

Definition at line 237 of file emu10kx.c.

◆ C_FRONT_R

#define C_FRONT_R   1

Definition at line 238 of file emu10kx.c.

◆ C_REAR_L

#define C_REAR_L   4

Definition at line 241 of file emu10kx.c.

◆ C_REAR_R

#define C_REAR_R   5

Definition at line 242 of file emu10kx.c.

◆ C_REC_L

#define C_REC_L   2

Definition at line 239 of file emu10kx.c.

◆ C_REC_R

#define C_REC_R   3

Definition at line 240 of file emu10kx.c.

◆ C_SIDE_L

#define C_SIDE_L   8

Definition at line 245 of file emu10kx.c.

◆ C_SIDE_R

#define C_SIDE_R   9

Definition at line 246 of file emu10kx.c.

◆ C_SUB

#define C_SUB   7

Definition at line 244 of file emu10kx.c.

◆ CDSPDIFMUTE

#define CDSPDIFMUTE   0

Definition at line 249 of file emu10kx.c.

◆ COND_BORROW

#define COND_BORROW   DSP_CONST(0x2)

Definition at line 107 of file emu10kx.c.

◆ COND_EQ_ZERO

#define COND_EQ_ZERO   DSP_CONST(0x5)

Definition at line 110 of file emu10kx.c.

◆ COND_LESS_ZERO

#define COND_LESS_ZERO   DSP_CONST(0x4)

Definition at line 109 of file emu10kx.c.

◆ COND_MINUS

#define COND_MINUS   DSP_CONST(0x3)

Definition at line 108 of file emu10kx.c.

◆ COND_NEQ_ZERO

#define COND_NEQ_ZERO   DSP_CONST(0x8)

Definition at line 112 of file emu10kx.c.

◆ COND_NORMALIZED

#define COND_NORMALIZED   DSP_CONST(0x1)

Definition at line 106 of file emu10kx.c.

◆ COND_SATURATION

#define COND_SATURATION   DSP_CONST(0x6)

Definition at line 111 of file emu10kx.c.

◆ DIGITAL_ONLY

#define DIGITAL_ONLY   0x0200

Definition at line 73 of file emu10kx.c.

◆ DSP_ACCUM

#define DSP_ACCUM   DSP_CONST(0x16)

Definition at line 114 of file emu10kx.c.

◆ DSP_CCR

#define DSP_CCR   DSP_CONST(0x17)

Definition at line 115 of file emu10kx.c.

◆ DSP_CONST

#define DSP_CONST (   i)    (sc->dsp_zero+(i))

Definition at line 104 of file emu10kx.c.

◆ EFX_CACHE

#define EFX_CACHE (   CACHE_IDX)
Value:
do { \
sc->cache_gpr[CACHE_IDX] = emu_rm_gpr_alloc(sc->rm, 1); \
emu_addefxop(sc, ACC3, \
GPR(sc->cache_gpr[CACHE_IDX]), \
DSP_CONST(0), \
DSP_CONST(0), \
DSP_CONST(0), \
&pc); \
} while (0)
static int emu_rm_gpr_alloc(struct emu_rm *rm, int count)
Definition: emu10kx.c:2390
#define DSP_CONST(i)
Definition: emu10kx.c:104
#define ACC3
Definition: emu10kx.c:88
#define GPR(i)
Definition: emu10kx.c:99

Definition at line 1623 of file emu10kx.c.

◆ EFX_COPY

#define EFX_COPY (   TO,
  FROM 
)
Value:
do { \
emu_addefxop(sc, ACC3, \
TO, \
DSP_CONST(0), \
DSP_CONST(0), \
FROM, \
&pc); \
} while (0)

Definition at line 1683 of file emu10kx.c.

◆ EFX_OUTPUT

#define EFX_OUTPUT (   TITLE,
  OUT_CACHE_IDX,
  OUT_GPR_IDX,
  OUTP_NR,
  DEF 
)
Value:
do { \
sc->mixer_gpr[OUT_GPR_IDX] = emu_addefxmixer(sc, TITLE, OUT_GPR_IDX, DEF); \
sc->mixer_volcache[OUT_GPR_IDX] = DEF; \
emu_addefxop(sc, MACS, \
OUTP(OUTP_NR), \
DSP_CONST(0), \
GPR(sc->cache_gpr[OUT_CACHE_IDX]), \
GPR(sc->mixer_gpr[OUT_GPR_IDX]), \
&pc); \
} while (0)
#define MACS
Definition: emu10kx.c:82
static int emu_addefxmixer(struct emu_sc_info *sc, const char *mix_name, const int mix_id, uint32_t defvolume)
Definition: emu10kx.c:1552
#define OUTP(i)
Definition: emu10kx.c:101

Definition at line 1646 of file emu10kx.c.

◆ EFX_OUTPUTD

#define EFX_OUTPUTD (   OUT_CACHE_IDX,
  OUT_GPR_IDX,
  OUTP_NR 
)
Value:
do { \
emu_addefxop(sc, MACS, \
OUTP(OUTP_NR), \
DSP_CONST(0), \
GPR(sc->cache_gpr[OUT_CACHE_IDX]), \
GPR(sc->mixer_gpr[OUT_GPR_IDX]), \
&pc); \
} while (0)

Definition at line 1658 of file emu10kx.c.

◆ EFX_ROUTE

#define EFX_ROUTE (   TITLE,
  INP_NR,
  IN_GPR_IDX,
  OUT_CACHE_IDX,
  DEF 
)
Value:
do { \
sc->mixer_gpr[IN_GPR_IDX] = emu_addefxmixer(sc, TITLE, IN_GPR_IDX, DEF); \
sc->mixer_volcache[IN_GPR_IDX] = DEF; \
emu_addefxop(sc, MACS, \
GPR(sc->cache_gpr[OUT_CACHE_IDX]), \
GPR(sc->cache_gpr[OUT_CACHE_IDX]), \
INP_NR, \
GPR(sc->mixer_gpr[IN_GPR_IDX]), \
&pc); \
} while (0)

Definition at line 1634 of file emu10kx.c.

◆ EFX_SKIP

#define EFX_SKIP (   OPCOUNT,
  FLAG_GPR 
)
Value:
do { \
emu_addefxop(sc, MACS, \
DSP_CONST(0), \
GPR(sc->mute_gpr[FLAG_GPR]), \
DSP_CONST(0), \
DSP_CONST(0), \
&pc); \
emu_addefxop(sc, SKIP, \
OPCOUNT, \
&pc); \
} while (0)
#define DSP_CCR
Definition: emu10kx.c:115
#define COND_NEQ_ZERO
Definition: emu10kx.c:112
#define SKIP
Definition: emu10kx.c:97

Definition at line 1668 of file emu10kx.c.

◆ EMU_A2_MIXER_I2S_ENABLE

#define EMU_A2_MIXER_I2S_ENABLE   0x7B

Definition at line 234 of file emu10kx.c.

◆ EMU_A2_MIXER_SPDIF_ENABLE

#define EMU_A2_MIXER_SPDIF_ENABLE   0x7A

Definition at line 235 of file emu10kx.c.

◆ EMU_A2_SRCMULTI_ENABLE

#define EMU_A2_SRCMULTI_ENABLE   0x6e

Definition at line 230 of file emu10kx.c.

◆ EMU_A2_SRCSel

#define EMU_A2_SRCSel   0x60

Definition at line 229 of file emu10kx.c.

◆ EMU_A_I2S_CAPTURE_96000

#define EMU_A_I2S_CAPTURE_96000   0x00000400

Definition at line 232 of file emu10kx.c.

◆ EMU_DATA2

#define EMU_DATA2   0x24

Definition at line 223 of file emu10kx.c.

◆ EMU_INTE2

#define EMU_INTE2   0x2c

Definition at line 225 of file emu10kx.c.

◆ EMU_INTE3

#define EMU_INTE3   0x3c

Definition at line 227 of file emu10kx.c.

◆ EMU_IPR2

#define EMU_IPR2   0x28

Definition at line 224 of file emu10kx.c.

◆ EMU_IPR3

#define EMU_IPR3   0x38

Definition at line 226 of file emu10kx.c.

◆ EMU_MAX_GPR

#define EMU_MAX_GPR   512

Definition at line 253 of file emu10kx.c.

◆ EMU_MAX_IRQ_CONSUMERS

#define EMU_MAX_IRQ_CONSUMERS   32

Definition at line 254 of file emu10kx.c.

◆ EMU_MTX_DEBUG

#define EMU_MTX_DEBUG ( )
Value:
do { \
} while (0)

Definition at line 445 of file emu10kx.c.

◆ EMU_RWLOCK

#define EMU_RWLOCK ( )
Value:
do { \
EMU_MTX_DEBUG(); \
mtx_lock(&(sc->rw)); \
} while (0)

Definition at line 449 of file emu10kx.c.

◆ EMU_RWUNLOCK

#define EMU_RWUNLOCK ( )
Value:
do { \
mtx_unlock(&(sc->rw)); \
EMU_MTX_DEBUG(); \
} while (0)

Definition at line 454 of file emu10kx.c.

◆ EXP

#define EXP   0xD

Definition at line 95 of file emu10kx.c.

◆ FX

#define FX (   i)    (i)

Definition at line 102 of file emu10kx.c.

◆ FX2

#define FX2 (   i)    (sc->efxc_base+(i))

Definition at line 103 of file emu10kx.c.

◆ GPR

#define GPR (   i)    (sc->gpr_base+(i))

Definition at line 99 of file emu10kx.c.

◆ HAS_51

#define HAS_51   0x0001

Definition at line 62 of file emu10kx.c.

◆ HAS_71

#define HAS_71   0x0002

Definition at line 63 of file emu10kx.c.

◆ HAS_AC97

#define HAS_AC97   0x0004

Definition at line 64 of file emu10kx.c.

◆ IN_0E

#define IN_0E   0x0e

Definition at line 139 of file emu10kx.c.

◆ IN_0F

#define IN_0F   0x0f

Definition at line 140 of file emu10kx.c.

◆ IN_AC97

#define IN_AC97   IN_AC97_L

Definition at line 120 of file emu10kx.c.

◆ IN_AC97_L

#define IN_AC97_L   0x00

Definition at line 118 of file emu10kx.c.

◆ IN_AC97_R

#define IN_AC97_R   0x01

Definition at line 119 of file emu10kx.c.

◆ IN_COAX_SPDIF

#define IN_COAX_SPDIF   IN_COAX_SPDIF_L

Definition at line 135 of file emu10kx.c.

◆ IN_COAX_SPDIF_L

#define IN_COAX_SPDIF_L   0x0a

Definition at line 133 of file emu10kx.c.

◆ IN_COAX_SPDIF_R

#define IN_COAX_SPDIF_R   0x0b

Definition at line 134 of file emu10kx.c.

◆ IN_LINE1

#define IN_LINE1   IN_LINE1_L

Definition at line 132 of file emu10kx.c.

◆ IN_LINE1_L

#define IN_LINE1_L   0x08

Definition at line 130 of file emu10kx.c.

◆ IN_LINE1_R

#define IN_LINE1_R   0x09

Definition at line 131 of file emu10kx.c.

◆ IN_LINE2

#define IN_LINE2   IN_LINE2_L

Definition at line 138 of file emu10kx.c.

◆ IN_LINE2_L

#define IN_LINE2_L   0x0c

Definition at line 136 of file emu10kx.c.

◆ IN_LINE2_R

#define IN_LINE2_R   0x0d

Definition at line 137 of file emu10kx.c.

◆ IN_SPDIF_CD

#define IN_SPDIF_CD   IN_SPDIF_CD_L

Definition at line 123 of file emu10kx.c.

◆ IN_SPDIF_CD_L

#define IN_SPDIF_CD_L   0x02

Definition at line 121 of file emu10kx.c.

◆ IN_SPDIF_CD_R

#define IN_SPDIF_CD_R   0x03

Definition at line 122 of file emu10kx.c.

◆ IN_TOSLINK

#define IN_TOSLINK   IN_TOSLINK_L

Definition at line 129 of file emu10kx.c.

◆ IN_TOSLINK_L

#define IN_TOSLINK_L   0x06

Definition at line 127 of file emu10kx.c.

◆ IN_TOSLINK_R

#define IN_TOSLINK_R   0x07

Definition at line 128 of file emu10kx.c.

◆ IN_ZOOM

#define IN_ZOOM   IN_ZOOM_L

Definition at line 126 of file emu10kx.c.

◆ IN_ZOOM_L

#define IN_ZOOM_L   0x04

Definition at line 124 of file emu10kx.c.

◆ IN_ZOOM_R

#define IN_ZOOM_R   0x05

Definition at line 125 of file emu10kx.c.

◆ INP

#define INP (   i)    (sc->input_base+(i))

Definition at line 100 of file emu10kx.c.

◆ INTERP

#define INTERP   0xE

Definition at line 96 of file emu10kx.c.

◆ IS_CA0102

#define IS_CA0102   0x0020

Definition at line 68 of file emu10kx.c.

◆ IS_CA0108

#define IS_CA0108   0x0040

Definition at line 69 of file emu10kx.c.

◆ IS_CARDBUS

#define IS_CARDBUS   0x0400

Definition at line 75 of file emu10kx.c.

◆ IS_EMU10K1

#define IS_EMU10K1   0x0008

Definition at line 66 of file emu10kx.c.

◆ IS_EMU10K2

#define IS_EMU10K2   0x0010

Definition at line 67 of file emu10kx.c.

◆ IS_UNKNOWN

#define IS_UNKNOWN   0x0080

Definition at line 70 of file emu10kx.c.

◆ L2L_POINTS

#define L2L_POINTS   10

Definition at line 2536 of file emu10kx.c.

◆ LIMIT

#define LIMIT   0xA

Definition at line 92 of file emu10kx.c.

◆ LIMIT1

#define LIMIT1   0xB

Definition at line 93 of file emu10kx.c.

◆ LOG

#define LOG   0xC

Definition at line 94 of file emu10kx.c.

◆ MACINTS

#define MACINTS   0x4

Definition at line 86 of file emu10kx.c.

◆ MACINTW

#define MACINTW   0x5

Definition at line 87 of file emu10kx.c.

◆ MACMV

#define MACMV   0x7

Definition at line 89 of file emu10kx.c.

◆ MACS

#define MACS   0x0

Definition at line 82 of file emu10kx.c.

◆ MACS1

#define MACS1   0x1

Definition at line 83 of file emu10kx.c.

◆ MACW

#define MACW   0x2

Definition at line 84 of file emu10kx.c.

◆ MACW1

#define MACW1   0x3

Definition at line 85 of file emu10kx.c.

◆ MODE_ANALOG

#define MODE_ANALOG   1

Definition at line 77 of file emu10kx.c.

◆ MODE_DIGITAL

#define MODE_DIGITAL   2

Definition at line 78 of file emu10kx.c.

◆ NUM_CACHES

#define NUM_CACHES   10

Definition at line 247 of file emu10kx.c.

◆ NUM_MUTE

#define NUM_MUTE   2

Definition at line 251 of file emu10kx.c.

◆ OUT_A_CENTER

#define OUT_A_CENTER   0x11

Definition at line 164 of file emu10kx.c.

◆ OUT_A_FRONT

#define OUT_A_FRONT   OUT_AC97

Definition at line 146 of file emu10kx.c.

◆ OUT_A_SUB

#define OUT_A_SUB   0x12

Definition at line 165 of file emu10kx.c.

◆ OUT_AC97

#define OUT_AC97   OUT_AC97_L

Definition at line 145 of file emu10kx.c.

◆ OUT_AC97_L

#define OUT_AC97_L   0x00

Definition at line 143 of file emu10kx.c.

◆ OUT_AC97_R

#define OUT_AC97_R   0x01

Definition at line 144 of file emu10kx.c.

◆ OUT_ADC_REC

#define OUT_ADC_REC   OUT_ADC_REC_L

Definition at line 160 of file emu10kx.c.

◆ OUT_ADC_REC_L

#define OUT_ADC_REC_L   0x0a

Definition at line 158 of file emu10kx.c.

◆ OUT_ADC_REC_R

#define OUT_ADC_REC_R   0x0b

Definition at line 159 of file emu10kx.c.

◆ OUT_D_CENTER

#define OUT_D_CENTER   0x04

Definition at line 150 of file emu10kx.c.

◆ OUT_D_SUB

#define OUT_D_SUB   0x05

Definition at line 151 of file emu10kx.c.

◆ OUT_HEADPHONE

#define OUT_HEADPHONE   OUT_HEADPHONE_L

Definition at line 154 of file emu10kx.c.

◆ OUT_HEADPHONE_L

#define OUT_HEADPHONE_L   0x06

Definition at line 152 of file emu10kx.c.

◆ OUT_HEADPHONE_R

#define OUT_HEADPHONE_R   0x07

Definition at line 153 of file emu10kx.c.

◆ OUT_MIC_CAP

#define OUT_MIC_CAP   0x0c

Definition at line 161 of file emu10kx.c.

◆ OUT_REAR

#define OUT_REAR   OUT_REAR_L

Definition at line 157 of file emu10kx.c.

◆ OUT_REAR_L

#define OUT_REAR_L   0x08

Definition at line 155 of file emu10kx.c.

◆ OUT_REAR_R

#define OUT_REAR_R   0x09

Definition at line 156 of file emu10kx.c.

◆ OUT_TOSLINK

#define OUT_TOSLINK   OUT_TOSLINK_L

Definition at line 149 of file emu10kx.c.

◆ OUT_TOSLINK_L

#define OUT_TOSLINK_L   0x02

Definition at line 147 of file emu10kx.c.

◆ OUT_TOSLINK_R

#define OUT_TOSLINK_R   0x03

Definition at line 148 of file emu10kx.c.

◆ OUTP

#define OUTP (   i)    (sc->output_base+(i))

Definition at line 101 of file emu10kx.c.

◆ SKIP

#define SKIP   0xF

Definition at line 97 of file emu10kx.c.

◆ SPDIF_MODE_AC3

#define SPDIF_MODE_AC3   2

Definition at line 80 of file emu10kx.c.

◆ SPDIF_MODE_PCM

#define SPDIF_MODE_PCM   1

Definition at line 79 of file emu10kx.c.

◆ TSTNEG

#define TSTNEG   0x9

Definition at line 91 of file emu10kx.c.

Function Documentation

◆ DRIVER_MODULE()

DRIVER_MODULE ( snd_emu10kx  ,
pci  ,
emu_driver  ,
emu_devclass  ,
emu_modevent  ,
NULL   
)

◆ emu10kx_close()

static int emu10kx_close ( struct cdev *  i_dev,
int flags  __unused,
int mode  __unused,
struct thread *td  __unused 
)
static

◆ emu10kx_dev_init()

static int emu10kx_dev_init ( struct emu_sc_info sc)
static

Definition at line 2313 of file emu10kx.c.

References emu_sc_info::cdev, emu_sc_info::dev, emu10kx_cdevsw, emu_sc_info::emu10kx_lock, and PCMMINOR.

Referenced by emu_pci_attach().

Here is the caller graph for this function:

◆ emu10kx_dev_uninit()

static int emu10kx_dev_uninit ( struct emu_sc_info sc)
static

Definition at line 2329 of file emu10kx.c.

References emu_sc_info::cdev, emu_sc_info::emu10kx_isopen, and emu_sc_info::emu10kx_lock.

Referenced by emu_pci_attach(), and emu_pci_detach().

Here is the caller graph for this function:

◆ emu10kx_open()

static int emu10kx_open ( struct cdev *  i_dev,
int flags  __unused,
int mode  __unused,
struct thread *td  __unused 
)
static

Definition at line 2186 of file emu10kx.c.

References emu_sc_info::emu10kx_bufptr, emu_sc_info::emu10kx_isopen, emu_sc_info::emu10kx_lock, emu10kx_prepare(), emu_sc_info::emu10kx_sbuf, and error.

Here is the call graph for this function:

◆ emu10kx_prepare()

◆ emu10kx_read()

static int emu10kx_read ( struct cdev *  i_dev,
struct uio *  buf,
int flag  __unused 
)
static

◆ emu_addefxmixer()

static int emu_addefxmixer ( struct emu_sc_info sc,
const char *  mix_name,
const int  mix_id,
uint32_t  defvolume 
)
static

Definition at line 1552 of file emu10kx.c.

References emu_sc_info::ctx, emu_rm_gpr_alloc(), emumix_set_fxvol(), emu_sc_info::rm, emu_sc_info::root, and sysctl_emu_mixer_control().

Here is the call graph for this function:

◆ emu_addefxop()

static void emu_addefxop ( struct emu_sc_info sc,
unsigned int  op,
unsigned int  z,
unsigned int  w,
unsigned int  x,
unsigned int  y,
uint32_t *  pc 
)
static

Definition at line 1517 of file emu10kx.c.

References emu_sc_info::code_size, emu_sc_info::dev, emu_wrefx(), emu_sc_info::high_operand_shift, and emu_sc_info::opcode_shift.

Referenced by emu_initefx().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_cardbus_init()

static int emu_cardbus_init ( struct emu_sc_info sc)
static

Definition at line 2630 of file emu10kx.c.

References emu_wr_cbptr().

Referenced by emu_pci_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_digitalswitch()

static void emu_digitalswitch ( struct emu_sc_info sc)
static

Definition at line 1608 of file emu10kx.c.

References emu_sc_info::ctx, emu_sc_info::root, and sysctl_emu_digitalswitch_control().

Referenced by emu_initefx().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_enable_ir()

void emu_enable_ir ( struct emu_sc_info sc)

Definition at line 779 of file emu10kx.c.

References emu_sc_info::dev, EMU_A_IOCFG, EMU_A_IOCFG_GPOUT1, EMU_A_IOCFG_GPOUT2, EMU_HCFG, EMU_HCFG_GPOUT1, EMU_HCFG_GPOUT2, emu_rd_nolock(), emu_wr_nolock(), emu_sc_info::enable_ir, emu_sc_info::is_ca0102, emu_sc_info::is_emu10k1, and emu_sc_info::is_emu10k2.

Referenced by emu_midi_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_free()

static void emu_free ( struct emu_mem mem,
void *  dmabuf,
bus_dmamap_t  map 
)
static

Definition at line 1079 of file emu10kx.c.

References emu_mem::dmat, and emu_sc_info::mem.

Referenced by emu_init(), emu_memfree(), and emu_uninit().

Here is the caller graph for this function:

◆ emu_getcard()

static unsigned int emu_getcard ( device_t  dev)
static

Definition at line 564 of file emu10kx.c.

References dev, emu_hwinfo::device, emu_bad_cards, emu_cards, PCIR_DEVICE, PCIR_SUBDEV_0, and emu_hwinfo::subdevice.

Referenced by emu_pci_attach(), and emu_pci_probe().

Here is the caller graph for this function:

◆ emu_gettag()

bus_dma_tag_t emu_gettag ( struct emu_sc_info sc)

Definition at line 1037 of file emu10kx.c.

References emu_mem::dmat, and emu_sc_info::mem.

Referenced by emufxrchan_init(), and emurchan_init().

Here is the caller graph for this function:

◆ emu_init()

static int emu_init ( struct emu_sc_info sc)
static

Definition at line 2650 of file emu10kx.c.

References emu_sc_info::broken_digital, emu_mem::card, emu_sc_info::dev, emu_mem::dmat, EMU_A2_MIXER_I2S_ENABLE, EMU_A2_MIXER_SPDIF_ENABLE, EMU_A2_SRCMULTI_ENABLE, EMU_A2_SRCSel, EMU_A_CHAN_FXRT1, EMU_A_CHAN_FXRT2, EMU_A_CHAN_SENDAMOUNTS, EMU_A_I2S_CAPTURE_96000, EMU_A_IOCFG, EMU_A_SPDIF_48000, EMU_A_SPDIF_SAMPLERATE, EMU_AC97SLOT, EMU_AC97SLOT_CENTER, EMU_AC97SLOT_LFE, EMU_AC97SLOT_REAR_LEFT, EMU_AC97SLOT_REAR_RIGHT, EMU_ADCBA, EMU_ADCBS, EMU_CHAN_ATKHLDM, EMU_CHAN_ATKHLDV, EMU_CHAN_CCCA, EMU_CHAN_CCR, EMU_CHAN_CPF, EMU_CHAN_CVCF, EMU_CHAN_DCYSUSM, EMU_CHAN_DCYSUSV, EMU_CHAN_DSL, EMU_CHAN_ENVVAL, EMU_CHAN_ENVVOL, EMU_CHAN_FM2FRQ2, EMU_CHAN_FMMOD, EMU_CHAN_FXRT, EMU_CHAN_IFATN, EMU_CHAN_IP, EMU_CHAN_LFOVAL1, EMU_CHAN_LFOVAL2, EMU_CHAN_MAP_PTI_MASK, EMU_CHAN_MAPA, EMU_CHAN_MAPB, EMU_CHAN_PEFE, EMU_CHAN_PSST, EMU_CHAN_PTRX, EMU_CHAN_TEMPENV, EMU_CHAN_TREMFRQ, EMU_CHAN_VTFT, EMU_CHAN_Z1, EMU_CHAN_Z2, EMU_CLIEH, EMU_CLIEL, emu_free(), EMU_FXBA, EMU_FXBS, EMU_HCFG, EMU_HCFG_LOCKSOUNDCACHE, EMU_HCFG_LOCKTANKCACHE_MASK, EMU_HCFG_MUTEBUTTONENABLE, emu_initefx(), EMU_INTE, EMU_INTE2, EMU_INTE3, EMU_INTE_INTERTIMERENB, EMU_INTE_PCIERRENABLE, EMU_INTE_SAMPLERATER, emu_malloc(), EMU_MAX_BUFSZ, EMU_MAXPAGES, EMU_MICBA, EMU_MICBS, EMU_PTB, emu_rd(), emu_rdptr(), EMU_RECBS_BUFSIZE_NONE, EMU_SOLEH, EMU_SOLEL, EMU_SPBYPASS, EMU_TCB, EMU_TCBS, emu_wr(), emu_wr_p16vptr(), emu_wrptr(), emumix_set_mode(), emumix_set_spdif_mode(), EMUPAGESIZE, emu_sc_info::has_51, emu_sc_info::has_71, emu_sc_info::is_ca0102, emu_sc_info::is_ca0108, emu_sc_info::is_emu10k2, emu_sc_info::mem, MODE_ANALOG, MODE_DIGITAL, NUM_G, emu_mem::ptb_map, emu_mem::ptb_pages, emu_mem::ptb_pages_addr, emu_mem::silent_map, emu_mem::silent_page, emu_mem::silent_page_addr, and SPDIF_MODE_PCM.

Referenced by emu_pci_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_initefx()

static void emu_initefx ( struct emu_sc_info sc)
static

Definition at line 1693 of file emu10kx.c.

References A_IN_AC97_L, A_IN_AC97_R, A_IN_AUX2_L, A_IN_AUX2_R, A_IN_LINE2_L, A_IN_LINE2_R, A_IN_O_SPDIF_L, A_IN_O_SPDIF_R, A_IN_R_SPDIF_L, A_IN_R_SPDIF_R, A_IN_SPDIF_CD_L, A_IN_SPDIF_CD_R, A_OUT_A_CENTER, A_OUT_A_FRONT_L, A_OUT_A_FRONT_R, A_OUT_A_REAR_L, A_OUT_A_REAR_R, A_OUT_A_SIDE_L, A_OUT_A_SIDE_R, A_OUT_A_SUB, A_OUT_ADC_REC_L, A_OUT_ADC_REC_R, A_OUT_D_CENTER, A_OUT_D_FRONT_L, A_OUT_D_FRONT_R, A_OUT_D_REAR_L, A_OUT_D_REAR_R, A_OUT_D_SIDE_L, A_OUT_D_SIDE_R, A_OUT_D_SUB, A_OUT_HPHONE_L, A_OUT_HPHONE_R, ACC3, ANALOGMUTE, C_CENTER, C_FRONT_L, C_FRONT_R, C_REAR_L, C_REAR_R, C_REC_L, C_REC_R, C_SIDE_L, C_SIDE_R, C_SUB, emu_sc_info::cache_gpr, CDSPDIFMUTE, emu_sc_info::code_size, emu_sc_info::dbg_level, DSP_CONST, emu_sc_info::dummy_gpr, EFX_CACHE, EFX_COPY, EFX_OUTPUT, EFX_OUTPUTD, EFX_ROUTE, EFX_SKIP, EMU_A_DBG, EMU_A_DBG_SINGLE_STEP, emu_addefxop(), EMU_DBG, EMU_DBG_SINGLE_STEP, emu_digitalswitch(), emu_rm_gpr_alloc(), emu_wrptr(), emumix_set_gpr(), FX, FX2, GPR, emu_sc_info::has_51, emu_sc_info::has_71, IN_AC97_L, IN_AC97_R, IN_COAX_SPDIF_L, IN_COAX_SPDIF_R, IN_LINE1_L, IN_LINE1_R, IN_LINE2_L, IN_LINE2_R, IN_SPDIF_CD_L, IN_SPDIF_CD_R, IN_TOSLINK_L, IN_TOSLINK_R, IN_ZOOM_L, IN_ZOOM_R, INP, emu_sc_info::is_emu10k1, M_FX0_FRONT_L, M_FX0_REC_L, M_FX1_FRONT_R, M_FX1_REC_R, M_FX2_REAR_L, M_FX3_REAR_R, M_FX4_CENTER, M_FX5_SUBWOOFER, M_FX6_SIDE_L, M_FX7_SIDE_R, M_IN0_FRONT_L, M_IN0_FRONT_R, M_IN0_REC_L, M_IN0_REC_R, M_IN1_FRONT_L, M_IN1_FRONT_R, M_IN1_REC_L, M_IN1_REC_R, M_IN2_FRONT_L, M_IN2_FRONT_R, M_IN2_REC_L, M_IN2_REC_R, M_IN3_FRONT_L, M_IN3_FRONT_R, M_IN3_REC_L, M_IN3_REC_R, M_IN4_FRONT_L, M_IN4_FRONT_R, M_IN4_REC_L, M_IN4_REC_R, M_IN5_FRONT_L, M_IN5_FRONT_R, M_IN5_REC_L, M_IN5_REC_R, M_IN6_FRONT_L, M_IN6_FRONT_R, M_IN6_REC_L, M_IN6_REC_R, M_IN7_FRONT_L, M_IN7_FRONT_R, M_IN7_REC_L, M_IN7_REC_R, M_MASTER_CENTER, M_MASTER_FRONT_L, M_MASTER_FRONT_R, M_MASTER_REAR_L, M_MASTER_REAR_R, M_MASTER_REC_L, M_MASTER_REC_R, M_MASTER_SIDE_L, M_MASTER_SIDE_R, M_MASTER_SUBWOOFER, MACS, emu_sc_info::mch_disabled, emu_sc_info::mch_rec, emu_sc_info::mute_gpr, NUM_MUTE, OUT_A_CENTER, OUT_A_SUB, OUT_AC97_L, OUT_AC97_R, OUT_ADC_REC_L, OUT_ADC_REC_R, OUT_D_CENTER, OUT_D_SUB, OUT_HEADPHONE_L, OUT_HEADPHONE_R, OUT_REAR_L, OUT_REAR_R, OUT_TOSLINK_L, OUT_TOSLINK_R, OUTP, emu_sc_info::rm, emu_sc_info::routing_code_end, and SKIP.

Referenced by emu_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_intr()

static void emu_intr ( void *  p)
static

◆ emu_intr_register()

int emu_intr_register ( struct emu_sc_info sc,
uint32_t  inte_mask,
uint32_t  intr_mask,
uint32_t(*)(void *softc, uint32_t irq func,
void *  isc 
)

◆ emu_intr_unregister()

int emu_intr_unregister ( struct emu_sc_info sc,
int  hnumber 
)

◆ emu_malloc()

static void * emu_malloc ( struct emu_mem mem,
uint32_t  sz,
bus_addr_t *  addr,
bus_dmamap_t *  map 
)
static

Definition at line 1057 of file emu10kx.c.

References addr, emu_mem::card, emu_sc_info::dbg_level, emu_sc_info::dev, emu_mem::dmat, emu_setmap(), error, and emu_sc_info::mem.

Referenced by emu_init(), and emu_memalloc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_memalloc()

static void * emu_memalloc ( struct emu_mem mem,
uint32_t  sz,
bus_addr_t *  addr,
const char *  owner 
)
static

Definition at line 1086 of file emu10kx.c.

References addr, blksz, emu_mem::bmap, emu_mem::card, emu_sc_info::dbg_level, emu_sc_info::dev, emu_malloc(), EMU_MAX_BUFSZ, EMU_MAXPAGES, EMUPAGESIZE, free, emu_mem::ptb_pages, and start.

Referenced by emu_vinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_memfree()

static int emu_memfree ( struct emu_mem mem,
void *  membuf 
)
static

Definition at line 1148 of file emu10kx.c.

References emu_mem::bmap, emu_free(), free, emu_mem::ptb_pages, and emu_mem::silent_page_addr.

Referenced by emu_vfree(), and emu_vinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_memstart()

static int emu_memstart ( struct emu_mem mem,
void *  membuf 
)
static

Definition at line 1172 of file emu10kx.c.

Referenced by emu_vinit().

Here is the caller graph for this function:

◆ emu_modevent()

static int emu_modevent ( module_t mod  __unused,
int  cmd,
void *data  __unused 
)
static

Definition at line 3520 of file emu10kx.c.

◆ emu_pci_attach()

static int emu_pci_attach ( device_t  dev)
static

Definition at line 3018 of file emu10kx.c.

References emu_sc_info::address_mask, emu_voice::b16, BROKEN_DIGITAL, emu_sc_info::broken_digital, emu_voice::busy, emu_midiinfo::card, emu_pcminfo::card, emu_sc_info::cdev, emu_sc_info::code_base, emu_sc_info::code_size, emu_sc_info::ctx, emu_sc_info::dbg_level, emu_sc_info::dev, dev, emu_sc_info::dsp_zero, emu_sc_info::efxc_base, emu10kx_dev_init(), emu10kx_dev_uninit(), EMU_A_FXGPREGBASE, EMU_A_MICROCODEBASE, EMU_A_MUDATA1, EMU_A_MUDATA2, EMU_A_PTR_ADDR_MASK, emu_cardbus_init(), emu_cards, EMU_FXGPREGBASE, emu_getcard(), emu_init(), emu_intr(), EMU_MAX_IRQ_CONSUMERS, EMU_MICROCODEBASE, EMU_PTR_ADDR_MASK, emu_rm_init(), emu_rm_uninit(), emu_sc_info::enable_ir, emu_voice::end, error, emu_hwinfo::flags, sndcard_func::func, func, emu_sc_info::gpr_base, HAS_51, emu_sc_info::has_51, HAS_71, emu_sc_info::has_71, HAS_AC97, emu_sc_info::has_ac97, emu_sc_info::high_operand_shift, emu_sc_info::ih, emu_sc_info::input_base, emu_sc_info::irq, IS_CA0102, emu_sc_info::is_ca0102, IS_CA0108, emu_sc_info::is_ca0108, IS_CARDBUS, emu_sc_info::is_cardbus, IS_EMU10K1, emu_sc_info::is_emu10k1, IS_EMU10K2, emu_sc_info::is_emu10k2, emu_voice::ismaster, emu_sc_info::lock, emu_sc_info::mch_disabled, emu_sc_info::mch_rec, emu_sc_info::mchannel_fx, emu_sc_info::midi, emu_sc_info::num_fxbuses, NUM_G, emu_sc_info::num_gprs, emu_sc_info::num_inputs, emu_sc_info::num_outputs, emu_sc_info::opcode_shift, emu_sc_info::output_base, PCIR_BAR, emu_sc_info::pcm, emu_midiinfo::port, emu_midiinfo::portnr, RANGE, emu_sc_info::reg, emu_sc_info::rev, emu_sc_info::rm, emu_sc_info::root, emu_pcminfo::route, RT_CENTER, RT_COUNT, RT_FRONT, RT_MCHRECORD, RT_REAR, RT_SIDE, RT_SUB, emu_voice::running, emu_sc_info::rw, SCF_MIDI, SCF_PCM, emu_sc_info::sh, emu_voice::slave, emu_voice::speed, emu_sc_info::st, emu_voice::start, status, emu_voice::stereo, emu_sc_info::timer, emu_sc_info::type, emu_voice::vnum, and emu_sc_info::voice.

Here is the call graph for this function:

◆ emu_pci_detach()

static int emu_pci_detach ( device_t  dev)
static

◆ emu_pci_probe()

static int emu_pci_probe ( device_t  dev)
static

Definition at line 2990 of file emu10kx.c.

References desc, dev, emu_cards, emu_getcard(), PCIR_DEVVENDOR, and vendor.

Here is the call graph for this function:

◆ emu_rate_to_linearpitch()

static uint32_t emu_rate_to_linearpitch ( uint32_t  rate)
static

Definition at line 1244 of file emu10kx.c.

References rate.

Referenced by emu_vtrigger().

Here is the caller graph for this function:

◆ emu_rate_to_pitch()

static uint32_t emu_rate_to_pitch ( uint32_t  rate)
static

Definition at line 1187 of file emu10kx.c.

References rate.

Referenced by emu_vtrigger().

Here is the caller graph for this function:

◆ emu_rd()

uint32_t emu_rd ( struct emu_sc_info sc,
unsigned int  regno,
unsigned int  size 
)

Definition at line 763 of file emu10kx.c.

References EMU_DATA, EMU_DATA2, emu_rd_nolock(), regno, and size.

Referenced by emu_init(), emu_intr(), emu_intr_register(), emu_intr_unregister(), emu_timer_enable(), and emumix_set_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_rd_nolock()

static uint32_t emu_rd_nolock ( struct emu_sc_info sc,
unsigned int  regno,
unsigned int  size 
)
static

Definition at line 611 of file emu10kx.c.

References regno, emu_sc_info::sh, size, and emu_sc_info::st.

Referenced by emu_enable_ir(), emu_rd(), emu_rd_p16vptr(), emu_rdptr(), emu_wr_cbptr(), and emu_wrptr().

Here is the caller graph for this function:

◆ emu_rd_p16vptr()

uint32_t emu_rd_p16vptr ( struct emu_sc_info sc,
uint16_t  chn,
uint16_t  reg 
)

Definition at line 706 of file emu10kx.c.

References EMU_A2_PTR, EMU_DATA2, emu_rd_nolock(), EMU_RWLOCK, EMU_RWUNLOCK, emu_wr_nolock(), reg, and val.

Here is the call graph for this function:

◆ emu_rdptr()

uint32_t emu_rdptr ( struct emu_sc_info sc,
unsigned int  chn,
unsigned int  reg 
)

Definition at line 649 of file emu10kx.c.

References emu_sc_info::address_mask, EMU_DATA, EMU_PTR, EMU_PTR_CHNO_MASK, emu_rd_nolock(), EMU_RWLOCK, EMU_RWUNLOCK, emu_wr_nolock(), mask, offset, reg, size, and val.

Referenced by emu_init(), and emu_vpos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_read_ivar()

static int emu_read_ivar ( device_t bus  __unused,
device_t  dev,
int  ivar_index,
uintptr_t *  result 
)
static

◆ emu_rm_gpr_alloc()

static int emu_rm_gpr_alloc ( struct emu_rm rm,
int  count 
)
static

Definition at line 2390 of file emu10kx.c.

References emu_rm::allocmap, count, emu_rm::gpr_lock, emu_rm::last_free_gpr, emu_rm::num_gprs, and emu_rm::num_used.

Referenced by emu_addefxmixer(), and emu_initefx().

Here is the caller graph for this function:

◆ emu_rm_init()

int emu_rm_init ( struct emu_sc_info sc)
static

◆ emu_rm_uninit()

int emu_rm_uninit ( struct emu_sc_info sc)
static

Definition at line 2372 of file emu10kx.c.

References emu_rm::allocmap, emu_sc_info::dbg_level, emu_sc_info::dev, free, emu_rm::gpr_lock, emu_rm::last_free_gpr, and emu_sc_info::rm.

Referenced by emu_pci_attach(), and emu_pci_detach().

Here is the caller graph for this function:

◆ emu_setmap()

static void emu_setmap ( void *  arg,
bus_dma_segment_t *  segs,
int  nseg,
int  error 
)
static

Definition at line 1043 of file emu10kx.c.

References error.

Referenced by emu_malloc().

Here is the caller graph for this function:

◆ emu_timer_clear()

int emu_timer_clear ( struct emu_sc_info sc,
int  timer 
)

Definition at line 897 of file emu10kx.c.

References EMU_MAX_IRQ_CONSUMERS, emu_timer_enable(), emu_sc_info::lock, RANGE, and emu_sc_info::timer.

Referenced by emupchan_free(), and emurchan_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_timer_create()

int emu_timer_create ( struct emu_sc_info sc)

Definition at line 811 of file emu10kx.c.

References EMU_MAX_IRQ_CONSUMERS, emu_sc_info::lock, and emu_sc_info::timer.

Referenced by emupchan_init(), and emurchan_init().

Here is the caller graph for this function:

◆ emu_timer_enable()

int emu_timer_enable ( struct emu_sc_info sc,
int  timer,
int  go 
)

Definition at line 855 of file emu10kx.c.

References EMU_INTE, EMU_INTE_INTERTIMERENB, EMU_MAX_IRQ_CONSUMERS, emu_rd(), EMU_TIMER, emu_wr(), go, emu_sc_info::lock, RANGE, emu_sc_info::timer, and emu_sc_info::timerinterval.

Referenced by emu_pcm_intr(), emu_timer_clear(), emupchan_trigger(), and emurchan_setblocksize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_timer_set()

int emu_timer_set ( struct emu_sc_info sc,
int  timer,
int  delay 
)

Definition at line 831 of file emu10kx.c.

References EMU_MAX_IRQ_CONSUMERS, EMU_TIMER, emu_wr(), emu_sc_info::lock, RANGE, emu_sc_info::timer, and emu_sc_info::timerinterval.

Referenced by emupchan_setblocksize(), emupchan_trigger(), and emurchan_setblocksize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_uninit()

◆ emu_valloc()

struct emu_voice * emu_valloc ( struct emu_sc_info sc)

Definition at line 1251 of file emu10kx.c.

References emu_voice::busy, emu_sc_info::lock, NUM_G, and emu_sc_info::voice.

◆ emu_vfree()

void emu_vfree ( struct emu_sc_info sc,
struct emu_voice v 
)

Definition at line 1268 of file emu10kx.c.

References emu_voice::busy, emu_memfree(), emu_sc_info::lock, emu_sc_info::mem, NUM_G, r, emu_voice::slave, emu_voice::vbuf, and emu_sc_info::voice.

Referenced by emupchan_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_vinit()

◆ emu_vpos()

int emu_vpos ( struct emu_sc_info sc,
struct emu_voice v 
)

Definition at line 1500 of file emu10kx.c.

References emu_voice::b16, EMU_CHAN_CCCA_CURRADDR, emu_rdptr(), emu_voice::start, emu_voice::stereo, and emu_voice::vnum.

Here is the call graph for this function:

◆ emu_vroute()

void emu_vroute ( struct emu_sc_info sc,
struct emu_route rt,
struct emu_voice v 
)

Definition at line 1355 of file emu10kx.c.

References emu_voice::amounts, emu_route::amounts_left, emu_route::amounts_right, emu_vroute(), emu_voice::ismaster, emu_voice::routing, emu_route::routing_left, emu_route::routing_right, emu_voice::slave, and emu_voice::stereo.

Referenced by emu_vroute(), and emupchan_trigger().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_vsetup()

void emu_vsetup ( struct emu_voice v,
int  fmt,
int  spd 
)

◆ emu_vstop()

static void emu_vstop ( struct emu_sc_info sc,
char  channel,
int  enable 
)
static

Definition at line 1445 of file emu10kx.c.

References channel, EMU_SOLEH, EMU_SOLEL, emu_wrptr(), enable, and reg.

Referenced by emu_vtrigger().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_vtrigger()

◆ emu_vwrite()

◆ emu_wr()

void emu_wr ( struct emu_sc_info sc,
unsigned int  regno,
uint32_t  data,
unsigned int  size 
)

Definition at line 754 of file emu10kx.c.

References data, EMU_A2_PTR, EMU_PTR, emu_wr_nolock(), regno, and size.

Referenced by emu_init(), emu_intr(), emu_intr_register(), emu_intr_unregister(), emu_timer_enable(), emu_timer_set(), emu_uninit(), and emumix_set_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_wr_cbptr()

static void emu_wr_cbptr ( struct emu_sc_info sc,
uint32_t  data 
)
static

Definition at line 733 of file emu10kx.c.

References data, emu_rd_nolock(), emu_wr_nolock(), and val.

Referenced by emu_cardbus_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_wr_nolock()

static void emu_wr_nolock ( struct emu_sc_info sc,
unsigned int  regno,
uint32_t  data,
unsigned int  size 
)
static

Definition at line 627 of file emu10kx.c.

References data, regno, emu_sc_info::sh, size, and emu_sc_info::st.

Referenced by emu_enable_ir(), emu_rd_p16vptr(), emu_rdptr(), emu_wr(), emu_wr_cbptr(), emu_wr_p16vptr(), and emu_wrptr().

Here is the caller graph for this function:

◆ emu_wr_p16vptr()

void emu_wr_p16vptr ( struct emu_sc_info sc,
uint16_t  chn,
uint16_t  reg,
uint32_t  data 
)

Definition at line 721 of file emu10kx.c.

References data, EMU_A2_PTR, EMU_DATA2, EMU_RWLOCK, EMU_RWUNLOCK, emu_wr_nolock(), and reg.

Referenced by emu_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_wrefx()

static void emu_wrefx ( struct emu_sc_info sc,
unsigned int  pc,
unsigned int  data 
)
static

Definition at line 1511 of file emu10kx.c.

References emu_sc_info::code_base, data, and emu_wrptr().

Referenced by emu_addefxop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emu_write_ivar()

static int emu_write_ivar ( device_t bus  __unused,
device_t dev  __unused,
int  ivar_index,
uintptr_t value  __unused 
)
static

Definition at line 2976 of file emu10kx.c.

◆ emu_wrptr()

void emu_wrptr ( struct emu_sc_info sc,
unsigned int  chn,
unsigned int  reg,
uint32_t  data 
)

Definition at line 676 of file emu10kx.c.

References emu_sc_info::address_mask, data, EMU_DATA, EMU_PTR, EMU_PTR_CHNO_MASK, emu_rd_nolock(), EMU_RWLOCK, EMU_RWUNLOCK, emu_wr_nolock(), mask, offset, reg, and size.

Referenced by emu_init(), emu_initefx(), emu_uninit(), emu_vstop(), emu_vtrigger(), emu_vwrite(), emu_wrefx(), emumix_set_gpr(), and emumix_set_spdif_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emumix_get_volume()

int emumix_get_volume ( struct emu_sc_info sc,
int  mixer_idx 
)

Definition at line 2621 of file emu10kx.c.

References emu_sc_info::mixer_volcache, and NUM_MIXERS.

Referenced by emu_dspmixer_setrecsrc(), and sysctl_emu_mixer_control().

Here is the caller graph for this function:

◆ emumix_set_fxvol()

void emumix_set_fxvol ( struct emu_sc_info sc,
unsigned  gpr,
int32_t  vol 
)
static

Definition at line 2587 of file emu10kx.c.

References emumix_set_gpr(), and log2lin().

Referenced by emu_addefxmixer(), and emumix_set_volume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emumix_set_gpr()

void emumix_set_gpr ( struct emu_sc_info sc,
unsigned  gpr,
int32_t  val 
)
static

Definition at line 2595 of file emu10kx.c.

References emu_sc_info::dbg_level, emu_sc_info::dev, emu_wrptr(), GPR, and val.

Referenced by emu_initefx(), emumix_set_fxvol(), and emumix_set_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emumix_set_mode()

◆ emumix_set_spdif_mode()

void emumix_set_spdif_mode ( struct emu_sc_info sc,
int  mode 
)
static

◆ emumix_set_volume()

void emumix_set_volume ( struct emu_sc_info sc,
int  mixer_idx,
int  volume 
)

Definition at line 2610 of file emu10kx.c.

References emumix_set_fxvol(), emu_sc_info::mixer_gpr, emu_sc_info::mixer_volcache, NUM_MIXERS, and RANGE.

Referenced by emu_ac97_write_emulation(), emu_dspmixer_set(), emu_dspmixer_setrecsrc(), and sysctl_emu_mixer_control().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log2lin()

static int log2lin ( int  log_t)
static

Definition at line 2565 of file emu10kx.c.

References l2l_df, l2l_f, and L2L_POINTS.

Referenced by emumix_set_fxvol().

Here is the caller graph for this function:

◆ MODULE_VERSION()

MODULE_VERSION ( snd_emu10kx  ,
SND_EMU10KX_PREFVER   
)

◆ sysctl_emu_digitalswitch_control()

static int sysctl_emu_digitalswitch_control ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 1580 of file emu10kx.c.

References emumix_set_mode(), emu_sc_info::mode, MODE_ANALOG, MODE_DIGITAL, and req.

Referenced by emu_digitalswitch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sysctl_emu_mixer_control()

static int sysctl_emu_mixer_control ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 1529 of file emu10kx.c.

References emumix_get_volume(), emumix_set_volume(), and req.

Referenced by emu_addefxmixer().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ emu10kx_cdevsw

struct cdevsw emu10kx_cdevsw
static
Initial value:
= {
.d_open = emu10kx_open,
.d_close = emu10kx_close,
.d_read = emu10kx_read,
.d_name = "emu10kx",
.d_version = D_VERSION,
}
static d_read_t emu10kx_read
Definition: emu10kx.c:2175
static d_close_t emu10kx_close
Definition: emu10kx.c:2174
static d_open_t emu10kx_open
Definition: emu10kx.c:2173

Definition at line 2177 of file emu10kx.c.

Referenced by emu10kx_dev_init().

◆ emu10kx_close

d_close_t emu10kx_close
static

Definition at line 2174 of file emu10kx.c.

◆ emu10kx_open

d_open_t emu10kx_open
static

Definition at line 2173 of file emu10kx.c.

◆ emu10kx_read

d_read_t emu10kx_read
static

Definition at line 2175 of file emu10kx.c.

◆ emu_bad_cards

struct emu_hwinfo emu_bad_cards[]
static
Initial value:
= {
{0x1102, 0x0002, 0x1102, 0x4001, "EMUAPS", "E-mu APS", 0},
{0x1102, 0x0002, 0x1102, 0x4002, "EMUAPS", "E-mu APS", 0},
{0x1102, 0x0004, 0x1102, 0x4001, "EMU???", "E-mu 1212m [4001]", 0},
{0x1102, 0x8064, 0x0000, 0x0000, "SB0100", "SBLive! 5.1 OEM", 0},
{0x1102, 0x0006, 0x0000, 0x0000, "SB0200", "DELL OEM SBLive! Value", 0},
{0x1102, 0x0007, 0x0000, 0x0000, "SB0310", "Audigy LS", 0},
}

Definition at line 549 of file emu10kx.c.

Referenced by emu_getcard().

◆ emu_cards

struct emu_hwinfo emu_cards[]
static

Definition at line 470 of file emu10kx.c.

Referenced by emu_getcard(), emu_pci_attach(), and emu_pci_probe().

◆ emu_devclass

devclass_t emu_devclass
static

Definition at line 3544 of file emu10kx.c.

◆ emu_driver

driver_t emu_driver
static
Initial value:
= {
"emu10kx",
sizeof(struct emu_sc_info),
NULL,
0,
NULL
}
static device_method_t emu_methods[]
Definition: emu10kx.c:3498

Definition at line 3510 of file emu10kx.c.

◆ emu_methods

device_method_t emu_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, emu_pci_probe),
DEVMETHOD(device_attach, emu_pci_attach),
DEVMETHOD(device_detach, emu_pci_detach),
DEVMETHOD(bus_read_ivar, emu_read_ivar),
DEVMETHOD(bus_write_ivar, emu_write_ivar),
DEVMETHOD_END
}
static int emu_read_ivar(device_t bus __unused, device_t dev, int ivar_index, uintptr_t *result)
Definition: emu10kx.c:2940
static int emu_pci_detach(device_t dev)
Definition: emu10kx.c:3418
static int emu_write_ivar(device_t bus __unused, device_t dev __unused, int ivar_index, uintptr_t value __unused)
Definition: emu10kx.c:2976
static int emu_pci_attach(device_t dev)
Definition: emu10kx.c:3018
static int emu_pci_probe(device_t dev)
Definition: emu10kx.c:2990

Definition at line 3498 of file emu10kx.c.

◆ l2l_df

int l2l_df[L2L_POINTS]
static
Initial value:
= {
0x572C5CA,
0x3211625,
0x1CC1A76,
0x108428F,
0x097C70A,
0x0572C5C,
0x0321162,
0x01CC1A7,
0x0108428,
0x016493D
}

Definition at line 2538 of file emu10kx.c.

Referenced by log2lin().

◆ l2l_f

int l2l_f[L2L_POINTS]
static
Initial value:
= {
0x4984461A,
0x2A3968A7,
0x18406003,
0x0DEDC66D,
0x07FFFFFF,
0x04984461,
0x02A3968A,
0x01840600,
0x00DEDC66,
0x00000000
}

Definition at line 2551 of file emu10kx.c.

Referenced by log2lin().