FreeBSD kernel sound device code
emu10k1.c File Reference
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
#include <dev/sound/pci/emuxkireg.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <sys/queue.h>
#include <dev/sound/midi/mpu401.h>
#include "mpufoi_if.h"
Include dependency graph for emu10k1.c:

Go to the source code of this file.

Data Structures

struct  emu_memblk
 
struct  emu_mem
 
struct  emu_voice
 
struct  sc_pchinfo
 
struct  sc_rchinfo
 
struct  sc_info
 

Macros

#define NUM_G   64 /* use all channels */
 
#define WAVEOUT_MAXBUFSIZE   32768
 
#define EMUPAGESIZE   4096 /* don't change */
 
#define EMUMAXPAGES   (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE)
 
#define EMU10K1_PCI_ID   0x00021102 /* 1102 => Creative Labs Vendor ID */
 
#define EMU10K2_PCI_ID   0x00041102
 
#define EMU10K3_PCI_ID   0x00081102
 
#define EMU_DEFAULT_BUFSZ   4096
 
#define EMU_MAX_CHANS   8
 
#define EMU_CHANS   4
 
#define MAXREQVOICES   8
 
#define RESERVED   0
 
#define NUM_MIDI   16
 
#define NUM_FXSENDS   4
 
#define TMEMSIZE   256*1024
 
#define TMEMSIZEREG   4
 
#define ENABLE   0xffffffff
 
#define DISABLE   0x00000000
 
#define ENV_ON   EMU_CHAN_DCYSUSV_CHANNELENABLE_MASK
 
#define ENV_OFF   0x00 /* XXX: should this be 1? */
 
#define EMU_A_IOCFG_GPOUT_A   0x40
 
#define EMU_A_IOCFG_GPOUT_D   0x04
 
#define EMU_A_IOCFG_GPOUT_AD   (EMU_A_IOCFG_GPOUT_A|EMU_A_IOCFG_GPOUT_D) /* EMU_A_IOCFG_GPOUT0 */
 
#define EMU_HCFG_GPOUT1   0x00000800
 
#define iACC3   0x06
 
#define iMACINT0   0x04
 
#define iINTERP   0x0e
 
#define C_00000000   0x40
 
#define C_00000001   0x41
 
#define C_00000004   0x44
 
#define C_40000000   0x4d
 
#define A_C_00000000   0xc0
 
#define A_C_40000000   0xcd
 
#define FXBUS(x)   (0x00 + (x))
 
#define EXTIN(x)   (0x10 + (x))
 
#define EXTOUT(x)   (0x20 + (x))
 
#define GPR(x)   (EMU_FXGPREGBASE + (x))
 
#define A_EXTIN(x)   (0x40 + (x))
 
#define A_FXBUS(x)   (0x00 + (x))
 
#define A_EXTOUT(x)   (0x60 + (x))
 
#define A_GPR(x)   (EMU_A_FXGPREGBASE + (x))
 
#define FXBUS_PCM_LEFT   0x00
 
#define FXBUS_PCM_RIGHT   0x01
 
#define FXBUS_MIDI_LEFT   0x04
 
#define FXBUS_MIDI_RIGHT   0x05
 
#define FXBUS_MIDI_REVERB   0x0c
 
#define FXBUS_MIDI_CHORUS   0x0d
 
#define EXTIN_AC97_L   0x00
 
#define EXTIN_AC97_R   0x01
 
#define EXTIN_SPDIF_CD_L   0x02
 
#define EXTIN_SPDIF_CD_R   0x03
 
#define EXTIN_TOSLINK_L   0x06
 
#define EXTIN_TOSLINK_R   0x07
 
#define EXTIN_COAX_SPDIF_L   0x0a
 
#define EXTIN_COAX_SPDIF_R   0x0b
 
#define A_EXTIN_AC97_L   0x00
 
#define A_EXTIN_AC97_R   0x01
 
#define EXTOUT_AC97_L   0x00
 
#define EXTOUT_AC97_R   0x01
 
#define EXTOUT_TOSLINK_L   0x02
 
#define EXTOUT_TOSLINK_R   0x03
 
#define EXTOUT_AC97_CENTER   0x04
 
#define EXTOUT_AC97_LFE   0x05
 
#define EXTOUT_HEADPHONE_L   0x06
 
#define EXTOUT_HEADPHONE_R   0x07
 
#define EXTOUT_REAR_L   0x08
 
#define EXTOUT_REAR_R   0x09
 
#define EXTOUT_ADC_CAP_L   0x0a
 
#define EXTOUT_ADC_CAP_R   0x0b
 
#define EXTOUT_ACENTER   0x11
 
#define EXTOUT_ALFE   0x12
 
#define A_EXTOUT_FRONT_L   0x00
 
#define A_EXTOUT_FRONT_R   0x01
 
#define A_EXTOUT_CENTER   0x02
 
#define A_EXTOUT_LFE   0x03
 
#define A_EXTOUT_HEADPHONE_L   0x04
 
#define A_EXTOUT_HEADPHONE_R   0x05
 
#define A_EXTOUT_REAR_L   0x06
 
#define A_EXTOUT_REAR_R   0x07
 
#define A_EXTOUT_AFRONT_L   0x08
 
#define A_EXTOUT_AFRONT_R   0x09
 
#define A_EXTOUT_ACENTER   0x0a
 
#define A_EXTOUT_ALFE   0x0b
 
#define A_EXTOUT_AREAR_L   0x0e
 
#define A_EXTOUT_AREAR_R   0x0f
 
#define A_EXTOUT_AC97_L   0x10
 
#define A_EXTOUT_AC97_R   0x11
 
#define A_EXTOUT_ADC_CAP_L   0x16
 
#define A_EXTOUT_ADC_CAP_R   0x17
 

Functions

 SND_DECLARE_FILE ("$FreeBSD$")
 
static int emu_init (struct sc_info *)
 
static void emu_intr (void *)
 
static void * emu_malloc (struct sc_info *sc, u_int32_t sz, bus_addr_t *addr, bus_dmamap_t *map)
 
static void * emu_memalloc (struct sc_info *sc, u_int32_t sz, bus_addr_t *addr)
 
static int emu_memfree (struct sc_info *sc, void *buf)
 
static int emu_memstart (struct sc_info *sc, void *buf)
 
