← Documents Documentation/admin-guide/media/si4713.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Media

Silicon Labs Si4713 FM Radio Transmitter

Si4713 I2C FM transmitter의 driver 계층, V4L2 extended control, RNL 측정, subchannel과 test 절차를 설명합니다.

Source pathDocumentation/admin-guide/media/si4713.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Control과 data path

si4713.rst:1-192

Platform radio device가 user land V4L2 API를 제공하고 I2C `v4l2-subdev`가 실제 `0x63` device에 command를 전달합니다. Extended control은 modulation, audio processing, output power와 RDS field를 관리합니다.

Control 영역주요 symbol역할
Stereo pilotpilot_frequency, pilot_deviation, pilot_enabledPilot tone의 frequency·deviation과 enable 상태를 설정합니다.
Audio compressionacomp_enabled, acomp_gain, acomp_threshold, acomp_attack_time, acomp_release_time전송 signal의 audio dynamic range control을 설정합니다.
Deviation limiterlimiter_enabled, limiter_deviation, limiter_release_timeOver-deviation 때 input front-end gain을 조절합니다.
Tuning powerpower_level, antenna_capacitor출력 power와 antenna tuning capacitor를 설정합니다.
RDSrds_ps_name, rds_radio_text, rds_pi, rds_pty전송할 PS name, radio text, PI와 PTY field를 설정합니다.
Regionpreemphasis전송에 적용할 preemphasis를 설정합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. include:: <isonum.txt>
4
5 The Silicon Labs Si4713 FM Radio Transmitter Driver
6 ===================================================
7
8 Copyright |copy| 2009 Nokia Corporation
9
10 Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
11
12
13 Information about the Device
14 ----------------------------
15
16 This chip is a Silicon Labs product. It is an I2C device, currently on 0x63 address.
17 Basically, it has transmission and signal noise level measurement features.
18
19 The Si4713 integrates transmit functions for FM broadcast stereo transmission.
20 The chip also allows integrated receive power scanning to identify low signal
21 power FM channels.
22
23 The chip is programmed using commands and responses. There are also several
24 properties which can change the behavior of this chip.
25
26 Users must comply with local regulations on radio frequency (RF) transmission.
27
28 Device driver description
29 -------------------------
30
31 There are two modules to handle this device. One is an I2C device driver
32 and the other is a platform driver.
33
34 The I2C device driver exports a v4l2-subdev interface to the kernel.
35 All properties can also be accessed by v4l2 extended controls interface, by
36 using the v4l2-subdev calls (g_ext_ctrls, s_ext_ctrls).
37
38 The platform device driver exports a v4l2 radio device interface to user land.
39 So, it uses the I2C device driver as a sub device in order to send the user
40 commands to the actual device. Basically it is a wrapper to the I2C device driver.
41
42 Applications can use v4l2 radio API to specify frequency of operation, mute state,
43 etc. But mostly of its properties will be present in the extended controls.
44
45 When the v4l2 mute property is set to 1 (true), the driver will turn the chip off.
46
47 Properties description
48 ----------------------
49
50 The properties can be accessed using v4l2 extended controls.
51 Here is an output from v4l2-ctl util:
52
53 .. code-block:: none
54
55 / # v4l2-ctl -d /dev/radio0 --all -L
56 Driver Info:
57 Driver name : radio-si4713
58 Card type : Silicon Labs Si4713 Modulator
59 Bus info :
60 Driver version: 0
61 Capabilities : 0x00080800
62 RDS Output
63 Modulator
64 Audio output: 0 (FM Modulator Audio Out)
65 Frequency: 1408000 (88.000000 MHz)
66 Video Standard = 0x00000000
67 Modulator:
68 Name : FM Modulator
69 Capabilities : 62.5 Hz stereo rds
70 Frequency range : 76.0 MHz - 108.0 MHz
71 Subchannel modulation: stereo+rds
72
73 User Controls
74
75 mute (bool) : default=1 value=0
76
77 FM Radio Modulator Controls
78
79 rds_signal_deviation (int) : min=0 max=90000 step=10 default=200 value=200 flags=slider
80 rds_program_id (int) : min=0 max=65535 step=1 default=0 value=0
81 rds_program_type (int) : min=0 max=31 step=1 default=0 value=0
82 rds_ps_name (str) : min=0 max=96 step=8 value='si4713 '
83 rds_radio_text (str) : min=0 max=384 step=32 value=''
84 audio_limiter_feature_enabled (bool) : default=1 value=1
85 audio_limiter_release_time (int) : min=250 max=102390 step=50 default=5010 value=5010 flags=slider
86 audio_limiter_deviation (int) : min=0 max=90000 step=10 default=66250 value=66250 flags=slider
87 audio_compression_feature_enabl (bool) : default=1 value=1
88 audio_compression_gain (int) : min=0 max=20 step=1 default=15 value=15 flags=slider
89 audio_compression_threshold (int) : min=-40 max=0 step=1 default=-40 value=-40 flags=slider
90 audio_compression_attack_time (int) : min=0 max=5000 step=500 default=0 value=0 flags=slider
91 audio_compression_release_time (int) : min=100000 max=1000000 step=100000 default=1000000 value=1000000 flags=slider
92 pilot_tone_feature_enabled (bool) : default=1 value=1
93 pilot_tone_deviation (int) : min=0 max=90000 step=10 default=6750 value=6750 flags=slider
94 pilot_tone_frequency (int) : min=0 max=19000 step=1 default=19000 value=19000 flags=slider
95 pre_emphasis_settings (menu) : min=0 max=2 default=1 value=1
96 tune_power_level (int) : min=0 max=120 step=1 default=88 value=88 flags=slider
97 tune_antenna_capacitor (int) : min=0 max=191 step=1 default=0 value=110 flags=slider
98
99 Here is a summary of them:
100
101 * Pilot is an audible tone sent by the device.
102
103 - pilot_frequency - Configures the frequency of the stereo pilot tone.
104 - pilot_deviation - Configures pilot tone frequency deviation level.
105 - pilot_enabled - Enables or disables the pilot tone feature.
106
107 * The si4713 device is capable of applying audio compression to the
108 transmitted signal.
109
110 - acomp_enabled - Enables or disables the audio dynamic range control feature.
111 - acomp_gain - Sets the gain for audio dynamic range control.
112 - acomp_threshold - Sets the threshold level for audio dynamic range control.
113 - acomp_attack_time - Sets the attack time for audio dynamic range control.
114 - acomp_release_time - Sets the release time for audio dynamic range control.
115
116 * Limiter sets up the audio deviation limiter feature. Once an over deviation occurs,
117 it is possible to adjust the front-end gain of the audio input and always
118 prevent over deviation.
119
120 - limiter_enabled - Enables or disables the limiter feature.
121 - limiter_deviation - Configures audio frequency deviation level.
122 - limiter_release_time - Sets the limiter release time.
123
124 * Tuning power
125
126 - power_level - Sets the output power level for signal transmission.
127 antenna_capacitor - This selects the value of antenna tuning capacitor
128 manually or automatically if set to zero.
129
130 * RDS related
131
132 - rds_ps_name - Sets the RDS ps name field for transmission.
133 - rds_radio_text - Sets the RDS radio text for transmission.
134 - rds_pi - Sets the RDS PI field for transmission.
135 - rds_pty - Sets the RDS PTY field for transmission.
136
137 * Region related
138
139 - preemphasis - sets the preemphasis to be applied for transmission.
140
141 RNL
142 ---
143
144 This device also has an interface to measure received noise level. To do that, you should
145 ioctl the device node. Here is an code of example:
146
147 .. code-block:: none
148
149 int main (int argc, char *argv[])
150 {
151 struct si4713_rnl rnl;
152 int fd = open("/dev/radio0", O_RDWR);
153 int rval;
154
155 if (argc < 2)
156 return -EINVAL;
157
158 if (fd < 0)
159 return fd;
160
161 sscanf(argv[1], "%d", &rnl.frequency);
162
163 rval = ioctl(fd, SI4713_IOC_MEASURE_RNL, &rnl);
164 if (rval < 0)
165 return rval;
166
167 printf("received noise level: %d\n", rnl.rnl);
168
169 close(fd);
170 }
171
172 The struct si4713_rnl and SI4713_IOC_MEASURE_RNL are defined under
173 include/linux/platform_data/media/si4713.h.
174
175 Stereo/Mono and RDS subchannels
176 -------------------------------
177
178 The device can also be configured using the available sub channels for
179 transmission. To do that use S/G_MODULATOR ioctl and configure txsubchans properly.
180 Refer to the V4L2 API specification for proper use of this ioctl.
181
182 Testing
183 -------
184 Testing is usually done with v4l2-ctl utility for managing FM tuner cards.
185 The tool can be found in v4l-dvb repository under v4l2-apps/util directory.
186
187 Example for setting rds ps name:
188
189 .. code-block:: none
190
191 # v4l2-ctl -d /dev/radio0 --set-ctrl=rds_ps_name="Dummy"
192
193

