1 .\" $NetBSD: radio.4,v 1.10 2003/12/16 11:31:04 wiz Exp $
2 .\" $RuOBSD: radio.4,v 1.4 2001/10/26 05:38:43 form Exp $
3 .\" $OpenBSD: radio.4,v 1.3 2001/12/05 10:58:54 mickey Exp $
5 .\" Copyright (c) 2001 Vladimir Popov
6 .\" All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
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.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 .\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .Nd device-independent radio driver layer
41 .Cd "radio* at udsbr?"
49 driver provides support for various FM radio cards.
50 It provides an uniform programming interface layer above different underlying
51 radio hardware drivers.
53 For radio tuner controlling there is a single device file available:
58 commands are supported:
60 .Bl -tag -width indent -compact
61 .It Dv RIOCSSRCH (int)
62 This command assumes that a signal search is required and gives direction
63 of search to the driver \- 0 to search down and any non-zero value to search up.
64 .It Dv RIOCGINFO (struct radio_info)
65 .It Dv RIOCSINFO (struct radio_info)
66 Get or set the current hardware device information into the struct radio_info
73 int rfreq; /* reference frequency */
74 int lock; /* locking field strength */
75 uint32_t freq; /* in kHz */
76 uint32_t caps; /* card capabilities */
77 #define RADIO_CAPS_DETECT_STEREO (1\*[Lt]\*[Lt]0)
78 #define RADIO_CAPS_DETECT_SIGNAL (1\*[Lt]\*[Lt]1)
79 #define RADIO_CAPS_SET_MONO (1\*[Lt]\*[Lt]2)
80 #define RADIO_CAPS_HW_SEARCH (1\*[Lt]\*[Lt]3)
81 #define RADIO_CAPS_HW_AFC (1\*[Lt]\*[Lt]4)
82 #define RADIO_CAPS_REFERENCE_FREQ (1\*[Lt]\*[Lt]5)
83 #define RADIO_CAPS_LOCK_SENSITIVITY (1\*[Lt]\*[Lt]6)
84 #define RADIO_CARD_TYPE (0xFF\*[Lt]\*[Lt]16)
86 #define RADIO_INFO_STEREO (1\*[Lt]\*[Lt]0)
87 #define RADIO_INFO_SIGNAL (1\*[Lt]\*[Lt]1)
97 field holds the card volume information and can be at most 255.
105 holds information about the card reference frequency (not all cards support
110 field holds information about the card locking field strength during
111 an automatic search for cards that support this feature.
115 field is the frequency in kHz the card is tuned to.
119 field is read-only and describes the card capabilities.
120 The capabilities can have following values:
121 .Bl -tag -width indent -compact
122 .It Dv RADIO_CAPS_DETECT_STEREO
123 The device can determine is it tuned to a stereo signal.
124 .It Dv RADIO_CAPS_DETECT_SIGNAL
125 The device can determine is it tuned or not.
126 .It Dv RADIO_CAPS_SET_MONO
127 The device capable to forcible set its output to mono.
128 .It Dv RADIO_CAPS_HW_SEARCH
129 The device can do hardware search.
130 .It Dv RADIO_CAPS_HW_AFC
131 The device has an internal hardware automatic frequency control.
132 .It Dv RADIO_CAPS_REFERENCE_FREQ
133 The device allow to change the reference frequency of a received signal.
134 .It Dv RADIO_CAPS_LOCK_SENSITIVITY
135 The device allow to change the station lock sensitivity used during search
137 .It Dv RADIO_CARD_TYPE
138 Some cards have several different incarnations.
139 This allow to determine the variant of the card.
145 field is read-only and describes the current state of the card \-
146 tuned/not tuned, stereo signal/mono signal.
147 .Bl -tag -width indent -compact
148 .It Dv RADIO_INFO_STEREO
149 Informs whether the device receives a stereo or mono signal.
150 .It Dv RADIO_INFO_SIGNAL
151 Informs whether the device receives a valid signal or noise.
155 .Bl -tag -width /dev/radio -compact
171 device driver appeared in
178 driver was written by Vladimir Popov and Maxim Tsyplakov.
179 The man page was written by Vladimir Popov.