FreeBSD kernel sound device code
|
#include <dev/sound/pcm/sound.h>
#include <dev/sound/isa/ad1816.h>
#include <isa/isavar.h>
#include "mixer_if.h"
Go to the source code of this file.
Data Structures | |
struct | ad1816_chinfo |
struct | ad1816_info |
Macros | |
#define | AD1816_MUTE 31 /* value for mute */ |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static void | ad1816_lock (struct ad1816_info *ad1816) |
static void | ad1816_unlock (struct ad1816_info *ad1816) |
static int | port_rd (struct resource *port, int off) |
static void | port_wr (struct resource *port, int off, u_int8_t data) |
static int | io_rd (struct ad1816_info *ad1816, int reg) |
static void | io_wr (struct ad1816_info *ad1816, int reg, u_int8_t data) |
static void | ad1816_intr (void *arg) |
static int | ad1816_wait_init (struct ad1816_info *ad1816, int x) |
static unsigned short | ad1816_read (struct ad1816_info *ad1816, unsigned int reg) |
static void | ad1816_write (struct ad1816_info *ad1816, unsigned int reg, unsigned short data) |
static int | ad1816mix_init (struct snd_mixer *m) |
static int | ad1816mix_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
static u_int32_t | ad1816mix_setrecsrc (struct snd_mixer *m, u_int32_t src) |
MIXER_DECLARE (ad1816mixer) | |
static void * | ad1816chan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) |
static int | ad1816chan_setformat (kobj_t obj, void *data, u_int32_t format) |
static u_int32_t | ad1816chan_setspeed (kobj_t obj, void *data, u_int32_t speed) |
static u_int32_t | ad1816chan_setblocksize (kobj_t obj, void *data, u_int32_t blocksize) |
static int | ad1816chan_trigger (kobj_t obj, void *data, int go) |
static u_int32_t | ad1816chan_getptr (kobj_t obj, void *data) |
static struct pcmchan_caps * | ad1816chan_getcaps (kobj_t obj, void *data) |
CHANNEL_DECLARE (ad1816chan) | |
static void | ad1816_release_resources (struct ad1816_info *ad1816, device_t dev) |
static int | ad1816_alloc_resources (struct ad1816_info *ad1816, device_t dev) |
static int | ad1816_init (struct ad1816_info *ad1816, device_t dev) |
static int | ad1816_probe (device_t dev) |
static int | ad1816_attach (device_t dev) |
static int | ad1816_detach (device_t dev) |
DRIVER_MODULE (snd_ad1816, isa, ad1816_driver, pcm_devclass, 0, 0) | |
DRIVER_MODULE (snd_ad1816, acpi, ad1816_driver, pcm_devclass, 0, 0) | |
MODULE_DEPEND (snd_ad1816, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER) | |
MODULE_VERSION (snd_ad1816, 1) | |
Variables | |
static u_int32_t | ad1816_fmt [] |
static struct pcmchan_caps | ad1816_caps = {4000, 55200, ad1816_fmt, 0} |
static kobj_method_t | ad1816mixer_methods [] |
static kobj_method_t | ad1816chan_methods [] |
static device_method_t | ad1816_methods [] |
static driver_t | ad1816_driver |
|
static |
Definition at line 522 of file ad1816.c.
References ad1816_info::bufsize, dev, ad1816_info::drq1, ad1816_info::drq1_rid, ad1816_info::drq2, ad1816_info::drq2_rid, ad1816_info::io_base, ad1816_info::io_rid, ad1816_info::irq, ad1816_info::irq_rid, pcm_getflags(), pcm_setflags(), and SD_F_SIMPLEX.
Referenced by ad1816_attach().
|
static |
Definition at line 597 of file ad1816.c.
References ad1816_alloc_resources(), ad1816_init(), ad1816_intr(), ad1816_release_resources(), ad1816_info::bufsize, dev, ad1816_info::drq1, ad1816_info::drq1_rid, ad1816_info::drq2, ad1816_info::drq2_rid, DSP_BUFFSIZE, ad1816_info::ih, ad1816_info::io_base, ad1816_info::io_rid, ad1816_info::irq, ad1816_info::irq_rid, ad1816_info::lock, mixer_init(), ad1816_info::parent_dmat, pcm_addchan(), pcm_getbuffersize(), PCM_KLDSTRING, pcm_register(), pcm_setstatus(), PCMDIR_PLAY, PCMDIR_REC, snd_mtxcreate(), snd_setup_intr(), SND_STATUSLEN, and status.
|
static |
Definition at line 656 of file ad1816.c.
References ad1816_release_resources(), dev, pcm_getdevinfo(), pcm_unregister(), and r.
|
static |
Definition at line 559 of file ad1816.c.
References ad1816_write().
Referenced by ad1816_attach().
|
static |
Definition at line 131 of file ad1816.c.
References AD1816_INT, AD1816_INTRCI, AD1816_INTRPI, ad1816_lock(), ad1816_unlock(), ad1816_chinfo::buffer, c, ad1816_chinfo::channel, chn_intr(), io_rd(), io_wr(), ad1816_info::rch, and sndbuf_runsz().
Referenced by ad1816_attach().
|
static |
Definition at line 87 of file ad1816.c.
References ad1816_info::lock, and snd_mtxlock.
Referenced by ad1816_intr(), ad1816chan_setformat(), ad1816chan_setspeed(), ad1816chan_trigger(), ad1816mix_set(), and ad1816mix_setrecsrc().
|
static |
|
static |
Definition at line 184 of file ad1816.c.
References AD1816_ALE, AD1816_ALEMASK, AD1816_HIGH, AD1816_LOW, ad1816_wait_init(), io_rd(), io_wr(), and reg.
Referenced by ad1816chan_trigger(), ad1816mix_set(), and ad1816mix_setrecsrc().
|
static |
Definition at line 489 of file ad1816.c.
References dev, ad1816_info::drq1, ad1816_info::drq1_rid, ad1816_info::drq2, ad1816_info::drq2_rid, free, ad1816_info::ih, ad1816_info::io_base, ad1816_info::io_rid, ad1816_info::irq, ad1816_info::irq_rid, ad1816_info::lock, ad1816_info::parent_dmat, and snd_mtxfree().
Referenced by ad1816_attach(), and ad1816_detach().
|
static |
Definition at line 93 of file ad1816.c.
References ad1816_info::lock, and snd_mtxunlock.
Referenced by ad1816_intr(), ad1816chan_setformat(), ad1816chan_setspeed(), ad1816chan_trigger(), ad1816mix_set(), and ad1816mix_setrecsrc().
|
static |
Definition at line 172 of file ad1816.c.
References AD1816_ALE, AD1816_BUSY, io_rd(), and n.
Referenced by ad1816_read(), and ad1816_write().
|
static |
Definition at line 197 of file ad1816.c.
References AD1816_ALE, AD1816_ALEMASK, AD1816_HIGH, AD1816_LOW, ad1816_wait_init(), data, io_wr(), and reg.
Referenced by ad1816_init(), ad1816chan_setformat(), ad1816chan_setspeed(), ad1816chan_trigger(), ad1816mix_set(), and ad1816mix_setrecsrc().
|
static |
Definition at line 469 of file ad1816.c.
References ad1816_caps.
|
static |
Definition at line 462 of file ad1816.c.
References ad1816_chinfo::buffer, data, and sndbuf_dmaptr().
|
static |
Definition at line 319 of file ad1816.c.
References b, ad1816_chinfo::buffer, ad1816_info::bufsize, c, ad1816_chinfo::channel, devinfo, ad1816_chinfo::dir, dir, ad1816_info::drq1, ad1816_info::drq2, ad1816_chinfo::parent, ad1816_info::parent_dmat, PCMDIR_PLAY, ad1816_info::rch, SND_DMA, sndbuf_alloc(), sndbuf_dmasetdir(), and sndbuf_dmasetup().
|
static |
Definition at line 401 of file ad1816.c.
References ad1816_chinfo::blksz, blocksize, and data.
|
static |
Definition at line 340 of file ad1816.c.
References AD1816_ALAW, AD1816_CAPT, ad1816_lock(), AD1816_MULAW, AD1816_PLAY, AD1816_S16BE, AD1816_S16LE, AD1816_STEREO, AD1816_U8, ad1816_unlock(), ad1816_write(), AFMT_CHANNEL, AFMT_ENCODING, data, ad1816_chinfo::dir, fmt, format, io_wr(), ad1816_chinfo::parent, PCMDIR_PLAY, and reg.
|
static |
Definition at line 388 of file ad1816.c.
References ad1816_lock(), ad1816_unlock(), ad1816_write(), data, ad1816_chinfo::dir, ad1816_chinfo::parent, PCMDIR_PLAY, RANGE, and speed.
|
static |
Definition at line 410 of file ad1816.c.
References AD1816_CAPT, AD1816_ENABLE, ad1816_lock(), AD1816_PLAY, ad1816_read(), ad1816_unlock(), ad1816_write(), ad1816_chinfo::blksz, ad1816_chinfo::buffer, data, ad1816_chinfo::dir, go, io_rd(), io_wr(), ad1816_chinfo::parent, PCMDIR_PLAY, PCMTRIG_ABORT, PCMTRIG_COMMON, PCMTRIG_START, PCMTRIG_STOP, reg, and sndbuf_dma().
|
static |
Definition at line 208 of file ad1816.c.
References AD1816_MIXER_DEVICES, AD1816_REC_DEVICES, m, mix_setdevs(), and mix_setrecdevs().
|
static |
Definition at line 216 of file ad1816.c.
References ad1816_lock(), AD1816_MUTE, ad1816_read(), ad1816_unlock(), ad1816_write(), dev, left, m, mix_getdevinfo(), reg, and right.
|
static |
Definition at line 279 of file ad1816.c.
References ad1816_lock(), ad1816_read(), ad1816_unlock(), ad1816_write(), dev, m, mix_getdevinfo(), and src.
CHANNEL_DECLARE | ( | ad1816chan | ) |
DRIVER_MODULE | ( | snd_ad1816 | , |
acpi | , | ||
ad1816_driver | , | ||
pcm_devclass | , | ||
0 | , | ||
0 | |||
) |
DRIVER_MODULE | ( | snd_ad1816 | , |
isa | , | ||
ad1816_driver | , | ||
pcm_devclass | , | ||
0 | , | ||
0 | |||
) |
|
static |
Definition at line 119 of file ad1816.c.
References ad1816_info::io_base, port_rd(), and reg.
Referenced by ad1816_intr(), ad1816_read(), ad1816_wait_init(), and ad1816chan_trigger().
|
static |
Definition at line 125 of file ad1816.c.
References data, ad1816_info::io_base, port_wr(), and reg.
Referenced by ad1816_intr(), ad1816_read(), ad1816_write(), ad1816chan_setformat(), and ad1816chan_trigger().
MIXER_DECLARE | ( | ad1816mixer | ) |
MODULE_DEPEND | ( | snd_ad1816 | , |
sound | , | ||
SOUND_MINVER | , | ||
SOUND_PREFVER | , | ||
SOUND_MAXVER | |||
) |
MODULE_VERSION | ( | snd_ad1816 | , |
1 | |||
) |
|
static |
|
static |
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 82 of file ad1816.c.
Referenced by ad1816chan_getcaps().
|
static |
|
static |
|
static |
|
static |
|
static |