FreeBSD kernel sound device code
|
Go to the source code of this file.
Data Structures | |
struct | snd_mixer |
Macros | |
#define | MIXER_NAMELEN 16 |
#define | MIXER_SET_UNLOCK(x, y) |
#define | MIXER_SET_LOCK(x, y) |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_MIXER, "mixer", "mixer") |
SYSCTL_INT (_hw_snd, OID_AUTO, vpc_mixer_bypass, CTLFLAG_RWTUN, &mixer_bypass, 0, "control channel pcm/rec volume, bypassing real mixer device") | |
static struct cdev * | mixer_get_devt (device_t dev) |
static int | mixer_lookup (char *devname) |
static int | mixer_set_softpcmvol (struct snd_mixer *m, struct snddev_info *d, u_int left, u_int right) |
static int | mixer_set_eq (struct snd_mixer *m, struct snddev_info *d, u_int dev, u_int level) |
static int | mixer_set (struct snd_mixer *m, u_int dev, u_int32_t muted, u_int lev) |
static int | mixer_get (struct snd_mixer *mixer, int dev) |
void | mix_setmutedevs (struct snd_mixer *mixer, u_int32_t mutedevs) |
static int | mixer_setrecsrc (struct snd_mixer *mixer, u_int32_t src) |
static int | mixer_getrecsrc (struct snd_mixer *mixer) |
static int | mixer_get_recroute (struct snd_mixer *m, int *route) |
Retrieve the route number of the current recording device. More... | |
static int | mixer_set_recroute (struct snd_mixer *m, int route) |
Select a device for recording. More... | |
void | mix_setdevs (struct snd_mixer *m, u_int32_t v) |
void | mix_setrecdevs (struct snd_mixer *m, u_int32_t v) |
Record mask of available recording devices. More... | |
void | mix_setparentchild (struct snd_mixer *m, u_int32_t parent, u_int32_t childs) |
void | mix_setrealdev (struct snd_mixer *m, u_int32_t dev, u_int32_t realdev) |
u_int32_t | mix_getparent (struct snd_mixer *m, u_int32_t dev) |
u_int32_t | mix_getchild (struct snd_mixer *m, u_int32_t dev) |
u_int32_t | mix_getdevs (struct snd_mixer *m) |
u_int32_t | mix_getmutedevs (struct snd_mixer *m) |
u_int32_t | mix_getrecdevs (struct snd_mixer *m) |
void * | mix_getdevinfo (struct snd_mixer *m) |
static struct snd_mixer * | mixer_obj_create (device_t dev, kobj_class_t cls, void *devinfo, int type, const char *desc) |
int | mixer_delete (struct snd_mixer *m) |
struct snd_mixer * | mixer_create (device_t dev, kobj_class_t cls, void *devinfo, const char *desc) |
int | mixer_init (device_t dev, kobj_class_t cls, void *devinfo) |
int | mixer_uninit (device_t dev) |
int | mixer_reinit (device_t dev) |
static int | sysctl_hw_snd_hwvol_mixer (SYSCTL_HANDLER_ARGS) |
int | mixer_hwvol_init (device_t dev) |
void | mixer_hwvol_mute_locked (struct snd_mixer *m) |
void | mixer_hwvol_mute (device_t dev) |
void | mixer_hwvol_step_locked (struct snd_mixer *m, int left_step, int right_step) |
void | mixer_hwvol_step (device_t dev, int left_step, int right_step) |
int | mixer_busy (struct snd_mixer *m) |
int | mix_set (struct snd_mixer *m, u_int dev, u_int left, u_int right) |
int | mix_get (struct snd_mixer *m, u_int dev) |
int | mix_setrecsrc (struct snd_mixer *m, u_int32_t src) |
u_int32_t | mix_getrecsrc (struct snd_mixer *m) |
int | mix_get_type (struct snd_mixer *m) |
device_t | mix_get_dev (struct snd_mixer *m) |
static int | mixer_open (struct cdev *i_dev, int flags, int mode, struct thread *td) |
static int | mixer_close (struct cdev *i_dev, int flags, int mode, struct thread *td) |
static int | mixer_ioctl_channel (struct cdev *dev, u_long cmd, caddr_t arg, int mode, struct thread *td, int from) |
static int | mixer_ioctl (struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) |
static void | mixer_mixerinfo (struct snd_mixer *m, mixer_info *mi) |
int | mixer_ioctl_cmd (struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td, int from) |
static void | mixer_clone (void *arg, struct ucred *cred, char *name, int namelen, struct cdev **dev) |
static void | mixer_sysinit (void *p) |
static void | mixer_sysuninit (void *p) |
SYSINIT (mixer_sysinit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysinit, NULL) | |
SYSUNINIT (mixer_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, mixer_sysuninit, NULL) | |
int | mixer_oss_mixerinfo (struct cdev *i_dev, oss_mixerinfo *mi) |
Handler for SNDCTL_MIXERINFO. More... | |
struct mtx * | mixer_get_lock (struct snd_mixer *m) |
int | mix_get_locked (struct snd_mixer *m, u_int dev, int *pleft, int *pright) |
int | mix_set_locked (struct snd_mixer *m, u_int dev, int left, int right) |
Variables | |
static int | mixer_bypass = 1 |
static u_int16_t | snd_mixerdefaults [SOUND_MIXER_NRDEVICES] |
static char * | snd_mixernames [SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES |
static d_open_t | mixer_open |
static d_close_t | mixer_close |
static d_ioctl_t | mixer_ioctl |
static struct cdevsw | mixer_cdevsw |
int | mixer_count = 0 |
static eventhandler_tag | mixer_ehtag = NULL |
#define MIXER_SET_LOCK | ( | x, | |
y | |||
) |
#define MIXER_SET_UNLOCK | ( | x, | |
y | |||
) |
|
static |
int mix_get | ( | struct snd_mixer * | m, |
u_int | dev | ||
) |
Definition at line 1016 of file mixer.c.
References dev, m, mixer_get(), snd_mtxlock, and snd_mtxunlock.
Referenced by chn_syncstate(), and sysctl_es137x_single_pcm_mixer().
device_t mix_get_dev | ( | struct snd_mixer * | m | ) |
Definition at line 1066 of file mixer.c.
References m.
Referenced by uaudio_mixer_init_sub(), uaudio_mixer_set(), uaudio_mixer_setrecsrc(), and uaudio_mixer_uninit_sub().
int mix_get_locked | ( | struct snd_mixer * | m, |
u_int | dev, | ||
int * | pleft, | ||
int * | pright | ||
) |
Definition at line 1576 of file mixer.c.
References dev, m, and mixer_get().
int mix_get_type | ( | struct snd_mixer * | m | ) |
Definition at line 1058 of file mixer.c.
References m, and pcmchan_matrix::type.
u_int32_t mix_getchild | ( | struct snd_mixer * | m, |
u_int32_t | dev | ||
) |
void * mix_getdevinfo | ( | struct snd_mixer * | m | ) |
Definition at line 645 of file mixer.c.
References m.
Referenced by ac97mix_init(), ac97mix_reinit(), ac97mix_set(), ac97mix_setrecsrc(), ac97mix_uninit(), ad1816mix_set(), ad1816mix_setrecsrc(), alsmix_set(), alsmix_setrecsrc(), burgundy_init(), burgundy_set(), cmimix_init(), cmimix_set(), cmimix_setrecsrc(), emu_dspmixer_init(), emu_dspmixer_set(), emu_dspmixer_setrecsrc(), emu_dspmixer_uninit(), envy24htmixer_init(), envy24htmixer_reinit(), envy24htmixer_set(), envy24htmixer_setrecsrc(), envy24htmixer_uninit(), envy24mixer_init(), envy24mixer_reinit(), envy24mixer_set(), envy24mixer_setrecsrc(), envy24mixer_uninit(), es1370_mixinit(), es1370_mixset(), es1370_mixsetrecsrc(), essmix_init(), essmix_set(), essmix_setrecsrc(), hdaa_audio_ctl_ossmixer_init(), hdaa_audio_ctl_ossmixer_set(), hdaa_audio_ctl_ossmixer_setrecsrc(), hdspemixer_init(), hdspemixer_set(), mssmix_init(), mssmix_set(), mssmix_setrecsrc(), onyx_init(), onyx_set(), sb16mix_init(), sb16mix_set(), sb16mix_setrecsrc(), sbmix_init(), sbmix_set(), sbpromix_init(), sbpromix_set(), sbpromix_setrecsrc(), screamer_init(), screamer_set(), snapper_init(), snapper_set(), sv_mix_set(), sv_mix_setrecsrc(), tumbler_init(), tumbler_set(), ua_mixer_init(), ua_mixer_set(), ua_mixer_setrecsrc(), ua_mixer_uninit(), ymmix_init(), ymmix_set(), and ymmix_setrecsrc().
u_int32_t mix_getdevs | ( | struct snd_mixer * | m | ) |
Definition at line 627 of file mixer.c.
References m.
Referenced by dsp_ioctl(), emu_dspmixer_init(), mixer_ioctl_channel(), mixer_ioctl_cmd(), sysctl_es137x_single_pcm_mixer(), and ymmix_init().
u_int32_t mix_getmutedevs | ( | struct snd_mixer * | m | ) |
Definition at line 633 of file mixer.c.
References m.
Referenced by mixer_ioctl_cmd().
u_int32_t mix_getparent | ( | struct snd_mixer * | m, |
u_int32_t | dev | ||
) |
Definition at line 611 of file mixer.c.
Referenced by chn_syncstate().
u_int32_t mix_getrecdevs | ( | struct snd_mixer * | m | ) |
Definition at line 639 of file mixer.c.
References m.
Referenced by emu_dspmixer_init(), es1370_mixsetrecsrc(), hdaa_audio_ctl_ossmixer_setrecsrc(), mixer_ioctl_cmd(), and sysctl_es137x_single_pcm_mixer().
u_int32_t mix_getrecsrc | ( | struct snd_mixer * | m | ) |
Definition at line 1044 of file mixer.c.
References m, mixer_getrecsrc(), snd_mtxlock, and snd_mtxunlock.
Referenced by sysctl_es137x_single_pcm_mixer().
int mix_set | ( | struct snd_mixer * | m, |
u_int | dev, | ||
u_int | left, | ||
u_int | right | ||
) |
Definition at line 1002 of file mixer.c.
References dev, left, m, mixer_set(), right, snd_mtxlock, and snd_mtxunlock.
Referenced by emu_dspmixer_set(), hdaa_audio_ctl_set_defaults(), and sysctl_es137x_single_pcm_mixer().
int mix_set_locked | ( | struct snd_mixer * | m, |
u_int | dev, | ||
int | left, | ||
int | right | ||
) |
void mix_setdevs | ( | struct snd_mixer * | m, |
u_int32_t | v | ||
) |
Definition at line 489 of file mixer.c.
References snddev_info::flags, m, SD_F_EQ, and SD_F_SOFTPCMVOL.
Referenced by ac97mix_init(), ad1816mix_init(), alsmix_init(), burgundy_init(), cmimix_init(), emu_dspmixer_init(), emu_efxmixer_init(), envy24htmixer_init(), envy24mixer_init(), es1370_mixinit(), essmix_init(), hdaa_audio_ctl_ossmixer_init(), hdspemixer_init(), mssmix_init(), onyx_init(), sb16mix_init(), sbmix_init(), sbpromix_init(), screamer_init(), snapper_init(), sv_mix_init(), sysctl_es137x_single_pcm_mixer(), tumbler_init(), uaudio_mixer_init_sub(), and ymmix_init().
void mix_setmutedevs | ( | struct snd_mixer * | mixer, |
u_int32_t | mutedevs | ||
) |
Definition at line 351 of file mixer.c.
References mixer, and mixer_set().
Referenced by mixer_hwvol_mute_locked(), and mixer_ioctl_cmd().
void mix_setparentchild | ( | struct snd_mixer * | m, |
u_int32_t | parent, | ||
u_int32_t | childs | ||
) |
Definition at line 579 of file mixer.c.
Referenced by ac97mix_init(), hdaa_audio_ctl_ossmixer_init(), and uaudio_mixer_init_sub().
void mix_setrealdev | ( | struct snd_mixer * | m, |
u_int32_t | dev, | ||
u_int32_t | realdev | ||
) |
Definition at line 602 of file mixer.c.
Referenced by ac97mix_init(), hdaa_audio_ctl_ossmixer_init(), and uaudio_mixer_init_sub().
void mix_setrecdevs | ( | struct snd_mixer * | m, |
u_int32_t | v | ||
) |
Record mask of available recording devices.
Calling functions are responsible for defining the mask of available recording devices. This function records that value in a structure used by the rest of the mixer code.
This function also populates a structure used by the SNDCTL_DSP_*RECSRC* family of ioctls that are part of OSSV4. All recording device labels are concatenated in ascending order corresponding to their routing numbers. (Ex: a system might have 0 => 'vol', 1 => 'cd', 2 => 'line', etc.) For now, these labels are just the standard recording device names (cd, line1, etc.), but will eventually be fully dynamic and user controlled.
m | mixer device context container thing |
v | mask of recording devices |
Definition at line 529 of file mixer.c.
References m, and snd_mixernames.
Referenced by ac97mix_init(), ad1816mix_init(), alsmix_init(), cmimix_init(), emu_dspmixer_init(), emu_efxmixer_init(), envy24htmixer_init(), envy24mixer_init(), es1370_mixinit(), essmix_init(), hdaa_audio_ctl_ossmixer_init(), mssmix_init(), sb16mix_init(), sbmix_init(), sbpromix_init(), sv_mix_init(), sysctl_es137x_single_pcm_mixer(), and uaudio_mixer_init_sub().
int mix_setrecsrc | ( | struct snd_mixer * | m, |
u_int32_t | src | ||
) |
Definition at line 1030 of file mixer.c.
References m, mixer_setrecsrc(), snd_mtxlock, snd_mtxunlock, and src.
Referenced by emu_dspmixer_setrecsrc(), hdaa_autorecsrc_handler(), and sysctl_es137x_single_pcm_mixer().
int mixer_busy | ( | struct snd_mixer * | m | ) |
Definition at line 994 of file mixer.c.
References m.
Referenced by sysctl_es137x_single_pcm_mixer().
|
static |
Definition at line 1382 of file mixer.c.
References dev, snddev_info::mixer_dev, name, pcm_devclass, PCM_REGISTERED, and snd_unit.
Referenced by mixer_sysinit().
|
static |
Definition at line 1099 of file mixer.c.
References m, PCM_REGISTERED, snd_mtxlock, and snd_mtxunlock.
struct snd_mixer * mixer_create | ( | device_t | dev, |
kobj_class_t | cls, | ||
void * | devinfo, | ||
const char * | desc | ||
) |
Definition at line 712 of file mixer.c.
References desc, dev, devinfo, m, mixer_count, mixer_obj_create(), and MIXER_TYPE_SECONDARY.
Referenced by emu_dspmixer_init().
int mixer_delete | ( | struct snd_mixer * | m | ) |
Definition at line 693 of file mixer.c.
References m, mixer_count, MIXER_TYPE_SECONDARY, snd_mtxfree(), and pcmchan_matrix::type.
Referenced by emu_dspmixer_uninit().
|
static |
Definition at line 338 of file mixer.c.
Referenced by mix_get(), mix_get_locked(), mixer_hwvol_step_locked(), and mixer_ioctl_cmd().
|
static |
Definition at line 118 of file mixer.c.
References dev, and snddev_info::mixer_dev.
Referenced by mixer_hwvol_init(), mixer_hwvol_mute(), mixer_hwvol_step(), mixer_reinit(), and mixer_uninit().
struct mtx * mixer_get_lock | ( | struct snd_mixer * | m | ) |
Definition at line 1567 of file mixer.c.
References m.
Referenced by onyx_set(), snapper_set(), tumbler_set(), ua_mixer_set(), ua_mixer_setrecsrc(), and uaudio_mixer_init_sub().
|
static |
Retrieve the route number of the current recording device.
OSSv4 assigns routing numbers to recording devices, unlike the previous API which relied on a fixed table of device numbers and names. This function returns the routing number of the device currently selected for recording.
For now, this function is kind of a goofy compatibility stub atop the existing sound system. (For example, in theory, the old sound system allows multiple recording devices to be specified via a bitmask.)
m | mixer context container thing |
0 | success |
EIDRM | no recording device found (generally not possible) |
Definition at line 430 of file mixer.c.
References m.
Referenced by mixer_ioctl_cmd().
|
static |
Definition at line 406 of file mixer.c.
References mixer.
Referenced by mix_getrecsrc(), and mixer_ioctl_cmd().
int mixer_hwvol_init | ( | device_t | dev | ) |
Definition at line 916 of file mixer.c.
References dev, m, mixer_get_devt(), and sysctl_hw_snd_hwvol_mixer().
Referenced by m3_pci_attach(), and uaudio_attach_sub().
void mixer_hwvol_mute | ( | device_t | dev | ) |
Definition at line 943 of file mixer.c.
References dev, m, mixer_get_devt(), mixer_hwvol_mute_locked(), snd_mtxlock, and snd_mtxunlock.
Referenced by m3_intr().
void mixer_hwvol_mute_locked | ( | struct snd_mixer * | m | ) |
Definition at line 937 of file mixer.c.
References m, and mix_setmutedevs().
Referenced by mixer_hwvol_mute(), and uaudio_hid_rx_callback().
void mixer_hwvol_step | ( | device_t | dev, |
int | left_step, | ||
int | right_step | ||
) |
Definition at line 981 of file mixer.c.
References dev, m, mixer_get_devt(), mixer_hwvol_step_locked(), snd_mtxlock, and snd_mtxunlock.
Referenced by m3_intr().
void mixer_hwvol_step_locked | ( | struct snd_mixer * | m, |
int | left_step, | ||
int | right_step | ||
) |
Definition at line 956 of file mixer.c.
References left, m, mixer_get(), mixer_set(), and right.
Referenced by mixer_hwvol_step(), and uaudio_hid_rx_callback().
int mixer_init | ( | device_t | dev, |
kobj_class_t | cls, | ||
void * | devinfo | ||
) |
Definition at line 725 of file mixer.c.
References dev, devinfo, snddev_info::eqpreamp, snddev_info::flags, m, mixer_cdevsw, mixer_count, snddev_info::mixer_dev, mixer_obj_create(), mixer_set(), mixer_setrecsrc(), MIXER_TYPE_PRIMARY, PCMMINOR, SD_F_EQ, SD_F_EQ_DEFAULT, SD_F_EQ_MASK, SD_F_SOFTPCMVOL, SND_DEV_CTL, snd_mixerdefaults, snd_mixernames, snd_mkunit(), and val.
Referenced by ad1816_attach(), als_pci_attach(), atiixp_chip_post_init(), cmi_attach(), cs4281_pci_attach(), davbus_attach(), emu_pci_attach(), emu_pcm_attach(), envy24_pci_attach(), envy24ht_pci_attach(), es_pci_attach(), ess_attach(), fm801_pci_attach(), hdaa_pcm_attach(), hdspe_pcm_attach(), i2s_postattach(), ich_pci_attach(), m3_pci_attach(), mss_doattach(), nm_pci_attach(), pcmcsa_attach(), sb16_attach(), sb_attach(), sv_attach(), tr_pci_attach(), uaudio_attach_sub(), and via_attach().
|
static |
Definition at line 1232 of file mixer.c.
References snddev_info::flags, mixer_bypass, MIXER_CMD_CDEV, mixer_ioctl_channel(), mixer_ioctl_cmd(), PCM_ACQUIRE_QUICK, PCM_DETACHING, PCM_GIANT_ENTER, PCM_GIANT_LEAVE, PCM_REGISTERED, PCM_RELEASE_QUICK, and SD_F_VPC.
|
static |
Definition at line 1124 of file mixer.c.
References c, pcm_channel::channels, CHN_FOREACH, CHN_GETVOLUME, CHN_LOCK, CHN_LOCKASSERT, chn_setvolume_multi(), CHN_UNLOCK, dev, pcm_channel::direction, FEEDER_VOLUME, pcm_channel::feederflags, left, m, mix_getdevs(), PCMDIR_PLAY, PCMDIR_REC, pcm_channel::pid, right, SND_CHN_T_FL, SND_CHN_T_FR, snd_mtxlock, snd_mtxunlock, and SND_VOL_C_PCM.
Referenced by mixer_ioctl().
int mixer_ioctl_cmd | ( | struct cdev * | i_dev, |
u_long | cmd, | ||
caddr_t | arg, | ||
int | mode, | ||
struct thread * | td, | ||
int | from | ||
) |
Definition at line 1278 of file mixer.c.
References dsp_oss_audioinfo(), m, mix_getdevs(), mix_getmutedevs(), mix_getrecdevs(), mix_setmutedevs(), MIXER_CMD_CDEV, mixer_get(), mixer_get_recroute(), mixer_getrecsrc(), mixer_mixerinfo(), mixer_oss_mixerinfo(), mixer_set(), mixer_set_recroute(), mixer_setrecsrc(), snd_mtxlock, snd_mtxunlock, sound_oss_card_info(), and sound_oss_sysinfo().
Referenced by dsp_ioctl(), and mixer_ioctl().
|
static |
Definition at line 128 of file mixer.c.
References snd_mixernames.
Referenced by sysctl_hw_snd_hwvol_mixer().
|
static |
Definition at line 1265 of file mixer.c.
References m.
Referenced by mixer_ioctl_cmd().
|
static |
Definition at line 651 of file mixer.c.
References desc, dev, devinfo, m, MIXER_TYPE_PRIMARY, MIXER_TYPE_SECONDARY, snd_mtxcreate(), snd_mtxfree(), snd_mtxlock, pcmchan_matrix::type, and type.
Referenced by mixer_create(), and mixer_init().
|
static |
Definition at line 1076 of file mixer.c.
References m, PCM_DETACHING, PCM_REGISTERED, snd_mtxlock, and snd_mtxunlock.
int mixer_oss_mixerinfo | ( | struct cdev * | i_dev, |
oss_mixerinfo * | mi | ||
) |
Handler for SNDCTL_MIXERINFO.
This function searches for a mixer based on the numeric ID stored in oss_miserinfo::dev. If set to -1, then information about the current mixer handling the request is provided. Note, however, that this ioctl may be made with any sound device (audio, mixer, midi).
See http://manuals.opensound.com/developer/SNDCTL_MIXERINFO.html for more information.
i_dev | character device on which the ioctl arrived |
arg | user argument (oss_mixerinfo *) |
EINVAL | oss_mixerinfo::dev specified a bad value |
0 | success |
The only flag for
Mixer extensions currently aren't supported, so leave
XXX Described by Hannu@4Front, but not found in soundcard.h. strlcpy(mi->devnode, devtoname(d->mixer_dev), sizeof(mi->devnode)); mi->legacy_device = i;
Definition at line 1439 of file mixer.c.
References m, mixer_cdevsw, snddev_info::mixer_dev, PCM_DETACHING, pcm_devclass, PCM_LOCK, PCM_REGISTERED, PCM_UNLOCK, and PCM_UNLOCKASSERT.
Referenced by dsp_ioctl(), and mixer_ioctl_cmd().
int mixer_reinit | ( | device_t | dev | ) |
Definition at line 860 of file mixer.c.
References dev, m, mixer_get_devt(), mixer_set(), mixer_setrecsrc(), snd_mtxlock, and snd_mtxunlock.
Referenced by als_pci_resume(), atiixp_pci_resume(), cmi_resume(), cs4281_pci_resume(), ess_resume(), hdaa_resume(), ich_pci_resume(), m3_pci_resume(), nm_pci_resume(), sv_resume(), and tr_pci_resume().
|
static |
Definition at line 247 of file mixer.c.
References child, dev, snddev_info::flags, m, mixer_set_eq(), MIXER_SET_LOCK, mixer_set_softpcmvol(), MIXER_SET_UNLOCK, r, SD_F_EQ, SD_F_MPSAFE, and SD_F_SOFTPCMVOL.
Referenced by mix_set(), mix_set_locked(), mix_setmutedevs(), mixer_hwvol_step_locked(), mixer_init(), mixer_ioctl_cmd(), mixer_reinit(), and mixer_uninit().
|
static |
Definition at line 195 of file mixer.c.
References snddev_info::busy, c, chn_findfeeder(), CHN_FOREACH, CHN_LOCK, CHN_UNLOCK, dev, FEEDEQ_BASS, FEEDEQ_TREBLE, FEEDER_EQ, snddev_info::flags, snddev_info::lock, m, MIXER_SET_LOCK, MIXER_SET_UNLOCK, snddev_info::pcm, PCM_DETACHING, PCM_REGISTERED, and SD_F_MPSAFE.
Referenced by mixer_set().
|
static |
Select a device for recording.
This function sets a recording source based on a recording device's routing number. Said number is translated to an old school recdev mask and passed over mixer_setrecsrc.
m | mixer context container thing |
0 | success(?) |
EINVAL | User specified an invalid device number |
otherwise | error from mixer_setrecsrc |
Definition at line 465 of file mixer.c.
References m, and mixer_setrecsrc().
Referenced by mixer_ioctl_cmd().
|
static |
Definition at line 150 of file mixer.c.
References c, pcm_channel::channels, CHN_FOREACH, CHN_LOCK, chn_setvolume_multi(), CHN_UNLOCK, pcm_channel::direction, FEEDER_VOLUME, pcm_channel::feederflags, snddev_info::flags, left, snddev_info::lock, m, MIXER_SET_LOCK, MIXER_SET_UNLOCK, PCM_DETACHING, PCM_REGISTERED, PCMDIR_PLAY, right, SD_F_MPSAFE, and SND_VOL_C_MASTER.
Referenced by mixer_set().
|
static |
Definition at line 373 of file mixer.c.
References snddev_info::flags, mixer, MIXER_SET_LOCK, MIXER_SET_UNLOCK, SD_F_MPSAFE, and src.
Referenced by mix_setrecsrc(), mixer_init(), mixer_ioctl_cmd(), mixer_reinit(), mixer_set_recroute(), and mixer_uninit().
|
static |
Definition at line 1400 of file mixer.c.
References mixer_clone(), and mixer_ehtag.
|
static |
Definition at line 1408 of file mixer.c.
References mixer_ehtag.
int mixer_uninit | ( | device_t | dev | ) |
Definition at line 805 of file mixer.c.
References dev, m, mixer_count, snddev_info::mixer_dev, mixer_get_devt(), mixer_set(), mixer_setrecsrc(), MIXER_TYPE_PRIMARY, snd_mtxfree(), snd_mtxlock, snd_mtxunlock, and pcmchan_matrix::type.
Referenced by pcm_unregister(), and uaudio_detach_sub().
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 890 of file mixer.c.
References dev, error, m, mixer_lookup(), req, snd_mixernames, snd_mtxlock, and snd_mtxunlock.
Referenced by mixer_hwvol_init().
SYSCTL_INT | ( | _hw_snd | , |
OID_AUTO | , | ||
vpc_mixer_bypass | , | ||
CTLFLAG_RWTUN | , | ||
& | mixer_bypass, | ||
0 | , | ||
"control channel pcm/rec | volume, | ||
bypassing real mixer device" | |||
) |
SYSINIT | ( | mixer_sysinit | , |
SI_SUB_DRIVERS | , | ||
SI_ORDER_MIDDLE | , | ||
mixer_sysinit | , | ||
NULL | |||
) |
SYSUNINIT | ( | mixer_sysuninit | , |
SI_SUB_DRIVERS | , | ||
SI_ORDER_MIDDLE | , | ||
mixer_sysuninit | , | ||
NULL | |||
) |
|
static |
Definition at line 44 of file mixer.c.
Referenced by mixer_ioctl().
|
static |
Definition at line 102 of file mixer.c.
Referenced by mixer_init(), and mixer_oss_mixerinfo().
int mixer_count = 0 |
Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl.
Definition at line 113 of file mixer.c.
Referenced by mixer_create(), mixer_delete(), mixer_init(), mixer_uninit(), and sound_oss_sysinfo().
|
static |
Definition at line 115 of file mixer.c.
Referenced by mixer_sysinit(), and mixer_sysuninit().
|
static |
Definition at line 78 of file mixer.c.
Referenced by mixer_init().
|
static |
Definition at line 96 of file mixer.c.
Referenced by mix_setrecdevs(), mixer_init(), mixer_lookup(), and sysctl_hw_snd_hwvol_mixer().