Lines Matching defs:mixer
38 SND_DECLARE_FILE("$FreeBSD: releng/10.2/sys/dev/sound/pcm/mixer.c 271193 2014-09-06 15:24:48Z mav $");
40 static MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
46 "control channel pcm/rec volume, bypassing real mixer device");
71 * mixer's controls. A change in value indicates that persistent
72 * mixer applications should update their displays.
106 .d_name = "mixer",
110 * Keeps a count of mixer devices; used only by OSSv4 SNDCTL_SYSINFO ioctl.
331 mixer_get(struct snd_mixer *mixer, int dev)
333 if ((dev < SOUND_MIXER_NRDEVICES) && (mixer->devs & (1 << dev)))
334 return mixer->level[dev];
340 mixer_setrecsrc(struct snd_mixer *mixer, u_int32_t src)
346 d = device_get_softc(mixer->dev);
349 if (!(d->flags & SD_F_MPSAFE) && mtx_owned(mixer->lock) != 0)
353 src &= mixer->recdevs;
355 src = mixer->recdevs & SOUND_MASK_MIC;
357 src = mixer->recdevs & SOUND_MASK_MONITOR;
359 src = mixer->recdevs & SOUND_MASK_LINE;
360 if (src == 0 && mixer->recdevs != 0)
361 src = (1 << (ffs(mixer->recdevs) - 1));
363 MIXER_SET_UNLOCK(mixer, dropmtx);
364 recsrc = MIXER_SETRECSRC(mixer, src);
365 MIXER_SET_LOCK(mixer, dropmtx);
367 mixer->recsrc = recsrc;
373 mixer_getrecsrc(struct snd_mixer *mixer)
375 return mixer->recsrc;
390 * @param m mixer context container thing
425 * @param m mixer context container thing
482 * used by the rest of the mixer code.
492 * @param m mixer device context container thing
622 ("invalid mixer type=%d", type));
625 snprintf(m->name, sizeof(m->name), "%s:mixer",
632 "primary pcm mixer" : "secondary pcm mixer");
658 ("%s(): illegal mixer type=%d", __func__, m->type));
660 /* mixer uninit can sleep --hps */
730 UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);
757 device_printf(dev, "Soft PCM mixer ENABLED\n");
781 ("%s(): illegal mixer type=%d", __func__, m->type));
806 /* mixer uninit can sleep --hps */
1126 * pcm or rec volume is by doing mixer ioctl
1128 * on its open fd, rather than cracky mixer bypassing here.
1247 * Certain ioctls may be made on any type of device (audio, mixer,
1341 if (strcmp(name, "mixer") == 0) {
1373 * This function searches for a mixer based on the numeric ID stored
1375 * current mixer handling the request is provided. Note, however, that
1376 * this ioctl may be made with any sound device (audio, mixer, midi).
1378 * @note Caller must not hold any PCM device, channel, or mixer locks.
1397 * If probing the device handling the ioctl, make sure it's a mixer
1398 * device. (This ioctl is valid on audio, mixer, and midi devices.)
1409 * begin by iterating over PCM devices and search for our mixer.
1433 * - a specific mixer device has been locked, so be
1438 snprintf(mi->id, sizeof(mi->id), "mixer%d", i);
1444 * a pcm and mixer devices, so this is hardcoded to 0.
1451 * string that identifies the mixer better than
1483 * @note The priority field is for mixer applets to
1484 * determine which mixer should be the default, with 0
1490 * default mixer. Other devices use values 1 to 9
1514 * Allow the sound driver to use the mixer lock to protect its mixer