[BACK]Return to mixerctl.8 CVS log [TXT][DIR] Up to [local] / src / usr.bin / mixerctl

Annotation of src/usr.bin/mixerctl/mixerctl.8, Revision 1.7

1.7     ! ratchov     1: .\" $OpenBSD: mixerctl.8,v 1.6 2020/04/23 05:54:35 ratchov Exp $
1.1       deraadt     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: .\"
1.6       ratchov    30: .Dd $Mdocdate: April 23 2020 $
1.5       schwarze   31: .Dt MIXERCTL 8
1.1       deraadt    32: .Os
                     33: .Sh NAME
                     34: .Nm mixerctl
1.7     ! ratchov    35: .Nd manipulate controls for audio hardware
1.1       deraadt    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
1.7     ! ratchov    55: command displays or sets various controls for audio hardware,
        !            56: such as microphone reference voltage or output level.
        !            57: Where hardware defaults are not the desired ones,
        !            58: controls can be set at system startup using the configuration file
        !            59: .Xr mixerctl.conf 5 .
        !            60: .Pp
        !            61: .Nm
        !            62: itself can only be run by the superuser.
        !            63: Common controls should be adjusted at runtime using
        !            64: .Xr sndioctl 1 ,
        !            65: which is intended for every day use and requires no superuser privileges.
        !            66: Manual use of
        !            67: .Nm
        !            68: is intended for controls which cannot be set using
        !            69: .Xr sndioctl 1 .
        !            70: .Pp
1.6       ratchov    71: If a list of control names is present on the command line,
1.1       deraadt    72: .Nm
1.6       ratchov    73: prints the current value of those controls for the specified device.
1.1       deraadt    74: .Pp
                     75: The options are as follows:
                     76: .Bl -tag -width "-f file"
                     77: .It Fl a
1.6       ratchov    78: Print all device controls and their current values.
1.1       deraadt    79: This is the default, if no parameters are given to
                     80: .Nm .
                     81: .It Fl f Ar file
1.3       ratchov    82: Specify an alternative audio control device.
1.1       deraadt    83: The default is
                     84: .Pa /dev/audioctl0 .
                     85: .It Fl n
1.6       ratchov    86: Suppress printing of the control name.
1.1       deraadt    87: .It Fl q
1.6       ratchov    88: Suppress all printing when setting a control.
1.1       deraadt    89: .It Fl t
                     90: Toggle.
                     91: Attempt to select the next possible value
                     92: of an enum
                     93: (see below).
                     94: .It Fl v
1.6       ratchov    95: Show all possible values of controls.
1.1       deraadt    96: Enum values are shown in
                     97: .Sq []
                     98: and values belonging to a set are shown in
                     99: .Sq {}
                    100: (see below).
                    101: .It Ar name Ns = Ns Ar value
1.6       ratchov   102: Attempt to set the control with given
1.1       deraadt   103: .Ar name
                    104: to
                    105: .Ar value .
                    106: .El
                    107: .Pp
                    108: The exact set of controls that can be manipulated depends on
1.3       ratchov   109: the device.
1.1       deraadt   110: The general format (in both getting and setting a value) is:
                    111: .Pp
                    112: .D1 class.name=value
                    113: .Pp
                    114: The
                    115: .Ar class
                    116: can have values like
                    117: .Dq inputs
                    118: or
                    119: .Dq outputs ,
                    120: indicating that the control affects the input or output, respectively,
1.3       ratchov   121: to the device.
1.1       deraadt   122: The
                    123: .Ar name
1.3       ratchov   124: indicates what part of the device the control affects.
                    125: Continuous values, e.g. volume,
1.1       deraadt   126: have numeric values in the range 0\-255.
                    127: If
                    128: .Ar value
                    129: can be set for each channel independently,
                    130: the values are printed separated by commas.
1.3       ratchov   131: Discrete values, e.g. the recording source,
1.1       deraadt   132: have symbolic names.
                    133: .Pp
                    134: Variables may take one of three types,
                    135: again dependent on the mixer:
                    136: .Bl -enum
                    137: .It
                    138: Enums.
                    139: These may take only one out of a possible list of symbolic values
                    140: or the literal string
                    141: .Dq toggle ,
                    142: which toggles the value,
                    143: e.g. inputs.mic.source=mic0.
                    144: .It
                    145: Sets.
                    146: These can take one or more of a possible list of symbolic values;
                    147: multiple values are specified as a comma-separated list,
                    148: e.g. record.source=mic,cd.
                    149: Additionally,
                    150: .Ar value
                    151: may be omitted to specify the empty set,
                    152: e.g. record.source=.
                    153: .It
                    154: Numbers.
                    155: Numerical values may be specified in either absolute or relative forms.
                    156: The relative form is indicated by a prefix of
                    157: .Ql +
                    158: or
                    159: .Ql -
                    160: to denote an increase or decrease, respectively.
                    161: .El
                    162: .Sh ENVIRONMENT
                    163: .Bl -tag -width "MIXERDEVICEXXX"
                    164: .It Ev MIXERDEVICE
1.3       ratchov   165: The audio control device to use.
1.1       deraadt   166: .El
                    167: .Sh FILES
                    168: .Bl -tag -width "/etc/mixerctl.confXXX" -compact
                    169: .It Pa /dev/audioctl0
1.3       ratchov   170: Default audio control device.
1.1       deraadt   171: .It Pa /etc/mixerctl.conf
                    172: .Nm
                    173: configuration file.
                    174: .El
                    175: .Sh EXAMPLES
1.6       ratchov   176: Show possible values for all controls,
1.1       deraadt   177: and their current settings:
                    178: .Bd -literal -offset indent
1.4       jmc       179: # mixerctl -av
1.1       deraadt   180: inputs.mic=0,0 volume
                    181: inputs.mic.mute=off  [ off on ]
                    182: inputs.cd=220,220 volume
                    183: inputs.cd.mute=off  [ off on ]
                    184: inputs.dac=220,220 volume
                    185: inputs.dac.mute=off  [ off on ]
                    186: record.record=220,220 volume
                    187: record.record.source=mic  [ mic cd dac ]
                    188: monitor.monitor=0 volume
                    189: .Ed
                    190: .Pp
                    191: Toggle inputs.dac.mute:
                    192: .Bd -literal -offset indent
1.4       jmc       193: # mixerctl -t inputs.dac.mute
                    194: inputs.dac.mute: off -> on
                    195: # mixerctl inputs.dac.mute=toggle
                    196: inputs.dac.mute: on -> off
1.1       deraadt   197: .Ed
                    198: .Sh SEE ALSO
                    199: .Xr aucat 1 ,
                    200: .Xr cdio 1 ,
                    201: .Xr audio 4 ,
                    202: .Xr mixerctl.conf 5 ,
1.2       jmc       203: .Xr audioctl 8 ,
1.1       deraadt   204: .Xr sysctl 8
                    205: .Sh HISTORY
                    206: The
                    207: .Nm
                    208: command first appeared in
                    209: .Ox 2.4 .