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

Linux 6.18.37 · Administration / Media

The SI476x Driver

SI476x radio driver의 firmware update 한계와 ACF·RDS·AGC·RSQ debugfs binary layout을 설명합니다.

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

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

1. 요약·해설

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

Debugfs data map

si476x.rst:1-160

V4L2와 직접 관련이 적은 RF test·quality metric은 `<device-name>`별 debugfs binary file로 노출됩니다. 각 file은 고정 offset field로 구성되며 primary tuner RSQ는 일반 RSQ layout을 재사용합니다.

Debugfs fileRecord 수내용
`/sys/kernel/debug/<device-name>/acf`12ACF 상태와 soft-mute·filter·pilot 정보
`/sys/kernel/debug/<device-name>/rds_blckcnt`3RDS block 수신 통계
`/sys/kernel/debug/<device-name>/agc`8Automatic Gain Control 상태와 gain
`/sys/kernel/debug/<device-name>/rsq`28Received Signal Quality metric과 flag
`/sys/kernel/debug/<device-name>/rsq_primary`28Primary tuner용 RSQ, `rsq`와 같은 layout

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. include:: <isonum.txt>
4
5
6 The SI476x Driver
7 =================
8
9 Copyright |copy| 2013 Andrey Smirnov <[email protected]>
10
11 TODO for the driver
12 -------------------
13
14 - According to the SiLabs' datasheet it is possible to update the
15 firmware of the radio chip in the run-time, thus bringing it to the
16 most recent version. Unfortunately I couldn't find any mentioning of
17 the said firmware update for the old chips that I tested the driver
18 against, so for chips like that the driver only exposes the old
19 functionality.
20
21
22 Parameters exposed over debugfs
23 -------------------------------
24 SI476x allow user to get multiple characteristics that can be very
25 useful for EoL testing/RF performance estimation, parameters that have
26 very little to do with V4L2 subsystem. Such parameters are exposed via
27 debugfs and can be accessed via regular file I/O operations.
28
29 The drivers exposes following files:
30
31 * /sys/kernel/debug/<device-name>/acf
32 This file contains ACF(Automatically Controlled Features) status
33 information. The contents of the file is binary data of the
34 following layout:
35
36 .. tabularcolumns:: |p{7ex}|p{12ex}|L|
37
38 ============= ============== ====================================
39 Offset Name Description
40 ============= ============== ====================================
41 0x00 blend_int Flag, set when stereo separation has
42 crossed below the blend threshold
43 0x01 hblend_int Flag, set when HiBlend cutoff
44 frequency is lower than threshold
45 0x02 hicut_int Flag, set when HiCut cutoff
46 frequency is lower than threshold
47 0x03 chbw_int Flag, set when channel filter
48 bandwidth is less than threshold
49 0x04 softmute_int Flag indicating that softmute
50 attenuation has increased above
51 softmute threshold
52 0x05 smute 0 - Audio is not soft muted
53 1 - Audio is soft muted
54 0x06 smattn Soft mute attenuation level in dB
55 0x07 chbw Channel filter bandwidth in kHz
56 0x08 hicut HiCut cutoff frequency in units of
57 100Hz
58 0x09 hiblend HiBlend cutoff frequency in units
59 of 100 Hz
60 0x10 pilot 0 - Stereo pilot is not present
61 1 - Stereo pilot is present
62 0x11 stblend Stereo blend in %
63 ============= ============== ====================================
64
65
66 * /sys/kernel/debug/<device-name>/rds_blckcnt
67 This file contains statistics about RDS receptions. It's binary data
68 has the following layout:
69
70 .. tabularcolumns:: |p{7ex}|p{12ex}|L|
71
72 ============= ============== ====================================
73 Offset Name Description
74 ============= ============== ====================================
75 0x00 expected Number of expected RDS blocks
76 0x02 received Number of received RDS blocks
77 0x04 uncorrectable Number of uncorrectable RDS blocks
78 ============= ============== ====================================
79
80 * /sys/kernel/debug/<device-name>/agc
81 This file contains information about parameters pertaining to
82 AGC(Automatic Gain Control)
83
84 The layout is:
85
86 .. tabularcolumns:: |p{7ex}|p{12ex}|L|
87
88 ============= ============== ====================================
89 Offset Name Description
90 ============= ============== ====================================
91 0x00 mxhi 0 - FM Mixer PD high threshold is
92 not tripped
93 1 - FM Mixer PD high threshold is
94 tripped
95 0x01 mxlo ditto for FM Mixer PD low
96 0x02 lnahi ditto for FM LNA PD high
97 0x03 lnalo ditto for FM LNA PD low
98 0x04 fmagc1 FMAGC1 attenuator resistance
99 (see datasheet for more detail)
100 0x05 fmagc2 ditto for FMAGC2
101 0x06 pgagain PGA gain in dB
102 0x07 fmwblang FM/WB LNA Gain in dB
103 ============= ============== ====================================
104
105 * /sys/kernel/debug/<device-name>/rsq
106 This file contains information about parameters pertaining to
107 RSQ(Received Signal Quality)
108
109 The layout is:
110
111 .. tabularcolumns:: |p{7ex}|p{12ex}|p{60ex}|
112
113 ============= ============== ====================================
114 Offset Name Description
115 ============= ============== ====================================
116 0x00 multhint 0 - multipath value has not crossed
117 the Multipath high threshold
118 1 - multipath value has crossed
119 the Multipath high threshold
120 0x01 multlint ditto for Multipath low threshold
121 0x02 snrhint 0 - received signal's SNR has not
122 crossed high threshold
123 1 - received signal's SNR has
124 crossed high threshold
125 0x03 snrlint ditto for low threshold
126 0x04 rssihint ditto for RSSI high threshold
127 0x05 rssilint ditto for RSSI low threshold
128 0x06 bltf Flag indicating if seek command
129 reached/wrapped seek band limit
130 0x07 snr_ready Indicates that SNR metrics is ready
131 0x08 rssiready ditto for RSSI metrics
132 0x09 injside 0 - Low-side injection is being used
133 1 - High-side injection is used
134 0x10 afcrl Flag indicating if AFC rails
135 0x11 valid Flag indicating if channel is valid
136 0x12 readfreq Current tuned frequency
137 0x14 freqoff Signed frequency offset in units of
138 2ppm
139 0x15 rssi Signed value of RSSI in dBuV
140 0x16 snr Signed RF SNR in dB
141 0x17 issi Signed Image Strength Signal
142 indicator
143 0x18 lassi Signed Low side adjacent Channel
144 Strength indicator
145 0x19 hassi ditto for High side
146 0x20 mult Multipath indicator
147 0x21 dev Frequency deviation
148 0x24 assi Adjacent channel SSI
149 0x25 usn Ultrasonic noise indicator
150 0x26 pilotdev Pilot deviation in units of 100 Hz
151 0x27 rdsdev ditto for RDS
152 0x28 assidev ditto for ASSI
153 0x29 strongdev Frequency deviation
154 0x30 rdspi RDS PI code
155 ============= ============== ====================================
156
157 * /sys/kernel/debug/<device-name>/rsq_primary
158 This file contains information about parameters pertaining to
159 RSQ(Received Signal Quality) for primary tuner only. Layout is as
160 the one above.
161

