FreeBSD kernel sound device code
|
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pci/hdspe.h>
#include <dev/sound/chip.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <mixer_if.h>
Go to the source code of this file.
Data Structures | |
struct | hdspe_latency |
struct | hdspe_rate |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static int | hdspe_hw_mixer (struct sc_chinfo *ch, unsigned int dst, unsigned int src, unsigned short data) |
static int | hdspechan_setgain (struct sc_chinfo *ch) |
static int | hdspemixer_init (struct snd_mixer *m) |
static int | hdspemixer_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
MIXER_DECLARE (hdspemixer) | |
static void | hdspechan_enable (struct sc_chinfo *ch, int value) |
static int | hdspe_running (struct sc_info *sc) |
static void | hdspe_start_audio (struct sc_info *sc) |
static void | hdspe_stop_audio (struct sc_info *sc) |
static void | buffer_copy (struct sc_chinfo *ch) |
static int | clean (struct sc_chinfo *ch) |
static void * | hdspechan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) |
static int | hdspechan_trigger (kobj_t obj, void *data, int go) |
static uint32_t | hdspechan_getptr (kobj_t obj, void *data) |
static int | hdspechan_free (kobj_t obj, void *data) |
static int | hdspechan_setformat (kobj_t obj, void *data, uint32_t format) |
static uint32_t | hdspechan_setspeed (kobj_t obj, void *data, uint32_t speed) |
static uint32_t | hdspechan_setblocksize (kobj_t obj, void *data, uint32_t blocksize) |
static struct pcmchan_caps * | hdspechan_getcaps (kobj_t obj, void *data) |
CHANNEL_DECLARE (hdspechan) | |
static int | hdspe_pcm_probe (device_t dev) |
static uint32_t | hdspe_pcm_intr (struct sc_pcminfo *scp) |
static int | hdspe_pcm_attach (device_t dev) |
static int | hdspe_pcm_detach (device_t dev) |
DRIVER_MODULE (snd_hdspe_pcm, hdspe, hdspe_pcm_driver, pcm_devclass, 0, 0) | |
MODULE_DEPEND (snd_hdspe, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER) | |
MODULE_VERSION (snd_hdspe, 1) | |
Variables | |
static struct hdspe_latency | latency_map [] |
static struct hdspe_rate | rate_map [] |
static kobj_method_t | hdspemixer_methods [] |
static uint32_t | hdspe_rfmt [] |
static struct pcmchan_caps | hdspe_rcaps = {32000, 192000, hdspe_rfmt, 0} |
static uint32_t | hdspe_pfmt [] |
static struct pcmchan_caps | hdspe_pcaps = {32000, 192000, hdspe_pfmt, 0} |
static kobj_method_t | hdspechan_methods [] |
static device_method_t | hdspe_pcm_methods [] |
static driver_t | hdspe_pcm_driver |
|
static |
Definition at line 260 of file hdspe-pcm.c.
References AFMT_CHANNEL, sc_chinfo::buffer, sc_info::ch, sc_chinfo::data, sc_chinfo::dir, sc_info::dst, sc_chinfo::format, HDSPE_CHANBUF_SAMPLES, sc_chinfo::lslot, n, sc_chinfo::parent, sc_info::pbuf, PCMDIR_PLAY, sc_info::period, sc_info::rbuf, sc_chinfo::rslot, sc_pcminfo::sc, sc_chinfo::size, sndbuf_getfreeptr(), sndbuf_getready(), sndbuf_getreadyptr(), and src.
Referenced by hdspechan_trigger().
CHANNEL_DECLARE | ( | hdspechan | ) |
|
static |
Definition at line 316 of file hdspe-pcm.c.
References buf, sc_info::ch, sc_chinfo::dir, HDSPE_CHANBUF_SAMPLES, HDSPE_CHANBUF_SIZE, sc_chinfo::lslot, sc_chinfo::parent, sc_info::pbuf, PCMDIR_PLAY, sc_info::rbuf, sc_chinfo::rslot, and sc_pcminfo::sc.
Referenced by hdspechan_trigger().
DRIVER_MODULE | ( | snd_hdspe_pcm | , |
hdspe | , | ||
hdspe_pcm_driver | , | ||
pcm_devclass | , | ||
0 | , | ||
0 | |||
) |
|
static |
Definition at line 84 of file hdspe-pcm.c.
References sc_info::ch, data, sc_chinfo::dir, sc_info::dst, HDSPE_MIXER_BASE, hdspe_write_4, sc_chinfo::parent, PCMDIR_PLAY, sc_pcminfo::sc, and src.
Referenced by hdspechan_setgain().
|
static |
Definition at line 699 of file hdspe-pcm.c.
References sc_pcminfo::chnum, sc_info::cs, desc, hdspe_channel::descr, dev, sc_pcminfo::hc, hdspe_pcm_intr(), sc_pcminfo::ih, sc_info::irq, mixer_init(), pcm_addchan(), pcm_getflags(), PCM_KLDSTRING, pcm_register(), pcm_setflags(), pcm_setstatus(), PCMDIR_PLAY, PCMDIR_REC, hdspe_channel::play, hdspe_channel::rec, sc_pcminfo::sc, SD_F_MPSAFE, SND_STATUSLEN, and status.
|
static |
Definition at line 748 of file hdspe-pcm.c.
References dev, and pcm_unregister().
|
static |
Definition at line 680 of file hdspe-pcm.c.
References sc_info::ch, sc_pcminfo::chan, sc_chinfo::channel, chn_intr(), sc_pcminfo::chnum, sc_info::lock, sc_pcminfo::sc, snd_mtxlock, and snd_mtxunlock.
Referenced by hdspe_pcm_attach().
|
static |
Definition at line 669 of file hdspe-pcm.c.
References dev.
|
static |
Definition at line 204 of file hdspe-pcm.c.
References sc_pcminfo::chan, sc_pcminfo::chnum, sc_info::dev, free, and sc_chinfo::run.
Referenced by hdspe_stop_audio(), hdspechan_setblocksize(), and hdspechan_setspeed().
|
static |
Definition at line 240 of file hdspe-pcm.c.
References sc_info::ctrl_register, HDSPE_AUDIO_INT_ENABLE, HDSPE_CONTROL_REG, HDSPE_ENABLE, and hdspe_write_4.
Referenced by hdspechan_trigger().
|
static |
Definition at line 248 of file hdspe-pcm.c.
References sc_info::ctrl_register, HDSPE_AUDIO_INT_ENABLE, HDSPE_CONTROL_REG, HDSPE_ENABLE, hdspe_running(), and hdspe_write_4.
Referenced by hdspechan_trigger().
|
static |
Definition at line 182 of file hdspe-pcm.c.
References AFMT_CHANNEL, sc_info::ch, sc_chinfo::dir, sc_chinfo::format, HDSPE_IN_ENABLE_BASE, HDSPE_OUT_ENABLE_BASE, hdspe_write_1, sc_chinfo::lslot, sc_chinfo::parent, PCMDIR_PLAY, reg, sc_chinfo::rslot, sc_chinfo::run, sc_pcminfo::sc, and value.
Referenced by hdspechan_trigger().
|
static |
Definition at line 446 of file hdspe-pcm.c.
References sc_info::ch, sc_chinfo::data, data, sc_pcminfo::dev, free, sc_info::lock, sc_chinfo::parent, sc_pcminfo::sc, snd_mtxlock, and snd_mtxunlock.
|
static |
Definition at line 640 of file hdspe-pcm.c.
References data, sc_chinfo::dir, hdspe_pcaps, hdspe_rcaps, sc_chinfo::parent, and PCMDIR_PLAY.
|
static |
Definition at line 423 of file hdspe-pcm.c.
References AFMT_CHANNEL, sc_info::ch, data, sc_chinfo::format, HDSPE_BUF_POSITION_MASK, hdspe_read_2, HDSPE_STATUS_REG, sc_info::lock, sc_chinfo::parent, sc_pcminfo::sc, snd_mtxlock, and snd_mtxunlock.
|
static |
Definition at line 338 of file hdspe-pcm.c.
References b, sc_chinfo::buffer, c, sc_info::ch, sc_pcminfo::chan, sc_chinfo::channel, sc_pcminfo::chnum, sc_chinfo::data, sc_pcminfo::dev, devinfo, sc_chinfo::dir, dir, sc_pcminfo::hc, HDSPE_CHANBUF_SIZE, hdspe_channel::left, sc_info::lock, sc_chinfo::lslot, sc_chinfo::lvol, sc_chinfo::parent, hdspe_channel::right, sc_chinfo::rslot, sc_chinfo::run, sc_chinfo::rvol, sc_pcminfo::sc, sc_chinfo::size, snd_mtxlock, snd_mtxunlock, and sndbuf_setup().
|
static |
Definition at line 559 of file hdspe-pcm.c.
References AFMT_CHANNEL, blocksize, sc_chinfo::buffer, sc_info::ch, sc_info::ctrl_register, data, sc_pcminfo::dev, sc_chinfo::format, HDSPE_CHANBUF_SIZE, HDSPE_CONTROL_REG, hdspe_encode_latency, HDSPE_LAT_BYTES_MAX, HDSPE_LAT_BYTES_MIN, hdspe_running(), hdspe_write_4, latency_map, sc_info::lock, hdspe_latency::n, sc_chinfo::parent, hdspe_latency::period, sc_info::period, sc_pcminfo::sc, snd_mtxlock, snd_mtxunlock, sndbuf_getblksz(), and sndbuf_resize().
|
static |
Definition at line 471 of file hdspe-pcm.c.
References data, sc_pcminfo::dev, format, sc_chinfo::format, and sc_chinfo::parent.
|
static |
Definition at line 106 of file hdspe-pcm.c.
References sc_info::ch, hdspe_hw_mixer(), HDSPE_MAX_GAIN, sc_chinfo::lslot, sc_chinfo::lvol, sc_chinfo::rslot, and sc_chinfo::rvol.
Referenced by hdspechan_trigger(), and hdspemixer_set().
|
static |
Definition at line 488 of file hdspe-pcm.c.
References AIO, sc_info::ch, sc_info::ctrl_register, data, sc_pcminfo::dev, HDSPE_CONTROL_REG, HDSPE_FREQ_AIO, HDSPE_FREQ_REG, hdspe_running(), hdspe_write_4, sc_chinfo::parent, sc_info::period, rate_map, RAYDAT, hdspe_rate::reg, sc_pcminfo::sc, speed, sc_info::speed, hdspe_rate::speed, and sc_info::type.
|
static |
Definition at line 379 of file hdspe-pcm.c.
References buffer_copy(), sc_info::ch, clean(), data, sc_pcminfo::dev, go, hdspe_start_audio(), hdspe_stop_audio(), hdspechan_enable(), hdspechan_setgain(), sc_info::lock, sc_chinfo::parent, PCMTRIG_ABORT, PCMTRIG_EMLDMARD, PCMTRIG_EMLDMAWR, PCMTRIG_START, PCMTRIG_STOP, sc_chinfo::run, sc_pcminfo::sc, snd_mtxlock, and snd_mtxunlock.
|
static |
Definition at line 118 of file hdspe-pcm.c.
References sc_pcminfo::dev, sc_pcminfo::hc, sc_info::lock, m, mask, mix_getdevinfo(), mix_setdevs(), pcm_getflags(), pcm_setflags(), hdspe_channel::play, hdspe_channel::rec, sc_pcminfo::sc, SD_F_SOFTPCMVOL, snd_mtxlock, and snd_mtxunlock.
|
static |
Definition at line 146 of file hdspe-pcm.c.
References sc_pcminfo::chan, sc_pcminfo::chnum, sc_pcminfo::dev, dev, sc_chinfo::dir, hdspechan_setgain(), left, sc_chinfo::lvol, m, mix_getdevinfo(), PCMDIR_PLAY, PCMDIR_REC, right, sc_chinfo::run, and sc_chinfo::rvol.
MIXER_DECLARE | ( | hdspemixer | ) |
MODULE_DEPEND | ( | snd_hdspe | , |
sound | , | ||
SOUND_MINVER | , | ||
SOUND_PREFVER | , | ||
SOUND_MAXVER | |||
) |
MODULE_VERSION | ( | snd_hdspe | , |
1 | |||
) |
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 637 of file hdspe-pcm.c.
Referenced by hdspechan_getcaps().
|
static |
Definition at line 768 of file hdspe-pcm.c.
|
static |
Definition at line 761 of file hdspe-pcm.c.
|
static |
Definition at line 631 of file hdspe-pcm.c.
|
static |
Definition at line 629 of file hdspe-pcm.c.
Referenced by hdspechan_getcaps().
|
static |
Definition at line 624 of file hdspe-pcm.c.
|
static |
Definition at line 655 of file hdspe-pcm.c.
|
static |
Definition at line 174 of file hdspe-pcm.c.
|
static |
Definition at line 51 of file hdspe-pcm.c.
Referenced by hdspechan_setblocksize().
|
static |
Definition at line 69 of file hdspe-pcm.c.
Referenced by hdspechan_setspeed().