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

Annotation of src/usr.bin/sndioctl/sndioctl.1, Revision 1.15

1.15    ! kn          1: .\" $OpenBSD: sndioctl.1,v 1.14 2020/05/27 17:34:45 schwarze Exp $
1.1       ratchov     2: .\"
                      3: .\" Copyright (c) 2014-2020 Alexandre Ratchov <alex@caoua.org>
                      4: .\"
                      5: .\" Permission to use, copy, modify, and distribute this software for any
                      6: .\" purpose with or without fee is hereby granted, provided that the above
                      7: .\" copyright notice and this permission notice appear in all copies.
                      8: .\"
                      9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     16: .\"
1.14      schwarze   17: .Dd $Mdocdate: May 27 2020 $
1.1       ratchov    18: .Dt SNDIOCTL 1
                     19: .Os
                     20: .Sh NAME
                     21: .Nm sndioctl
1.11      ratchov    22: .Nd manipulate audio device controls
1.1       ratchov    23: .Sh SYNOPSIS
                     24: .Nm
                     25: .Bk -words
1.6       ratchov    26: .Op Fl dimnqv
1.1       ratchov    27: .Op Fl f Ar device
                     28: .Op Ar command ...
                     29: .Ek
                     30: .Sh DESCRIPTION
                     31: The
                     32: .Nm
1.11      ratchov    33: utility can display or manipulate controls of
1.1       ratchov    34: .Xr sndio 7
1.11      ratchov    35: audio devices, like the output level.
1.1       ratchov    36: The options are as follows:
                     37: .Bl -tag -width Ds
                     38: .It Fl d
1.11      ratchov    39: Dump the raw list of available controls and exit.
1.1       ratchov    40: Useful as a debugging tool.
                     41: .It Fl f Ar device
                     42: Use this
                     43: .Xr sndio 7
                     44: audio device.
                     45: .It Fl i
1.11      ratchov    46: Display characteristics of requested controls
1.1       ratchov    47: instead of their values.
                     48: .It Fl m
1.11      ratchov    49: Monitor and display audio controls changes.
1.5       ratchov    50: .It Fl n
                     51: Suppress printing of the variable name.
1.6       ratchov    52: .It Fl q
                     53: Suppress all printing when setting a variable.
1.1       ratchov    54: .It Fl v
                     55: Enable verbose mode, a.k.a. multi-channel mode.
1.11      ratchov    56: By default controls affecting different channels
1.1       ratchov    57: of the same stream are disguised as a single mono
1.11      ratchov    58: control to hide details that are not essential.
1.1       ratchov    59: .El
                     60: .Pp
1.11      ratchov    61: If no commands are specified all valid controls are displayed on
1.1       ratchov    62: .Em stdout .
                     63: Unless
                     64: .Fl d ,
                     65: .Fl m ,
1.5       ratchov    66: .Fl n ,
1.1       ratchov    67: or
                     68: .Fl i
1.11      ratchov    69: are used, displayed lines are valid commands.
                     70: The set of available controls depends on the audio device.
1.1       ratchov    71: .Pp
1.11      ratchov    72: Commands use the following two formats to display and change
                     73: controls respectively:
1.1       ratchov    74: .Pp
1.15    ! kn         75: .Dl [group/]stream[channel].function
        !            76: .Dl [group/]stream[channel].function=value
1.1       ratchov    77: .Pp
1.11      ratchov    78: On the left-hand side are specified the control group (if any),
1.1       ratchov    79: the affected stream name, and the optional channel number.
                     80: Examples of left-hand side terms:
                     81: .Pp
                     82: .Dl output.level
1.8       ratchov    83: .Dl output[0].level
1.1       ratchov    84: .Pp
1.9       ratchov    85: If the channel number (including the brackets) is omitted,
                     86: the command is applied to all channels.
                     87: .Pp
1.4       ratchov    88: Values are numbers between 0 and 1.
1.1       ratchov    89: Two-state controls (switches) take either 0 or 1 as value,
                     90: typically corresponding to the
                     91: .Em off
                     92: and
                     93: .Em on
                     94: states respectively.
                     95: .Pp
                     96: If a decimal is prefixed by the plus (minus) sign then
                     97: the given value is added to (subtracted from) the
                     98: current value of the control.
                     99: If
                    100: .Qq \&!
                    101: is used instead of a number, then the switch is toggled.
                    102: .Sh EXAMPLES
1.12      schwarze  103: Increase the
                    104: .Cm level
                    105: control affecting all
                    106: .Cm output
                    107: channels by 10% of the maximum:
                    108: .Pp
                    109: .Dl $ sndioctl output.level=+0.1
                    110: .Pp
1.14      schwarze  111: Mute all
                    112: .Cm output
                    113: channels:
1.12      schwarze  114: .Pp
                    115: .Dl $ sndioctl output.mute=1
                    116: .Pp
                    117: Toggle the above
                    118: .Cm mute
1.8       ratchov   119: control:
1.1       ratchov   120: .Pp
1.12      schwarze  121: .Dl $ sndioctl output.mute=!
1.13      espie     122: .Pp
1.14      schwarze  123: Allow audio recording and set all
                    124: .Cm input
                    125: channels to 50%:
1.13      espie     126: .Bd -literal -offset indent
                    127: # sysctl kern.audio.record=1
                    128: $ sndioctl input.mute=0 input.level=0.5
                    129: .Ed
1.1       ratchov   130: .Sh SEE ALSO
                    131: .Xr sioctl_open 3