Documentation/driver-api/media/drivers/radiotrack.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

The Radiotrack radio driver

RadioTrack ISA FM card의 8-bit I/O port layout, volume·stereo 제어와 24-bit tuning protocol을 설명하는 전문 번역입니다.

Source pathDocumentation/driver-api/media/drivers/radiotrack.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

radiotrack.rst:1-168

RadioTrack은 하나의 8-bit ISA I/O port로 volume, stereo detect, radio audio path와 tuner serial update를 동시에 제어합니다. Frequency는 24-bit code로 변환한 뒤 LSb부터 zero/one 두 phase를 전송합니다.

문서 구성
원문 줄내용
1-38실험 문서의 계보와 목적
39-52Card와 RF/VFO 한계
53-74I/O port bit layout
75-100Volume, stereo, audio path truth table
101-12324-bit tuning protocol
124-168Card, volume, stereo, frequency programming 예제

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 The Radiotrack radio driver
4 ===========================
5
6 Author: Stephen M. Benoit <benoits@servicepro.com>
7
8 Date: Dec 14, 1996
9
10 ACKNOWLEDGMENTS
11 ----------------
12
13 This 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
15 Frans Brinkman (brinkman@esd.nl) in 1996. The results reported here are from
16 experiments that the author performed on his own setup, so your mileage may
17 vary... I make no guarantees, claims or warranties to the suitability or
18 validity of this information. No other documentation on the AIMS
19 Lab (http://www.aimslab.com/) RadioTrack card was made available to the
20 author. This document is offered in the hopes that it might help users who
21 want to use the RadioTrack card in an environment other than MS Windows.
22
23 WHY THIS DOCUMENT?
24 ------------------
25
26 I have a RadioTrack card from back when I ran an MS-Windows platform. After
27 converting to Linux, I found Gideon le Grange's command-line software for
28 running the card, and found that it was good! Frans Brinkman made a
29 comfortable X-windows interface, and added a scanning feature. For hack
30 value, I wanted to see if the tuner could be tuned beyond the usual FM radio
31 broadcast band, so I could pick up the audio carriers from North American
32 broadcast TV channels, situated just below and above the 87.0-109.0 MHz range.
33 I did not get much success, but I learned about programming ioports under
34 Linux and gained some insights about the hardware design used for the card.
35
36 So, without further delay, here are the details.
37
38
39 PHYSICAL DESCRIPTION
40 --------------------
41
42 The RadioTrack card is an ISA 8-bit FM radio card. The radio frequency (RF)
43 input is simply an antenna lead, and the output is a power audio signal
44 available through a miniature phone plug. Its RF frequencies of operation are
45 more or less limited from 87.0 to 109.0 MHz (the commercial FM broadcast
46 band). Although the registers can be programmed to request frequencies beyond
47 these limits, experiments did not give promising results. The variable
48 frequency oscillator (VFO) that demodulates the intermediate frequency (IF)
49 signal probably has a small range of useful frequencies, and wraps around or
50 gets clipped beyond the limits mentioned above.
51
52
53 CONTROLLING THE CARD WITH IOPORT
54 --------------------------------
55
56 The RadioTrack (base) ioport is configurable for 0x30c or 0x20c. Only one
57 ioport seems to be involved. The ioport decoding circuitry must be pretty
58 simple, 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
60 parallel with one write to the ioport. The only feedback available through
61 the ioports appears to be the "Stereo Detect" bit.
62
63 The 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 ==== ==== =================================
76 VolA VolB Description
77 ==== ==== =================================
78 0 0 audio mute
79 0 1 volume + (some delay required)
80 1 0 volume - (some delay required)
81 1 1 stay at present volume
82 ==== ==== =================================
83
84 ==================== ===========
85 Stereo Detect Enable Description
86 ==================== ===========
87 0 No Detect
88 1 Detect
89 ==================== ===========
90
91 Results available by reading ioport >60 msec after last port write.
92
93 0xff ==> no stereo detected, 0xfd ==> stereo detected.
94
95 ============================= =============================
96 Radio to Audio (path) Enable Description
97 ============================= =============================
98 0 Disable path (silence)
99 1 Enable path (audio produced)
100 ============================= =============================
101
102 ===== ===== ==================
103 TuneA TuneB Description
104 ===== ===== ==================
105 0 0 "zero" bit phase 1
106 0 1 "zero" bit phase 2
107 1 0 "one" bit phase 1
108 1 1 "one" bit phase 2
109 ===== ===== ==================
110
111
112 24-bit code, where bits = (freq*40) + 10486188.
113 The Most Significant 11 bits must be 1010 xxxx 0x0 to be valid.
114 The bits are shifted in LSb first.
115
116 ================== ===========================
117 Tune Update Enable Description
118 ================== ===========================
119 0 Tuner held constant
120 1 Tuner updating in progress
121 ================== ===========================
122
123
124 PROGRAMMING 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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

문서의 출처와 주의사항

1-22

Stephen M. Benoit가 1996년 12월 14일 작성한 이 `GPL-2.0` 문서는 AIMS Lab RadioTrack radio card의 제어 방법을 설명합니다.

문서는 Gideon le Grange가 1994년에 작성한 Linux용 C code와 Frans Brinkman이 1996년에 더한 설명을 토대로 합니다. 보고된 결과는 저자 자신의 장비에서 수행한 실험이므로 다른 환경에서는 다를 수 있으며, 정보의 적합성이나 유효성을 보증하지 않습니다.

저자는 AIMS Lab(`http://www.aimslab.com/`) RadioTrack card에 관한 다른 문서를 구할 수 없었습니다. 이 자료는 MS Windows 이외의 환경에서 card를 사용하려는 사람에게 도움이 되길 바라며 제공됐습니다.

문서 계보
연도기여자기여
1994Gideon le GrangeLinux C control code
1996Frans Brinkman설명 보강
1996-12-14Stephen M. Benoit실험 기반 hardware/programming 문서
주의환경 의존실험 결과에 대한 보증 없음

.. SPDX-License-Identifier: GPL-2.0

The Radiotrack radio driver
===========================

Author: Stephen M. Benoit <benoits@servicepro.com>

Date:  Dec 14, 1996

ACKNOWLEDGMENTS
----------------

This document was made based on 'C' code for Linux from Gideon le Grange
(legrang@active.co.za or legrang@cs.sun.ac.za) in 1994, and elaborations from
Frans Brinkman (brinkman@esd.nl) in 1996.  The results reported here are from
experiments that the author performed on his own setup, so your mileage may
vary... I make no guarantees, claims or warranties to the suitability or
validity of this information.  No other documentation on the AIMS
Lab (http://www.aimslab.com/) RadioTrack card was made available to the
author.  This document is offered in the hopes that it might help users who
want to use the RadioTrack card in an environment other than MS Windows.

이 문서를 작성한 이유

23-38

저자는 MS Windows를 사용하던 시절의 RadioTrack card를 Linux로 전환한 뒤 Gideon le Grange의 command-line software를 발견했습니다. Frans Brinkman은 편리한 X Windows interface와 scanning 기능을 추가했습니다.

저자는 일반 FM broadcast band를 넘어 tuner를 조정해 87.0-109.0 MHz 범위 바로 아래와 위에 있는 북미 broadcast TV channel의 audio carrier를 수신할 수 있는지 시험했습니다. 큰 성공은 없었지만 Linux I/O port programming과 card hardware 설계에 관한 통찰을 얻었고, 그 세부 사항을 이 문서에 기록했습니다.

실험 목표와 결과
항목내용
기존 도구Command-line control과 X Windows scanning UI
실험 목표FM band 밖의 TV audio carrier 수신
대상 범위87.0-109.0 MHz 주변
결과수신 성공은 제한적
성과Linux ioport programming과 hardware 이해

WHY THIS DOCUMENT?
------------------

I have a RadioTrack card from back when I ran an MS-Windows platform.  After
converting to Linux, I found Gideon le Grange's command-line software for
running the card, and found that it was good!  Frans Brinkman made a
comfortable X-windows interface, and added a scanning feature.  For hack
value, I wanted to see if the tuner could be tuned beyond the usual FM radio
broadcast band, so I could pick up the audio carriers from North American
broadcast TV channels, situated just below and above the 87.0-109.0 MHz range.
I did not get much success, but I learned about programming ioports under
Linux and gained some insights about the hardware design used for the card.

So, without further delay, here are the details.

Card의 물리적 특성

39-52

RadioTrack은 ISA 8-bit FM radio card입니다. RF input은 단순한 antenna lead이고, output은 miniature phone plug에서 나오는 power audio signal입니다.

실용 RF 동작 범위는 대략 commercial FM band인 87.0-109.0 MHz로 제한됩니다. Register에는 범위 밖 frequency도 요청할 수 있지만 실험 결과는 좋지 않았습니다. IF signal을 demodulate하는 variable frequency oscillator(VFO)의 유효 범위가 좁아 한계를 넘으면 wraparound되거나 clipping되는 것으로 추정됩니다.

RadioTrack hardware 특성
항목값 또는 설명
BusISA 8-bit
RF inputAntenna lead
Audio outputMiniature phone plug의 power audio
실용 주파수약 87.0-109.0 MHz
범위 밖 동작Register 요청 가능, 실제 결과는 불안정
추정 제한VFO range와 wraparound/clipping

PHYSICAL DESCRIPTION
--------------------

The RadioTrack card is an ISA 8-bit FM radio card.  The radio frequency (RF)
input is simply an antenna lead, and the output is a power audio signal
available through a miniature phone plug.  Its RF frequencies of operation are
more or less limited from 87.0 to 109.0 MHz (the commercial FM broadcast
band).  Although the registers can be programmed to request frequencies beyond
these limits, experiments did not give promising results.  The variable
frequency oscillator (VFO) that demodulates the intermediate frequency (IF)
signal probably has a small range of useful frequencies, and wraps around or
gets clipped beyond the limits mentioned above.

I/O port와 bit 배치

53-74

RadioTrack base I/O port는 `0x30c` 또는 `0x20c`로 설정할 수 있으며, 관찰상 하나의 port만 사용합니다. Decode 회로가 단순해 개별 port bit가 card의 특정 function이나 block에 직접 대응합니다. 따라서 한 번의 port write로 여러 기능을 병렬 변경할 수 있습니다.

I/O port에서 읽을 수 있는 feedback은 `Stereo Detect` bit뿐인 것으로 보입니다. 8개 bit는 MSb에서 LSb 순서로 `VolA`, `VolB`, unknown, `Stereo Detect Enable`, `Radio Audio Enable`, `TuneA`, `TuneB`, `Tune Update Enable`입니다.

8-bit I/O port layout
BitMSb→LSb field기능
7`VolA`Volume control (+ side)
6`VolB`Volume control (- side)
5`????`Unknown
4`Stereo Detect Enable`Stereo detect gate
3`Radio Audio Enable`Radio-to-audio path
2`TuneA`Serial tune data bit phase
1`TuneB`Serial tune latch phase
0`Tune Update Enable`Tuner update gate

원문의 MSb→LSb ASCII register를 bit 좌표로 재구성했습니다.

한 번의 I/O write
Write BASE byteVolume bitsStereo detect gateAudio pathTune phaseUpdate gate
Read BASE after delayStereo Detect feedback

각 bit가 독립 function에 직접 연결돼 여러 card 상태를 동시에 바꿉니다.

CONTROLLING THE CARD WITH IOPORT
--------------------------------

The RadioTrack (base) ioport is configurable for 0x30c or 0x20c.  Only one
ioport seems to be involved.  The ioport decoding circuitry must be pretty
simple, as individual ioport bits are directly matched to specific functions
(or blocks) of the radio card.  This way, many functions can be changed in
parallel with one write to the ioport.  The only feedback available through
the ioports appears to be the "Stereo Detect" bit.

The bits of the ioport are arranged as follows:

.. code-block:: none

        MSb                                                         LSb
        +------+------+------+--------+--------+-------+---------+--------+
        | VolA | VolB | ???? | Stereo | Radio  | TuneA | TuneB   | Tune   |
        |  (+) |  (-) |      | Detect | Audio  | (bit) | (latch) | Update |
        |      |      |      | Enable | Enable |       |         | Enable |
        +------+------+------+--------+--------+-------+---------+--------+

Volume, stereo detect와 audio path

75-100

`VolA/VolB`가 `00`이면 audio mute, `01`이면 volume up, `10`이면 volume down, `11`이면 현재 volume을 유지합니다. Volume up/down pulse 뒤에는 일정한 delay가 필요합니다.

`Stereo Detect Enable`이 0이면 detect하지 않고 1이면 detect합니다. 마지막 port write 후 60 ms보다 늦게 I/O port를 읽어야 결과를 얻을 수 있습니다. `0xff`는 stereo 미검출, `0xfd`는 stereo 검출을 뜻합니다.

`Radio Audio Enable`이 0이면 radio-to-audio path를 disable해 silence가 되고, 1이면 path를 enable해 audio가 출력됩니다.

VolA / VolB truth table
VolAVolB동작
00Audio mute
01Volume +, delay 필요
10Volume -, delay 필요
11현재 volume 유지

Stereo detect
Enable동작Read result
0No Detect의미 있는 feedback 없음
1Detect`>60 ms` 뒤 `0xff`: no stereo, `0xfd`: stereo

Radio-to-audio path
Enable결과
0Path disable, silence
1Path enable, audio produced

====  ====  =================================
VolA  VolB  Description
====  ====  =================================
0         0  audio mute
0         1  volume +    (some delay required)
1         0  volume -    (some delay required)
1         1  stay at present volume
====  ====  =================================

====================        ===========
Stereo Detect Enable        Description
====================        ===========
0                        No Detect
1                        Detect
====================        ===========

Results available by reading ioport >60 msec after last port write.

  0xff ==> no stereo detected,  0xfd ==> stereo detected.

=============================        =============================
Radio to Audio (path) Enable        Description
=============================        =============================
0                                Disable path (silence)
1                                Enable path  (audio produced)
=============================        =============================

Tune bit protocol과 24-bit code

101-123

`TuneA/TuneB`의 두 phase로 serial bit를 기록합니다. `00`과 `01`은 각각 zero bit phase 1과 phase 2, `10`과 `11`은 one bit phase 1과 phase 2입니다.

Tuner에 보내는 값은 `code = (freq * 40) + 10486188`로 계산한 24-bit code입니다. 유효하려면 가장 중요한 11 bit가 `1010 xxxx 0x0` 형태여야 하며, bit는 LSb부터 먼저 shift합니다.

`Tune Update Enable`이 0이면 tuner 값을 고정하고, 1이면 tuner update가 진행 중임을 뜻합니다.

TuneA / TuneB phase table
TuneATuneBSerial 의미
00Zero bit phase 1
01Zero bit phase 2
10One bit phase 1
11One bit phase 2

Frequency code programming
Frequency(freq * 40) + 1048618824-bit code
Validate upper 11 bits1010 xxxx 0x0
Shift LSb firstWrite phase 1Write phase 2Repeat 24 bits
Tune Update Enable = 0Hold tuner constant
Tune Update Enable = 1Tuner update in progress

24-bit code를 계산한 뒤 LSb부터 각 bit의 두 phase를 전송합니다.


=====  =====  ==================
TuneA  TuneB  Description
=====  =====  ==================
0        0     "zero" bit phase 1
0        1     "zero" bit phase 2
1        0     "one" bit phase 1
1        1     "one" bit phase 2
=====  =====  ==================


24-bit code, where bits = (freq*40) + 10486188.
The Most Significant 11 bits must be 1010 xxxx 0x0 to be valid.
The bits are shifted in LSb first.

==================        ===========================
Tune Update Enable        Description
==================        ===========================
0                        Tuner held constant
1                        Tuner updating in progress
==================        ===========================

I/O programming 예제

124-168

Default 상태는 `BASE ← 0xc8`입니다. 현재 volume을 유지하고 stereo detect를 끄며 radio audio를 enable하고 tuner adjustment를 disable합니다. Card off는 `BASE ← 0x00`으로 audio mute, detect off, radio disable, tuner adjustment disable을 설정합니다. Card on은 먼저 `0x00`으로 미완료 상태를 지운 뒤 `0xc8` default를 기록합니다.

Volume down은 `BASE ← 0x48`, 10 ms 대기, `BASE ← 0xc8` 순서입니다. Volume up은 `BASE ← 0x88`, 10 ms 대기, `BASE ← 0xc8` 순서입니다.

Stereo 확인은 `BASE ← 0xd8`로 detect를 enable하고 100 ms 기다린 뒤 `x ← BASE`로 읽고 `BASE ← 0xc8`로 복구합니다. `x=0xff`면 not stereo, `x=0xfd`면 stereo detected입니다.

Frequency 설정은 먼저 `code = (freq * 40) + 10486188`을 계산합니다. 24개 bit를 LSb부터 처리하면서 zero bit는 `0x01`과 `0x03`, one bit는 `0x05`와 `0x07`의 두 phase write로 전송합니다. 이 write들은 audio mute, stereo detect off, radio disable 상태에서 tuner adjustment를 enable합니다.

Programming command 요약
작업Write/read sequenceDelay/result
Default`BASE ← 0xc8`현재 volume, radio enabled
Card Off`BASE ← 0x00`Mute, radio disabled
Card On`0x00 → 0xc8`미완료 상태 clear 후 default
Volume Down`0x48 → 0xc8`중간 10 ms
Volume Up`0x88 → 0xc8`중간 10 ms
Check Stereo`0xd8 → read BASE → 0xc8`100 ms, `ff` no / `fd` yes
Write zero`0x01 → 0x03`Phase 1 → phase 2
Write one`0x05 → 0x07`Phase 1 → phase 2

24-bit frequency write loop
Compute codeSelect current LSb
Bit = 0BASE 0x01BASE 0x03
Bit = 1BASE 0x05BASE 0x07
Advance to next bitRepeat until 24 bits written

각 bit를 LSb에서 MSb 방향으로 두 phase씩 기록합니다.

PROGRAMMING EXAMPLES
--------------------

.. code-block:: none

        Default:        BASE <-- 0xc8  (current volume, no stereo detect,
                                        radio enable, tuner adjust disable)

        Card Off:        BASE <-- 0x00  (audio mute, no stereo detect,
                                        radio disable, tuner adjust disable)

        Card On:        BASE <-- 0x00  (see "Card Off", clears any unfinished business)
                        BASE <-- 0xc8  (see "Default")

        Volume Down:    BASE <-- 0x48  (volume down, no stereo detect,
                                        radio enable, tuner adjust disable)
                        wait 10 msec
                        BASE <-- 0xc8  (see "Default")

        Volume Up:      BASE <-- 0x88  (volume up, no stereo detect,
                                        radio enable, tuner adjust disable)
                        wait 10 msec
                        BASE <-- 0xc8  (see "Default")

        Check Stereo:   BASE <-- 0xd8  (current volume, stereo detect,
                                        radio enable, tuner adjust disable)
                        wait 100 msec
                        x <-- BASE     (read ioport)
                        BASE <-- 0xc8  (see "Default")

                        x=0xff ==> "not stereo", x=0xfd ==> "stereo detected"

        Set Frequency:  code = (freq*40) + 10486188
                        foreach of the 24 bits in code,
                        (from Least to Most Significant):
                        to write a "zero" bit,
                        BASE <-- 0x01  (audio mute, no stereo detect, radio
                                        disable, "zero" bit phase 1, tuner adjust)
                        BASE <-- 0x03  (audio mute, no stereo detect, radio
                                        disable, "zero" bit phase 2, tuner adjust)
                        to write a "one" bit,
                        BASE <-- 0x05  (audio mute, no stereo detect, radio
                                        disable, "one" bit phase 1, tuner adjust)
                        BASE <-- 0x07  (audio mute, no stereo detect, radio
                                        disable, "one" bit phase 2, tuner adjust)