3. 한국어 전문 번역

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

SI476x driver

1-10

이 문서는 GPL-2.0 라이선스를 따릅니다. Copyright |copy| 2013 Andrey Smirnov <[email protected]>.

Driver의 남은 작업

11-20
  • SiLabs datasheet에 따르면 runtime에 radio chip firmware를 update해 최신 version으로 올릴 수 있습니다. 그러나 driver를 test한 구형 chip에서는 해당 firmware update에 관한 설명을 찾을 수 없었으므로, 그런 chip에 대해서는 driver가 기존 기능만 노출합니다.

Debugfs parameter와 ACF

21-64

SI476x는 EoL test와 RF performance 추정에 유용하지만 V4L2 subsystem과는 관련이 적은 여러 특성을 제공합니다. 이런 parameter는 debugfs로 노출되며 일반 file I/O operation으로 접근할 수 있습니다.

`/sys/kernel/debug/<device-name>/acf`는 ACF(Automatically Controlled Features) 상태 정보를 다음 binary layout으로 제공합니다.

OffsetName설명
0x00blend_intStereo separation이 blend threshold 아래로 내려가면 set되는 flag
0x01hblend_intHiBlend cutoff frequency가 threshold보다 낮으면 set되는 flag
0x02hicut_intHiCut cutoff frequency가 threshold보다 낮으면 set되는 flag
0x03chbw_intChannel filter bandwidth가 threshold보다 작으면 set되는 flag
0x04softmute_intSoftmute attenuation이 softmute threshold 위로 증가했음을 나타내는 flag
0x05smute0: audio가 soft-muted 상태가 아님; 1: audio가 soft-muted 상태
0x06smattnSoft mute attenuation level, 단위 dB
0x07chbwChannel filter bandwidth, 단위 kHz
0x08hicutHiCut cutoff frequency, 단위 100 Hz
0x09hiblendHiBlend cutoff frequency, 단위 100 Hz
0x10pilot0: stereo pilot 없음; 1: stereo pilot 있음
0x11stblendStereo blend, 단위 %

