xref: /linux/Documentation/driver-api/media/drivers/radiotrack.rst (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1.. SPDX-License-Identifier: GPL-2.0
2
3The Radiotrack radio driver
4===========================
5
6Author: Stephen M. Benoit <benoits@servicepro.com>
7
8Date:  Dec 14, 1996
9
10ACKNOWLEDGMENTS
11----------------
12
13This document was made based on 'C' code for Linux from Gideon le Grange
14(legrang@active.co.za or legrang@cs.sun.ac.za) in 1994, and elaborations from
15Frans Brinkman (brinkman@esd.nl) in 1996.  The results reported here are from
16experiments that the author performed on his own setup, so your mileage may
17vary... I make no guarantees, claims or warranties to the suitability or
18validity of this information.  No other documentation on the AIMS
19Lab (http://www.aimslab.com/) RadioTrack card was made available to the
20author.  This document is offered in the hopes that it might help users who
21want to use the RadioTrack card in an environment other than MS Windows.
22
23WHY THIS DOCUMENT?
24------------------
25
26I have a RadioTrack card from back when I ran an MS-Windows platform.  After
27converting to Linux, I found Gideon le Grange's command-line software for
28running the card, and found that it was good!  Frans Brinkman made a
29comfortable X-windows interface, and added a scanning feature.  For hack
30value, I wanted to see if the tuner could be tuned beyond the usual FM radio
31broadcast band, so I could pick up the audio carriers from North American
32broadcast TV channels, situated just below and above the 87.0-109.0 MHz range.
33I did not get much success, but I learned about programming ioports under
34Linux and gained some insights about the hardware design used for the card.
35
36So, without further delay, here are the details.
37
38
39PHYSICAL DESCRIPTION
40--------------------
41
42The RadioTrack card is an ISA 8-bit FM radio card.  The radio frequency (RF)
43input is simply an antenna lead, and the output is a power audio signal
44available through a miniature phone plug.  Its RF frequencies of operation are
45more or less limited from 87.0 to 109.0 MHz (the commercial FM broadcast
46band).  Although the registers can be programmed to request frequencies beyond
47these limits, experiments did not give promising results.  The variable
48frequency oscillator (VFO) that demodulates the intermediate frequency (IF)
49signal probably has a small range of useful frequencies, and wraps around or
50gets clipped beyond the limits mentioned above.
51
52
53CONTROLLING THE CARD WITH IOPORT
54--------------------------------
55
56The RadioTrack (base) ioport is configurable for 0x30c or 0x20c.  Only one
57ioport seems to be involved.  The ioport decoding circuitry must be pretty
58simple, as individual ioport bits are directly matched to specific functions
59(or blocks) of the radio card.  This way, many functions can be changed in
60parallel with one write to the ioport.  The only feedback available through
61the ioports appears to be the "Stereo Detect" bit.
62
63The bits of the ioport are arranged as follows:
64
65.. code-block:: none
66
67	MSb                                                         LSb
68	+------+------+------+--------+--------+-------+---------+--------+
69	| VolA | VolB | ???? | Stereo | Radio  | TuneA | TuneB   | Tune   |
70	|  (+) |  (-) |      | Detect | Audio  | (bit) | (latch) | Update |
71	|      |      |      | Enable | Enable |       |         | Enable |
72	+------+------+------+--------+--------+-------+---------+--------+
73
74
75====  ====  =================================
76VolA  VolB  Description
77====  ====  =================================
780	 0  audio mute
790	 1  volume +    (some delay required)
801	 0  volume -    (some delay required)
811	 1  stay at present volume
82====  ====  =================================
83
84====================	===========
85Stereo Detect Enable	Description
86====================	===========
870			No Detect
881			Detect
89====================	===========
90
91Results available by reading ioport >60 msec after last port write.
92
93  0xff ==> no stereo detected,  0xfd ==> stereo detected.
94
95=============================	=============================
96Radio to Audio (path) Enable	Description
97=============================	=============================
980				Disable path (silence)
991				Enable path  (audio produced)
100=============================	=============================
101
102=====  =====  ==================
103TuneA  TuneB  Description
104=====  =====  ==================
1050	0     "zero" bit phase 1
1060	1     "zero" bit phase 2
1071	0     "one" bit phase 1
1081	1     "one" bit phase 2
109=====  =====  ==================
110
111
11224-bit code, where bits = (freq*40) + 10486188.
113The Most Significant 11 bits must be 1010 xxxx 0x0 to be valid.
114The bits are shifted in LSb first.
115
116==================	===========================
117Tune Update Enable	Description
118==================	===========================
1190			Tuner held constant
1201			Tuner updating in progress
121==================	===========================
122
123
124PROGRAMMING EXAMPLES
125--------------------
126
127.. code-block:: none
128
129	Default:        BASE <-- 0xc8  (current volume, no stereo detect,
130					radio enable, tuner adjust disable)
131
132	Card Off:	BASE <-- 0x00  (audio mute, no stereo detect,
133					radio disable, tuner adjust disable)
134
135	Card On:	BASE <-- 0x00  (see "Card Off", clears any unfinished business)
136			BASE <-- 0xc8  (see "Default")
137
138	Volume Down:    BASE <-- 0x48  (volume down, no stereo detect,
139					radio enable, tuner adjust disable)
140			wait 10 msec
141			BASE <-- 0xc8  (see "Default")
142
143	Volume Up:      BASE <-- 0x88  (volume up, no stereo detect,
144					radio enable, tuner adjust disable)
145			wait 10 msec
146			BASE <-- 0xc8  (see "Default")
147
148	Check Stereo:   BASE <-- 0xd8  (current volume, stereo detect,
149					radio enable, tuner adjust disable)
150			wait 100 msec
151			x <-- BASE     (read ioport)
152			BASE <-- 0xc8  (see "Default")
153
154			x=0xff ==> "not stereo", x=0xfd ==> "stereo detected"
155
156	Set Frequency:  code = (freq*40) + 10486188
157			foreach of the 24 bits in code,
158			(from Least to Most Significant):
159			to write a "zero" bit,
160			BASE <-- 0x01  (audio mute, no stereo detect, radio
161					disable, "zero" bit phase 1, tuner adjust)
162			BASE <-- 0x03  (audio mute, no stereo detect, radio
163					disable, "zero" bit phase 2, tuner adjust)
164			to write a "one" bit,
165			BASE <-- 0x05  (audio mute, no stereo detect, radio
166					disable, "one" bit phase 1, tuner adjust)
167			BASE <-- 0x07  (audio mute, no stereo detect, radio
168					disable, "one" bit phase 2, tuner adjust)
169