static u_int32_t emu_rd (struct sc_info *, int, int)
 
static void emu_wr (struct sc_info *, int, u_int32_t, int)
 
static u_int32_t emu_rdptr (struct sc_info *sc, int chn, int reg)
 
static void emu_wrptr (struct sc_info *sc, int chn, int reg, u_int32_t data)
 
static void emu_wrefx (struct sc_info *sc, unsigned int pc, unsigned int data)
 
static int emu_rdcd (kobj_t obj, void *devinfo, int regno)
 
static int emu_wrcd (kobj_t obj, void *devinfo, int regno, u_int32_t data)
 
 AC97_DECLARE (emu_ac97)
 
static int emu_settimer (struct sc_info *sc)
 
static int emu_enatimer (struct sc_info *sc, int go)
 
static void emu_enastop (struct sc_info *sc, char channel, int enable)
 
static int emu_recval (int speed)
 
static int audigy_recval (int speed)
 
static u_int32_t emu_rate_to_pitch (u_int32_t rate)
 
static u_int32_t emu_rate_to_linearpitch (u_int32_t rate)
 
static struct emu_voiceemu_valloc (struct sc_info *sc)
 
static int emu_vinit (struct sc_info *sc, struct emu_voice *m, struct emu_voice *s, u_int32_t sz, struct snd_dbuf *b)
 
static void emu_vsetup (struct sc_pchinfo *ch)
 
static void emu_vwrite (struct sc_info *sc, struct emu_voice *v)
 
static void emu_vtrigger (struct sc_info *sc, struct emu_voice *v, int go)
 
static int emu_vpos (struct sc_info *sc, struct emu_voice *v)
 
static void * emupchan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
 
static int emupchan_free (kobj_t obj, void *data)
 
static int emupchan_setformat (kobj_t obj, void *data, u_int32_t format)
 
static u_int32_t emupchan_setspeed (kobj_t obj, void *data, u_int32_t speed)
 
static u_int32_t emupchan_setblocksize (kobj_t obj, void *data, u_int32_t blocksize)
 
static int emupchan_trigger (kobj_t obj, void *data, int go)
 
static u_int32_t emupchan_getptr (kobj_t obj, void *data)
 
static struct pcmchan_capsemupchan_getcaps (kobj_t obj, void *data)
 
 CHANNEL_DECLARE (emupchan)
 
static void * emurchan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
 
static int emurchan_setformat (kobj_t obj, void *data, u_int32_t format)
 
static u_int32_t emurchan_setspeed (kobj_t obj, void *data, u_int32_t speed)
 
static u_int32_t emurchan_setblocksize (kobj_t obj, void *data, u_int32_t blocksize)
 
static int emurchan_trigger (kobj_t obj, void *data, int go)
 
static u_int32_t emurchan_getptr (kobj_t obj, void *data)
 
static struct pcmchan_capsemurchan_getcaps (kobj_t obj, void *data)
 
 CHANNEL_DECLARE (emurchan)
 
static unsigned char emu_mread (struct mpu401 *arg, void *sc, int reg)
 
static void emu_mwrite (struct mpu401 *arg, void *sc, int reg, unsigned char b)
 
static int emu_muninit (struct mpu401 *arg, void *cookie)
 
static DEFINE_CLASS (emu_mpu, emu_mpu_methods, 0)
 
static void emu_intr2 (void *p)
 
static void emu_midiattach (struct sc_info *sc)
 
static void emu_setmap (void *arg, bus_dma_segment_t *segs, int nseg, int error)
 
static void emu_free (struct sc_info *sc, void *buf, bus_dmamap_t map)
 
static void emu_addefxop (struct sc_info *sc, int op, int z, int w, int x, int y, u_int32_t *pc)
 
static void audigy_addefxop (struct sc_info *sc, int op, int z, int w, int x, int y, u_int32_t *pc)
 
static void audigy_initefx (struct sc_info *sc)
 
static void emu_initefx (struct sc_info *sc)
 
static int emu_uninit (struct sc_info *sc)
 
static int emu_pci_probe (device_t dev)
 
static int emu_pci_attach (device_t dev)
 
static int emu_pci_detach (device_t dev)
 
 DRIVER_MODULE (snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL)
 
 MODULE_DEPEND (snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER)
 
 MODULE_VERSION (snd_emu10k1, 1)
 
 MODULE_DEPEND (snd_emu10k1, midi, 1, 1, 1)
 
static int emujoy_pci_probe (device_t dev)
 
static int emujoy_pci_attach (device_t dev)
 
static int emujoy_pci_detach (device_t dev)
 
 DRIVER_MODULE (emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL)
 

Variables

static u_int32_t emu_rfmt_ac97 []
 
static u_int32_t emu_rfmt_mic []
 
static u_int32_t emu_rfmt_efx []
 
static struct pcmchan_caps emu_reccaps [3]
 
static u_int32_t emu_pfmt []
 
static struct pcmchan_caps emu_playcaps = {4000, 48000, emu_pfmt, 0}
 
static int adcspeed [8] = {48000, 44100, 32000, 24000, 22050, 16000, 11025, 8000}
 
static int audigy_adcspeed [9]
 
static kobj_method_t emu_ac97_methods []
 
static kobj_method_t emupchan_methods []
 
static kobj_method_t emurchan_methods []
 
static kobj_method_t emu_mpu_methods []
 
static device_method_t emu_methods []
 
static driver_t emu_driver
 
static device_method_t emujoy_methods []
 
static driver_t emujoy_driver
 
static devclass_t emujoy_devclass
 

Macro Definition Documentation

◆ A_C_00000000

#define A_C_00000000   0xc0

Definition at line 90 of file emu10k1.c.

◆ A_C_40000000

#define A_C_40000000   0xcd

Definition at line 91 of file emu10k1.c.

◆ A_EXTIN

#define A_EXTIN (   x)    (0x40 + (x))

Definition at line 99 of file emu10k1.c.

◆ A_EXTIN_AC97_L

#define A_EXTIN_AC97_L   0x00

Definition at line 122 of file emu10k1.c.

◆ A_EXTIN_AC97_R

#define A_EXTIN_AC97_R   0x01

Definition at line 123 of file emu10k1.c.

◆ A_EXTOUT

