xref: /netbsd-src/usr.bin/mixerctl/mixerctl.1 (revision a4a2a2151253a2b238debcd6ac09e977501fa6b1)
1*a4a2a215Sjoerg.\" $NetBSD: mixerctl.1,v 1.25 2010/05/14 17:20:06 joerg Exp $
2b88029fbSjdolecek.\"
39d5e7c9aSaugustss.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
49d5e7c9aSaugustss.\" All rights reserved.
59d5e7c9aSaugustss.\"
69d5e7c9aSaugustss.\" Author: Lennart Augustsson
79d5e7c9aSaugustss.\"
89d5e7c9aSaugustss.\" Redistribution and use in source and binary forms, with or without
99d5e7c9aSaugustss.\" modification, are permitted provided that the following conditions
109d5e7c9aSaugustss.\" are met:
119d5e7c9aSaugustss.\" 1. Redistributions of source code must retain the above copyright
129d5e7c9aSaugustss.\"    notice, this list of conditions and the following disclaimer.
139d5e7c9aSaugustss.\" 2. Redistributions in binary form must reproduce the above copyright
149d5e7c9aSaugustss.\"    notice, this list of conditions and the following disclaimer in the
159d5e7c9aSaugustss.\"    documentation and/or other materials provided with the distribution.
169d5e7c9aSaugustss.\"
179d5e7c9aSaugustss.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
189d5e7c9aSaugustss.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
199d5e7c9aSaugustss.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
203bc5599fSjtc.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
213bc5599fSjtc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
229d5e7c9aSaugustss.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
239d5e7c9aSaugustss.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
249d5e7c9aSaugustss.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
259d5e7c9aSaugustss.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
269d5e7c9aSaugustss.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
279d5e7c9aSaugustss.\" POSSIBILITY OF SUCH DAMAGE.
289d5e7c9aSaugustss.\"
295c6f9cb0Swiz.Dd August 15, 2008
309d5e7c9aSaugustss.Dt MIXERCTL 1
319d5e7c9aSaugustss.Os
329d5e7c9aSaugustss.Sh NAME
339d5e7c9aSaugustss.Nm mixerctl
349d5e7c9aSaugustss.Nd control audio mixing
359d5e7c9aSaugustss.Sh SYNOPSIS
3679adb0bcSlukem.Nm
37b88029fbSjdolecek.Op Fl d Ar file
389d5e7c9aSaugustss.Op Fl n
399d5e7c9aSaugustss.Op Fl v
409d5e7c9aSaugustss.Fl a
41990562bfSwiz.Nm
42b88029fbSjdolecek.Op Fl d Ar file
439d5e7c9aSaugustss.Op Fl n
449d5e7c9aSaugustss.Op Fl v
459d5e7c9aSaugustss.Ar name ...
46990562bfSwiz.Nm
47b88029fbSjdolecek.Op Fl d Ar file
489d5e7c9aSaugustss.Op Fl n
499d5e7c9aSaugustss.Fl w
509d5e7c9aSaugustss.Ar name=value ...
51990562bfSwiz.Nm
52b88029fbSjdolecek.Op Fl d Ar file
53e0a4556cSaugustss.Op Fl n
54e0a4556cSaugustss.Fl w
55e0a4556cSaugustss.Ar name++ ...
56990562bfSwiz.Nm
57b88029fbSjdolecek.Op Fl d Ar file
58e0a4556cSaugustss.Op Fl n
59e0a4556cSaugustss.Fl w
60e0a4556cSaugustss.Ar name-- ...
6192656747Scube.Nm
6292656747Scube.Op Fl d Ar file
6392656747Scube.Op Fl n
6492656747Scube.Fl w
6592656747Scube.Ar name+=value ...
6692656747Scube.Nm
6792656747Scube.Op Fl d Ar file
6892656747Scube.Op Fl n
6992656747Scube.Fl w
7092656747Scube.Ar name-=value ...
719d5e7c9aSaugustss.Sh DESCRIPTION
729d5e7c9aSaugustssThe
7379adb0bcSlukem.Nm
749d5e7c9aSaugustsscommand displays or sets various audio system mixing variables.
759d5e7c9aSaugustssIf a list of variables is present on the command line, then
7679adb0bcSlukem.Nm
779d5e7c9aSaugustssprints the current value of those variables for the specified device.
789d5e7c9aSaugustssIf the
799d5e7c9aSaugustss.Fl a
809d5e7c9aSaugustssflag is specified, all variables for the device are printed.
819d5e7c9aSaugustssIf the
829d5e7c9aSaugustss.Fl w
8333a43be9Ssnjflag is specified,
8479adb0bcSlukem.Nm
859d5e7c9aSaugustssattempts to set the specified variables to the given values.
869d5e7c9aSaugustss.Pp
879d5e7c9aSaugustssThe
88b88029fbSjdolecek.Fl d
8933a43be9Ssnjflag can be used to give an alternative mixer device.
9033a43be9SsnjThe default is
91063a980bSaugustss.Pa /dev/mixer .
929d5e7c9aSaugustss.Pp
939d5e7c9aSaugustssThe
949d5e7c9aSaugustss.Fl n
959d5e7c9aSaugustssflag suppresses printing of the variable name.
969d5e7c9aSaugustss.Pp
979d5e7c9aSaugustssThe
989d5e7c9aSaugustss.Fl v
999d5e7c9aSaugustssflag shows the possible values of enumeration and set valued
1005bfcb907Swizvariables.
10191c57604SwizEnumerated values are shown in brackets
102d1a45441Sjoerg.Pq Dq []
10391c57604Swizand set values are shown in curly braces
10491c57604Swiz.Pq Dq {} .
1059f5ffe60Saugustss.Pp
1069f5ffe60SaugustssThe exact set of controls that can be manipulated depends on
1075bfcb907Swizthe mixer.
1085bfcb907SwizThe general format (in both getting and setting a value) is
1099f5ffe60Saugustss.br
1109f5ffe60Saugustss.Va "class.name" = value
1119f5ffe60Saugustss.br
1129f5ffe60Saugustss.Va class
1139f5ffe60Saugustsscan have values like
1149f5ffe60Saugustss.Li inputs
1159f5ffe60Saugustssor
11633a43be9Ssnj.Li outputs ,
11733a43be9Ssnjindicating that the control affects the input or output
11833a43be9Ssnjof the mixer, respectively.
1199f5ffe60Saugustss.Va name
1209f5ffe60Saugustssindicates what part of the mixer the control affects.
1215bfcb907SwizContinuous mixer values, e.g., volume, have numeric values
12291c57604Swizin the range 0\-255.
12333a43be9SsnjIf
12433a43be9Ssnj.Va value
12533a43be9Ssnjcan be set for each channel independently, the values are printed
12633a43be9Ssnjseparated by commas.
1275bfcb907SwizDiscrete mixer values, e.g., the recording source, have symbolic names.
1285bfcb907SwizDepending on the mixer it may either be an enumeration or a set.
129e0a4556cSaugustss.Pp
130e0a4556cSaugustssThe suffixes ++ and -- can be used to step through the values of a
1315bfcb907Swizmixer control.
13233a43be9SsnjFor numeric controls, these operators increase or decrease, respectively,
1335bfcb907Swizthe value by an amount (the delta) suitable to make
134e0a4556cSaugustssthe control assume the next possible value.
135b1dd3534SapbFor binary controls, these operators toggle between
136b1dd3534Sapb.Li on
137b1dd3534Sapband
138b1dd3534Sapb.Li off .
13992656747Scube.Pp
14092656747ScubeThe operators += and -= change the value of a mixer control by the
14192656747Scubeindicated number of steps.
14256533d25Swiz.Sh ENVIRONMENT
14356533d25Swiz.Bl -tag -width MIXERDEVICE
14456533d25Swiz.It Pa MIXERDEVICE
14556533d25Swizthe mixer device to use.
14656533d25Swiz.El
14756533d25Swiz.Sh FILES
14833a43be9Ssnj.Bl -tag -width /etc/mixerctl.conf -compact
149063a980bSaugustss.It Pa /dev/mixer
15056533d25Swizmixer audio device
15133a43be9Ssnj.It Pa /etc/mixerctl.conf
15233a43be9Ssnjmixer configuration file
15356533d25Swiz.El
1549f5ffe60Saugustss.Sh EXAMPLES
1555bfcb907SwizThe command
1569f5ffe60Saugustss.Dl "mixerctl -a -v"
1579f5ffe60Saugustsscan produce
1589f5ffe60Saugustss.Bd -literal
1599f5ffe60Saugustssinputs.mic=0,0 volume
1609f5ffe60Saugustssinputs.mic.mute=off  [ off on ]
1619f5ffe60Saugustssinputs.cd=220,220 volume
1629f5ffe60Saugustssinputs.cd.mute=off  [ off on ]
1639f5ffe60Saugustssinputs.dac=220,220 volume
1649f5ffe60Saugustssinputs.dac.mute=off  [ off on ]
1659f5ffe60Saugustssrecord.record=220,220 volume
1669f5ffe60Saugustssrecord.record.source=mic  [ mic cd dac ]
1679f5ffe60Saugustssmonitor.monitor=0 volume
1689f5ffe60Saugustss.Ed
169*a4a2a215Sjoerg.Sh COMPATIBILITY
170*a4a2a215SjoergThe old
171*a4a2a215Sjoerg.Fl f
172*a4a2a215Sjoergflag is still supported.
173*a4a2a215SjoergThis support will be removed eventually.
1749d5e7c9aSaugustss.Sh SEE ALSO
1759d5e7c9aSaugustss.Xr audioctl 1 ,
1769d5e7c9aSaugustss.Xr audio 4 ,
17733a43be9Ssnj.Xr mixerctl.conf 5 ,
1789d5e7c9aSaugustss.Xr sysctl 8
179240af559Saugustss.Sh HISTORY
180240af559SaugustssThe
18179adb0bcSlukem.Nm
182240af559Saugustsscommand first appeared in
183240af559Saugustss.Nx 1.3 .
184