1.\" $NetBSD: audioctl.1,v 1.21 2017/02/10 19:31:42 nat Exp $ 2.\" 3.\" Copyright (c) 1997, 1999 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" Author: Lennart Augustsson and Charles M. Hannum 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 January 27, 2002 30.Dt AUDIOCTL 1 31.Os 32.Sh NAME 33.Nm audioctl 34.Nd control audio device 35.Sh SYNOPSIS 36.Nm 37.Op Fl d Ar device 38.Op Fl p Ar channel 39.Op Fl n 40.Fl a 41.Nm 42.Op Fl d Ar device 43.Op Fl p Ar channel 44.Op Fl n 45.Ar name ... 46.Nm 47.Op Fl d Ar device 48.Op Fl p Ar channel 49.Op Fl n 50.Fl w 51.Ar name=value ... 52.Sh DESCRIPTION 53The 54.Nm 55command displays or sets various audio system driver variables. 56If a list of variables is present on the command line, then 57.Nm 58prints the current value of those variables for the specified device. 59If the 60.Fl a 61flag is specified, all variables for the device are printed. 62If the 63.Fl w 64flag is specified 65.Nm 66attempts to set the specified variables to the given values. 67.Pp 68The 69.Fl d 70flag can be used to give an alternative audio control device, the default is 71.Pa /dev/audioctl0 . 72.Pp 73The 74.Fl p 75flag can be used to give a virtual channel to control, the default is a new 76channel. 77.Pp 78The 79.Fl n 80flag suppresses printing of the variable name. 81.Sh ENVIRONMENT 82.Bl -tag -width AUDIOCTLDEVICE 83.It Pa AUDIOCTLDEVICE 84the audio control device to use. 85.El 86.Sh FILES 87.Bl -tag -width /dev/audioctl0 -compact 88.It Pa /dev/audio0 89audio I/O device (resets on open) 90.It Pa /dev/audioctl0 91audio control device 92.It Pa /dev/sound0 93audio I/O device (does not reset on open) 94.El 95.Sh EXAMPLES 96To set the playing sampling rate to 11025, for the channel 3 you can use 97.Dl audioctl -p 3 -w play.sample_rate=11025 98To set all of the play parameters for CD-quality audio, you can use 99.Dl audioctl -p 3 -w play=44100,2,16,slinear_le 100Note that many of the variables that can be inspected and changed with 101.Nm 102are reset when 103.Pa /dev/audio0 104is opened. 105This can be circumvented by using 106.Pa /dev/sound0 107instead. 108.Sh COMPATIBILITY 109The old 110.Fl f 111flag is still supported. 112This support will be removed eventually. 113.Sh SEE ALSO 114.Xr audioplay 1 , 115.Xr audiorecord 1 , 116.Xr mixerctl 1 , 117.Xr audio 4 , 118.Xr sysctl 8 119.Sh HISTORY 120The 121.Nm 122command first appeared in 123.Nx 1.3 . 124