#define A_EXTOUT (   x)    (0x60 + (x))

Definition at line 101 of file emu10k1.c.

◆ A_EXTOUT_AC97_L

#define A_EXTOUT_AC97_L   0x10

Definition at line 155 of file emu10k1.c.

◆ A_EXTOUT_AC97_R

#define A_EXTOUT_AC97_R   0x11

Definition at line 156 of file emu10k1.c.

◆ A_EXTOUT_ACENTER

#define A_EXTOUT_ACENTER   0x0a

Definition at line 151 of file emu10k1.c.

◆ A_EXTOUT_ADC_CAP_L

#define A_EXTOUT_ADC_CAP_L   0x16

Definition at line 157 of file emu10k1.c.

◆ A_EXTOUT_ADC_CAP_R

#define A_EXTOUT_ADC_CAP_R   0x17

Definition at line 158 of file emu10k1.c.

◆ A_EXTOUT_AFRONT_L

#define A_EXTOUT_AFRONT_L   0x08

Definition at line 149 of file emu10k1.c.

◆ A_EXTOUT_AFRONT_R

#define A_EXTOUT_AFRONT_R   0x09

Definition at line 150 of file emu10k1.c.

◆ A_EXTOUT_ALFE

#define A_EXTOUT_ALFE   0x0b

Definition at line 152 of file emu10k1.c.

◆ A_EXTOUT_AREAR_L

#define A_EXTOUT_AREAR_L   0x0e

Definition at line 153 of file emu10k1.c.

◆ A_EXTOUT_AREAR_R

#define A_EXTOUT_AREAR_R   0x0f

Definition at line 154 of file emu10k1.c.

◆ A_EXTOUT_CENTER

#define A_EXTOUT_CENTER   0x02

Definition at line 143 of file emu10k1.c.

◆ A_EXTOUT_FRONT_L

#define A_EXTOUT_FRONT_L   0x00

Definition at line 141 of file emu10k1.c.

◆ A_EXTOUT_FRONT_R

#define A_EXTOUT_FRONT_R   0x01

Definition at line 142 of file emu10k1.c.

◆ A_EXTOUT_HEADPHONE_L

#define A_EXTOUT_HEADPHONE_L   0x04

Definition at line 145 of file emu10k1.c.

◆ A_EXTOUT_HEADPHONE_R

#define A_EXTOUT_HEADPHONE_R   0x05

Definition at line 146 of file emu10k1.c.

◆ A_EXTOUT_LFE

#define A_EXTOUT_LFE   0x03

Definition at line 144 of file emu10k1.c.

◆ A_EXTOUT_REAR_L

#define A_EXTOUT_REAR_L   0x06

Definition at line 147 of file emu10k1.c.

◆ A_EXTOUT_REAR_R

#define A_EXTOUT_REAR_R   0x07

Definition at line 148 of file emu10k1.c.

◆ A_FXBUS

#define A_FXBUS (   x)    (0x00 + (x))

Definition at line 100 of file emu10k1.c.

◆ A_GPR

#define A_GPR (   x)    (EMU_A_FXGPREGBASE + (x))

Definition at line 102 of file emu10k1.c.

◆ C_00000000

#define C_00000000   0x40

Definition at line 85 of file emu10k1.c.

◆ C_00000001

#define C_00000001   0x41

Definition at line 86 of file emu10k1.c.

◆ C_00000004

#define C_00000004   0x44

Definition at line 87 of file emu10k1.c.

◆ C_40000000

#define C_40000000   0x4d

Definition at line 88 of file emu10k1.c.

◆ DISABLE

#define DISABLE   0x00000000

Definition at line 70 of file emu10k1.c.

◆ EMU10K1_PCI_ID

#define EMU10K1_PCI_ID   0x00021102 /* 1102 => Creative Labs Vendor ID */

Definition at line 54 of file emu10k1.c.

◆ EMU10K2_PCI_ID

#define EMU10K2_PCI_ID   0x00041102

Definition at line 55 of file emu10k1.c.

◆ EMU10K3_PCI_ID

#define EMU10K3_PCI_ID   0x00081102

Definition at line 56 of file emu10k1.c.

◆ EMU_A_IOCFG_GPOUT_A

#define EMU_A_IOCFG_GPOUT_A   0x40

Definition at line 74 of file emu10k1.c.

◆ EMU_A_IOCFG_GPOUT_AD

#define EMU_A_IOCFG_GPOUT_AD   (EMU_A_IOCFG_GPOUT_A|EMU_A_IOCFG_GPOUT_D) /* EMU_A_IOCFG_GPOUT0 */

Definition at line 76 of file emu10k1.c.

◆ EMU_A_IOCFG_GPOUT_D

#define EMU_A_IOCFG_GPOUT_D   0x04

Definition at line 75 of file emu10k1.c.

◆ EMU_CHANS

#define EMU_CHANS   4

Definition at line 59 of file emu10k1.c.

◆ EMU_DEFAULT_BUFSZ

#define EMU_DEFAULT_BUFSZ   4096

Definition at line 57 of file emu10k1.c.

◆ EMU_HCFG_GPOUT1

#define EMU_HCFG_GPOUT1   0x00000800

Definition at line 78 of file emu10k1.c.

◆ EMU_MAX_CHANS

#define EMU_MAX_CHANS   8

Definition at line 58 of file emu10k1.c.

◆ EMUMAXPAGES

#define EMUMAXPAGES   (WAVEOUT_MAXBUFSIZE * NUM_G / EMUPAGESIZE)

Definition at line 53 of file emu10k1.c.

◆ EMUPAGESIZE

#define EMUPAGESIZE   4096 /* don't change */

Definition at line 52 of file emu10k1.c.

◆ ENABLE

#define ENABLE   0xffffffff

Definition at line 69 of file emu10k1.c.

◆ ENV_OFF

#define ENV_OFF   0x00 /* XXX: should this be 1? */

Definition at line 72 of file emu10k1.c.

◆ ENV_ON

Definition at line 71 of file emu10k1.c.

◆ EXTIN

#define EXTIN (   x)    (0x10 + (x))

Definition at line 95 of file emu10k1.c.

◆ EXTIN_AC97_L

#define EXTIN_AC97_L   0x00

Definition at line 113 of file emu10k1.c.

◆ EXTIN_AC97_R