3. 한국어 전문 번역

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

Si4713 transmitter 소개

1-10

이 문서는 GPL-2.0 라이선스를 따릅니다. Copyright |copy| 2009 Nokia Corporation. 연락처는 Eduardo Valentin <eduardo.valentin@nokia.com>입니다.

Device 정보

11-27

이 chip은 Silicon Labs 제품이며 현재 address `0x63`을 사용하는 I2C device입니다. 기본적으로 FM 전송과 signal noise level 측정 기능을 제공합니다.

Si4713은 FM broadcast stereo transmission용 transmit function을 통합합니다. 또한 receive power scan 기능으로 signal power가 낮은 FM channel을 식별할 수 있습니다.

Chip은 command와 response로 programming하며, 여러 property로 동작을 변경할 수 있습니다.

사용자는 radio frequency(RF) 전송에 관한 지역 규정을 준수해야 합니다.

Device driver 구성

28-46

이 device는 두 module로 처리합니다. 하나는 I2C device driver이고 다른 하나는 platform driver입니다.

I2C device driver는 kernel에 `v4l2-subdev` interface를 export합니다. 모든 property는 `v4l2-subdev` call인 `g_ext_ctrls`, `s_ext_ctrls`를 사용하는 V4L2 extended controls interface로도 접근할 수 있습니다.

