brintos

brintos / linux-shallow public Read only

0
0
Text · 6.1 KiB · a85cb62 Raw
169 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3The Radiotrack radio driver4===========================5 6Author: Stephen M. Benoit <benoits@servicepro.com>7 8Date:  Dec 14, 19969 10ACKNOWLEDGMENTS11----------------12 13This document was made based on 'C' code for Linux from Gideon le Grange14(legrang@active.co.za or legrang@cs.sun.ac.za) in 1994, and elaborations from15Frans Brinkman (brinkman@esd.nl) in 1996.  The results reported here are from16experiments that the author performed on his own setup, so your mileage may17vary... I make no guarantees, claims or warranties to the suitability or18validity of this information.  No other documentation on the AIMS19Lab (http://www.aimslab.com/) RadioTrack card was made available to the20author.  This document is offered in the hopes that it might help users who21want 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.  After27converting to Linux, I found Gideon le Grange's command-line software for28running the card, and found that it was good!  Frans Brinkman made a29comfortable X-windows interface, and added a scanning feature.  For hack30value, I wanted to see if the tuner could be tuned beyond the usual FM radio31broadcast band, so I could pick up the audio carriers from North American32broadcast 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 under34Linux and gained some insights about the hardware design used for the card.35 36So, without further delay, here are the details.37 38 39PHYSICAL DESCRIPTION40--------------------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 signal44available through a miniature phone plug.  Its RF frequencies of operation are45more or less limited from 87.0 to 109.0 MHz (the commercial FM broadcast46band).  Although the registers can be programmed to request frequencies beyond47these limits, experiments did not give promising results.  The variable48frequency oscillator (VFO) that demodulates the intermediate frequency (IF)49signal probably has a small range of useful frequencies, and wraps around or50gets clipped beyond the limits mentioned above.51 52 53CONTROLLING THE CARD WITH IOPORT54--------------------------------55 56The RadioTrack (base) ioport is configurable for 0x30c or 0x20c.  Only one57ioport seems to be involved.  The ioport decoding circuitry must be pretty58simple, as individual ioport bits are directly matched to specific functions59(or blocks) of the radio card.  This way, many functions can be changed in60parallel with one write to the ioport.  The only feedback available through61the ioports appears to be the "Stereo Detect" bit.62 63The bits of the ioport are arranged as follows:64 65.. code-block:: none66 67	MSb                                                         LSb68	+------+------+------+--------+--------+-------+---------+--------+69	| VolA | VolB | ???? | Stereo | Radio  | TuneA | TuneB   | Tune   |70	|  (+) |  (-) |      | Detect | Audio  | (bit) | (latch) | Update |71	|      |      |      | Enable | Enable |       |         | Enable |72	+------+------+------+--------+--------+-------+---------+--------+73 74 75====  ====  =================================76VolA  VolB  Description77====  ====  =================================780	 0  audio mute790	 1  volume +    (some delay required)801	 0  volume -    (some delay required)811	 1  stay at present volume82====  ====  =================================83 84====================	===========85Stereo Detect Enable	Description86====================	===========870			No Detect881			Detect89====================	===========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	Description97=============================	=============================980				Disable path (silence)991				Enable path  (audio produced)100=============================	=============================101 102=====  =====  ==================103TuneA  TuneB  Description104=====  =====  ==================1050	0     "zero" bit phase 11060	1     "zero" bit phase 21071	0     "one" bit phase 11081	1     "one" bit phase 2109=====  =====  ==================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	Description118==================	===========================1190			Tuner held constant1201			Tuner updating in progress121==================	===========================122 123 124PROGRAMMING EXAMPLES125--------------------126 127.. code-block:: none128 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 msec141			BASE <-- 0xc8  (see "Default")142 143	Volume Up:      BASE <-- 0x88  (volume up, no stereo detect,144					radio enable, tuner adjust disable)145			wait 10 msec146			BASE <-- 0xc8  (see "Default")147 148	Check Stereo:   BASE <-- 0xd8  (current volume, stereo detect,149					radio enable, tuner adjust disable)150			wait 100 msec151			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) + 10486188157			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, radio161					disable, "zero" bit phase 1, tuner adjust)162			BASE <-- 0x03  (audio mute, no stereo detect, radio163					disable, "zero" bit phase 2, tuner adjust)164			to write a "one" bit,165			BASE <-- 0x05  (audio mute, no stereo detect, radio166					disable, "one" bit phase 1, tuner adjust)167			BASE <-- 0x07  (audio mute, no stereo detect, radio168					disable, "one" bit phase 2, tuner adjust)169