#define EXTIN_AC97_R   0x01

Definition at line 114 of file emu10k1.c.

◆ EXTIN_COAX_SPDIF_L

#define EXTIN_COAX_SPDIF_L   0x0a

Definition at line 119 of file emu10k1.c.

◆ EXTIN_COAX_SPDIF_R

#define EXTIN_COAX_SPDIF_R   0x0b

Definition at line 120 of file emu10k1.c.

◆ EXTIN_SPDIF_CD_L

#define EXTIN_SPDIF_CD_L   0x02

Definition at line 115 of file emu10k1.c.

◆ EXTIN_SPDIF_CD_R

#define EXTIN_SPDIF_CD_R   0x03

Definition at line 116 of file emu10k1.c.

◆ EXTIN_TOSLINK_L

#define EXTIN_TOSLINK_L   0x06

Definition at line 117 of file emu10k1.c.

◆ EXTIN_TOSLINK_R

#define EXTIN_TOSLINK_R   0x07

Definition at line 118 of file emu10k1.c.

◆ EXTOUT

#define EXTOUT (   x)    (0x20 + (x))

Definition at line 96 of file emu10k1.c.

◆ EXTOUT_AC97_CENTER

#define EXTOUT_AC97_CENTER   0x04

Definition at line 130 of file emu10k1.c.

◆ EXTOUT_AC97_L

#define EXTOUT_AC97_L   0x00

Definition at line 126 of file emu10k1.c.

◆ EXTOUT_AC97_LFE

#define EXTOUT_AC97_LFE   0x05

Definition at line 131 of file emu10k1.c.

◆ EXTOUT_AC97_R

#define EXTOUT_AC97_R   0x01

Definition at line 127 of file emu10k1.c.

◆ EXTOUT_ACENTER

#define EXTOUT_ACENTER   0x11

Definition at line 138 of file emu10k1.c.

◆ EXTOUT_ADC_CAP_L

#define EXTOUT_ADC_CAP_L   0x0a

Definition at line 136 of file emu10k1.c.

◆ EXTOUT_ADC_CAP_R

#define EXTOUT_ADC_CAP_R   0x0b

Definition at line 137 of file emu10k1.c.

◆ EXTOUT_ALFE

#define EXTOUT_ALFE   0x12

Definition at line 139 of file emu10k1.c.

◆ EXTOUT_HEADPHONE_L

#define EXTOUT_HEADPHONE_L   0x06

Definition at line 132 of file emu10k1.c.

◆ EXTOUT_HEADPHONE_R

#define EXTOUT_HEADPHONE_R   0x07

Definition at line 133 of file emu10k1.c.

◆ EXTOUT_REAR_L

#define EXTOUT_REAR_L   0x08

Definition at line 134 of file emu10k1.c.

◆ EXTOUT_REAR_R

#define EXTOUT_REAR_R   0x09

Definition at line 135 of file emu10k1.c.

◆ EXTOUT_TOSLINK_L

#define EXTOUT_TOSLINK_L   0x02

Definition at line 128 of file emu10k1.c.

◆ EXTOUT_TOSLINK_R

#define EXTOUT_TOSLINK_R   0x03

Definition at line 129 of file emu10k1.c.

◆ FXBUS

#define FXBUS (   x)    (0x00 + (x))

Definition at line 94 of file emu10k1.c.

◆ FXBUS_MIDI_CHORUS

#define FXBUS_MIDI_CHORUS   0x0d

Definition at line 110 of file emu10k1.c.

◆ FXBUS_MIDI_LEFT

#define FXBUS_MIDI_LEFT   0x04

Definition at line 107 of file emu10k1.c.

◆ FXBUS_MIDI_REVERB

#define FXBUS_MIDI_REVERB   0x0c

Definition at line 109 of file emu10k1.c.

◆ FXBUS_MIDI_RIGHT

#define FXBUS_MIDI_RIGHT   0x05

Definition at line 108 of file emu10k1.c.

◆ FXBUS_PCM_LEFT

#define FXBUS_PCM_LEFT   0x00

Definition at line 105 of file emu10k1.c.

◆ FXBUS_PCM_RIGHT

#define FXBUS_PCM_RIGHT   0x01

Definition at line 106 of file emu10k1.c.

◆ GPR

#define GPR (   x)    (EMU_FXGPREGBASE + (x))

Definition at line 98 of file emu10k1.c.

◆ iACC3

#define iACC3   0x06

Definition at line 81 of file emu10k1.c.

◆ iINTERP

#define iINTERP   0x0e

Definition at line 83 of file emu10k1.c.

◆ iMACINT0

#define iMACINT0   0x04

Definition at line 82 of file emu10k1.c.

◆ MAXREQVOICES

#define MAXREQVOICES   8

Definition at line 61 of file emu10k1.c.

◆ NUM_FXSENDS

#define NUM_FXSENDS   4

Definition at line 64 of file emu10k1.c.

◆ NUM_G

#define NUM_G   64 /* use all channels */

Definition at line 50 of file emu10k1.c.

◆ NUM_MIDI

#define NUM_MIDI   16

Definition at line 63 of file emu10k1.c.

◆ RESERVED

#define RESERVED   0

Definition at line 62 of file emu10k1.c.

◆ TMEMSIZE

#define TMEMSIZE   256*1024

Definition at line 66 of file emu10k1.c.

◆ TMEMSIZEREG

#define TMEMSIZEREG   4

Definition at line 67 of file emu10k1.c.

◆ WAVEOUT_MAXBUFSIZE

#define WAVEOUT_MAXBUFSIZE   32768

Definition at line 51 of file emu10k1.c.

Function Documentation

◆ AC97_DECLARE()

AC97_DECLARE ( emu_ac97  )

◆ audigy_addefxop()

static void audigy_addefxop ( struct sc_info sc,
int  op,
int  z,
int  w,
int  x,
int  y,
u_int32_t *  pc 
)
static

Definition at line 1452 of file emu10k1.c.

References emu_wrefx().

Referenced by audigy_initefx().

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

◆ audigy_initefx()

◆ audigy_recval()

static int audigy_recval ( int  speed)
static

Definition at line 481 of file emu10k1.c.

References audigy_adcspeed, speed, and val.

Referenced by emurchan_setspeed(), and emurchan_trigger().

Here is the caller graph for this function:

◆ CHANNEL_DECLARE() [1/2]

CHANNEL_DECLARE ( emupchan  )

◆ CHANNEL_DECLARE() [2/2]

CHANNEL_DECLARE ( emurchan  )

◆ DEFINE_CLASS()

static DEFINE_CLASS ( emu_mpu  ,
emu_mpu_methods  ,
 
)
static

◆ DRIVER_MODULE() [1/2]

DRIVER_MODULE ( emujoy  ,
pci  ,
emujoy_driver  ,
emujoy_devclass  ,
NULL  ,
NULL   
)

◆ DRIVER_MODULE() [2/2]

DRIVER_MODULE ( snd_emu10k1  ,
pci  ,
emu_driver  ,
pcm_devclass  ,
NULL  ,
NULL   
)

◆ emu_addefxop()

static void emu_addefxop ( struct sc_info sc,
int  op,
int  z,
int  w,
int  x,
int  y,
u_int32_t *  pc 
)
static

Definition at line 1443 of file emu10k1.c.

References emu_wrefx().

Referenced by emu_initefx().

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

◆ emu_enastop()

static void emu_enastop ( struct sc_info sc,
char  channel,
int  enable 
)
static

Definition at line 461 of file emu10k1.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_enatimer()

static int emu_enatimer ( struct sc_info sc,
int  go 
)
static

Definition at line 442 of file emu10k1.c.

References EMU_INTE, EMU_INTE_INTERTIMERENB, emu_rd(), emu_wr(), go, and sc_info::timer.

Referenced by emu_intr(), and emupchan_trigger().

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

◆ emu_free()

static void emu_free ( struct sc_info sc,
void *  buf,
bus_dmamap_t  map 
)
static

Definition at line 1340 of file emu10k1.c.

References buf, and sc_info::parent_dmat.

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

Here is the caller graph for this function:

◆ emu_init()

static int emu_init ( struct sc_info sc)
static

Definition at line 1752 of file emu10k1.c.

References sc_info::audigy, sc_info::audigy2, audigy_initefx(), emu_voice::b16, emu_voice::busy, emu_voice::channel, EMU_A_CHAN_FXRT1, EMU_A_CHAN_FXRT2, EMU_A_CHAN_SENDAMOUNTS, EMU_A_IOCFG, EMU_A_IOCFG_GPOUT_A, EMU_A_IOCFG_GPOUT_AD, EMU_A_SPDIF_SAMPLERATE, EMU_AC97SLOT, EMU_AC97SLOT_CENTER, EMU_AC97SLOT_LFE, 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_AC3ENABLE_CDSPDIF, EMU_HCFG_AC3ENABLE_GPSPDIF, EMU_HCFG_AUDIOENABLE, EMU_HCFG_AUTOMUTE, EMU_HCFG_GPINPUT0, EMU_HCFG_GPINPUT1, EMU_HCFG_GPOUT1, EMU_HCFG_JOYENABLE, EMU_HCFG_LOCKSOUNDCACHE, EMU_HCFG_LOCKTANKCACHE_MASK, EMU_HCFG_MUTEBUTTONENABLE, emu_initefx(), EMU_INTE, EMU_INTE_INTERTIMERENB, EMU_INTE_PCIERRENABLE, EMU_INTE_SAMPLERATER, emu_malloc(), EMU_MICBA, EMU_MICBS, EMU_PTB, emu_rd(), emu_rdptr(), EMU_RECBS_BUFSIZE_NONE, EMU_SOLEH, EMU_SOLEL, EMU_SPBYPASS, EMU_SPCS0, EMU_SPCS1, EMU_SPCS2, EMU_SPCS_CHANNELNUM_LEFT, EMU_SPCS_CLKACCY_1000PPM, EMU_SPCS_COPYRIGHT, EMU_SPCS_EMPHASIS_NONE, EMU_SPCS_GENERATIONSTATUS, EMU_SPCS_SAMPLERATE_48, EMU_SPCS_SOURCENUM_UNSPEC, EMU_TCB, EMU_TCBS, emu_wr(), emu_wrptr(), EMUMAXPAGES, EMUPAGESIZE, emu_voice::end, ENV_OFF, emu_voice::ismaster, sc_info::mem, NUM_G, sc_info::pnum, sc_info::rev, sc_info::rnum, emu_voice::running, emu_voice::slave, emu_voice::speed, emu_voice::start, emu_voice::stereo, sc_info::tos_link, emu_voice::vnum, and sc_info::voice.

Referenced by emu_pci_attach().

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

◆ emu_initefx()

◆ emu_intr()

◆ emu_intr2()

static void emu_intr2 ( void *  p)
static

Definition at line 1199 of file emu10k1.c.

References sc_info::mpu, and sc_info::mpu_intr.

Referenced by emu_midiattach().

Here is the caller graph for this function:

◆ emu_malloc()

static void * emu_malloc ( struct sc_info sc,
u_int32_t  sz,
bus_addr_t *  addr,
bus_dmamap_t *  map 
)
static

Definition at line 1323 of file emu10k1.c.

References addr, buf, emu_setmap(), and sc_info::parent_dmat.

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 sc_info sc,
u_int32_t  sz,
bus_addr_t *  addr 
)
static

Definition at line 1347 of file emu10k1.c.

References addr, blksz, emu_mem::bmap, buf, emu_malloc(), EMUMAXPAGES, EMUPAGESIZE, free, sc_info::mem, 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 sc_info sc,
void *  buf 
)
static

Definition at line 1402 of file emu10k1.c.

References emu_mem::bmap, buf, emu_free(), free, sc_info::mem, and emu_mem::ptb_pages.

Referenced by emupchan_free().

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

◆ emu_memstart()

static int emu_memstart ( struct sc_info sc,
void *  buf 
)
static

Definition at line 1427 of file emu10k1.c.

References buf, and sc_info::mem.

Referenced by emu_vinit().

Here is the caller graph for this function:

◆ emu_midiattach()

static void emu_midiattach ( struct sc_info sc)
static

Definition at line 1208 of file emu10k1.c.

References EMU_INTE, EMU_INTE_MIDIRXENABLE, emu_intr2(), emu_rd(), emu_wr(), sc_info::mpu, mpu401_init(), and sc_info::mpu_intr.