Platform device driver는 user land에 V4L2 radio device interface를 export합니다. 사용자 command를 실제 device에 보내기 위해 I2C device driver를 subdevice로 사용하며, 기본적으로 I2C driver의 wrapper입니다.

Application은 V4L2 radio API로 동작 frequency와 mute 상태 등을 지정할 수 있습니다. 대부분의 property는 extended control로 제공됩니다.

V4L2 mute property를 `1`(true)로 설정하면 driver는 chip을 끕니다.

Property와 control 출력

47-98

Property는 V4L2 extended control로 접근합니다. 다음은 `v4l2-ctl` utility의 출력입니다.

/ # v4l2-ctl -d /dev/radio0 --all -L
Driver Info:
	Driver name   : radio-si4713
	Card type     : Silicon Labs Si4713 Modulator
	Bus info      :
	Driver version: 0
	Capabilities  : 0x00080800
		RDS Output
		Modulator
Audio output: 0 (FM Modulator Audio Out)
Frequency: 1408000 (88.000000 MHz)
Video Standard = 0x00000000
Modulator:
	Name                 : FM Modulator
	Capabilities         : 62.5 Hz stereo rds
	Frequency range      : 76.0 MHz - 108.0 MHz
	Subchannel modulation: stereo+rds

User Controls

			mute (bool) : default=1 value=0

FM Radio Modulator Controls

	rds_signal_deviation (int)  : min=0 max=90000 step=10 default=200 value=200 flags=slider
		rds_program_id (int)  : min=0 max=65535 step=1 default=0 value=0
	rds_program_type (int)  : min=0 max=31 step=1 default=0 value=0
		rds_ps_name (str)  : min=0 max=96 step=8 value='si4713  '
		rds_radio_text (str)  : min=0 max=384 step=32 value=''
audio_limiter_feature_enabled (bool) : default=1 value=1
audio_limiter_release_time (int)  : min=250 max=102390 step=50 default=5010 value=5010 flags=slider
	audio_limiter_deviation (int)  : min=0 max=90000 step=10 default=66250 value=66250 flags=slider
audio_compression_feature_enabl (bool) : default=1 value=1
	audio_compression_gain (int)  : min=0 max=20 step=1 default=15 value=15 flags=slider
