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