Referenced by emu_pci_attach().

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

◆ emu_mread()

static unsigned char emu_mread ( struct mpu401 arg,
void *  sc,
int  reg 
)
static

Definition at line 1162 of file emu10k1.c.

References emu_rd(), and reg.

Here is the call graph for this function:

◆ emu_muninit()

static int emu_muninit ( struct mpu401 arg,
void *  cookie 
)
static

Definition at line 1178 of file emu10k1.c.

References sc_info::lock, sc_info::mpu_intr, snd_mtxlock, and snd_mtxunlock.

◆ emu_mwrite()

static void emu_mwrite ( struct mpu401 arg,
void *  sc,
int  reg,
unsigned char  b 
)
static

Definition at line 1171 of file emu10k1.c.

References b, emu_wr(), and reg.

Here is the call graph for this function:

◆ emu_pci_attach()

◆ emu_pci_detach()

static int emu_pci_detach ( device_t  dev)
static

Definition at line 2163 of file emu10k1.c.

References dev, emu_uninit(), free, sc_info::ih, sc_info::irq, sc_info::lock, sc_info::parent_dmat, PCIR_BAR, pcm_getdevinfo(), pcm_unregister(), r, sc_info::reg, and snd_mtxfree().

Here is the call graph for this function:

◆ emu_pci_probe()

static int emu_pci_probe ( device_t  dev)
static

Definition at line 2045 of file emu10k1.c.

References dev, EMU10K1_PCI_ID, EMU10K2_PCI_ID, and EMU10K3_PCI_ID.

◆ emu_rate_to_linearpitch()

static u_int32_t emu_rate_to_linearpitch ( u_int32_t  rate)
static

Definition at line 548 of file emu10k1.c.

References rate.

Referenced by emu_vtrigger().

Here is the caller graph for this function:

◆ emu_rate_to_pitch()

static u_int32_t emu_rate_to_pitch ( u_int32_t  rate)
static

Definition at line 491 of file emu10k1.c.

References rate.

Referenced by emu_vtrigger().

Here is the caller graph for this function:

◆ emu_rd()

static u_int32_t emu_rd ( struct sc_info sc,
int  regno,
int  size 
)
static

Definition at line 302 of file emu10k1.c.

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

Referenced by emu_ac97_read_emulation(), emu_enatimer(), emu_init(), emu_intr(), emu_midiattach(), emu_mread(), emu_rdcd(), emu_rdptr(), emu_wrptr(), and emurchan_trigger().

Here is the caller graph for this function:

◆ emu_rdcd()

static int emu_rdcd ( kobj_t obj  ,
void *  devinfo,
int  regno 
)
static

Definition at line 380 of file emu10k1.c.

References devinfo, EMU_AC97ADDR, EMU_AC97DATA, emu_rd(), emu_wr(), and regno.

Here is the call graph for this function:

◆ emu_rdptr()

static u_int32_t emu_rdptr ( struct sc_info sc,
int  chn,
int  reg 
)
static

Definition at line 333 of file emu10k1.c.

References sc_info::addrmask, EMU_DATA, EMU_PTR, EMU_PTR_CHNO_MASK, emu_rd(), emu_wr(), mask, offset, reg, size, and val.

Referenced by emu_init(), emu_mread(), emu_vpos(), emufxrchan_getptr(), and emurchan_getptr().

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

◆ emu_recval()

static int emu_recval ( int  speed)
static

Definition at line 471 of file emu10k1.c.

References adcspeed, speed, and val.

Referenced by emurchan_setspeed(), and emurchan_trigger().

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 1309 of file emu10k1.c.

References error.

Referenced by emu_malloc().

Here is the caller graph for this function:

◆ emu_settimer()

static int emu_settimer ( struct sc_info sc)
static

◆ emu_uninit()

◆ emu_valloc()

static struct emu_voice * emu_valloc ( struct sc_info sc)
static

Definition at line 555 of file emu10k1.c.

References emu_voice::busy, and sc_info::voice.

Referenced by emupchan_init().

Here is the caller graph for this function:

◆ emu_vinit()

static int emu_vinit ( struct sc_info sc,
struct emu_voice m,
struct emu_voice s,
u_int32_t  sz,
struct snd_dbuf b 
)
static

◆ emu_vpos()

static int emu_vpos ( struct sc_info sc,
struct emu_voice v 
)
static

Definition at line 751 of file emu10k1.c.

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

Referenced by emupchan_getptr().

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

◆ emu_vsetup()

static void emu_vsetup ( struct sc_pchinfo ch)
static

Definition at line 621 of file emu10k1.c.

References AFMT_16BIT, AFMT_CHANNEL, emu_voice::b16, sc_pchinfo::fmt, sc_pchinfo::master, emu_voice::slave, sc_pchinfo::spd, emu_voice::speed, and emu_voice::stereo.

Referenced by emupchan_trigger().

Here is the caller graph for this function:

◆ emu_vtrigger()

static void emu_vtrigger ( struct sc_info sc,
struct emu_voice v,
int  go 
)
static

◆ emu_vwrite()

◆ emu_wr()

static void emu_wr ( struct sc_info sc,
int  regno,
u_int32_t  data,
int  size 
)
static

◆ emu_wrcd()

static int emu_wrcd ( kobj_t obj  ,
void *  devinfo,
int  regno,
u_int32_t  data 
)
static

Definition at line 389 of file emu10k1.c.

References data, devinfo, EMU_AC97ADDR, EMU_AC97DATA, emu_wr(), and regno.

Here is the call graph for this function:

◆ emu_wrefx()

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

Definition at line 369 of file emu10k1.c.

References sc_info::audigy, data, EMU_A_MICROCODEBASE, EMU_MICROCODEBASE, and emu_wrptr().

Referenced by audigy_addefxop(), emu_addefxop(), and emu_initefx().

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

◆ emu_wrptr()

static void emu_wrptr ( struct sc_info sc,
int  chn,
int  reg,
u_int32_t  data 
)
static

Definition at line 351 of file emu10k1.c.

References sc_info::addrmask, data, EMU_DATA, EMU_PTR, EMU_PTR_CHNO_MASK, emu_rd(), emu_wr(), mask, offset, reg, and size.

