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