Lines Matching full:mixer
40 static MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
45 "control channel pcm/rec volume, bypassing real mixer device");
70 * mixer's controls. A change in value indicates that persistent
71 * mixer applications should update their displays.
105 .d_name = "mixer",
331 mixer_get(struct snd_mixer *mixer, int dev) in mixer_get() argument
333 if ((dev < SOUND_MIXER_NRDEVICES) && (mixer->devs & (1 << dev))) { in mixer_get()
334 if (mixer->mutedevs & (1 << dev)) in mixer_get()
335 return (mixer->level_muted[dev]); in mixer_get()
337 return (mixer->level[dev]); in mixer_get()
344 mix_setmutedevs(struct snd_mixer *mixer, u_int32_t mutedevs) in mix_setmutedevs() argument
349 mutedevs &= mixer->devs; in mix_setmutedevs()
350 delta = (mixer->mutedevs ^ mutedevs) & mixer->devs; in mix_setmutedevs()
351 mixer->mutedevs = mutedevs; in mix_setmutedevs()
357 mixer->level_muted[i] = mixer->level[i]; in mix_setmutedevs()
358 mixer_set(mixer, i, 0, 0); in mix_setmutedevs()
360 mixer_set(mixer, i, 0, mixer->level_muted[i]); in mix_setmutedevs()
366 mixer_setrecsrc(struct snd_mixer *mixer, u_int32_t src) in mixer_setrecsrc() argument
372 d = device_get_softc(mixer->dev); in mixer_setrecsrc()
375 if (!(d->flags & SD_F_MPSAFE) && mtx_owned(mixer->lock) != 0) in mixer_setrecsrc()
379 src &= mixer->recdevs; in mixer_setrecsrc()
381 src = mixer->recdevs & SOUND_MASK_MIC; in mixer_setrecsrc()
383 src = mixer->recdevs & SOUND_MASK_MONITOR; in mixer_setrecsrc()
385 src = mixer->recdevs & SOUND_MASK_LINE; in mixer_setrecsrc()
386 if (src == 0 && mixer->recdevs != 0) in mixer_setrecsrc()
387 src = (1 << (ffs(mixer->recdevs) - 1)); in mixer_setrecsrc()
389 MIXER_SET_UNLOCK(mixer, dropmtx); in mixer_setrecsrc()
390 recsrc = MIXER_SETRECSRC(mixer, src); in mixer_setrecsrc()
391 MIXER_SET_LOCK(mixer, dropmtx); in mixer_setrecsrc()
393 mixer->recsrc = recsrc; in mixer_setrecsrc()
399 mixer_getrecsrc(struct snd_mixer *mixer) in mixer_getrecsrc() argument
401 return mixer->recsrc; in mixer_getrecsrc()
416 * @param m mixer context container thing
451 * @param m mixer context container thing
508 * used by the rest of the mixer code.
518 * @param m mixer device context container thing
654 ("invalid mixer type=%d", type)); in mixer_obj_create()
657 snprintf(m->name, sizeof(m->name), "%s:mixer", in mixer_obj_create()
664 "primary pcm mixer" : "secondary pcm mixer"); in mixer_obj_create()
690 ("%s(): illegal mixer type=%d", __func__, m->type)); in mixer_delete()
692 /* mixer uninit can sleep --hps */ in mixer_delete()
754 "mixer%d", unit); in mixer_init()
763 device_printf(dev, "Mixer \"%s\" -> \"%s\":", in mixer_init()
768 device_printf(dev, "Mixer \"%s\":", in mixer_init()
779 device_printf(dev, "Soft PCM mixer ENABLED\n"); in mixer_init()
803 ("%s(): illegal mixer type=%d", __func__, m->type)); in mixer_uninit()
817 /* mixer uninit can sleep --hps */ in mixer_uninit()
1135 * pcm or rec volume is by doing mixer ioctl in mixer_ioctl_channel()
1137 * on its open fd, rather than cracky mixer bypassing here. in mixer_ioctl_channel()
1256 * Certain ioctls may be made on any type of device (audio, mixer, in mixer_ioctl_cmd()
1364 if (strcmp(name, "mixer") == 0) { in mixer_clone()
1401 snprintf(mi->id, sizeof(mi->id), "mixer%d (n/a)", unit); in mixer_oss_mixerinfo_unavail()
1402 snprintf(mi->name, sizeof(mi->name), "pcm%d:mixer (unavailable)", unit); in mixer_oss_mixerinfo_unavail()
1410 * This function searches for a mixer based on the numeric ID stored
1412 * current mixer handling the request is provided. Note, however, that
1413 * this ioctl may be made with any sound device (audio, mixer, midi).
1415 * @note Caller must not hold any PCM device, channel, or mixer locks.
1434 * If probing the device handling the ioctl, make sure it's a mixer in mixer_oss_mixerinfo()
1435 * device. (This ioctl is valid on audio, mixer, and midi devices.) in mixer_oss_mixerinfo()
1445 * begin by iterating over PCM devices and search for our mixer. in mixer_oss_mixerinfo()
1483 * - a specific mixer device has been locked, so be in mixer_oss_mixerinfo()
1488 snprintf(mi->id, sizeof(mi->id), "mixer%d", i); in mixer_oss_mixerinfo()
1494 * a pcm and mixer devices, so this is hardcoded to 0. in mixer_oss_mixerinfo()
1501 * string that identifies the mixer better than in mixer_oss_mixerinfo()
1527 * Mixer extensions currently aren't supported, so in mixer_oss_mixerinfo()
1534 * @note The priority field is for mixer applets to in mixer_oss_mixerinfo()
1535 * determine which mixer should be the default, with 0 in mixer_oss_mixerinfo()
1541 * default mixer. Other devices use values 1 to 9 in mixer_oss_mixerinfo()
1546 snprintf(mi->devnode, sizeof(mi->devnode), "/dev/mixer%d", i); in mixer_oss_mixerinfo()
1560 * Allow the sound driver to use the mixer lock to protect its mixer