Referenced by audigy_initefx(), emu_enastop(), emu_init(), emu_initefx(), emu_mwrite(), emu_uninit(), emu_vtrigger(), emu_vwrite(), emu_wrefx(), emufxrchan_init(), emufxrchan_trigger(), emurchan_init(), and emurchan_trigger().

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

◆ emujoy_pci_attach()

static int emujoy_pci_attach ( device_t  dev)
static

Definition at line 2229 of file emu10k1.c.

◆ emujoy_pci_detach()

static int emujoy_pci_detach ( device_t  dev)
static

Definition at line 2236 of file emu10k1.c.

◆ emujoy_pci_probe()

static int emujoy_pci_probe ( device_t  dev)
static

Definition at line 2209 of file emu10k1.c.

References dev.

◆ emupchan_free()

static int emupchan_free ( kobj_t obj  ,
void *  data 
)
static

Definition at line 836 of file emu10k1.c.

References sc_chinfo::buffer, sc_info::ch, data, emu_memfree(), sc_info::lock, sc_chinfo::parent, r, snd_mtxlock, snd_mtxunlock, and sndbuf_getbuf().

Here is the call graph for this function:

◆ emupchan_getcaps()

static struct pcmchan_caps * emupchan_getcaps ( kobj_t obj  ,
void *  data 
)
static

Definition at line 928 of file emu10k1.c.

References emu_playcaps.

◆ emupchan_getptr()

static u_int32_t emupchan_getptr ( kobj_t obj  ,
void *  data 
)
static

Definition at line 914 of file emu10k1.c.

References sc_info::ch, data, emu_vpos(), sc_info::lock, sc_chinfo::parent, r, snd_mtxlock, and snd_mtxunlock.

Here is the call graph for this function:

◆ emupchan_init()

static void * emupchan_init ( kobj_t obj  ,
void *  devinfo,
struct snd_dbuf b,
struct pcm_channel c,
int dir   
)
static

◆ emupchan_setblocksize()

static u_int32_t emupchan_setblocksize ( kobj_t obj  ,
void *  data,
u_int32_t  blocksize 
)
static

◆ emupchan_setformat()

static int emupchan_setformat ( kobj_t obj  ,
void *  data,
u_int32_t  format 
)
static

Definition at line 850 of file emu10k1.c.

References data, sc_pchinfo::fmt, and format.

◆ emupchan_setspeed()

static u_int32_t emupchan_setspeed ( kobj_t obj  ,
void *  data,
u_int32_t  speed 
)
static

Definition at line 859 of file emu10k1.c.

References data, sc_pchinfo::spd, and speed.

◆ emupchan_trigger()

static int emupchan_trigger ( kobj_t obj  ,
void *  data,
int  go 
)
static

◆ emurchan_getcaps()

static struct pcmchan_caps * emurchan_getcaps ( kobj_t obj  ,
void *  data 
)
static

Definition at line 1142 of file emu10k1.c.

References data, emu_reccaps, and sc_rchinfo::num.

◆ emurchan_getptr()

static u_int32_t emurchan_getptr ( kobj_t obj  ,
void *  data 
)
static

Definition at line 1128 of file emu10k1.c.

References sc_info::ch, data, emu_rdptr(), sc_info::lock, sc_chinfo::parent, r, snd_mtxlock, and snd_mtxunlock.

Here is the call graph for this function:

◆ emurchan_init()

◆ emurchan_setblocksize()

static u_int32_t emurchan_setblocksize ( kobj_t obj  ,
void *  data,
u_int32_t  blocksize 
)
static

◆ emurchan_setformat()

static int emurchan_setformat ( kobj_t obj  ,
void *  data,
u_int32_t  format 
)
static

Definition at line 1001 of file emu10k1.c.

References data, sc_rchinfo::fmt, and format.

◆ emurchan_setspeed()

static u_int32_t emurchan_setspeed ( kobj_t obj  ,
void *  data,
u_int32_t  speed 
)
static

Definition at line 1010 of file emu10k1.c.

References adcspeed, sc_info::audigy, audigy_adcspeed, audigy_recval(), data, emu_recval(), sc_rchinfo::num, sc_rchinfo::parent, sc_rchinfo::spd, and speed.

Here is the call graph for this function:

◆ emurchan_trigger()

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( snd_emu10k1  ,
midi  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( snd_emu10k1  ,
sound  ,
SOUND_MINVER  ,
SOUND_PREFVER  ,
SOUND_MAXVER   
)

◆ MODULE_VERSION()

MODULE_VERSION ( snd_emu10k1  ,
 
)

◆ SND_DECLARE_FILE()

SND_DECLARE_FILE ( "$FreeBSD$"  )

Variable Documentation

◆ adcspeed

int adcspeed[8] = {48000, 44100, 32000, 24000, 22050, 16000, 11025, 8000}
static

Definition at line 293 of file emu10k1.c.

Referenced by emu_recval(), and emurchan_setspeed().

◆ audigy_adcspeed

int audigy_adcspeed[9]
static
Initial value:
= {
48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000
}

Definition at line 295 of file emu10k1.c.

Referenced by audigy_recval(), and emurchan_setspeed().

◆ emu_ac97_methods

kobj_method_t emu_ac97_methods[]
static
Initial value:
= {
KOBJMETHOD(ac97_read, emu_rdcd),
KOBJMETHOD(ac97_write, emu_wrcd),
}
static int emu_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data)
Definition: emu10k1.c:389
static int emu_rdcd(kobj_t obj, void *devinfo, int regno)
Definition: emu10k1.c:380
#define KOBJMETHOD_END
Definition: midi.c:76

Definition at line 398 of file emu10k1.c.

◆ emu_driver

driver_t emu_driver
static
Initial value:
= {
"pcm",
}
static device_method_t emu_methods[]
Definition: emu10k1.c:2187
#define PCM_SOFTC_SIZE
Definition: sound.h:96

Definition at line 2196 of file emu10k1.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_END
}
static int emu_pci_detach(device_t dev)
Definition: emu10k1.c:2163
static int emu_pci_attach(device_t dev)
Definition: emu10k1.c:2074
static int emu_pci_probe(device_t dev)
Definition: emu10k1.c:2045

Definition at line 2187 of file emu10k1.c.

◆ emu_mpu_methods