audio_compression_threshold (int)  : min=-40 max=0 step=1 default=-40 value=-40 flags=slider
audio_compression_attack_time (int)  : min=0 max=5000 step=500 default=0 value=0 flags=slider
audio_compression_release_time (int)  : min=100000 max=1000000 step=100000 default=1000000 value=1000000 flags=slider
pilot_tone_feature_enabled (bool) : default=1 value=1
	pilot_tone_deviation (int)  : min=0 max=90000 step=10 default=6750 value=6750 flags=slider
	pilot_tone_frequency (int)  : min=0 max=19000 step=1 default=19000 value=19000 flags=slider
	pre_emphasis_settings (menu) : min=0 max=2 default=1 value=1
	tune_power_level (int)  : min=0 max=120 step=1 default=88 value=88 flags=slider
	tune_antenna_capacitor (int)  : min=0 max=191 step=1 default=0 value=110 flags=slider

Control 요약

99-140

Stereo pilot

Pilot은 device가 보내는 audible tone입니다.

  • `pilot_frequency` - stereo pilot tone의 frequency를 설정합니다.
  • `pilot_deviation` - pilot tone frequency deviation level을 설정합니다.
  • `pilot_enabled` - pilot tone 기능을 enable 또는 disable합니다.

Audio compression

Si4713 device는 전송 signal에 audio compression을 적용할 수 있습니다.

  • `acomp_enabled` - audio dynamic range control을 enable 또는 disable합니다.
  • `acomp_gain` - audio dynamic range control의 gain을 설정합니다.
  • `acomp_threshold` - audio dynamic range control의 threshold level을 설정합니다.
  • `acomp_attack_time` - audio dynamic range control의 attack time을 설정합니다.
  • `acomp_release_time` - audio dynamic range control의 release time을 설정합니다.

Limiter

Limiter는 audio deviation limiter 기능을 구성합니다. Over-deviation이 발생하면 audio input의 front-end gain을 조절해 over-deviation을 계속 방지할 수 있습니다.

  • `limiter_enabled` - limiter 기능을 enable 또는 disable합니다.
  • `limiter_deviation` - audio frequency deviation level을 설정합니다.
  • `limiter_release_time` - limiter release time을 설정합니다.

Tuning power

  • `power_level` - signal 전송의 output power level을 설정합니다.
  • `antenna_capacitor` - antenna tuning capacitor 값을 직접 선택하며, 0이면 자동으로 선택합니다.

RDS

  • `rds_ps_name` - 전송할 RDS PS name field를 설정합니다.
  • `rds_radio_text` - 전송할 RDS radio text를 설정합니다.
  • `rds_pi` - 전송할 RDS PI field를 설정합니다.
  • `rds_pty` - 전송할 RDS PTY field를 설정합니다.

Region

  • `preemphasis` - 전송에 적용할 preemphasis를 설정합니다.

Received Noise Level 측정

141-173

이 device에는 received noise level(RNL)을 측정하는 interface도 있습니다. 측정하려면 device node에 ioctl을 호출합니다. 다음은 예제 code입니다.

int main (int argc, char *argv[])
{
	struct si4713_rnl rnl;
	int fd = open("/dev/radio0", O_RDWR);
	int rval;

	if (argc < 2)
		return -EINVAL;

	if (fd < 0)
		return fd;

	sscanf(argv[1], "%d", &rnl.frequency);

	rval = ioctl(fd, SI4713_IOC_MEASURE_RNL, &rnl);
	if (rval < 0)
		return rval;

	printf("received noise level: %d\n", rnl.rnl);

	close(fd);
}

`struct si4713_rnl`과 `SI4713_IOC_MEASURE_RNL`은 `include/linux/platform_data/media/si4713.h`에 정의되어 있습니다.

Stereo/Mono와 RDS subchannel

174-180

전송에 사용할 subchannel로 device를 설정할 수도 있습니다. `S/G_MODULATOR` ioctl을 사용하고 `txsubchans`를 올바르게 설정하십시오. 이 ioctl의 올바른 사용법은 V4L2 API specification을 참고하십시오.

Test

181-192

Test는 보통 FM tuner card 관리용 `v4l2-ctl` utility로 수행합니다. 이 도구는 v4l-dvb repository의 `v4l2-apps/util` directory에 있습니다.

RDS PS name을 설정하는 예시는 다음과 같습니다.

# v4l2-ctl -d /dev/radio0 --set-ctrl=rds_ps_name="Dummy"