FreeBSD kernel sound device code
|
#include "opt_isa.h"
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/vchan.h>
#include "feeder_if.h"
Go to the source code of this file.
Macros | |
#define | SND_CHN_OSS_FRONT (SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR) |
#define | SND_CHN_OSS_SURR (SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR) |
#define | SND_CHN_OSS_CENTER_LFE (SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF) |
#define | SND_CHN_OSS_REAR (SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR) |
#define | CHN_LATENCY_PBLKCNT_REF |
#define | CHN_LATENCY_PBUFSZ_REF |
#define | CHN_LATENCY_RBLKCNT_REF |
#define | CHN_LATENCY_RBUFSZ_REF |
#define | CHN_LATENCY_DATA_REF 192000 /* 48khz stereo 16bit ~ 48000 x 2 x 2 */ |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
SYSCTL_INT (_hw_snd, OID_AUTO, report_soft_formats, CTLFLAG_RW, &report_soft_formats, 0, "report software-emulated formats") | |
SYSCTL_INT (_hw_snd, OID_AUTO, report_soft_matrix, CTLFLAG_RW, &report_soft_matrix, 0, "report software-emulated channel matrixing") | |
static int | sysctl_hw_snd_latency (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_hw_snd, OID_AUTO, latency, CTLTYPE_INT|CTLFLAG_RWTUN|CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_latency, "I", "buffering latency (0=low ... 10=high)") | |
static int | sysctl_hw_snd_latency_profile (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_hw_snd, OID_AUTO, latency_profile, CTLTYPE_INT|CTLFLAG_RWTUN|CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_latency_profile, "I", "buffering latency profile (0=aggressive 1=safe)") | |
static int | sysctl_hw_snd_timeout (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_hw_snd, OID_AUTO, timeout, CTLTYPE_INT|CTLFLAG_RWTUN|CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_hw_snd_timeout, "I", "interrupt timeout (1 - 10) seconds") | |
SYSCTL_INT (_hw_snd, OID_AUTO, vpc_autoreset, CTLFLAG_RWTUN, &chn_vpc_autoreset, 0, "automatically reset channels volume to 0db") | |
static void | chn_vpc_proc (int reset, int db) |
static int | sysctl_hw_snd_vpc_0db (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_hw_snd, OID_AUTO, vpc_0db, CTLTYPE_INT|CTLFLAG_RWTUN|CTLFLAG_NEEDGIANT, 0, sizeof(int), sysctl_hw_snd_vpc_0db, "I", "0db relative level") | |
static int | sysctl_hw_snd_vpc_reset (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_hw_snd, OID_AUTO, vpc_reset, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, 0, sizeof(int), sysctl_hw_snd_vpc_reset, "I", "reset volume on all channels") | |
SYSCTL_INT (_hw_snd, OID_AUTO, usefrags, CTLFLAG_RWTUN, &chn_usefrags, 0, "prefer setfragments() over setblocksize()") | |
SYSCTL_INT (_hw_snd, OID_AUTO, syncdelay, CTLFLAG_RWTUN, &chn_syncdelay, 0, "append (0-1000) millisecond trailing buffer delay on each sync") | |
MTX_SYSINIT (pcm_syncgroup, &snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF) | |
static void | chn_lockinit (struct pcm_channel *c, int dir) |
static void | chn_lockdestroy (struct pcm_channel *c) |
static int | chn_polltrigger (struct pcm_channel *c) |
Determine channel is ready for I/O. More... | |
static void | chn_pollreset (struct pcm_channel *c) |
static void | chn_wakeup (struct pcm_channel *c) |
static int | chn_sleep (struct pcm_channel *c, int timeout) |
static unsigned int | chn_dmaupdate (struct pcm_channel *c) |
static void | chn_wrfeed (struct pcm_channel *c) |
static void | chn_wrintr (struct pcm_channel *c) |
int | chn_write (struct pcm_channel *c, struct uio *buf) |
static void | chn_rdfeed (struct pcm_channel *c) |
static void | chn_rdintr (struct pcm_channel *c) |
int | chn_read (struct pcm_channel *c, struct uio *buf) |
void | chn_intr_locked (struct pcm_channel *c) |
void | chn_intr (struct pcm_channel *c) |
u_int32_t | chn_start (struct pcm_channel *c, int force) |
void | chn_resetbuf (struct pcm_channel *c) |
int | chn_sync (struct pcm_channel *c, int threshold) |
int | chn_poll (struct pcm_channel *c, int ev, struct thread *td) |
int | chn_abort (struct pcm_channel *c) |
int | chn_flush (struct pcm_channel *c) |
int | snd_fmtvalid (uint32_t fmt, uint32_t *fmtlist) |
uint32_t | snd_str2afmt (const char *req) |
uint32_t | snd_afmt2str (uint32_t afmt, char *buf, size_t len) |
int | chn_reset (struct pcm_channel *c, uint32_t fmt, uint32_t spd) |
int | chn_init (struct pcm_channel *c, void *devinfo, int dir, int direction) |
int | chn_kill (struct pcm_channel *c) |
int | chn_setvolume (struct pcm_channel *c, int left, int right) |
int | chn_setvolume_multi (struct pcm_channel *c, int vc, int left, int right, int center) |
int | chn_setvolume_matrix (struct pcm_channel *c, int vc, int vt, int val) |
int | chn_getvolume_matrix (struct pcm_channel *c, int vc, int vt) |
int | chn_setmute_multi (struct pcm_channel *c, int vc, int mute) |
int | chn_setmute_matrix (struct pcm_channel *c, int vc, int vt, int mute) |
int | chn_getmute_matrix (struct pcm_channel *c, int vc, int vt) |
struct pcmchan_matrix * | chn_getmatrix (struct pcm_channel *c) |
int | chn_setmatrix (struct pcm_channel *c, struct pcmchan_matrix *m) |
int | chn_oss_getorder (struct pcm_channel *c, unsigned long long *map) |
int | chn_oss_setorder (struct pcm_channel *c, unsigned long long *map) |
int | chn_oss_getmask (struct pcm_channel *c, uint32_t *retmask) |
void | chn_vpc_reset (struct pcm_channel *c, int vc, int force) |
static u_int32_t | round_pow2 (u_int32_t v) |
static u_int32_t | round_blksz (u_int32_t v, int round) |
static int | chn_calclatency (int dir, int latency, int bps, u_int32_t datarate, u_int32_t max, int *rblksz, int *rblkcnt) |
static int | chn_resizebuf (struct pcm_channel *c, int latency, int blkcnt, int blksz) |
int | chn_setlatency (struct pcm_channel *c, int latency) |
int | chn_setblocksize (struct pcm_channel *c, int blkcnt, int blksz) |
int | chn_setparam (struct pcm_channel *c, uint32_t format, uint32_t speed) |
int | chn_setspeed (struct pcm_channel *c, uint32_t speed) |
int | chn_setformat (struct pcm_channel *c, uint32_t format) |
void | chn_syncstate (struct pcm_channel *c) |
int | chn_trigger (struct pcm_channel *c, int go) |
int | chn_getptr (struct pcm_channel *c) |
Queries sound driver for sample-aligned hardware buffer pointer index. More... | |
struct pcmchan_caps * | chn_getcaps (struct pcm_channel *c) |
u_int32_t | chn_getformats (struct pcm_channel *c) |
int | chn_notify (struct pcm_channel *c, u_int32_t flags) |
int | chn_getrates (struct pcm_channel *c, int **rates) |
Fetch array of supported discrete sample rates. More... | |
int | chn_syncdestroy (struct pcm_channel *c) |
Remove channel from a sync group, if there is one. More... | |
Variables | |
int | report_soft_formats = 1 |
int | report_soft_matrix = 1 |
int | chn_latency = CHN_LATENCY_DEFAULT |
int | chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT |
static int | chn_timeout = CHN_TIMEOUT |
static int | chn_vpc_autoreset = 1 |
static int | chn_vol_0db_pcm = SND_VOL_0DB_PCM |
static int | chn_usefrags = 0 |
static int | chn_syncdelay = -1 |
struct mtx | snd_pcm_syncgroups_mtx |
Channel sync group lock. More... | |
struct pcm_synclist | snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(snd_pcm_syncgroups) |
syncgroups' master list More... | |
struct { | |
char * name | |
char * alias1 | |
char * alias2 | |
uint32_t afmt | |
} | afmt_tab [] |
#define CHN_LATENCY_DATA_REF 192000 /* 48khz stereo 16bit ~ 48000 x 2 x 2 */ |
#define CHN_LATENCY_PBLKCNT_REF |
#define CHN_LATENCY_PBUFSZ_REF |
#define CHN_LATENCY_RBLKCNT_REF |
#define CHN_LATENCY_RBUFSZ_REF |
#define SND_CHN_OSS_CENTER_LFE (SND_CHN_T_MASK_FC | SND_CHN_T_MASK_LF) |
#define SND_CHN_OSS_FRONT (SND_CHN_T_MASK_FL | SND_CHN_T_MASK_FR) |
#define SND_CHN_OSS_REAR (SND_CHN_T_MASK_BL | SND_CHN_T_MASK_BR) |
#define SND_CHN_OSS_SURR (SND_CHN_T_MASK_SL | SND_CHN_T_MASK_SR) |
int chn_abort | ( | struct pcm_channel * | c | ) |
Definition at line 927 of file channel.c.
References b, pcm_channel::bufhard, pcm_channel::bufsoft, c, chn_dmaupdate(), CHN_F_ABORTING, CHN_F_VIRTUAL, CHN_LOCKASSERT, CHN_STOPPED, chn_trigger(), pcm_channel::flags, PCMTRIG_ABORT, sndbuf_getready(), and sndbuf_setrun().
Referenced by chn_notify(), dsp_close(), dsp_ioctl(), dsp_oss_syncgroup(), sysctl_dev_pcm_vchanformat(), and sysctl_dev_pcm_vchanrate().
|
static |
Definition at line 1726 of file channel.c.
References blkcnt, blksz, CHN_2NDBUFMAXSIZE, CHN_LATENCY_DATA_REF, CHN_LATENCY_MAX, CHN_LATENCY_PBLKCNT_REF, CHN_LATENCY_PBUFSZ_REF, chn_latency_profile, CHN_LATENCY_PROFILE_MAX, CHN_LATENCY_RBLKCNT_REF, CHN_LATENCY_RBUFSZ_REF, dir, max, PCMDIR_PLAY, PCMDIR_REC, round_blksz(), round_pow2(), and snd_xbytes().
Referenced by chn_resizebuf().
|
static |
Definition at line 356 of file channel.c.
References amt, b, pcm_channel::bufhard, c, CHN_DIRSTR, chn_getptr(), CHN_LOCKASSERT, CHN_STARTED, pcm_channel::dev, pcm_channel::direction, PCMDIR_PLAY, snd_verbose, sndbuf_acquire(), sndbuf_dispose(), sndbuf_getalign(), sndbuf_getfree(), sndbuf_gethwptr(), sndbuf_getready(), sndbuf_getsize(), and sndbuf_sethwptr().
Referenced by chn_abort(), chn_rdintr(), and chn_wrintr().
int chn_flush | ( | struct pcm_channel * | c | ) |
Definition at line 962 of file channel.c.
References b, pcm_channel::bufhard, c, CHN_F_CLOSING, CHN_LOCKASSERT, chn_sync(), chn_trigger(), DEB, pcm_channel::direction, pcm_channel::flags, PCMDIR_PLAY, PCMTRIG_ABORT, and sndbuf_setrun().
Referenced by dsp_close().
struct pcmchan_caps * chn_getcaps | ( | struct pcm_channel * | c | ) |
Definition at line 2277 of file channel.c.
References c, CHN_LOCKASSERT, pcm_channel::devinfo, and pcm_channel::methods.
Referenced by chn_getformats(), chn_notify(), chn_oss_getmask(), chn_setparam(), dsp_ioctl(), dsp_oss_audioinfo(), feeder_chain(), pcm_setvchans(), sndstat_get_caps(), sysctl_dev_pcm_vchanrate(), vchan_create(), and vchan_init().
u_int32_t chn_getformats | ( | struct pcm_channel * | c | ) |
Definition at line 2284 of file channel.c.
References AFMT_CONVERTIBLE, AFMT_ENCODING, c, CHN_BITPERFECT, chn_getcaps(), pcmchan_caps::fmtlist, fmts, and report_soft_formats.
Referenced by dsp_ioctl().
struct pcmchan_matrix * chn_getmatrix | ( | struct pcm_channel * | c | ) |
Definition at line 1469 of file channel.c.
References AFMT_CONVERTIBLE, c, CHN_LOCKASSERT, pcm_channel::format, and pcm_channel::matrix.
int chn_getmute_matrix | ( | struct pcm_channel * | c, |
int | vc, | ||
int | vt | ||
) |
Definition at line 1456 of file channel.c.
References c, CHN_LOCKASSERT, pcm_channel::muted, SND_CHN_T_BEGIN, SND_CHN_T_END, SND_CHN_T_VOL_0DB, SND_VOL_C_MASTER, and SND_VOL_C_MAX.
int chn_getptr | ( | struct pcm_channel * | c | ) |
Queries sound driver for sample-aligned hardware buffer pointer index.
This function obtains the hardware pointer location, then aligns it to the current bytes-per-sample value before returning. (E.g., a channel running in 16 bit stereo mode would require 4 bytes per sample, so a hwptr value ranging from 32-35 would be returned as 32.)
c | PCM channel context |
Definition at line 2267 of file channel.c.
References pcm_channel::bufhard, c, CHN_LOCKASSERT, CHN_STARTED, pcm_channel::devinfo, pcm_channel::methods, and sndbuf_getalign().
Referenced by chn_dmaupdate(), and dsp_ioctl().
int chn_getrates | ( | struct pcm_channel * | c, |
int ** | rates | ||
) |
Fetch array of supported discrete sample rates.
Wrapper for CHANNEL_GETRATES. Please see channel_if.m:getrates() for detailed information.
c | pcm channel to examine |
rates | pointer to array of integers; rate table will be recorded here |
rates
Definition at line 2529 of file channel.c.
References c, CHN_LOCKASSERT, pcm_channel::devinfo, pcm_channel::methods, and rates.
Referenced by dsp_oss_audioinfo().
int chn_getvolume_matrix | ( | struct pcm_channel * | c, |
int | vc, | ||
int | vt | ||
) |
Definition at line 1387 of file channel.c.
References c, CHN_LOCKASSERT, SND_CHN_T_BEGIN, SND_CHN_T_END, SND_CHN_T_VOL_0DB, SND_VOL_C_MASTER, SND_VOL_C_MAX, and pcm_channel::volume.
int chn_init | ( | struct pcm_channel * | c, |
void * | devinfo, | ||
int | dir, | ||
int | direction | ||
) |
Definition at line 1163 of file channel.c.
References b, pcm_channel::bufhard, pcm_channel::bufsoft, pcm_channel::busy, c, chn_addfeeder(), CHN_F_DEAD, CHN_F_VIRTUAL, CHN_INIT, CHN_LOCK, chn_lockdestroy(), chn_lockinit(), chn_timeout, CHN_TIMEOUT, CHN_TIMEOUT_MAX, CHN_UNLOCK, chn_vol_0db_pcm, chn_vpc_reset(), pcm_channel::dev, devinfo, pcm_channel::devinfo, dir, pcm_channel::direction, DSP_DEFAULT_SPEED, pcm_channel::feeder, feeder_getclass(), feeder_matrix_id_map(), pcm_channel::feederflags, pcm_channel::flags, pcm_channel::format, pcmchan_matrix::id, pcm_channel::latency, pcm_channel::matrix, pcm_channel::methods, pcm_channel::muted, pcm_channel::name, PCMDIR_PLAY, snd_dbuf::shadbuf, snd_dbuf::sl, pcm_channel::sm, SND_CHN_MATRIX_1_0, SND_CHN_MATRIX_PCMCHANNEL, SND_CHN_T_MAX, SND_CHN_T_VOL_0DB, SND_FORMAT, SND_VOL_0DB_MASTER, SND_VOL_C_MASTER, SND_VOL_C_PCM, sndbuf_create(), sndbuf_destroy(), sndbuf_free(), sndbuf_getmaxsize(), sndbuf_getsize(), sndbuf_setfmt(), sndbuf_setspd(), sndbuf_setup(), pcm_channel::speed, pcm_channel::timeout, and pcm_channel::volume.
Referenced by pcm_chn_create().
void chn_intr | ( | struct pcm_channel * | c | ) |
Definition at line 660 of file channel.c.
References c, chn_intr_locked(), CHN_LOCK, CHN_LOCKOWNED, and CHN_UNLOCK.
Referenced by ad1816_intr(), als_intr(), aoa_interrupt(), atiixp_intr(), atiixp_poll_callback(), audio_soc_intr(), cmi_intr(), cs4281_intr(), csa_intr(), emu_intr(), emu_pcm_intr(), envy24_intr(), envy24ht_intr(), es_intr(), es_poll_callback(), ess_intr(), fm801_intr(), hdaa_stream_intr(), hdspe_pcm_intr(), ich_intr(), m3_intr(), mss_intr(), nm_intr(), opti931_intr(), sb_intr(), sv_intr(), tr_intr(), uaudio_chan_play_callback(), uaudio_chan_record_callback(), via_intr(), and via_poll_callback().
void chn_intr_locked | ( | struct pcm_channel * | c | ) |
Definition at line 646 of file channel.c.
References c, CHN_LOCKASSERT, chn_rdintr(), chn_wrintr(), pcm_channel::direction, pcm_channel::interrupts, and PCMDIR_PLAY.
Referenced by chn_intr().
int chn_kill | ( | struct pcm_channel * | c | ) |
Definition at line 1285 of file channel.c.
References b, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_F_DEAD, CHN_LOCK, chn_lockdestroy(), chn_removefeeder(), CHN_STARTED, chn_trigger(), CHN_UNLOCK, pcm_channel::devinfo, pcm_channel::flags, pcm_channel::methods, PCMTRIG_ABORT, sndbuf_destroy(), and sndbuf_free().
Referenced by pcm_chn_destroy().
|
static |
Definition at line 253 of file channel.c.
References c, CHN_BROADCAST, CHN_LOCKASSERT, pcm_channel::cv, pcm_channel::intr_cv, pcm_channel::lock, and snd_mtxfree().
Referenced by chn_init(), and chn_kill().
|
static |
Definition at line 225 of file channel.c.
References c, pcm_channel::cv, dir, pcm_channel::intr_cv, pcm_channel::lock, pcm_channel::name, PCMDIR_PLAY, PCMDIR_PLAY_VIRTUAL, PCMDIR_REC, PCMDIR_REC_VIRTUAL, and snd_mtxcreate().
Referenced by chn_init().
int chn_notify | ( | struct pcm_channel * | c, |
u_int32_t | flags | ||
) |
Definition at line 2302 of file channel.c.
References AFMT_BIT, AFMT_CHANNEL, AFMT_PASSTHROUGH, AFMT_VCHAN, pcm_channel::busy, c, pcmchan_caps::caps, chn_abort(), CHN_EMPTY, CHN_F_DIRTY, CHN_F_EXCLUSIVE, CHN_F_PASSTHROUGH, CHN_F_VCHAN_ADAPTIVE, CHN_F_VCHAN_DYNAMIC, CHN_FOREACH, chn_getcaps(), chn_latency, CHN_LOCK, CHN_LOCKASSERT, CHN_N_BLOCKSIZE, CHN_N_FORMAT, CHN_N_RATE, CHN_N_TRIGGER, CHN_N_VOLUME, chn_reset(), chn_setlatency(), chn_start(), CHN_STARTED, CHN_UNLOCK, pcm_channel::devinfo, pcm_channel::direction, pcm_channel::flags, pcm_channel::format, pcm_channel::methods, pcm_channel::parentsnddev, PCMDIR_PLAY, snddev_info::pvchanformat, snddev_info::pvchanrate, RANGE, snddev_info::rvchanformat, snddev_info::rvchanrate, snd_fmtbest(), snd_fmtvalid(), pcm_channel::speed, vchan_sync(), and VCHAN_SYNC_REQUIRED.
Referenced by chn_resizebuf(), and vchan_trigger().
int chn_oss_getmask | ( | struct pcm_channel * | c, |
uint32_t * | retmask | ||
) |
Definition at line 1542 of file channel.c.
References AFMT_CONVERTIBLE, c, pcmchan_caps::caps, CHN_BITPERFECT, chn_getcaps(), CHN_LOCKASSERT, pcm_channel::devinfo, format, m, pcmchan_matrix::mask, pcm_channel::methods, report_soft_matrix, SND_CHN_OSS_CENTER_LFE, SND_CHN_OSS_FRONT, SND_CHN_OSS_REAR, and SND_CHN_OSS_SURR.
Referenced by dsp_oss_getchannelmask().
int chn_oss_getorder | ( | struct pcm_channel * | c, |
unsigned long long * | map | ||
) |
Definition at line 1502 of file channel.c.
References AFMT_CONVERTIBLE, c, CHN_LOCKASSERT, feeder_matrix_oss_get_channel_order(), pcm_channel::format, pcmchan_matrix::map, and pcm_channel::matrix.
Referenced by dsp_oss_getchnorder().
int chn_oss_setorder | ( | struct pcm_channel * | c, |
unsigned long long * | map | ||
) |
Definition at line 1516 of file channel.c.
References AFMT_CONVERTIBLE, c, CHN_LOCKASSERT, chn_setmatrix(), feeder_matrix_oss_set_channel_order(), pcm_channel::format, m, pcmchan_matrix::map, and pcm_channel::matrix.
Referenced by dsp_oss_setchnorder().
int chn_poll | ( | struct pcm_channel * | c, |
int | ev, | ||
struct thread * | td | ||
) |
Definition at line 897 of file channel.c.
References pcm_channel::bufsoft, c, CHN_F_MMAP, CHN_F_TRIGGERED, CHN_LOCKASSERT, chn_pollreset(), chn_polltrigger(), chn_start(), pcm_channel::flags, and sndbuf_getsel().
Referenced by dsp_poll().
|
static |
Definition at line 296 of file channel.c.
References pcm_channel::bufsoft, c, CHN_LOCKASSERT, and sndbuf_updateprevtotal().
Referenced by chn_poll().
|
static |
Determine channel is ready for I/O.
1 | = ready for I/O |
0 | = not ready for I/O |
Definition at line 273 of file channel.c.
References pcm_channel::bufsoft, c, CHN_F_MMAP, CHN_LOCKASSERT, pcm_channel::direction, pcm_channel::flags, pcm_channel::lw, PCMDIR_PLAY, sndbuf_getfree(), sndbuf_getprevtotal(), sndbuf_getready(), and sndbuf_gettotal().
Referenced by chn_poll(), and chn_wakeup().
|
static |
Definition at line 526 of file channel.c.
References amt, b, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_F_MMAP, CHN_LOCKASSERT, chn_wakeup(), pcm_channel::feeder, pcm_channel::flags, sndbuf_dispose(), sndbuf_feed(), sndbuf_getfree(), sndbuf_getready(), and pcm_channel::xruns.
Referenced by chn_rdintr().
|
static |
Definition at line 569 of file channel.c.
References c, chn_dmaupdate(), CHN_LOCKASSERT, chn_rdfeed(), chn_trigger(), and PCMTRIG_EMLDMARD.
Referenced by chn_intr_locked().
int chn_read | ( | struct pcm_channel * | c, |
struct uio * | buf | ||
) |
Definition at line 589 of file channel.c.
References buf, pcm_channel::bufsoft, c, CHN_F_ABORTING, CHN_F_DEAD, CHN_F_NBIO, CHN_F_NOTRIGGER, CHN_LOCK, CHN_LOCKASSERT, chn_sleep(), chn_start(), CHN_STOPPED, chn_timeout, CHN_UNLOCK, pcm_channel::dev, pcm_channel::flags, pcm_channel::name, sndbuf_dispose(), sndbuf_getbufofs(), sndbuf_getready(), sndbuf_getreadyptr(), and sndbuf_getsize().
Referenced by dsp_io_ops().
int chn_reset | ( | struct pcm_channel * | c, |
uint32_t | fmt, | ||
uint32_t | spd | ||
) |
Definition at line 1129 of file channel.c.
References c, CHN_F_BITPERFECT, CHN_F_RESET, chn_latency, CHN_LOCKASSERT, chn_resetbuf(), chn_setformat(), chn_setlatency(), chn_setparam(), chn_setspeed(), pcm_channel::dev, pcm_channel::devinfo, pcm_channel::feedcount, pcm_channel::flags, fmt, pcm_channel::interrupts, pcm_channel::methods, pcm_getflags(), r, SD_F_BITPERFECT, spd, pcm_channel::timeout, and pcm_channel::xruns.
Referenced by chn_notify(), dsp_close(), dsp_open(), sysctl_dev_pcm_vchanformat(), sysctl_dev_pcm_vchanrate(), vchan_create(), and vchan_destroy().
void chn_resetbuf | ( | struct pcm_channel * | c | ) |
Definition at line 750 of file channel.c.
References b, pcm_channel::blocks, pcm_channel::bufhard, pcm_channel::bufsoft, c, and sndbuf_reset().
Referenced by chn_reset(), chn_resizebuf(), and dsp_ioctl().
|
static |
Definition at line 1778 of file channel.c.
References b, blkcnt, blksz, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_2NDBUFMAXSIZE, chn_calclatency(), CHN_DIRSTR, CHN_EMPTY, CHN_F_HAS_SIZE, CHN_F_MMAP, CHN_F_TRIGGERED, CHN_F_VIRTUAL, chn_latency, CHN_LATENCY_MAX, CHN_LOCK, CHN_LOCKASSERT, CHN_N_BLOCKSIZE, chn_notify(), chn_resetbuf(), CHN_UNLOCK, chn_usefrags, pcm_channel::dev, pcm_channel::devinfo, pcm_channel::direction, pcm_channel::flags, pcm_channel::latency, limit, pcm_channel::lw, pcm_channel::methods, pcm_channel::parentchannel, PCMDIR_PLAY, PCMDIR_REC, round_blksz(), round_pow2(), snd_verbose, sndbuf_getalign(), sndbuf_getblkcnt(), sndbuf_getblksz(), sndbuf_getmaxsize(), sndbuf_getsize(), sndbuf_getspd(), sndbuf_remalloc(), sndbuf_setblksz(), sndbuf_xbytes(), and pcm_channel::timeout.
Referenced by chn_setblocksize(), chn_setlatency(), and chn_setparam().
int chn_setblocksize | ( | struct pcm_channel * | c, |
int | blkcnt, | ||
int | blksz | ||
) |
Definition at line 1983 of file channel.c.
References blkcnt, blksz, c, CHN_LOCKASSERT, and chn_resizebuf().
Referenced by dsp_ioctl().
int chn_setformat | ( | struct pcm_channel * | c, |
uint32_t | format | ||
) |
Definition at line 2061 of file channel.c.
References AFMT_CHANNEL, AFMT_PASSTHROUGH, AFMT_PASSTHROUGH_CHANNEL, AFMT_PASSTHROUGH_EXTCHANNEL, c, chn_setparam(), pcm_channel::dev, format, pcm_channel::format, SND_FORMAT, snd_verbose, speed, and pcm_channel::speed.
Referenced by chn_reset(), chn_setmatrix(), and dsp_ioctl().
int chn_setlatency | ( | struct pcm_channel * | c, |
int | latency | ||
) |
Definition at line 1975 of file channel.c.
References c, CHN_LOCKASSERT, and chn_resizebuf().
Referenced by chn_notify(), chn_reset(), and dsp_oss_policy().
int chn_setmatrix | ( | struct pcm_channel * | c, |
struct pcmchan_matrix * | m | ||
) |
Definition at line 1482 of file channel.c.
References AFMT_CONVERTIBLE, c, pcmchan_matrix::channels, CHN_LOCKASSERT, chn_setformat(), pcmchan_matrix::ext, pcm_channel::format, pcmchan_matrix::id, m, pcm_channel::matrix, SND_CHN_MATRIX_PCMCHANNEL, and SND_FORMAT.
Referenced by chn_oss_setorder().
int chn_setmute_matrix | ( | struct pcm_channel * | c, |
int | vc, | ||
int | vt, | ||
int | mute | ||
) |
Definition at line 1418 of file channel.c.
References c, CHN_LOCKASSERT, pcm_channel::muted, SND_CHN_T_BEGIN, SND_CHN_T_END, SND_CHN_T_STEP, SND_CHN_T_VOL_0DB, SND_VOL_C_BEGIN, SND_VOL_C_END, SND_VOL_C_MASTER, SND_VOL_C_MAX, SND_VOL_C_STEP, and SND_VOL_C_VAL.
Referenced by chn_setmute_multi().
int chn_setmute_multi | ( | struct pcm_channel * | c, |
int | vc, | ||
int | mute | ||
) |
Definition at line 1400 of file channel.c.
References c, chn_setmute_matrix(), SND_CHN_LEFT_MASK, SND_CHN_RIGHT_MASK, and SND_CHN_T_MAX.
Referenced by dsp_ioctl_channel().
int chn_setparam | ( | struct pcm_channel * | c, |
uint32_t | format, | ||
uint32_t | speed | ||
) |
Definition at line 1991 of file channel.c.
References pcm_channel::bufhard, c, pcmchan_caps::caps, chn_getcaps(), CHN_LOCKASSERT, chn_resizebuf(), CHN_STARTED, pcm_channel::devinfo, feeder_chain(), feeder_rate_round, format, pcm_channel::format, pcm_channel::methods, RANGE, sndbuf_getfmt(), sndbuf_getspd(), sndbuf_setspd(), speed, and pcm_channel::speed.
Referenced by chn_reset(), chn_setformat(), and chn_setspeed().
int chn_setspeed | ( | struct pcm_channel * | c, |
uint32_t | speed | ||
) |
Definition at line 2032 of file channel.c.
References AFMT_PASSTHROUGH, AFMT_PASSTHROUGH_RATE, c, chn_setparam(), pcm_channel::dev, format, pcm_channel::format, snd_verbose, speed, and pcm_channel::speed.
Referenced by chn_reset(), and dsp_ioctl().
int chn_setvolume | ( | struct pcm_channel * | c, |
int | left, | ||
int | right | ||
) |
Definition at line 1310 of file channel.c.
References c, chn_setvolume_matrix(), left, right, SND_CHN_T_FL, SND_CHN_T_FR, and SND_VOL_C_MASTER.
int chn_setvolume_matrix | ( | struct pcm_channel * | c, |
int | vc, | ||
int | vt, | ||
int | val | ||
) |
Definition at line 1342 of file channel.c.
References c, CHN_LOCKASSERT, SND_CHN_T_BEGIN, SND_CHN_T_END, SND_CHN_T_STEP, SND_CHN_T_VOL_0DB, SND_VOL_0DB_MAX, SND_VOL_0DB_MIN, SND_VOL_C_BEGIN, SND_VOL_C_END, SND_VOL_C_MASTER, SND_VOL_C_MAX, SND_VOL_C_STEP, SND_VOL_C_VAL, SND_VOL_CALC_VAL, val, and pcm_channel::volume.
Referenced by chn_setvolume(), and chn_setvolume_multi().
int chn_setvolume_multi | ( | struct pcm_channel * | c, |
int | vc, | ||
int | left, | ||
int | right, | ||
int | center | ||
) |
Definition at line 1322 of file channel.c.
References c, chn_setvolume_matrix(), left, right, SND_CHN_LEFT_MASK, SND_CHN_RIGHT_MASK, and SND_CHN_T_MAX.
Referenced by chn_syncstate(), dsp_ioctl_channel(), mixer_ioctl_channel(), and mixer_set_softpcmvol().
|
static |
Definition at line 334 of file channel.c.
References c, CHN_F_DEAD, CHN_F_SLEEPING, CHN_LOCKASSERT, pcm_channel::flags, pcm_channel::intr_cv, pcm_channel::lock, and pcm_channel::timeout.
Referenced by chn_read(), chn_sync(), and chn_write().
u_int32_t chn_start | ( | struct pcm_channel * | c, |
int | force | ||
) |
Definition at line 674 of file channel.c.
References b, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_BUF_PARENT, CHN_DIRSTR, CHN_EMPTY, CHN_F_CLOSING, CHN_F_HAS_VCHAN, CHN_F_NOTRIGGER, CHN_F_TRIGGERED, CHN_F_VIRTUAL, CHN_LOCKASSERT, CHN_STARTED, chn_trigger(), pcm_channel::dev, pcm_channel::direction, pcm_channel::feedcount, pcm_channel::flags, pcm_channel::interrupts, pcm_channel::parentchannel, PCMDIR_PLAY, PCMDIR_REC, PCMTRIG_START, snd_verbose, sndbuf_fillsilence_rl(), sndbuf_getalign(), sndbuf_getfree(), sndbuf_getready(), sndbuf_getsize(), sndbuf_getspd(), sndbuf_setrun(), sndbuf_xbytes(), pcm_channel::timeout, and pcm_channel::xruns.
Referenced by chn_notify(), chn_poll(), chn_read(), chn_sync(), chn_write(), dsp_ioctl(), dsp_oss_syncstart(), sysctl_dev_pcm_vchanformat(), and sysctl_dev_pcm_vchanrate().
int chn_sync | ( | struct pcm_channel * | c, |
int | threshold | ||
) |
Definition at line 766 of file channel.c.
References b, blksz, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_BUF_PARENT, CHN_F_ABORTING, CHN_F_CLOSING, CHN_F_DEAD, CHN_LOCKASSERT, chn_sleep(), chn_start(), CHN_STOPPED, chn_syncdelay, count, pcm_channel::dev, pcm_channel::direction, pcm_channel::flags, PCMDIR_PLAY, snd_verbose, sndbuf_acquire(), sndbuf_clear(), sndbuf_getalign(), sndbuf_getblkcnt(), sndbuf_getblksz(), sndbuf_getfree(), sndbuf_getmaxsize(), sndbuf_getready(), sndbuf_getsize(), sndbuf_getspd(), sndbuf_xbytes(), and pcm_channel::timeout.
Referenced by chn_flush(), and dsp_ioctl().
int chn_syncdestroy | ( | struct pcm_channel * | c | ) |
Remove channel from a sync group, if there is one.
This function is initially intended for the following conditions:
SNDCTL_DSP_SYNCSTART
ioctl)c
is locked or not.)c | channel device to be started or closed |
Definition at line 2554 of file channel.c.
References c, free, pcmchan_syncgroup::id, pcmchan_syncmember::parent, PCM_SG_LOCKASSERT, pcm_channel::sm, and snd_pcm_syncgroups.
Referenced by dsp_close(), and dsp_oss_syncgroup().
void chn_syncstate | ( | struct pcm_channel * | c | ) |
Definition at line 2090 of file channel.c.
References c, chn_findfeeder(), CHN_LOCKASSERT, chn_setvolume_multi(), pcm_channel::dev, pcm_channel::direction, snddev_info::eqpreamp, FEEDEQ_BASS, FEEDEQ_BYPASS, FEEDEQ_DISABLE, FEEDEQ_ENABLE, FEEDEQ_PREAMP, FEEDEQ_STATE, FEEDEQ_TREBLE, FEEDER_EQ, FEEDER_VOLUME, pcm_channel::feederflags, snddev_info::flags, left, m, mix_get(), mix_getparent(), snddev_info::mixer_dev, snd_mixer::parent, pcm_channel::parentsnddev, PCMDIR_PLAY, right, SD_F_EQ_BYPASSED, SD_F_EQ_ENABLED, SD_F_SOFTPCMVOL, SND_VOL_C_MASTER, and state.
Referenced by chn_trigger(), and feeder_chain().
int chn_trigger | ( | struct pcm_channel * | c, |
int | go | ||
) |
Definition at line 2192 of file channel.c.
References b, pcm_channel::bufhard, c, snddev_info::channels, CHN_INSERT_HEAD, CHN_LOCK, CHN_LOCKASSERT, CHN_REMOVE, chn_syncstate(), CHN_UNLOCK, pcm_channel::dev, pcm_channel::devinfo, go, pcm_channel::methods, pcm_channel::name, pcm_channel::parentsnddev, PCM_LOCK, PCM_UNLOCK, PCMTRIG_ABORT, PCMTRIG_COMMON, PCMTRIG_EMLDMARD, PCMTRIG_EMLDMAWR, PCMTRIG_START, PCMTRIG_STOP, SND_DMA, snd_verbose, sndbuf_dmabounce(), and pcm_channel::trigger.
Referenced by chn_abort(), chn_flush(), chn_kill(), chn_rdintr(), chn_start(), and chn_wrintr().
|
static |
Definition at line 129 of file channel.c.
References c, pcm_channel::channels, CHN_FOREACH, CHN_LOCK, CHN_SETVOLUME, CHN_UNLOCK, chn_vpc_reset(), PCM_ACQUIRE, pcm_devclass, PCM_LOCK, PCM_REGISTERED, PCM_RELEASE, PCM_UNLOCK, PCM_WAIT, reset, SND_CHN_T_VOL_0DB, and SND_VOL_C_PCM.
Referenced by sysctl_hw_snd_vpc_0db(), and sysctl_hw_snd_vpc_reset().
void chn_vpc_reset | ( | struct pcm_channel * | c, |
int | vc, | ||
int | force | ||
) |
Definition at line 1584 of file channel.c.
References c, CHN_LOCKASSERT, CHN_SETVOLUME, chn_vpc_autoreset, SND_CHN_T_BEGIN, SND_CHN_T_END, SND_CHN_T_STEP, SND_CHN_T_VOL_0DB, SND_VOL_C_BEGIN, SND_VOL_C_END, and pcm_channel::volume.
Referenced by chn_init(), chn_vpc_proc(), and dsp_open().
|
static |
Definition at line 304 of file channel.c.
References pcm_channel::bufsoft, c, pcm_channel::children, CHN_BROADCAST, CHN_EMPTY, CHN_F_SLEEPING, CHN_FOREACH, CHN_LOCK, CHN_LOCKASSERT, chn_polltrigger(), CHN_UNLOCK, chn_wakeup(), pcm_channel::flags, pcm_channel::intr_cv, and sndbuf_getsel().
Referenced by chn_rdfeed(), chn_wakeup(), and chn_wrfeed().
|
static |
Definition at line 392 of file channel.c.
References amt, b, pcm_channel::bufhard, pcm_channel::bufsoft, c, CHN_F_CLOSING, CHN_F_MMAP, CHN_LOCKASSERT, chn_wakeup(), pcm_channel::feeder, pcm_channel::flags, sndbuf_acquire(), sndbuf_feed(), sndbuf_getfree(), sndbuf_getready(), sndbuf_getsize(), sndbuf_xbytes(), and pcm_channel::xruns.
Referenced by chn_wrintr().
|
static |
Definition at line 439 of file channel.c.
References c, chn_dmaupdate(), CHN_LOCKASSERT, chn_trigger(), chn_wrfeed(), and PCMTRIG_EMLDMAWR.
Referenced by chn_intr_locked().
int chn_write | ( | struct pcm_channel * | c, |
struct uio * | buf | ||
) |
The idea is that, while set with CHN_F_NOTRIGGER, a channel isn't playing, but without this we end up with "interrupt timeout / channel dead".
Definition at line 459 of file channel.c.
References buf, pcm_channel::bufsoft, c, CHN_F_ABORTING, CHN_F_DEAD, CHN_F_NBIO, CHN_F_NOTRIGGER, CHN_LOCK, CHN_LOCKASSERT, chn_sleep(), chn_start(), CHN_STOPPED, chn_timeout, CHN_UNLOCK, pcm_channel::dev, pcm_channel::flags, pcm_channel::name, sndbuf_acquire(), sndbuf_getbufofs(), sndbuf_getfree(), sndbuf_getfreeptr(), and sndbuf_getsize().
Referenced by dsp_io_ops().
MTX_SYSINIT | ( | pcm_syncgroup | , |
& | snd_pcm_syncgroups_mtx, | ||
"PCM channel sync group lock" | , | ||
MTX_DEF | |||
) |
|
static |
Definition at line 1616 of file channel.c.
References CHN_2NDBUFMAXSIZE, and round_pow2().
Referenced by chn_calclatency(), and chn_resizebuf().
|
static |
Definition at line 1600 of file channel.c.
Referenced by chn_calclatency(), chn_resizebuf(), and round_blksz().
uint32_t snd_afmt2str | ( | uint32_t | afmt, |
char * | buf, | ||
size_t | len | ||
) |
Definition at line 1099 of file channel.c.
References afmt, AFMT_CHANNEL, AFMT_ENCODING, AFMT_EXTCHANNEL, afmt_tab, AFMTSTR_LEN, buf, len, name, and SND_FORMAT.
Referenced by sysctl_dev_pcm_vchanformat().
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
int snd_fmtvalid | ( | uint32_t | fmt, |
uint32_t * | fmtlist | ||
) |
Definition at line 982 of file channel.c.
References AFMT_ENCODING, AFMT_PASSTHROUGH, and fmt.
Referenced by chn_notify(), feeder_chain(), snd_fmtbest(), snd_fmtbestfunc(), vchan_create(), and vchan_setformat().
uint32_t snd_str2afmt | ( | const char * | req | ) |
Definition at line 1031 of file channel.c.
References afmt, AFMT_CHANNEL_MAX, AFMT_EXTCHANNEL_MAX, afmt_tab, alias1, alias2, name, req, and SND_FORMAT.
Referenced by sysctl_dev_pcm_vchanformat(), and vchan_create().
|
static |
Definition at line 56 of file channel.c.
References chn_latency, CHN_LATENCY_MAX, req, and val.
|
static |
Definition at line 79 of file channel.c.
References chn_latency_profile, CHN_LATENCY_PROFILE_MAX, req, and val.
|
static |
Definition at line 102 of file channel.c.
References chn_timeout, CHN_TIMEOUT_MAX, req, and val.
|
static |
Definition at line 156 of file channel.c.
References chn_vol_0db_pcm, chn_vpc_proc(), req, SND_VOL_0DB_MAX, and val.
|
static |
Definition at line 178 of file channel.c.
References chn_vol_0db_pcm, chn_vpc_proc(), req, SND_VOL_0DB_PCM, and val.
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
report_soft_formats | , | ||
CTLFLAG_RW | , | ||
& | report_soft_formats, | ||
0 | , | ||
"report software-emulated formats" | |||
) |
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
report_soft_matrix | , | ||
CTLFLAG_RW | , | ||
& | report_soft_matrix, | ||
0 | , | ||
"report software-emulated channel matrixing" | |||
) |
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
syncdelay | , | ||
CTLFLAG_RWTUN | , | ||
& | chn_syncdelay, | ||
0 | , | ||
"append (0-1000) millisecond trailing buffer delay on each sync" | |||
) |
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
usefrags | , | ||
CTLFLAG_RWTUN | , | ||
& | chn_usefrags, | ||
0 | , | ||
"prefer setfragments() over setblocksize()" | |||
) |
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
vpc_autoreset | , | ||
CTLFLAG_RWTUN | , | ||
& | chn_vpc_autoreset, | ||
0 | , | ||
"automatically reset channels volume to 0db" | |||
) |
SYSCTL_PROC | ( | _hw_snd | , |
OID_AUTO | , | ||
latency | , | ||
CTLTYPE_INT|CTLFLAG_RWTUN| | CTLFLAG_MPSAFE, | ||
0 | , | ||
sizeof(int) | , | ||
sysctl_hw_snd_latency | , | ||
"I" | , | ||
"buffering latency (0=low ... 10=high)" | |||
) |
SYSCTL_PROC | ( | _hw_snd | , |
OID_AUTO | , | ||
latency_profile | , | ||
CTLTYPE_INT|CTLFLAG_RWTUN| | CTLFLAG_MPSAFE, | ||
0 | , | ||
sizeof(int) | , | ||
sysctl_hw_snd_latency_profile | , | ||
"I" | , | ||
"buffering latency profile (0=aggressive 1=safe)" | |||
) |
SYSCTL_PROC | ( | _hw_snd | , |
OID_AUTO | , | ||
timeout | , | ||
CTLTYPE_INT|CTLFLAG_RWTUN| | CTLFLAG_MPSAFE, | ||
0 | , | ||
sizeof(int) | , | ||
sysctl_hw_snd_timeout | , | ||
"I" | , | ||
"interrupt timeout (1 - 10) seconds" | |||
) |
SYSCTL_PROC | ( | _hw_snd | , |
OID_AUTO | , | ||
vpc_0db | , | ||
CTLTYPE_INT|CTLFLAG_RWTUN| | CTLFLAG_NEEDGIANT, | ||
0 | , | ||
sizeof(int) | , | ||
sysctl_hw_snd_vpc_0db | , | ||
"I" | , | ||
"0db relative level" | |||
) |
SYSCTL_PROC | ( | _hw_snd | , |
OID_AUTO | , | ||
vpc_reset | , | ||
CTLTYPE_INT|CTLFLAG_RW| | CTLFLAG_NEEDGIANT, | ||
0 | , | ||
sizeof(int) | , | ||
sysctl_hw_snd_vpc_reset | , | ||
"I" | , | ||
"reset volume on all channels" | |||
) |
uint32_t afmt |
Definition at line 998 of file channel.c.
Referenced by snd_afmt2str(), and snd_str2afmt().
const struct { ... } afmt_tab[] |
Referenced by snd_afmt2str(), and snd_str2afmt().
char * alias1 |
Definition at line 997 of file channel.c.
Referenced by snd_str2afmt().
char * alias2 |
Definition at line 997 of file channel.c.
Referenced by snd_str2afmt().
int chn_latency = CHN_LATENCY_DEFAULT |
Definition at line 53 of file channel.c.
Referenced by chn_notify(), chn_reset(), chn_resizebuf(), SLIST_HEAD(), and sysctl_hw_snd_latency().
int chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT |
Definition at line 76 of file channel.c.
Referenced by chn_calclatency(), SLIST_HEAD(), and sysctl_hw_snd_latency_profile().
|
static |
Definition at line 198 of file channel.c.
Referenced by chn_sync().
|
static |
Definition at line 99 of file channel.c.
Referenced by chn_init(), chn_read(), chn_write(), and sysctl_hw_snd_timeout().
|
static |
Definition at line 197 of file channel.c.
Referenced by chn_resizebuf().
|
static |
Definition at line 126 of file channel.c.
Referenced by chn_init(), sysctl_hw_snd_vpc_0db(), and sysctl_hw_snd_vpc_reset().
|
static |
Definition at line 122 of file channel.c.
Referenced by chn_vpc_reset().
char* name |
Definition at line 997 of file channel.c.
Referenced by snd_afmt2str(), and snd_str2afmt().
int report_soft_formats = 1 |
Definition at line 45 of file channel.c.
Referenced by chn_getformats().
int report_soft_matrix = 1 |
Definition at line 49 of file channel.c.
Referenced by chn_oss_getmask().
struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(snd_pcm_syncgroups) |
syncgroups' master list
Each time a channel syncgroup is created, it's added to this list. This list should only be accessed with
See SNDCTL_DSP_SYNCGROUP for more information.
Definition at line 222 of file channel.c.
Referenced by chn_syncdestroy(), dsp_oss_syncgroup(), and dsp_oss_syncstart().
struct mtx snd_pcm_syncgroups_mtx |
Channel sync group lock.
Clients should acquire this lock without holding any channel locks before touching syncgroups or the main syncgroup list.
Definition at line 212 of file channel.c.
Referenced by dsp_oss_syncstart().