2 .\" Copyright (c) 2021 Christos Margiolis <christos@FreeBSD.org>
4 .\" Permission is hereby granted, free of charge, to any person obtaining a copy
5 .\" of this software and associated documentation files (the "Software"), to deal
6 .\" in the Software without restriction, including without limitation the rights
7 .\" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 .\" copies of the Software, and to permit persons to whom the Software is
9 .\" furnished to do so, subject to the following conditions:
11 .\" The above copyright notice and this permission notice shall be included in
12 .\" all copies or substantial portions of the Software.
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30 .Nd manipulate soundcard mixer controls
36 .Op Ar dev Ns Op . Ns Ar control Ns Op = Ns Ar value
47 utility is used to set and display soundcard mixer device controls.
49 The options are as follows:
50 .Bl -tag -width "-f device"
52 Print the values for all mixer devices available in the system (see FILES).
54 Change the default audio card to
56 The unit has to be an integer value. To see what unit values are available, look
57 at the number each mixer device has by running
62 as the mixer device (see FILES).
66 Print mixer values in a format suitable for use inside scripts. The
67 mixer's header (name, audio card name, ...) will not be printed.
69 Print only the recording source(s) of the mixer device.
72 The list of mixer devices that may be modified are:
73 .Bd -ragged -offset indent
74 vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix,
75 pcm2, rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3,
76 phin, phout, video, radio, and monitor.
79 Not all mixer devices are available.
81 Without any arguments,
83 displays all information for each one of the mixer's supported devices to
87 argument is specified,
89 displays only the values for
91 More than one device may be specified.
93 Commands use the following format:
95 .Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent
97 .It "dev Display all controls"
98 .It "dev.control Display only the specified control"
99 .It "dev.control=value Set control value"
102 The available controls are as follows (replace
104 with one of the available devices):
105 .Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent
107 .It "dev.volume [[+|-]lvol[:[+|-]rvol]]"
108 .It "dev.mute {0|1|^}"
109 .It "dev.recsrc {+|-|^|=}"
114 control modifies a device's volume. The optional
118 values have to be specified. The values have to be normalized 32-bit floats,
119 from 0.0 to 1.0 inclusivly. If no "." character is present, the value is treated
120 like a percentage, for backwards compatibility.
121 If the the left or right volume values are prefixed with
125 the value following will be used as a relative adjustment, modifying the
126 current settings by the amount specified.
130 control (un)mutes a device. The following values are available:
131 .Bl -tag -width = -offset indent
145 control modifies the recording sources of a mixer.
147 marks devices which can be used as a recording source with
149 Recording sources are marked with
151 To modify the recording source you can use one of the following modifiers
155 .Bl -tag -width = -offset indent
159 of possible recording devices
163 to possible recording devices
167 from possible recording devices
169 sets the recording device to
173 .Bl -tag -width /dev/mixerN -compact
175 The mixer device, where
177 is the number of that device, for example
179 PCM cards and mixers have a 1:1 relationship, which means that
183 and so on. By default,
185 prints both the audio card's number and the mixer associated with it
190 file, although it doesn't exist in the filesystem, points to the default
191 mixer device and is the file
195 option has not been specified.
199 Change the volume for the
203 mixer device to 0.65:
204 .Bl -tag -width Ds -offset indent
205 .It $ mixer -f /dev/mixer0 vol.volume=0.65
210 device's left volume by 0.10 and decrease the right
212 .Bl -tag -width Ds -offset indent
213 .It $ mixer mic.volume=+0.10:-0.05
218 .Bl -tag -width Ds -offset indent
219 .It $ mixer vol.mute=^
227 .Bl -tag -width Ds -offset indent
228 .It $ mixer mic.recsrc=+ line.recsrc=^
233 information to a file and retrieve back later
234 .Bl -tag -width Ds -offset indent
235 .It $ mixer -f /dev/mixer0 -o > info
237 .It $ mixer -f /dev/mixer0 `cat info`
246 utility first appeared in FreeBSD 2.0.5 and was rewritten completely in
249 .An Christos Margiolis Aq Mt christos@FreeBSD.org