FreeBSD kernel sound device code
|
#include <dev/sound/pcm/sound.h>
#include <dev/sound/isa/sb.h>
#include <dev/sound/chip.h>
#include <isa/isavar.h>
#include "mixer_if.h"
Go to the source code of this file.
Data Structures | |
struct | sb_chinfo |
struct | sb_info |
Macros | |
#define | SB_DEFAULT_BUFSZ 4096 |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static int | sb_rd (struct sb_info *sb, int reg) |
static void | sb_wr (struct sb_info *sb, int reg, u_int8_t val) |
static int | sb_dspready (struct sb_info *sb) |
static int | sb_cmd (struct sb_info *sb, u_char val) |
static int | sb_cmd1 (struct sb_info *sb, u_char cmd, int val) |
static int | sb_cmd2 (struct sb_info *sb, u_char cmd, int val) |
static u_int | sb_get_byte (struct sb_info *sb) |
static void | sb_setmixer (struct sb_info *sb, u_int port, u_int value) |
static int | sb_getmixer (struct sb_info *sb, u_int port) |
static int | sb_reset_dsp (struct sb_info *sb) |
static void | sb_intr (void *arg) |
static int | sb_speed (struct sb_chinfo *ch) |
static int | sb_start (struct sb_chinfo *ch) |
static int | sb_stop (struct sb_chinfo *ch) |
static void | sb_lock (struct sb_info *sb) |
static void | sb_unlock (struct sb_info *sb) |
static int | port_rd (struct resource *port, int off) |
static void | port_wr (struct resource *port, int off, u_int8_t data) |
static int | sb_dspwr (struct sb_info *sb, u_char val) |
static void | sb_release_resources (struct sb_info *sb, device_t dev) |
static int | sb_alloc_resources (struct sb_info *sb, device_t dev) |
static int | sbpromix_init (struct snd_mixer *m) |
static int | sbpromix_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
static u_int32_t | sbpromix_setrecsrc (struct snd_mixer *m, u_int32_t src) |
MIXER_DECLARE (sbpromix_mixer) | |
static int | sbmix_init (struct snd_mixer *m) |
static int | sbmix_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
static u_int32_t | sbmix_setrecsrc (struct snd_mixer *m, u_int32_t src) |
MIXER_DECLARE (sbmix_mixer) | |
static void * | sbchan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) |
static int | sbchan_setformat (kobj_t obj, void *data, u_int32_t format) |
static u_int32_t | sbchan_setspeed (kobj_t obj, void *data, u_int32_t speed) |
static u_int32_t | sbchan_setblocksize (kobj_t obj, void *data, u_int32_t blocksize) |
static int | sbchan_trigger (kobj_t obj, void *data, int go) |
static u_int32_t | sbchan_getptr (kobj_t obj, void *data) |
static struct pcmchan_caps * | sbchan_getcaps (kobj_t obj, void *data) |
CHANNEL_DECLARE (sbchan) | |
static int | sb_probe (device_t dev) |
static int | sb_attach (device_t dev) |
static int | sb_detach (device_t dev) |
DRIVER_MODULE (snd_sb8, sbc, sb_driver, pcm_devclass, 0, 0) | |
MODULE_DEPEND (snd_sb8, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER) | |
MODULE_DEPEND (snd_sb8, snd_sbc, 1, 1, 1) | |
MODULE_VERSION (snd_sb8, 1) | |
Variables | |
static u_int32_t | sb_fmt [] |
static struct pcmchan_caps | sb200_playcaps = {4000, 23000, sb_fmt, 0} |
static struct pcmchan_caps | sb200_reccaps = {4000, 13000, sb_fmt, 0} |
static struct pcmchan_caps | sb201_playcaps = {4000, 44100, sb_fmt, 0} |
static struct pcmchan_caps | sb201_reccaps = {4000, 15000, sb_fmt, 0} |
static u_int32_t | sbpro_fmt [] |
static struct pcmchan_caps | sbpro_playcaps = {4000, 44100, sbpro_fmt, 0} |
static struct pcmchan_caps | sbpro_reccaps = {4000, 44100, sbpro_fmt, 0} |
static kobj_method_t | sbpromix_mixer_methods [] |
static kobj_method_t | sbmix_mixer_methods [] |
static kobj_method_t | sbchan_methods [] |
static device_method_t | sb_methods [] |
static driver_t | sb_driver |
CHANNEL_DECLARE | ( | sbchan | ) |
DRIVER_MODULE | ( | snd_sb8 | , |
sbc | , | ||
sb_driver | , | ||
pcm_devclass | , | ||
0 | , | ||
0 | |||
) |
MIXER_DECLARE | ( | sbmix_mixer | ) |
MIXER_DECLARE | ( | sbpromix_mixer | ) |
MODULE_DEPEND | ( | snd_sb8 | , |
snd_sbc | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
MODULE_DEPEND | ( | snd_sb8 | , |
sound | , | ||
SOUND_MINVER | , | ||
SOUND_PREFVER | , | ||
SOUND_MAXVER | |||
) |
MODULE_VERSION | ( | snd_sb8 | , |
1 | |||
) |
|
static |
|
static |
|
static |
Definition at line 287 of file sb8.c.
References sb_info::bufsize, dev, sb_info::drq, sb_info::io_base, sb_info::irq, and rid.
Referenced by sb_attach().
|
static |
Definition at line 715 of file sb8.c.
References sb_info::bd_flags, sb_info::bd_id, sb_info::bufsize, dev, sb_info::drq, sb_info::ih, sb_info::io_base, sb_info::irq, mixer_init(), sb_info::parent_dev, sb_info::parent_dmat, pcm_addchan(), pcm_getbuffersize(), pcm_getflags(), PCM_KLDSTRING, pcm_register(), pcm_setflags(), pcm_setstatus(), PCMDIR_PLAY, PCMDIR_REC, sb_alloc_resources(), SB_DEFAULT_BUFSZ, sb_intr(), sb_release_resources(), sb_reset_dsp(), SD_F_SIMPLEX, snd_setup_intr(), SND_STATUSLEN, and status.
|
static |
Definition at line 174 of file sb8.c.
References sb_dspwr(), and val.
Referenced by sb_start(), and sb_stop().
|
static |
Definition at line 183 of file sb8.c.
References sb_dspwr(), and val.
Referenced by sb_speed().
|
static |
Definition at line 194 of file sb8.c.
References sb_dspwr(), and val.
Referenced by sb_start().
|
static |
Definition at line 772 of file sb8.c.
References dev, pcm_getdevinfo(), pcm_unregister(), r, and sb_release_resources().
|
static |
Definition at line 152 of file sb8.c.
References sb_rd(), and SBDSP_STATUS.
Referenced by sb_dspwr().
|
static |
|
static |
Definition at line 234 of file sb8.c.
References DSP_DATA_AVAIL, DSP_READ, and sb_rd().
Referenced by sb_reset_dsp().
|
static |
Definition at line 221 of file sb8.c.
References SB_MIX_ADDR, SB_MIX_DATA, sb_rd(), sb_wr(), and val.
Referenced by sbpromix_setrecsrc().
|
static |
Definition at line 477 of file sb8.c.
References sb_chinfo::buffer, sb_chinfo::channel, chn_intr(), DSP_DATA_AVAIL, sb_info::rch, sb_lock(), sb_rd(), sb_unlock(), and sndbuf_runsz().
Referenced by sb_attach().
|
static |
Definition at line 118 of file sb8.c.
References sb_info::parent_dev, and sbc_lock().
Referenced by sb_intr(), sb_speed(), sb_start(), and sb_stop().
|
static |
|
static |
Definition at line 140 of file sb8.c.
References sb_info::io_base, port_rd(), and reg.
Referenced by sb_dspready(), sb_get_byte(), sb_getmixer(), and sb_intr().
|
static |
Definition at line 262 of file sb8.c.
References dev, sb_info::drq, free, sb_info::ih, sb_info::io_base, sb_info::irq, and sb_info::parent_dmat.
Referenced by sb_attach(), and sb_detach().
|
static |
Definition at line 248 of file sb8.c.
References DEB, sb_info::io_base, sb_get_byte(), sb_wr(), and SBDSP_RST.
Referenced by sb_attach(), and sb_stop().
|
static |
Definition at line 212 of file sb8.c.
References SB_MIX_ADDR, SB_MIX_DATA, sb_wr(), and value.
Referenced by sb_start(), sbmix_init(), sbmix_set(), sbpromix_init(), sbpromix_set(), and sbpromix_setrecsrc().
|
static |
Definition at line 499 of file sb8.c.
References AFMT_CHANNEL, BD_F_HISPEED, sb_info::bd_flags, sb_info::bd_id, sb_chinfo::dir, sb_chinfo::fmt, max, sb_chinfo::parent, PCMDIR_PLAY, sb_cmd1(), sb_lock(), sb_unlock(), sb_chinfo::spd, speed, and stereo.
Referenced by sbchan_setspeed().
|
static |
Definition at line 540 of file sb8.c.
References AFMT_CHANNEL, BD_F_DMARUN, BD_F_HISPEED, sb_info::bd_flags, sb_chinfo::blksz, sb_chinfo::dir, DSP_CMD_SPKON, sb_chinfo::fmt, sb_chinfo::parent, PCMDIR_PLAY, sb_cmd(), sb_cmd2(), sb_lock(), sb_setmixer(), sb_unlock(), and stereo.
Referenced by sbchan_trigger().
|
static |
Definition at line 569 of file sb8.c.
References BD_F_HISPEED, sb_info::bd_flags, sb_chinfo::dir, DSP_CMD_DMAEXIT_8, DSP_CMD_SPKOFF, sb_chinfo::parent, PCMDIR_PLAY, sb_cmd(), sb_lock(), sb_reset_dsp(), and sb_unlock().
Referenced by sbchan_trigger().
|
static |
Definition at line 123 of file sb8.c.
References sb_info::parent_dev, and sbc_unlock().
Referenced by sb_intr(), sb_speed(), sb_start(), and sb_stop().
|
static |
Definition at line 146 of file sb8.c.
References sb_info::io_base, port_wr(), reg, and val.
Referenced by sb_dspwr(), sb_getmixer(), sb_reset_dsp(), and sb_setmixer().
|
static |
Definition at line 664 of file sb8.c.
References sb_info::bd_id, data, sb_chinfo::dir, sb_chinfo::parent, PCMDIR_PLAY, sb200_playcaps, sb200_reccaps, sb201_playcaps, sb201_reccaps, sbpro_playcaps, and sbpro_reccaps.
|
static |
Definition at line 656 of file sb8.c.
References sb_chinfo::buffer, data, and sndbuf_dmaptr().
|
static |
Definition at line 597 of file sb8.c.
References b, sb_chinfo::buffer, sb_info::bufsize, c, sb_chinfo::channel, devinfo, sb_chinfo::dir, dir, sb_info::drq, sb_chinfo::parent, sb_info::parent_dmat, PCMDIR_PLAY, sb_info::rch, sndbuf_alloc(), and sndbuf_dmasetup().
|
static |
Definition at line 631 of file sb8.c.
References sb_chinfo::blksz, blocksize, and data.
|
static |
Definition at line 613 of file sb8.c.
References data, sb_chinfo::fmt, and format.
|
static |
Definition at line 622 of file sb8.c.
References data, sb_speed(), sb_chinfo::spd, and speed.
|
static |
Definition at line 640 of file sb8.c.
References sb_chinfo::buffer, data, go, PCMTRIG_COMMON, PCMTRIG_START, sb_start(), sb_stop(), and sndbuf_dma().
|
static |
Definition at line 409 of file sb8.c.
References m, mix_getdevinfo(), mix_setdevs(), mix_setrecdevs(), and sb_setmixer().
|
static |
Definition at line 423 of file sb8.c.
References dev, left, m, max, mix_getdevinfo(), reg, and sb_setmixer().
|
static |
|
static |
Definition at line 315 of file sb8.c.
References m, mix_getdevinfo(), mix_setdevs(), mix_setrecdevs(), and sb_setmixer().
|
static |
|
static |
Definition at line 380 of file sb8.c.
References m, mix_getdevinfo(), RECORD_SRC, sb_getmixer(), sb_setmixer(), and src.
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 55 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |
Definition at line 56 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |
Definition at line 57 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |
Definition at line 58 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 65 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |
Definition at line 66 of file sb8.c.
Referenced by sbchan_getcaps().
|
static |