Lines Matching defs:mixer

38 SND_DECLARE_FILE("$FreeBSD: releng/11.0/sys/dev/sound/pcm/mixer.c 280442 2015-03-24 16:31:22Z hselasky $");
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",
109 * Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl.
330 mixer_get(struct snd_mixer *mixer, int dev)
332 if ((dev < SOUND_MIXER_NRDEVICES) && (mixer->devs & (1 << dev)))
333 return mixer->level[dev];
339 mixer_setrecsrc(struct snd_mixer *mixer, u_int32_t src)
345 d = device_get_softc(mixer->dev);
348 if (!(d->flags & SD_F_MPSAFE) && mtx_owned(mixer->lock) != 0)
352 src &= mixer->recdevs;
354 src = mixer->recdevs & SOUND_MASK_MIC;
356 src = mixer->recdevs & SOUND_MASK_MONITOR;
358 src = mixer->recdevs & SOUND_MASK_LINE;
359 if (src == 0 && mixer->recdevs != 0)
360 src = (1 << (ffs(mixer->recdevs) - 1));
362 MIXER_SET_UNLOCK(mixer, dropmtx);
363 recsrc = MIXER_SETRECSRC(mixer, src);
364 MIXER_SET_LOCK(mixer, dropmtx);
366 mixer->recsrc = recsrc;
372 mixer_getrecsrc(struct snd_mixer *mixer)
374 return mixer->recsrc;
389 * @param m mixer context container thing
424 * @param m mixer context container thing
481 * used by the rest of the mixer code.
491 * @param m mixer device context container thing
621 ("invalid mixer type=%d", type));
624 snprintf(m->name, sizeof(m->name), "%s:mixer",
631 "primary pcm mixer" : "secondary pcm mixer");
657 ("%s(): illegal mixer type=%d", __func__, m->type));
659 /* mixer uninit can sleep --hps */
729 UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);
756 device_printf(dev, "Soft PCM mixer ENABLED\n");
780 ("%s(): illegal mixer type=%d", __func__, m->type));
805 /* mixer uninit can sleep --hps */
1125 * pcm or rec volume is by doing mixer ioctl
1127 * on its open fd, rather than cracky mixer bypassing here.
1246 * Certain ioctls may be made on any type of device (audio, mixer,
1338 if (strcmp(name, "mixer") == 0) {
1370 * This function searches for a mixer based on the numeric ID stored
1372 * current mixer handling the request is provided. Note, however, that
1373 * this ioctl may be made with any sound device (audio, mixer, midi).
1375 * @note Caller must not hold any PCM device, channel, or mixer locks.
1394 * If probing the device handling the ioctl, make sure it's a mixer
1395 * device. (This ioctl is valid on audio, mixer, and midi devices.)
1406 * begin by iterating over PCM devices and search for our mixer.
1430 * - a specific mixer device has been locked, so be
1435 snprintf(mi->id, sizeof(mi->id), "mixer%d", i);
1441 * a pcm and mixer devices, so this is hardcoded to 0.
1448 * string that identifies the mixer better than
1480 * @note The priority field is for mixer applets to
1481 * determine which mixer should be the default, with 0
1487 * default mixer. Other devices use values 1 to 9
1511 * Allow the sound driver to use the mixer lock to protect its mixer