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
29 .Nd manipulate soundcard mixer controls
35 .Op Ar dev Ns Op Cm \&. Ns Ar control Ns Op Cm \&= Ns Ar value
46 utility is used to set and display soundcard mixer device controls.
48 The options are as follows:
49 .Bl -tag -width "-f device"
51 Print the values for all mixer devices available in the system
54 Change the default audio card to
56 The unit has to be an integer value.
57 To see what unit values are available, look at the number each mixer device has by running
67 Print mixer values in a format suitable for use inside scripts.
68 The mixer's header (name, audio card name, ...) will not be printed.
70 Print only the recording source(s) of the mixer device.
73 The list of mixer devices that may be modified are:
74 .Bd -ragged -offset indent
75 .Cm vol , bass , treble , synth , pcm , speaker , line , mic , cd , mix ,
78 .Cm line1 , line2 , line3 ,
79 .Cm dig1 , dig2 , dig3 ,
80 .Cm phin , phout , video , radio ,
85 Not all mixer devices are available.
87 Without any arguments,
89 displays all information for each one of the mixer's supported devices to
93 argument is specified,
95 displays only the values for
97 More than one device may be specified.
99 Commands use the following format:
100 .Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent
101 .It Sy Name Ta Sy Action
102 .It Ar dev Ta Display all controls
103 .It Ar dev Ns Cm \&. Ns Ar control Ta Display only the specified control
104 .It Ar dev Ns Cm \&. Ns Ar control Ns Cm \&= Ns Ar value Ta Set control value
107 The available controls are as follows (replace
109 with one of the available devices):
111 .Bl -column xxxxxxxxxxxxxxxxxxxxxxxx -offset indent
112 .It Sy Name Ta Sy Value
113 .It Ar dev Cm .volume Ta Xo
115 .Oo Cm \&+ | Cm \&- Oc Ar lvol Oo % Oc
116 .Oo Cm \&: Oo Cm \&+ | Cm \&- Oc Ar rvol Oo % Oc Oc
118 .It Ar dev Cm .mute Ta Cm 0 | 1 | ^
119 .It Ar dev Cm .recsrc Ta Cm ^ | + | - | =
124 .Ar dev Ns Cm .volume
125 control modifies a device's volume.
130 values have to be specified.
131 The values should typically be decimal numbers between 0 and 1 with at most 2
132 digits after the decimal point.
133 A trailing percent sign indicates that the value should be treated as a
134 percentage of 1.0, rather than an absolute value.
135 Thus, 70% means the same as 0.7.
136 If the left or right volume values are prefixed with
140 the value following will be used as a relative adjustment, modifying the
141 current settings by the amount specified.
142 Note that relative percentages are still relative to 1.0, not to the current
144 If the volume is currently 0.40 and an adjustment of +20% is specified, then
145 thet final volume will be set to 0.60.
147 Volume can also be set using the shorthand
148 .Ar dev Ns Cm =value .
149 This syntax does not apply to other controls.
153 control (un)mutes a device.
154 The following values are available:
155 .Bl -tag -width = -offset indent
168 .Ar dev Ns Cm .recsrc
169 control modifies the recording sources of a mixer.
171 marks devices which can be used as a recording source with
173 Recording sources are marked with
175 To modify the recording source you can use one of the following modifiers
179 .Bl -tag -width = -offset indent
183 of possible recording devices
187 to possible recording devices
191 from possible recording devices
193 sets the recording device to
197 .Bl -tag -width /dev/mixerN -compact
199 The mixer device, where
201 is the number of that device, for example
203 PCM cards and mixers have a 1:1 relationship, which means that
210 prints both the audio card's number and the mixer associated with it
215 file, although it does not exist in the filesystem, points to the default
216 mixer device and is the file
220 option has not been specified.
223 Change the volume for the
227 mixer device to 0.65:
228 .Bd -literal -offset indent
229 $ mixer -f /dev/mixer0 vol.volume=0.65
234 device's left volume by 0.10 and decrease the right
236 .Bd -literal -offset indent
237 $ mixer mic.volume=+0.10:-0.05
242 .Bd -literal -offset indent
251 .Bd -literal -offset indent
252 $ mixer mic.recsrc=+ line.recsrc=^
257 information to a file and retrieve back later:
258 .Bd -literal -offset indent
259 $ mixer -f /dev/mixer0 -o > info
261 $ mixer -f /dev/mixer0 `cat info`
270 utility first appeared in
272 and was rewritten completely in
275 .An Christos Margiolis Aq Mt christos@FreeBSD.org