MIXER(8)

NAME
mixer - manipulate soundcard mixer controls

SYNOPSIS
mixer [-f device] [-d unit] [-os] [dev[.control[=value]]] ...
mixer [-d unit] [-os] -a
mixer -h

DESCRIPTION
The mixer utility is used to set and display soundcard mixer device controls.

The options are as follows:

-a  Print the values for all mixer devices available in the system (see FILES).

-d unit
    Change the default audio card to unit. The unit has to be an integer value. To see what unit values are available, look at the number each mixer device has by running mixer.

-f device
    Open device as the mixer device (see FILES).

-h  Print a help message.

-o  Print mixer values in a format suitable for use inside scripts. The mixer's header (name, audio card name, ...) will not be printed.

-s  Print only the recording source(s) of the mixer device.

The list of mixer devices that may be modified are:

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.

Without any arguments, mixer displays all information for each one of the mixer's supported devices to stdout. If the dev argument is specified, mixer displays only the values for dev. More than one device may be specified.

Commands use the following format:

Name | Action
dev | Display all controls
dev.control | Display only the specified control
dev.control=value | Set control value

The available controls are as follows (replace dev with one of the available devices):
Name | Value
dev.volume | [[+|-]lvol[:[+|-]rvol]]
dev.mute | {0|1|^}
dev.recsrc | {+|-|^|=}

The dev.volume control modifies a device's volume. The optional lvol and/or rvol values have to be specified. The values have to be normalized 32-bit floats, from 0.0 to 1.0 inclusivly. If no "." character is present, the value is treated like a percentage, for backwards compatibility. If the 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.

The dev.mute control (un)mutes a device. The following values are available:

0   unmutes dev.

1   mutes dev.

^   toggles the mute of dev.

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:

^   toggles dev of possible recording devices

+   adds dev to possible recording devices

-   removes dev from possible recording devices

=   sets the recording device to dev

FILES
/dev/mixerN
    The mixer device, where N is the number of that device, for example /dev/mixer0. PCM cards and mixers have a 1:1 relationship, which means that mixer0 is the mixer for pcm0 and so on. By default, mixer prints both the audio card's number and the mixer associated with it in the form of pcmN:mixer. The /dev/mixer file, although it doesn't exist in the filesystem, points to the default mixer device and is the file mixer opens when the -f device option has not been specified.

EXAMPLES

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=^

Set mic and toggle line recording sources:

$ mixer mic.recsrc=+ line.recsrc=^

Dump /dev/mixer0 information to a file and retrieve back later

$ mixer -f /dev/mixer0 -o > info

...

$ mixer -f /dev/mixer0 `cat info`

SEE ALSO
mixer(3), sound(4), sysctl(8)

HISTORY
The mixer utility first appeared in FreeBSD 2.0.5 and was rewritten completely in FreeBSD 14.0.

AUTHORS
Christos Margiolis <christos@FreeBSD.org>