요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
The SI476x Driver
=================
Copyright |copy| 2013 Andrey Smirnov <[email protected]>
TODO for the driver
-------------------
- According to the SiLabs' datasheet it is possible to update the
firmware of the radio chip in the run-time, thus bringing it to the
most recent version. Unfortunately I couldn't find any mentioning of
the said firmware update for the old chips that I tested the driver
against, so for chips like that the driver only exposes the old
functionality.
Parameters exposed over debugfs
-------------------------------
SI476x allow user to get multiple characteristics that can be very
useful for EoL testing/RF performance estimation, parameters that have
very little to do with V4L2 subsystem. Such parameters are exposed via
debugfs and can be accessed via regular file I/O operations.
The drivers exposes following files:
* /sys/kernel/debug/<device-name>/acf
This file contains ACF(Automatically Controlled Features) status
information. The contents of the file is binary data of the
following layout:
.. tabularcolumns:: |p{7ex}|p{12ex}|L|
============= ============== ====================================
Offset Name Description
============= ============== ====================================
0x00 blend_int Flag, set when stereo separation has
crossed below the blend threshold
0x01 hblend_int Flag, set when HiBlend cutoff
frequency is lower than threshold
0x02 hicut_int Flag, set when HiCut cutoff
frequency is lower than threshold
0x03 chbw_int Flag, set when channel filter
bandwidth is less than threshold
0x04 softmute_int Flag indicating that softmute
attenuation has increased above
softmute threshold
0x05 smute 0 - Audio is not soft muted
1 - Audio is soft muted
0x06 smattn Soft mute attenuation level in dB
0x07 chbw Channel filter bandwidth in kHz
0x08 hicut HiCut cutoff frequency in units of
100Hz
0x09 hiblend HiBlend cutoff frequency in units
of 100 Hz
0x10 pilot 0 - Stereo pilot is not present
1 - Stereo pilot is present
0x11 stblend Stereo blend in %
============= ============== ====================================
* /sys/kernel/debug/<device-name>/rds_blckcnt
This file contains statistics about RDS receptions. It's binary data
has the following layout:
.. tabularcolumns:: |p{7ex}|p{12ex}|L|
============= ============== ====================================
Offset Name Description
============= ============== ====================================
0x00 expected Number of expected RDS blocks
0x02 received Number of received RDS blocks
0x04 uncorrectable Number of uncorrectable RDS blocks
============= ============== ====================================
* /sys/kernel/debug/<device-name>/agc
This file contains information about parameters pertaining to
AGC(Automatic Gain Control)
The layout is:
.. tabularcolumns:: |p{7ex}|p{12ex}|L|
============= ============== ====================================
Offset Name Description
============= ============== ====================================
0x00 mxhi 0 - FM Mixer PD high threshold is
not tripped
1 - FM Mixer PD high threshold is
tripped
0x01 mxlo ditto for FM Mixer PD low
0x02 lnahi ditto for FM LNA PD high
0x03 lnalo ditto for FM LNA PD low
0x04 fmagc1 FMAGC1 attenuator resistance
(see datasheet for more detail)
0x05 fmagc2 ditto for FMAGC2
0x06 pgagain PGA gain in dB
0x07 fmwblang FM/WB LNA Gain in dB
============= ============== ====================================
* /sys/kernel/debug/<device-name>/rsq
This file contains information about parameters pertaining to
RSQ(Received Signal Quality)
The layout is:
.. tabularcolumns:: |p{7ex}|p{12ex}|p{60ex}|
============= ============== ====================================
Offset Name Description
============= ============== ====================================
0x00 multhint 0 - multipath value has not crossed
the Multipath high threshold
1 - multipath value has crossed
the Multipath high threshold
0x01 multlint ditto for Multipath low threshold
0x02 snrhint 0 - received signal's SNR has not
crossed high threshold
1 - received signal's SNR has
crossed high threshold
0x03 snrlint ditto for low threshold
0x04 rssihint ditto for RSSI high threshold
0x05 rssilint ditto for RSSI low threshold
0x06 bltf Flag indicating if seek command
reached/wrapped seek band limit
0x07 snr_ready Indicates that SNR metrics is ready
0x08 rssiready ditto for RSSI metrics
0x09 injside 0 - Low-side injection is being used
1 - High-side injection is used
0x10 afcrl Flag indicating if AFC rails
0x11 valid Flag indicating if channel is valid
0x12 readfreq Current tuned frequency
0x14 freqoff Signed frequency offset in units of
2ppm
0x15 rssi Signed value of RSSI in dBuV
0x16 snr Signed RF SNR in dB
0x17 issi Signed Image Strength Signal
indicator
0x18 lassi Signed Low side adjacent Channel
Strength indicator
0x19 hassi ditto for High side
0x20 mult Multipath indicator
0x21 dev Frequency deviation
0x24 assi Adjacent channel SSI
0x25 usn Ultrasonic noise indicator
0x26 pilotdev Pilot deviation in units of 100 Hz
0x27 rdsdev ditto for RDS
0x28 assidev ditto for ASSI
0x29 strongdev Frequency deviation
0x30 rdspi RDS PI code
============= ============== ====================================
* /sys/kernel/debug/<device-name>/rsq_primary
This file contains information about parameters pertaining to
RSQ(Received Signal Quality) for primary tuner only. Layout is as
the one above.
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-64SI476x는 EoL test와 RF performance 추정에 유용하지만 V4L2 subsystem과는 관련이 적은 여러 특성을 제공합니다. 이런 parameter는 debugfs로 노출되며 일반 file I/O operation으로 접근할 수 있습니다.
`/sys/kernel/debug/<device-name>/acf`는 ACF(Automatically Controlled Features) 상태 정보를 다음 binary layout으로 제공합니다.
| Offset | Name | 설명 |
|---|---|---|
| 0x00 | blend_int | Stereo separation이 blend threshold 아래로 내려가면 set되는 flag |
| 0x01 | hblend_int | HiBlend cutoff frequency가 threshold보다 낮으면 set되는 flag |
| 0x02 | hicut_int | HiCut cutoff frequency가 threshold보다 낮으면 set되는 flag |
| 0x03 | chbw_int | Channel filter bandwidth가 threshold보다 작으면 set되는 flag |
| 0x04 | softmute_int | Softmute attenuation이 softmute threshold 위로 증가했음을 나타내는 flag |
| 0x05 | smute | 0: audio가 soft-muted 상태가 아님; 1: audio가 soft-muted 상태 |
| 0x06 | smattn | Soft mute attenuation level, 단위 dB |
| 0x07 | chbw | Channel filter bandwidth, 단위 kHz |
| 0x08 | hicut | HiCut cutoff frequency, 단위 100 Hz |
| 0x09 | hiblend | HiBlend cutoff frequency, 단위 100 Hz |
| 0x10 | pilot | 0: stereo pilot 없음; 1: stereo pilot 있음 |
| 0x11 | stblend | Stereo blend, 단위 % |
RDS block 통계
65-79`/sys/kernel/debug/<device-name>/rds_blckcnt`는 RDS 수신 통계를 다음 binary layout으로 제공합니다.
| Offset | Name | 설명 |
|---|---|---|
| 0x00 | expected | 예상한 RDS block 수 |
| 0x02 | received | 수신한 RDS block 수 |
| 0x04 | uncorrectable | 수정할 수 없는 RDS block 수 |
AGC parameter
80-104`/sys/kernel/debug/<device-name>/agc`는 AGC(Automatic Gain Control) 관련 parameter를 다음 layout으로 제공합니다.
| Offset | Name | 설명 |
|---|---|---|
| 0x00 | mxhi | 0: FM Mixer PD high threshold 미도달; 1: threshold 도달 |
| 0x01 | mxlo | FM Mixer PD low threshold에 대해 동일 |
| 0x02 | lnahi | FM LNA PD high threshold에 대해 동일 |
| 0x03 | lnalo | FM LNA PD low threshold에 대해 동일 |
| 0x04 | fmagc1 | FMAGC1 attenuator resistance, 자세한 내용은 datasheet 참고 |
| 0x05 | fmagc2 | FMAGC2에 대해 동일 |
| 0x06 | pgagain | PGA gain, 단위 dB |
| 0x07 | fmwblang | FM/WB LNA gain, 단위 dB |
RSQ parameter
105-155`/sys/kernel/debug/<device-name>/rsq`는 RSQ(Received Signal Quality) 관련 parameter를 다음 layout으로 제공합니다.
| Offset | Name | 설명 |
|---|---|---|
| 0x00 | multhint | 0: multipath value가 high threshold를 넘지 않음; 1: 넘음 |
| 0x01 | multlint | Multipath low threshold에 대해 동일 |
| 0x02 | snrhint | 0: received signal SNR이 high threshold를 넘지 않음; 1: 넘음 |
| 0x03 | snrlint | SNR low threshold에 대해 동일 |
| 0x04 | rssihint | RSSI high threshold에 대해 동일 |
| 0x05 | rssilint | RSSI low threshold에 대해 동일 |
| 0x06 | bltf | Seek command가 seek band limit에 도달하거나 wrap했음을 나타내는 flag |
| 0x07 | snr_ready | SNR metric이 준비됐음을 나타냄 |
| 0x08 | rssiready | RSSI metric이 준비됐음을 나타냄 |
| 0x09 | injside | 0: low-side injection 사용; 1: high-side injection 사용 |
| 0x10 | afcrl | AFC rail 상태를 나타내는 flag |
| 0x11 | valid | Channel 유효성을 나타내는 flag |
| 0x12 | readfreq | 현재 tuned frequency |
| 0x14 | freqoff | Signed frequency offset, 단위 2 ppm |
| 0x15 | rssi | Signed RSSI value, 단위 dBuV |
| 0x16 | snr | Signed RF SNR, 단위 dB |
| 0x17 | issi | Signed Image Strength Signal indicator |
| 0x18 | lassi | Signed low-side adjacent Channel Strength indicator |
| 0x19 | hassi | High-side에 대해 동일 |
| 0x20 | mult | Multipath indicator |
| 0x21 | dev | Frequency deviation |
| 0x24 | assi | Adjacent channel SSI |
| 0x25 | usn | Ultrasonic noise indicator |
| 0x26 | pilotdev | Pilot deviation, 단위 100 Hz |
| 0x27 | rdsdev | RDS deviation, 단위 100 Hz |
| 0x28 | assidev | ASSI deviation, 단위 100 Hz |
| 0x29 | strongdev | Frequency deviation |
| 0x30 | rdspi | RDS 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를 고려해 읽어야 합니다.
Debugfs data map
si476x.rst:1-160V4L2와 직접 관련이 적은 RF test·quality metric은 `<device-name>`별 debugfs binary file로 노출됩니다. 각 file은 고정 offset field로 구성되며 primary tuner RSQ는 일반 RSQ layout을 재사용합니다.