xref: /openbsd-src/usr.bin/radioctl/radioctl.1 (revision 3c440e6acecfcae594baa0278e4a342722a12a14)
1.\"	$OpenBSD: radioctl.1,v 1.16 2015/09/12 16:35:19 schwarze Exp $
2.\"
3.\" Copyright (c) 2001 Vladimir Popov
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22.\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd $Mdocdate: September 12 2015 $
27.Dt RADIOCTL 1
28.Os
29.Sh NAME
30.Nm radioctl
31.Nd control radio tuners
32.Sh SYNOPSIS
33.Nm radioctl
34.Op Fl anv
35.Op Fl f Ar file
36.Nm radioctl
37.Op Fl nv
38.Op Fl f Ar file
39.Ar name
40.Nm radioctl
41.Op Fl n
42.Op Fl f Ar file
43.Ar name Ns = Ns Ar value
44.Sh DESCRIPTION
45The
46.Nm
47command displays or sets various variables that affect the radio tuner
48behavior.
49If a variable is present on the command line,
50.Nm
51prints the current value of this variable for the specified device.
52By default,
53.Nm
54operates on the
55.Pa /dev/radio
56device.
57.Pp
58The options are as follows:
59.Bl -tag -width Ds
60.It Fl a
61Print all device variables and their current values.
62This is the default, if no parameters are given to
63.Nm .
64.It Fl f Ar file
65Specify an alternative radio tuner device.
66.It Fl n
67Suppress printing of the variable name.
68.It Fl v
69Show the possible values of queries.
70.It Ar name Ns = Ns Ar value
71Attempt to set the specified variable
72.Ar name
73to
74.Ar value .
75.El
76.Pp
77Values may be specified in either absolute or relative forms.
78The relative form is indicated by a prefix of
79.Ql +
80or
81.Ql -
82to denote an increase or decrease, respectively.
83.Pp
84The exact set of controls that can be manipulated depends on
85the tuner.
86The general format (in both getting and setting a value) is:
87.Bd -filled -offset indent
88.Ar name Ns = Ns Ar value
89.Ed
90.Pp
91The
92.Ar name
93indicates what part of the tuner the control affects.
94.Pp
95Write only controls:
96.Bl -tag -width Ds
97.It Ar search
98Only for cards that allow hardware search.
99Can be
100.Ql up
101or
102.Ql down .
103.El
104.Pp
105Read-write controls:
106.Bl -tag -width Ds
107.It Ar channel
108Specifies the TV channel.
109Integer value from 0 to 150.
110Using the
111.Ar channel
112control puts the tuner in
113.Dq TV
114mode.
115.It Ar chnlset
116Specifies the TV channel set.
117The tuner uses the current channel set to derive a frequency from the
118.Ar channel .
119The following is a list of valid channel sets:
120.Pp
121.Bl -tag -width "australiaXX" -offset indent -compact
122.It nabcst
123U.S.A. Broadcast
124.It cableirc
125U.S.A. Cable IRC
126.It cablehrc
127U.S.A. Cable HRC
128.It weurope
129Western Europe
130.It jpnbcst
131Japan Broadcast
132.It jpncable
133Japan Cable
134.It xussr
135Former U.S.S.R. and C.I.S. countries
136.It australia
137Australia
138.It france
139France
140.El
141.It Ar frequency
142Specifies the FM frequency in MHz.
143Float value from 87.5 to 108.0.
144Using the
145.Ar frequency
146control puts the tuner in
147.Dq radio
148mode.
149.It Ar volume
150Integer value from 0 to 255.
151.It Ar mute
152Mutes the card (volume is not affected),
153.Ql on
154or
155.Ql off .
156.It Ar mono
157Forces card output to mono,
158.Ql on
159or
160.Ql off .
161Only for cards that allow forced mono.
162.It Ar reference
163Reference frequency.
164Can be 25 kHz, 50 kHz and 100 kHz.
165Not all cards allow the reference frequency to be changed.
166.It Ar sensitivity
167Station locking sensitivity.
168Can be 5 mkV, 10 mkV, 30 mkV and 150 mkV.
169Not all cards allow the station locking sensitivity to be changed.
170.El
171.Pp
172All the remaining controls (mode, signal, stereo and card capabilities)
173are read-only and can be viewed using option
174.Fl a .
175.Sh ENVIRONMENT
176The following environment variable affects the execution of
177.Nm radioctl :
178.Bl -tag -width RADIODEVICE
179.It Ev RADIODEVICE
180The radio tuner device to use.
181.El
182.Sh FILES
183.Bl -tag -width /dev/radio
184.It Pa /dev/radio
185radio tuner device
186.El
187.Sh EXAMPLES
188Print all device variables,
189along with their current values:
190.Bd -literal -offset indent
191$ radioctl -a
192volume=255
193channel=0
194chnlset=weurope
195frequency=106.30MHz
196mute=off
197reference=50kHz
198signal=on
199stereo=on
200mode: radio
201card capabilities:
202        manageable mono/stereo
203.Ed
204.Sh SEE ALSO
205.Xr radio 4
206.Sh HISTORY
207.Nm
208command first appeared in
209.Ox 3.0 .
210