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