summaryrefslogtreecommitdiff
path: root/share/man/man4/radio.4
blob: 2cdf38ade885cec1bf26ec919ba9f56009d81bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.\"	$OpenBSD: radio.4,v 1.1 2001/10/04 22:33:49 gluk Exp $
.\"
.\" Copyright (c) 2001 Vladimir Popov
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
.\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 21, 2001
.Dt RADIO 4
.Os
.Sh NAME
.Nm radio
.Nd device-independent radio driver layer
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/ioctl.h>
.Fd #include <sys/radioio.h>
.Sh DESCRIPTION
The
.Nm
driver provides support for various FM radio cards. It provides an uniform
programming interface layer above different underlying radio hardware drivers.
.Pp
For radio tuner controlling there is a single device file available:
.Pa /dev/radio .
.Pp
The following
.Xr ioctl 2
commands are supported:
.Pp
.Bl -tag -width indent -compact
.It Dv RIOCSMUTE (u_long)
This command mutes or unmutes the device. This operation does not affect
volume value of the device.
.It Dv RIOCGMUTE (u_long)
This command returns current mute state of the device.
.It Dv RIOCSMONO (u_long)
This command sets the device output to mono even if the device receive a stereo
signal (forced mono).
.It Dv RIOCGMONO (u_long)
This command returns current forced mono state of the device.
.It Dv RIOCGVOLU (u_long)
This command returns current volume of the device.
.It Dv RIOCSVOLU (u_long)
This command sets current volume of the device.
.It Dv RIOCGFREQ (u_long)
This command returns frequency the device is tuned to.
.It Dv RIOCSFREQ (u_long)
This command sets working frequency of the device.
.It Dv RIOCSSRCH (u_long)
This command assumes that a signal search is required and gives direction
of search to the driver - 0 to search down and any non-zero value to search up.
.It Dv RIOCGCAPS (u_long)
This command returns the device capabilities. The capabilities can have
following values:
.Bl -tag -width indent -compact
.It Dv RADIO_CAPS_DETECT_STEREO
The device can determine is it tuned to a stereo signal.
.It Dv RADIO_CAPS_DETECT_SIGNAL
The device can determine is it tuned or not.
.It Dv RADIO_CAPS_SET_MONO
The device capable to forcible set its output to mono.
.It Dv RADIO_CAPS_HW_SEARCH
The device can do hardware search.
.It Dv RADIO_CAPS_HW_AFC
The device has an internal hardware automatic frequency control.
.It Dv RADIO_CAPS_REFERENCE_FREQ
The device allow to change the reference frequency of a received signal.
.It Dv RADIO_CAPS_LOCK_SENSITIVITY
The device allow to change the station lock sensitivity used during search
operation.
.It Dv RADIO_CAPS_CARD_TYPE
Some cards have several different incarnations. This allow to determine
the variant of the card. Currently not used.
.El
.It Dv RIOCGINFO (u_long)
This commands returns current state of the device.
.Bl -tag -width indent -compact
.It Dv RADIO_INFO_SIGNAL
Informs whether the device receives a valid signal or noise.
.It Dv RADIO_INFO_STEREO
Informs whether the device receives a stereo or mono signal.
.El
.It Dv RIOCGREFF (u_long)
This command returns current value of the device's reference frequency.
.It Dv RIOCSREFF (u_long)
This command sets reference frequency of the device.
.It Dv RIOCGLOCK (u_long)
This command returns current value of the device's station lock sensitivity.
.It Dv RIOCSLOCK (u_long)
This command sets station lock sensitivity of the device.
.El
.Sh FILES
.Bl -tag -width /dev/radio -compact
.It Pa /dev/radio
.El
.Sh SEE ALSO
.Xr ioctl 2 .
.Pp
For ports using the ISA bus:
.Xr sf2r 4 ,
.Xr az 4 .
.Pp
For ports using the PCI bus:
.Xr sf4r 4 .
.Sh BUGS
.Pp
You can have only one card of the same type. For example, if you have two
aztech FM tuners, the first card with jumper set to port 0x358 and the second
one - to 0x350, you can use only one aztech card (in the kernel, that is)
either with port 0x350 or 0x358. Don't even try to compile support for the
second card into the kernel.