Annotation of src/usr.bin/mixerctl/mixerctl.8, Revision 1.1
1.1 ! deraadt 1: .\" $OpenBSD: mixerctl.1,v 1.36 2020/04/04 08:43:08 ratchov Exp $
! 2: .\" $NetBSD: mixerctl.1,v 1.8 1998/05/09 12:41:16 augustss Exp $
! 3: .\"
! 4: .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
! 5: .\" All rights reserved.
! 6: .\"
! 7: .\" Author: Lennart Augustsson
! 8: .\"
! 9: .\" Redistribution and use in source and binary forms, with or without
! 10: .\" modification, are permitted provided that the following conditions
! 11: .\" are met:
! 12: .\" 1. Redistributions of source code must retain the above copyright
! 13: .\" notice, this list of conditions and the following disclaimer.
! 14: .\" 2. Redistributions in binary form must reproduce the above copyright
! 15: .\" notice, this list of conditions and the following disclaimer in the
! 16: .\" documentation and/or other materials provided with the distribution.
! 17: .\"
! 18: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
! 19: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! 20: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! 21: .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
! 22: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! 23: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! 24: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! 25: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! 26: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! 27: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! 28: .\" POSSIBILITY OF SUCH DAMAGE.
! 29: .\"
! 30: .Dd $Mdocdate: April 4 2020 $
! 31: .Dt MIXERCTL 1
! 32: .Os
! 33: .Sh NAME
! 34: .Nm mixerctl
! 35: .Nd control audio mixing
! 36: .Sh SYNOPSIS
! 37: .Nm mixerctl
! 38: .Op Fl anv
! 39: .Op Fl f Ar file
! 40: .Nm mixerctl
! 41: .Op Fl nv
! 42: .Op Fl f Ar file
! 43: .Ar name ...
! 44: .Nm mixerctl
! 45: .Op Fl qt
! 46: .Op Fl f Ar file
! 47: .Ar name ...
! 48: .Nm mixerctl
! 49: .Op Fl q
! 50: .Op Fl f Ar file
! 51: .Ar name Ns = Ns Ar value ...
! 52: .Sh DESCRIPTION
! 53: The
! 54: .Nm
! 55: command displays or sets various audio system mixing variables.
! 56: If a list of variables is present on the command line,
! 57: .Nm
! 58: prints the current value of those variables for the specified device.
! 59: Variables can also be set at system startup using the configuration file
! 60: .Xr mixerctl.conf 5 .
! 61: .Pp
! 62: The options are as follows:
! 63: .Bl -tag -width "-f file"
! 64: .It Fl a
! 65: Print all device variables and their current values.
! 66: This is the default, if no parameters are given to
! 67: .Nm .
! 68: .It Fl f Ar file
! 69: Specify an alternative audio mixing device.
! 70: The default is
! 71: .Pa /dev/audioctl0 .
! 72: .It Fl n
! 73: Suppress printing of the variable name.
! 74: .It Fl q
! 75: Suppress all printing when setting a variable.
! 76: .It Fl t
! 77: Toggle.
! 78: Attempt to select the next possible value
! 79: of an enum
! 80: (see below).
! 81: .It Fl v
! 82: Show all possible values of variables.
! 83: Enum values are shown in
! 84: .Sq []
! 85: and values belonging to a set are shown in
! 86: .Sq {}
! 87: (see below).
! 88: .It Ar name Ns = Ns Ar value
! 89: Attempt to set the specified variable
! 90: .Ar name
! 91: to
! 92: .Ar value .
! 93: .El
! 94: .Pp
! 95: The exact set of controls that can be manipulated depends on
! 96: the mixer.
! 97: The general format (in both getting and setting a value) is:
! 98: .Pp
! 99: .D1 class.name=value
! 100: .Pp
! 101: The
! 102: .Ar class
! 103: can have values like
! 104: .Dq inputs
! 105: or
! 106: .Dq outputs ,
! 107: indicating that the control affects the input or output, respectively,
! 108: to the mixer.
! 109: The
! 110: .Ar name
! 111: indicates what part of the mixer the control affects.
! 112: Continuous mixer values, e.g. volume,
! 113: have numeric values in the range 0\-255.
! 114: If
! 115: .Ar value
! 116: can be set for each channel independently,
! 117: the values are printed separated by commas.
! 118: Discrete mixer values, e.g. the recording source,
! 119: have symbolic names.
! 120: .Pp
! 121: Variables may take one of three types,
! 122: again dependent on the mixer:
! 123: .Bl -enum
! 124: .It
! 125: Enums.
! 126: These may take only one out of a possible list of symbolic values
! 127: or the literal string
! 128: .Dq toggle ,
! 129: which toggles the value,
! 130: e.g. inputs.mic.source=mic0.
! 131: .It
! 132: Sets.
! 133: These can take one or more of a possible list of symbolic values;
! 134: multiple values are specified as a comma-separated list,
! 135: e.g. record.source=mic,cd.
! 136: Additionally,
! 137: .Ar value
! 138: may be omitted to specify the empty set,
! 139: e.g. record.source=.
! 140: .It
! 141: Numbers.
! 142: Numerical values may be specified in either absolute or relative forms.
! 143: The relative form is indicated by a prefix of
! 144: .Ql +
! 145: or
! 146: .Ql -
! 147: to denote an increase or decrease, respectively.
! 148: .El
! 149: .Sh ENVIRONMENT
! 150: .Bl -tag -width "MIXERDEVICEXXX"
! 151: .It Ev MIXERDEVICE
! 152: The audio mixer device to use.
! 153: .El
! 154: .Sh FILES
! 155: .Bl -tag -width "/etc/mixerctl.confXXX" -compact
! 156: .It Pa /dev/audioctl0
! 157: Default mixer audio device.
! 158: .It Pa /etc/mixerctl.conf
! 159: .Nm
! 160: configuration file.
! 161: .El
! 162: .Sh EXAMPLES
! 163: Show possible values for all mixer variables,
! 164: and their current settings:
! 165: .Bd -literal -offset indent
! 166: $ mixerctl -av
! 167: inputs.mic=0,0 volume
! 168: inputs.mic.mute=off [ off on ]
! 169: inputs.cd=220,220 volume
! 170: inputs.cd.mute=off [ off on ]
! 171: inputs.dac=220,220 volume
! 172: inputs.dac.mute=off [ off on ]
! 173: record.record=220,220 volume
! 174: record.record.source=mic [ mic cd dac ]
! 175: monitor.monitor=0 volume
! 176: .Ed
! 177: .Pp
! 178: Toggle inputs.dac.mute:
! 179: .Bd -literal -offset indent
! 180: $ mixerctl -t inputs.dac.mute
! 181: inputs.dac.mute: off -\*(Gt on
! 182: $ mixerctl inputs.dac.mute=toggle
! 183: inputs.dac.mute: on -\*(Gt off
! 184: .Ed
! 185: .Sh SEE ALSO
! 186: .Xr aucat 1 ,
! 187: .Xr audioctl 8 ,
! 188: .Xr cdio 1 ,
! 189: .Xr audio 4 ,
! 190: .Xr mixerctl.conf 5 ,
! 191: .Xr sysctl 8
! 192: .Sh HISTORY
! 193: The
! 194: .Nm
! 195: command first appeared in
! 196: .Ox 2.4 .