kobj_method_t emu_mpu_methods[]
static
Initial value:
= {
KOBJMETHOD(mpufoi_read, emu_mread),
KOBJMETHOD(mpufoi_write, emu_mwrite),
KOBJMETHOD(mpufoi_uninit, emu_muninit),
}
static void emu_mwrite(struct mpu401 *arg, void *sc, int reg, unsigned char b)
Definition: emu10k1.c:1171
static int emu_muninit(struct mpu401 *arg, void *cookie)
Definition: emu10k1.c:1178
static unsigned char emu_mread(struct mpu401 *arg, void *sc, int reg)
Definition: emu10k1.c:1162

Definition at line 1189 of file emu10k1.c.

◆ emu_pfmt

u_int32_t emu_pfmt[]
static
Initial value:
= {
SND_FORMAT(AFMT_U8, 1, 0),
SND_FORMAT(AFMT_U8, 2, 0),
SND_FORMAT(AFMT_S16_LE, 1, 0),
SND_FORMAT(AFMT_S16_LE, 2, 0),
0
}
#define SND_FORMAT(f, c, e)
Definition: sound.h:238

Definition at line 283 of file emu10k1.c.

◆ emu_playcaps

struct pcmchan_caps emu_playcaps = {4000, 48000, emu_pfmt, 0}
static

Definition at line 291 of file emu10k1.c.

Referenced by emupchan_getcaps().

◆ emu_reccaps

struct pcmchan_caps emu_reccaps[3]
static
Initial value:
= {
{8000, 48000, emu_rfmt_ac97, 0},
{8000, 8000, emu_rfmt_mic, 0},
{48000, 48000, emu_rfmt_efx, 0},
}
static u_int32_t emu_rfmt_ac97[]
Definition: emu10k1.c:261
static u_int32_t emu_rfmt_mic[]
Definition: emu10k1.c:267
static u_int32_t emu_rfmt_efx[]
Definition: emu10k1.c:272

Definition at line 277 of file emu10k1.c.

Referenced by emurchan_getcaps().

◆ emu_rfmt_ac97

u_int32_t emu_rfmt_ac97[]
static
Initial value:
= {
SND_FORMAT(AFMT_S16_LE, 1, 0),
SND_FORMAT(AFMT_S16_LE, 2, 0),
0
}

Definition at line 261 of file emu10k1.c.

◆ emu_rfmt_efx

u_int32_t emu_rfmt_efx[]
static
Initial value:
= {
SND_FORMAT(AFMT_S16_LE, 2, 0),
0
}

Definition at line 272 of file emu10k1.c.

◆ emu_rfmt_mic

u_int32_t emu_rfmt_mic[]
static
Initial value:
= {
SND_FORMAT(AFMT_U8, 1, 0),
0
}

Definition at line 267 of file emu10k1.c.

◆ emujoy_devclass

devclass_t emujoy_devclass
static

Definition at line 2256 of file emu10k1.c.

◆ emujoy_driver

driver_t emujoy_driver
static
Initial value:
= {
"emujoy",
1
}
static device_method_t emujoy_methods[]
Definition: emu10k1.c:2242

Definition at line 2250 of file emu10k1.c.

◆ emujoy_methods

device_method_t emujoy_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, emujoy_pci_probe),
DEVMETHOD(device_attach, emujoy_pci_attach),
DEVMETHOD(device_detach, emujoy_pci_detach),
DEVMETHOD_END
}
static int emujoy_pci_attach(device_t dev)
Definition: emu10k1.c:2229
static int emujoy_pci_probe(device_t dev)
Definition: emu10k1.c:2209
static int emujoy_pci_detach(device_t dev)
Definition: emu10k1.c:2236

Definition at line 2242 of file emu10k1.c.

◆ emupchan_methods

kobj_method_t emupchan_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, emupchan_init),
KOBJMETHOD(channel_free, emupchan_free),
KOBJMETHOD(channel_setformat, emupchan_setformat),
KOBJMETHOD(channel_setspeed, emupchan_setspeed),
KOBJMETHOD(channel_setblocksize, emupchan_setblocksize),
KOBJMETHOD(channel_trigger, emupchan_trigger),
KOBJMETHOD(channel_getptr, emupchan_getptr),
KOBJMETHOD(channel_getcaps, emupchan_getcaps),
}
static struct pcmchan_caps * emupchan_getcaps(kobj_t obj, void *data)
Definition: emu10k1.c:928
static void * emupchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
Definition: emu10k1.c:810
static int emupchan_free(kobj_t obj, void *data)
Definition: emu10k1.c:836
static u_int32_t emupchan_setspeed(kobj_t obj, void *data, u_int32_t speed)
Definition: emu10k1.c:859
static int emupchan_trigger(kobj_t obj, void *data, int go)
Definition: emu10k1.c:884
static u_int32_t emupchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
Definition: emu10k1.c:868
static u_int32_t emupchan_getptr(kobj_t obj, void *data)
Definition: emu10k1.c:914
static int emupchan_setformat(kobj_t obj, void *data, u_int32_t format)
Definition: emu10k1.c:850

Definition at line 933 of file emu10k1.c.

◆ emurchan_methods

kobj_method_t emurchan_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, emurchan_init),
KOBJMETHOD(channel_setformat, emurchan_setformat),
KOBJMETHOD(channel_setspeed, emurchan_setspeed),
KOBJMETHOD(channel_setblocksize, emurchan_setblocksize),
KOBJMETHOD(channel_trigger, emurchan_trigger),
KOBJMETHOD(channel_getptr, emurchan_getptr),
KOBJMETHOD(channel_getcaps, emurchan_getcaps),
}
static int emurchan_setformat(kobj_t obj, void *data, u_int32_t format)
Definition: emu10k1.c:1001
static u_int32_t emurchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
Definition: emu10k1.c:1029
static u_int32_t emurchan_getptr(kobj_t obj, void *data)
Definition: emu10k1.c:1128
static struct pcmchan_caps * emurchan_getcaps(kobj_t obj, void *data)
Definition: emu10k1.c:1142
static void * emurchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
Definition: emu10k1.c:948
static int emurchan_trigger(kobj_t obj, void *data, int go)
Definition: emu10k1.c:1046
static u_int32_t emurchan_setspeed(kobj_t obj, void *data, u_int32_t speed)
Definition: emu10k1.c:1010

Definition at line 1149 of file emu10k1.c.