MIXER(8)
π MIXER(8) β ok bestie, let's talk about your soundcard
Hey hi hello π«Ά this one's from section 8 of the System Manager's Manual (the system manager's manual, yes, very official, very demure) and it's literally all about mixer, the little utility that lets you touch your soundcard's mixer controls instead of just yelling at your speakers. Slay.
β¨ NAME β¨
mixer β manipulate soundcard mixer controls π (read: poke at the volume, the mutes, the recording sources, all of it)
π SYNOPSIS π
mixer [-f device] [-d pcmX | X] [-os] [dev[.control[=value]]] ...
mixer [-os] -a
mixer -h
That's it. That's the whole vibe check. πΈ
π¦ DESCRIPTION π¦
The mixer utility is used to set and display soundcard mixer device controls. Periodt. π
The options, bestie (all of them, no cap)
-aβ Print the values for all mixer devices available in the system (peep βFILESβ π).-d pcmX | Xβ Change the default audio card topcmX, whereXis the device's unit number (so like, forpcm0, the unit number is0). Wanna see how to list all available audio devices in the system? βEXAMPLESβ has you covered β¨.-f deviceβ Opendeviceas the mixer device (again, see βFILESβ).-hβ Print a help message. Tiny little cry for help, but make it documentation π₯Ί.-oβ Print mixer values in a format suitable for use inside scripts. The mixer's header (name, audio card name, ...) will not be printed. Clean. Minimal. Main character energy.-sβ Print only the recording source(s) of the mixer device. Just the recsrc, nothing else, obsessed.
The mixer devices you can actually mess with π
vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2,
rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin,
phout, video, radio, and monitor.
Not all mixer devices are available. π Yes I know, devastating. Not every card has every knob. It's giving "limited edition."
What happens with no arguments
Without any arguments, mixer displays all information for each one of the mixer's supported devices to stdout. All the tea β, dumped straight out.
If the dev argument is specified, mixer displays only the values for dev. And you can pass more than one device β go off, specify as many as you want π
.
Commands, and how they're formatted
Commands use the following format:
devβ Display all controlsdev.controlβ Display only the specified controldev.control=valueβ Set control value
The available controls ποΈ
(Replace dev with one of the available devices, iykyk.)
dev.volumeβ value:vol|[+|-]lvol[%][:[+|-]rvol[%]]dev.muteβ value:0|1|^dev.muteβ value:off|on|toggledev.recsrcβ value:^|+|-|=dev.recsrcβ value:toggle|add|remove|set
dev.volume β the volume one π₯
The dev.volume control modifies a device's volume. The optional lvol and/or rvol values have to be specified. The values should typically be decimal numbers between 0 and 1 with at most 2 digits after the decimal point. A trailing percent sign means the value should be treated as a percentage of 1.0, rather than an absolute value. So like, 70% means the same as 0.7. Math is mathing β¨.
If the left or right volume values are prefixed with + or -, the value following will be used as a relative adjustment, modifying the current settings by the amount specified. Note that relative percentages are still relative to 1.0, not to the current value. So if the volume is currently 0.40 and an adjustment of +20% is specified, then the final volume will be set to 0.60. See? It's not adding to what you have, it's measuring from 1.0. That's the trick. π
Volume can also be set using the shorthand dev=value. This syntax does not apply to other controls β volume only, bestie, don't get greedy.
dev.mute β the (un)mute one π€«
The dev.mute control (un)mutes a device. The following values are available:
0 | offβ unmutes dev1 | onβ mutes dev^ | toggleβ toggles the mute of dev
dev.recsrc β the recording source one ποΈ
The dev.recsrc control modifies the recording sources of a mixer. mixer marks devices which can be used as a recording source with rec. Recording sources are marked with src. To modify the recording source you can use one of the following modifiers on a rec device:
^ | toggleβ toggles dev of possible recording devices+ | addβ adds dev to possible recording devices- | removeβ removes dev from possible recording devices= | setβ makes dev the only recording device. Only. The. One. π
π FILES π
/dev/mixerXβ The mixer device, whereXis the unit number of that device./dev/dsp*devices and/dev/mixer*devices have a1:1relationship, which means that, for instance,/dev/mixer0is the mixer device for/dev/dsp0. Matching set, cute π./dev/mixerβ Alias to the default device's mixer device.mixeropens this when the-f deviceoption is not specified.
π EXAMPLES π
List all available audio devices in the system:
$ mixer -a | grep ^pcm
Increase the vol device's volume by 5%:
$ mixer vol=+5%
Change the volume for the vol device of the /dev/mixer0 mixer device to 0.65:
$ mixer -f /dev/mixer0 vol.volume=0.65
Increase the mic device's left volume by 0.10 and decrease the right volume by 0.05:
$ mixer mic.volume=+0.10:-0.05
Toggle the mute for vol:
$ mixer vol.mute=toggle
Add mic and remove line from the recording devices:
$ mixer mic.recsrc=add line.recsrc=remove
Dump /dev/mixer0 information to a file and retrieve back later:
$ mixer -f /dev/mixer0 -o > info
...
$ mixer -f /dev/mixer0 `cat info`
That last one is giving save-state energy and honestly? Iconic. πΎβ¨
π SEE ALSO π
mixer(3), sound(4), sysctl(8) β go read those too, bestie, knowledge is free π«Ά
π°οΈ HISTORY π°οΈ
The mixer utility first appeared in FreeBSD 2.0.5 and was rewritten completely in FreeBSD 14.0. Glow-up of the century, no notes. π
π AUTHORS π
Christos Margiolis <christos@FreeBSD.org> β thank you for your service, king π«‘π
And that's the whole page, bestie!! πΈ This little gem came to you from the Debian build, dated February 26, 2026 β so go forth, mix responsibly, and remember: relative percentages are relative to 1.0, not to your current volume. Bye bye!! πβ¨π¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2021 Christos Margiolis <christos@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms