xref: /netbsd-src/usr.bin/mixerctl/mixerctl.1 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\" $NetBSD: mixerctl.1,v 1.20 2006/02/25 01:19:22 wiz Exp $
2.\"
3.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Author: Lennart Augustsson
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software
17.\"    must display the following acknowledgement:
18.\"        This product includes software developed by the NetBSD
19.\"        Foundation, Inc. and its contributors.
20.\" 4. Neither the name of The NetBSD Foundation nor the names of its
21.\"    contributors may be used to endorse or promote products derived
22.\"    from this software without specific prior written permission.
23.\"
24.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34.\" POSSIBILITY OF SUCH DAMAGE.
35.\"
36.Dd January 23, 2004
37.Dt MIXERCTL 1
38.Os
39.Sh NAME
40.Nm mixerctl
41.Nd control audio mixing
42.Sh SYNOPSIS
43.Nm
44.Op Fl d Ar file
45.Op Fl n
46.Op Fl v
47.Fl a
48.Nm
49.Op Fl d Ar file
50.Op Fl n
51.Op Fl v
52.Ar name ...
53.Nm
54.Op Fl d Ar file
55.Op Fl n
56.Fl w
57.Ar name=value ...
58.Nm
59.Op Fl d Ar file
60.Op Fl n
61.Fl w
62.Ar name++ ...
63.Nm
64.Op Fl d Ar file
65.Op Fl n
66.Fl w
67.Ar name-- ...
68.Nm
69.Op Fl d Ar file
70.Op Fl n
71.Fl w
72.Ar name+=value ...
73.Nm
74.Op Fl d Ar file
75.Op Fl n
76.Fl w
77.Ar name-=value ...
78.Sh DESCRIPTION
79The
80.Nm
81command displays or sets various audio system mixing variables.
82If a list of variables is present on the command line, then
83.Nm
84prints the current value of those variables for the specified device.
85If the
86.Fl a
87flag is specified, all variables for the device are printed.
88If the
89.Fl w
90flag is specified,
91.Nm
92attempts to set the specified variables to the given values.
93.Pp
94The
95.Fl d
96flag can be used to give an alternative mixer device.
97The default is
98.Pa /dev/mixer .
99.Pp
100The
101.Fl n
102flag suppresses printing of the variable name.
103.Pp
104The
105.Fl v
106flag shows the possible values of enumeration and set valued
107variables.
108Enumerated values are shown in brackets
109.Pp Dq []
110and set values are shown in curly braces
111.Pq Dq {} .
112.Pp
113The exact set of controls that can be manipulated depends on
114the mixer.
115The general format (in both getting and setting a value) is
116.br
117.Va "class.name" = value
118.br
119.Va class
120can have values like
121.Li inputs
122or
123.Li outputs ,
124indicating that the control affects the input or output
125of the mixer, respectively.
126.Va name
127indicates what part of the mixer the control affects.
128Continuous mixer values, e.g., volume, have numeric values
129in the range 0\-255.
130If
131.Va value
132can be set for each channel independently, the values are printed
133separated by commas.
134Discrete mixer values, e.g., the recording source, have symbolic names.
135Depending on the mixer it may either be an enumeration or a set.
136.Pp
137The suffixes ++ and -- can be used to step through the values of a
138mixer control.
139For numeric controls, these operators increase or decrease, respectively,
140the value by an amount (the delta) suitable to make
141the control assume the next possible value.
142.Pp
143The operators += and -= change the value of a mixer control by the
144indicated number of steps.
145.Sh ENVIRONMENT
146.Bl -tag -width MIXERDEVICE
147.It Pa MIXERDEVICE
148the mixer device to use.
149.El
150.Sh FILES
151.Bl -tag -width /etc/mixerctl.conf -compact
152.It Pa /dev/mixer
153mixer audio device
154.It Pa /etc/mixerctl.conf
155mixer configuration file
156.El
157.Sh EXAMPLES
158The command
159.Dl "mixerctl -a -v"
160can produce
161.Bd -literal
162inputs.mic=0,0 volume
163inputs.mic.mute=off  [ off on ]
164inputs.cd=220,220 volume
165inputs.cd.mute=off  [ off on ]
166inputs.dac=220,220 volume
167inputs.dac.mute=off  [ off on ]
168record.record=220,220 volume
169record.record.source=mic  [ mic cd dac ]
170monitor.monitor=0 volume
171.Ed
172.Sh SEE ALSO
173.Xr audioctl 1 ,
174.Xr audio 4 ,
175.Xr mixerctl.conf 5 ,
176.Xr sysctl 8
177.Sh HISTORY
178The
179.Nm
180command first appeared in
181.Nx 1.3 .
182.Sh COMPATIBILITY
183The old
184.Fl f
185flag is still supported.
186This support will be removed eventually.
187