xref: /netbsd-src/usr.bin/audio/ctl/audioctl.1 (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1.\" $NetBSD: audioctl.1,v 1.19 2010/05/15 00:08:31 joerg 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 n
39.Fl a
40.Nm
41.Op Fl d Ar device
42.Op Fl n
43.Ar name ...
44.Nm
45.Op Fl d Ar device
46.Op Fl n
47.Fl w
48.Ar name=value ...
49.Sh DESCRIPTION
50The
51.Nm
52command displays or sets various audio system driver variables.
53If a list of variables is present on the command line, then
54.Nm
55prints the current value of those variables for the specified device.
56If the
57.Fl a
58flag is specified, all variables for the device are printed.
59If the
60.Fl w
61flag is specified
62.Nm
63attempts to set the specified variables to the given values.
64.Pp
65The
66.Fl d
67flag can be used to give an alternative audio control device, the default is
68.Pa /dev/audioctl0 .
69.Pp
70The
71.Fl n
72flag suppresses printing of the variable name.
73.Sh ENVIRONMENT
74.Bl -tag -width AUDIOCTLDEVICE
75.It Pa AUDIOCTLDEVICE
76the audio control device to use.
77.El
78.Sh FILES
79.Bl -tag -width /dev/audioctl0 -compact
80.It Pa /dev/audio0
81audio I/O device (resets on open)
82.It Pa /dev/audioctl0
83audio control device
84.It Pa /dev/sound0
85audio I/O device (does not reset on open)
86.El
87.Sh EXAMPLES
88To set the playing sampling rate to 11025, you can use
89.Dl audioctl -w play.sample_rate=11025
90To set all of the play parameters for CD-quality audio, you can use
91.Dl audioctl -w play=44100,2,16,slinear_le
92Note that many of the variables that can be inspected and changed with
93.Nm
94are reset when
95.Pa /dev/audio0
96is opened.
97This can be circumvented by using
98.Pa /dev/sound0
99instead.
100.Sh COMPATIBILITY
101The old
102.Fl f
103flag is still supported.
104This support will be removed eventually.
105.Sh SEE ALSO
106.Xr audioplay 1 ,
107.Xr audiorecord 1 ,
108.Xr mixerctl 1 ,
109.Xr audio 4 ,
110.Xr sysctl 8
111.Sh HISTORY
112The
113.Nm
114command first appeared in
115.Nx 1.3 .
116