About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / video4linux / radiotrack.txt




Custom Search

Based on kernel version 3.16. Page generated on 2014-08-06 21:41 EST.

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

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.