RDS block 통계

65-79

`/sys/kernel/debug/<device-name>/rds_blckcnt`는 RDS 수신 통계를 다음 binary layout으로 제공합니다.

OffsetName설명
0x00expected예상한 RDS block 수
0x02received수신한 RDS block 수
0x04uncorrectable수정할 수 없는 RDS block 수

AGC parameter

80-104

`/sys/kernel/debug/<device-name>/agc`는 AGC(Automatic Gain Control) 관련 parameter를 다음 layout으로 제공합니다.

OffsetName설명
0x00mxhi0: FM Mixer PD high threshold 미도달; 1: threshold 도달
0x01mxloFM Mixer PD low threshold에 대해 동일
0x02lnahiFM LNA PD high threshold에 대해 동일
0x03lnaloFM LNA PD low threshold에 대해 동일
0x04fmagc1FMAGC1 attenuator resistance, 자세한 내용은 datasheet 참고
0x05fmagc2FMAGC2에 대해 동일
0x06pgagainPGA gain, 단위 dB
0x07fmwblangFM/WB LNA gain, 단위 dB

RSQ parameter

105-155

`/sys/kernel/debug/<device-name>/rsq`는 RSQ(Received Signal Quality) 관련 parameter를 다음 layout으로 제공합니다.

OffsetName설명
0x00multhint0: multipath value가 high threshold를 넘지 않음; 1: 넘음
0x01multlintMultipath low threshold에 대해 동일
0x02snrhint0: received signal SNR이 high threshold를 넘지 않음; 1: 넘음
0x03snrlintSNR low threshold에 대해 동일
0x04rssihintRSSI high threshold에 대해 동일
0x05rssilintRSSI low threshold에 대해 동일
0x06bltfSeek command가 seek band limit에 도달하거나 wrap했음을 나타내는 flag
0x07snr_readySNR metric이 준비됐음을 나타냄
0x08rssireadyRSSI metric이 준비됐음을 나타냄
0x09injside0: low-side injection 사용; 1: high-side injection 사용
0x10afcrlAFC rail 상태를 나타내는 flag
0x11validChannel 유효성을 나타내는 flag
0x12readfreq현재 tuned frequency
0x14freqoffSigned frequency offset, 단위 2 ppm
0x15rssiSigned RSSI value, 단위 dBuV
0x16snrSigned RF SNR, 단위 dB
0x17issiSigned Image Strength Signal indicator
0x18lassiSigned low-side adjacent Channel Strength indicator
0x19hassiHigh-side에 대해 동일
0x20multMultipath indicator
0x21devFrequency deviation
0x24assiAdjacent channel SSI
0x25usnUltrasonic noise indicator
0x26pilotdevPilot deviation, 단위 100 Hz
0x27rdsdevRDS deviation, 단위 100 Hz
0x28assidevASSI deviation, 단위 100 Hz
0x29strongdevFrequency deviation
0x30rdspiRDS PI code

Primary tuner RSQ

156-160

`/sys/kernel/debug/<device-name>/rsq_primary`는 primary tuner의 RSQ(Received Signal Quality) 정보를 제공합니다. Layout은 위 `rsq`와 같습니다.

모든 debugfs file은 binary data이므로 offset과 field width를 고려해 읽어야 합니다.