FreeBSD kernel sound device code
|
Go to the source code of this file.
Data Structures | |
struct | emu_midiinfo |
struct | emu_pcminfo |
struct | emu_route |
Functions | |
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 ihandle) |
uint32_t | emu_rd (struct emu_sc_info *sc, unsigned int regno, unsigned int size) |
void | emu_wr (struct emu_sc_info *sc, unsigned int regno, uint32_t data, unsigned int size) |
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) |
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) |
struct emu_voice * | emu_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_vroute (struct emu_sc_info *sc, struct emu_route *rt, struct emu_voice *v) |
void | emu_vsetup (struct emu_voice *v, int fmt, int spd) |
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) |
bus_dma_tag_t | emu_gettag (struct emu_sc_info *sc) |
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) |
void | emu_enable_ir (struct emu_sc_info *sc) |
#define EMU_A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 */ |
#define EMU_MAX_BUFSZ EMUPAGESIZE*16 |
#define EMU_PLAY_BUFSZ EMUPAGESIZE |
#define EMU_REC_BUFSZ EMUPAGESIZE*16 |
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().
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().
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 | ||
) |
Definition at line 918 of file emu10kx.c.
References emu_sc_info::dbg_level, emu_sc_info::dev, EMU_INTE, EMU_MAX_IRQ_CONSUMERS, emu_rd(), emu_wr(), func, emu_sc_info::ihandler, emu_intr_handler::inte_mask, emu_intr_handler::intr_mask, emu_intr_handler::irq_func, emu_sc_info::lock, and emu_intr_handler::softc.
Referenced by emu_midi_attach(), emu_pcm_attach(), emufxrchan_trigger(), and emurchan_trigger().
int emu_intr_unregister | ( | struct emu_sc_info * | sc, |
int | ihandle | ||
) |
Definition at line 947 of file emu10kx.c.
References EMU_INTE, EMU_MAX_IRQ_CONSUMERS, emu_rd(), emu_wr(), emu_sc_info::ihandler, emu_intr_handler::inte_mask, emu_intr_handler::intr_mask, emu_intr_handler::irq_func, emu_sc_info::lock, and emu_intr_handler::softc.
Referenced by emu_midi_attach(), emu_midi_detach(), emufxrchan_trigger(), and emurchan_trigger().
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().
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.
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().
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().
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().
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().
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().
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.
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().
int emu_vinit | ( | struct emu_sc_info * | sc, |
struct emu_voice * | m, | ||
struct emu_voice * | s, | ||
uint32_t | sz, | ||
struct snd_dbuf * | b | ||
) |
Definition at line 1289 of file emu10kx.c.
References b, emu_voice::b16, emu_voice::buf, emu_sc_info::dbg_level, emu_sc_info::dev, emu_memalloc(), emu_memfree(), emu_memstart(), EMUPAGESIZE, emu_voice::end, emu_voice::ismaster, m, emu_sc_info::mem, emu_voice::running, emu_voice::slave, sndbuf_setup(), emu_voice::speed, emu_voice::start, emu_voice::stereo, emu_voice::vbuf, and emu_voice::vol.
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.
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().
void emu_vsetup | ( | struct emu_voice * | v, |
int | fmt, | ||
int | spd | ||
) |
Definition at line 1337 of file emu10kx.c.
References AFMT_16BIT, AFMT_CHANNEL, emu_voice::b16, fmt, emu_voice::slave, spd, emu_voice::speed, and emu_voice::stereo.
void emu_vtrigger | ( | struct emu_sc_info * | sc, |
struct emu_voice * | v, | ||
int | go | ||
) |
Definition at line 1457 of file emu10kx.c.
References emu_voice::b16, EMU_CHAN_CCR_CACHEINVALIDSIZE, EMU_CHAN_CCR_READADDRESS, EMU_CHAN_CD0, EMU_CHAN_CPF_PITCH, EMU_CHAN_CVCF, EMU_CHAN_DCYSUSV, EMU_CHAN_IFATN, EMU_CHAN_IP, EMU_CHAN_PTRX_PITCHTARGET, EMU_CHAN_VTFT, emu_rate_to_linearpitch(), emu_rate_to_pitch(), emu_vstop(), emu_vtrigger(), emu_wrptr(), go, emu_voice::slave, emu_voice::speed, emu_voice::stereo, and emu_voice::vnum.
Referenced by emu_vtrigger().
void emu_vwrite | ( | struct emu_sc_info * | sc, |
struct emu_voice * | v | ||
) |
Definition at line 1374 of file emu10kx.c.
References emu_voice::amounts, emu_voice::b16, emu_voice::ea, EMU_A_CHAN_FXRT1, EMU_A_CHAN_FXRT2, EMU_A_CHAN_SENDAMOUNTS, EMU_CHAN_ATKHLDM, EMU_CHAN_ATKHLDV, EMU_CHAN_ATKHLDV_ATTACKTIME_MASK, EMU_CHAN_ATKHLDV_HOLDTIME_MASK, EMU_CHAN_CCCA, EMU_CHAN_CCCA_8BITSELECT, EMU_CHAN_CPF, EMU_CHAN_CPF_STEREO_MASK, EMU_CHAN_CVCF, EMU_CHAN_CVCF_CURRFILTER_MASK, EMU_CHAN_DCYSUSM, EMU_CHAN_DCYSUSM_DECAYTIME_MASK, EMU_CHAN_DSL, EMU_CHAN_ENVVAL, EMU_CHAN_ENVVOL, EMU_CHAN_FM2FRQ2, EMU_CHAN_FMMOD, EMU_CHAN_FXRT, EMU_CHAN_LFOVAL1, EMU_CHAN_LFOVAL2, EMU_CHAN_MAP_PTI_MASK, EMU_CHAN_MAPA, EMU_CHAN_MAPB, EMU_CHAN_PEFE_FILTERAMOUNT, EMU_CHAN_PEFE_PITCHAMOUNT, EMU_CHAN_PSST, EMU_CHAN_PTRX, EMU_CHAN_TREMFRQ, EMU_CHAN_VTFT, EMU_CHAN_VTFT_FILTERTARGET_MASK, EMU_CHAN_Z1, EMU_CHAN_Z2, emu_vwrite(), emu_wrptr(), emu_voice::end, emu_sc_info::is_emu10k1, emu_sc_info::mem, emu_voice::routing, emu_voice::sa, emu_mem::silent_page_addr, emu_voice::slave, emu_voice::start, emu_voice::stereo, val, and emu_voice::vnum.
Referenced by emu_vwrite().
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().
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().
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().
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().
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().