FreeBSD kernel sound device code
|
#include <dev/sound/chip.h>
#include <dev/sound/pcm/sound.h>
#include <dev/sound/isa/sb.h>
#include <isa/isavar.h>
Go to the source code of this file.
Data Structures | |
struct | sbc_ihl |
struct | sbc_softc |
Macros | |
#define | IO_MAX 3 |
#define | IRQ_MAX 1 |
#define | DRQ_MAX 2 |
#define | INTR_MAX 2 |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static int | sbc_probe (device_t dev) |
static int | sbc_attach (device_t dev) |
static void | sbc_intr (void *p) |
static struct resource * | sbc_alloc_resource (device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) |
static int | sbc_release_resource (device_t bus, device_t child, int type, int rid, struct resource *r) |
static int | sbc_setup_intr (device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) |
static int | sbc_teardown_intr (device_t dev, device_t child, struct resource *irq, void *cookie) |
static int | alloc_resource (struct sbc_softc *scp) |
static int | release_resource (struct sbc_softc *scp) |
static int | sb_rd (struct resource *io, int reg) |
static void | sb_wr (struct resource *io, int reg, u_int8_t val) |
static int | sb_dspready (struct resource *io) |
static int | sb_cmd (struct resource *io, u_char val) |
static u_int | sb_get_byte (struct resource *io) |
static void | sb_setmixer (struct resource *io, u_int port, u_int value) |
static void | sbc_lockinit (struct sbc_softc *scp) |
static void | sbc_lockdestroy (struct sbc_softc *scp) |
void | sbc_lock (struct sbc_softc *scp) |
void | sbc_lockassert (struct sbc_softc *scp) |
void | sbc_unlock (struct sbc_softc *scp) |
static int | sb_dspwr (struct resource *io, u_char val) |
static int | sb_reset_dsp (struct resource *io) |
static int | sb_identify_board (struct resource *io) |
static int | sbc_detach (device_t dev) |
static int | sbc_read_ivar (device_t bus, device_t dev, int index, uintptr_t *result) |
static int | sbc_write_ivar (device_t bus, device_t dev, int index, uintptr_t value) |
DRIVER_MODULE (snd_sbc, isa, sbc_driver, sbc_devclass, 0, 0) | |
DRIVER_MODULE (snd_sbc, acpi, sbc_driver, sbc_devclass, 0, 0) | |
MODULE_DEPEND (snd_sbc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER) | |
MODULE_VERSION (snd_sbc, 1) | |
ISA_PNP_INFO (sbc_ids) | |
Variables | |
static devclass_t | sbc_devclass |
static int | io_range [3] = {0x10, 0x2, 0x4} |
static struct isa_pnp_id | sbc_ids [] |
static device_method_t | sbc_methods [] |
static driver_t | sbc_driver |
|
static |
Definition at line 648 of file sbc.c.
References sbc_softc::dev, sbc_softc::drq, sbc_softc::drq_alloced, DRQ_MAX, sbc_softc::drq_rid, sbc_softc::io, sbc_softc::io_alloced, IO_MAX, io_range, sbc_softc::io_rid, sbc_softc::irq, sbc_softc::irq_alloced, IRQ_MAX, and sbc_softc::irq_rid.
Referenced by sbc_attach().
DRIVER_MODULE | ( | snd_sbc | , |
acpi | , | ||
sbc_driver | , | ||
sbc_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | snd_sbc | , |
isa | , | ||
sbc_driver | , | ||
sbc_devclass | , | ||
0 | , | ||
0 | |||
) |
ISA_PNP_INFO | ( | sbc_ids | ) |
MODULE_DEPEND | ( | snd_sbc | , |
sound | , | ||
SOUND_MINVER | , | ||
SOUND_PREFVER | , | ||
SOUND_MAXVER | |||
) |
MODULE_VERSION | ( | snd_sbc | , |
1 | |||
) |
|
static |
Definition at line 693 of file sbc.c.
References sbc_softc::dev, sbc_softc::drq, DRQ_MAX, sbc_softc::drq_rid, sbc_softc::ih, sbc_softc::io, IO_MAX, sbc_softc::io_rid, sbc_softc::irq, IRQ_MAX, and sbc_softc::irq_rid.
Referenced by sbc_attach(), and sbc_detach().
|
static |
Definition at line 180 of file sbc.c.
References sb_dspwr(), and val.
Referenced by sb_identify_board().
|
static |
Definition at line 158 of file sbc.c.
References sb_rd(), and SBDSP_STATUS.
Referenced by sb_dspwr().
|
static |
|
static |
Definition at line 199 of file sbc.c.
References DSP_DATA_AVAIL, DSP_READ, and sb_rd().
Referenced by sb_identify_board(), and sb_reset_dsp().
|
static |
Definition at line 222 of file sbc.c.
References DSP_CMD_GETID, DSP_CMD_GETVER, sb_cmd(), and sb_get_byte().
Referenced by sbc_attach(), and sbc_probe().
|
static |
Definition at line 142 of file sbc.c.
References reg.
Referenced by sb_dspready(), and sb_get_byte().
|
static |
Definition at line 213 of file sbc.c.
References sb_get_byte(), sb_wr(), and SBDSP_RST.
Referenced by sbc_attach(), and sbc_probe().
|
static |
Definition at line 186 of file sbc.c.
References SB_MIX_ADDR, SB_MIX_DATA, sb_wr(), and value.
Referenced by sbc_attach().
|
static |
Definition at line 150 of file sbc.c.
Referenced by sb_dspwr(), sb_reset_dsp(), and sb_setmixer().
|
static |
Definition at line 541 of file sbc.c.
References bus, sbc_softc::drq, sbc_softc::drq_alloced, DRQ_MAX, INTR_MAX, sbc_softc::io, sbc_softc::io_alloced, IO_MAX, sbc_softc::irq, sbc_softc::irq_alloced, IRQ_MAX, rid, and type.
|
static |
Definition at line 323 of file sbc.c.
References alloc_resource(), BD_F_DUP_MIDI, BD_F_ESS, BD_F_MIX_CT1335, BD_F_MIX_CT1345, BD_F_MIX_CT1745, BD_F_SB16, BD_F_SB16X, sbc_softc::bd_ver, sbc_softc::child_midi1, sbc_softc::child_midi2, sbc_softc::child_pcm, sbc_softc::dev, dev, DMA_NR, sbc_softc::drq, DV_F_DRQ_MASK, DV_F_DUAL_DMA, sndcard_func::func, func, sbc_softc::ih, sbc_softc::ihl, sbc_softc::io, sbc_softc::irq, irq, IRQ_MAX, IRQ_NR, sbc_ihl::parent, r, release_resource(), sb_identify_board(), sb_reset_dsp(), sb_setmixer(), sbc_intr(), sbc_lockinit(), SCF_MIDI, SCF_PCM, SCF_SYNTH, and snd_setup_intr().
|
static |
Definition at line 449 of file sbc.c.
References sbc_softc::child_midi1, sbc_softc::child_midi2, sbc_softc::child_pcm, dev, release_resource(), sbc_lock(), and sbc_lockdestroy().
|
static |
Definition at line 463 of file sbc.c.
References sbc_ihl::intr, sbc_ihl::intr_arg, and INTR_MAX.
Referenced by sbc_attach().
void sbc_lock | ( | struct sbc_softc * | scp | ) |
Definition at line 124 of file sbc.c.
References sbc_softc::lock, and snd_mtxlock.
Referenced by ess_lock(), sb_lock(), sbc_detach(), sbc_setup_intr(), and sbc_teardown_intr().
void sbc_lockassert | ( | struct sbc_softc * | scp | ) |
Definition at line 130 of file sbc.c.
References sbc_softc::lock, and snd_mtxassert().
Referenced by sb_lockassert().
|
static |
Definition at line 118 of file sbc.c.
References sbc_softc::lock, and snd_mtxfree().
Referenced by sbc_detach().
|
static |
Definition at line 111 of file sbc.c.
References sbc_softc::dev, sbc_softc::lock, and snd_mtxcreate().
Referenced by sbc_attach().
|
static |
Definition at line 272 of file sbc.c.
References dev, rid, sb_identify_board(), sb_reset_dsp(), sbc_ids, and vid.
|
static |
Definition at line 612 of file sbc.c.
References sbc_softc::bd_ver, bus, dev, sndcard_func::func, and index.
|
static |
Definition at line 580 of file sbc.c.
References bus, sbc_softc::drq_alloced, DRQ_MAX, sbc_softc::io_alloced, IO_MAX, sbc_softc::irq_alloced, IRQ_MAX, rid, and type.
|
static |
Definition at line 478 of file sbc.c.
References dev, sbc_softc::ihl, intr, sbc_ihl::intr, sbc_ihl::intr_arg, INTR_MAX, sbc_softc::irq, irq, IRQ_MAX, sbc_lock(), and sbc_unlock().
|
static |
Definition at line 513 of file sbc.c.
References dev, sbc_softc::ihl, sbc_ihl::intr, sbc_ihl::intr_arg, INTR_MAX, sbc_softc::irq, irq, IRQ_MAX, sbc_lock(), and sbc_unlock().
void sbc_unlock | ( | struct sbc_softc * | scp | ) |
Definition at line 136 of file sbc.c.
References sbc_softc::lock, and snd_mtxunlock.
Referenced by ess_unlock(), sb_unlock(), sbc_setup_intr(), and sbc_teardown_intr().
|
static |
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 101 of file sbc.c.
Referenced by alloc_resource().
|
static |
|
static |
Definition at line 241 of file sbc.c.
Referenced by sbc_probe().
|
static |