요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
The Silicon Labs Si470x FM Radio Receivers driver
=================================================
Copyright |copy| 2009 Tobias Lorenz <[email protected]>
Information from Silicon Labs
-----------------------------
Silicon Laboratories is the manufacturer of the radio ICs, that nowadays are the
most often used radio receivers in cell phones. Usually they are connected with
I2C. But SiLabs also provides a reference design, which integrates this IC,
together with a small microcontroller C8051F321, to form a USB radio.
Part of this reference design is also a radio application in binary and source
code. The software also contains an automatic firmware upgrade to the most
current version. Information on these can be downloaded here:
http://www.silabs.com/usbradio
Supported ICs
-------------
The following ICs have a very similar register set, so that they are or will be
supported somewhen by the driver:
- Si4700: FM radio receiver
- Si4701: FM radio receiver, RDS Support
- Si4702: FM radio receiver
- Si4703: FM radio receiver, RDS Support
- Si4704: FM radio receiver, no external antenna required
- Si4705: FM radio receiver, no external antenna required, RDS support, Dig I/O
- Si4706: Enhanced FM RDS/TMC radio receiver, no external antenna required, RDS
Support
- Si4707: Dedicated weather band radio receiver with SAME decoder, RDS Support
- Si4708: Smallest FM receivers
- Si4709: Smallest FM receivers, RDS Support
More information on these can be downloaded here:
http://www.silabs.com/products/mcu/Pages/USBFMRadioRD.aspx
Supported USB devices
---------------------
Currently the following USB radios (vendor:product) with the Silicon Labs si470x
chips are known to work:
- 10c4:818a: Silicon Labs USB FM Radio Reference Design
- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF)
- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
- 10c5:819a: Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear)
Software
--------
Testing is usually done with most application under Debian/testing:
- fmtools - Utility for managing FM tuner cards
- gnomeradio - FM-radio tuner for the GNOME desktop
- gradio - GTK FM radio tuner
- kradio - Comfortable Radio Application for KDE
- radio - ncurses-based radio application
- mplayer - The Ultimate Movie Player For Linux
- v4l2-ctl - Collection of command line video4linux utilities
For example, you can use:
.. code-block:: none
v4l2-ctl -d /dev/radio0 --set-ctrl=volume=10,mute=0 --set-freq=95.21 --all
There is also a library libv4l, which can be used. It's going to have a function
for frequency seeking, either by using hardware functionality as in radio-si470x
or by implementing a function as we currently have in every of the mentioned
programs. Somewhen the radio programs should make use of libv4l.
For processing RDS information, there is a project ongoing at:
http://rdsd.berlios.de/
There is currently no project for making TMC sentences human readable.
Audio Listing
-------------
USB Audio is provided by the ALSA snd_usb_audio module. It is recommended to
also select SND_USB_AUDIO, as this is required to get sound from the radio. For
listing you have to redirect the sound, for example using one of the following
commands. Please adjust the audio devices to your needs (/dev/dsp* and hw:x,x).
If you just want to test audio (very poor quality):
.. code-block:: none
cat /dev/dsp1 > /dev/dsp
If you use sox + OSS try:
.. code-block:: none
sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp
or using sox + alsa:
.. code-block:: none
sox --endian little -c 2 -S -r 96000 -t alsa hw:1 -t alsa -r 96000 hw:0
If you use arts try:
.. code-block:: none
arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
If you use mplayer try:
.. code-block:: none
mplayer -radio adevice=hw=1.0:arate=96000 \
-rawaudio rate=96000 \
radio://<frequency>/capture
Module Parameters
-----------------
After loading the module, you still have access to some of them in the sysfs
mount under /sys/module/radio_si470x/parameters. The contents of read-only files
(0444) are not updated, even if space, band and de are changed using private
video controls. The others are runtime changeable.
Errors
------
Increase tune_timeout, if you often get -EIO errors.
When timed out or band limit is reached, hw_freq_seek returns -EAGAIN.
If you get any errors from snd_usb_audio, please report them to the ALSA people.
Open Issues
-----------
V4L minor device allocation and parameter setting is not perfect. A solution is
currently under discussion.
There is an USB interface for downloading/uploading new firmware images. Support
for it can be implemented using the request_firmware interface.
There is a RDS interrupt mode. The driver is already using the same interface
for polling RDS information, but is currently not using the interrupt mode.
There is a LED interface, which can be used to override the LED control
programmed in the firmware. This can be made available using the LED support
functions in the kernel.
Other useful information and links
----------------------------------
http://www.silabs.com/usbradio
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Si470x driver 소개
1-8이 문서는 GPL-2.0 라이선스를 따릅니다. Copyright |copy| 2009 Tobias Lorenz <[email protected]>.
Silicon Labs 정보
9-21Silicon Laboratories는 현재 휴대전화에서 널리 사용되는 radio IC 제조사입니다. 보통 IC는 I2C로 연결됩니다. SiLabs는 이 IC와 작은 C8051F321 microcontroller를 통합해 USB radio를 구성하는 reference design도 제공합니다.
이 reference design에는 binary와 source code 형태의 radio application이 포함됩니다. Software에는 최신 version으로 자동 firmware upgrade하는 기능도 들어 있습니다. 관련 정보는 다음 위치에서 내려받을 수 있습니다.
지원 IC
22-43다음 IC는 매우 유사한 register set을 사용하므로 driver가 현재 지원하거나 향후 지원할 수 있습니다.
| IC | 기능 |
|---|---|
| Si4700 | FM radio receiver |
| Si4701 | FM radio receiver, RDS support |
| Si4702 | FM radio receiver |
| Si4703 | FM radio receiver, RDS support |
| Si4704 | FM radio receiver, external antenna 불필요 |
| Si4705 | FM radio receiver, external antenna 불필요, RDS support, Dig I/O |
| Si4706 | Enhanced FM RDS/TMC radio receiver, external antenna 불필요, RDS support |
| Si4707 | SAME decoder를 갖춘 dedicated weather band radio receiver, RDS support |
| Si4708 | Smallest FM receiver |
| Si4709 | Smallest FM receiver, RDS support |
지원 USB device
44-55Silicon Labs si470x chip을 사용하며 현재 동작이 확인된 USB radio의 vendor:product ID는 다음과 같습니다.
| Vendor:product | USB radio |
|---|---|
| 10c4:818a | Silicon Labs USB FM Radio Reference Design |
| 06e1:a155 | ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) |
| 1b80:d700 | KWorld USB FM Radio SnapMusic Mobile 700 (FM700) |
| 10c5:819a | Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear) |
Software
56-85Test는 보통 Debian/testing에서 다음 application을 사용해 수행합니다.
- fmtools - FM tuner card 관리 utility
- gnomeradio - GNOME desktop용 FM-radio tuner
- gradio - GTK FM radio tuner
- kradio - KDE용 radio application
- radio - ncurses 기반 radio application
- mplayer - Linux용 media player
- v4l2-ctl - Video4Linux command-line utility 모음
예를 들어 다음 명령을 사용할 수 있습니다.
v4l2-ctl -d /dev/radio0 --set-ctrl=volume=10,mute=0 --set-freq=95.21 --all
libv4l library도 사용할 수 있습니다. 이 library에는 radio-si470x처럼 hardware 기능을 이용하거나, 현재 위 각 program에 따로 구현된 방식으로 frequency seek를 수행하는 function이 들어갈 예정입니다. 장기적으로 radio program은 libv4l을 사용해야 합니다.
RDS 정보를 처리하는 project는 다음 위치에서 진행 중입니다.
현재 TMC 문장을 사람이 읽을 수 있게 만드는 project는 없습니다.
Audio 청취
86-126USB Audio는 ALSA `snd_usb_audio` module이 제공합니다. Radio에서 sound를 받으려면 `SND_USB_AUDIO`도 선택하는 것이 좋습니다. 청취하려면 sound를 redirect해야 하며, 다음 명령 중 하나를 사용할 수 있습니다. `/dev/dsp*`와 `hw:x,x` audio device는 환경에 맞게 조정하십시오.
Audio만 간단히 시험하려면 다음을 사용합니다. 품질은 매우 낮습니다.
cat /dev/dsp1 > /dev/dsp
sox와 OSS를 사용한다면 다음을 시도하십시오.
sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp
sox와 ALSA를 사용한다면 다음을 사용하십시오.
sox --endian little -c 2 -S -r 96000 -t alsa hw:1 -t alsa -r 96000 hw:0
aRts를 사용한다면 다음을 시도하십시오.
arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
mplayer를 사용한다면 다음을 시도하십시오.
mplayer -radio adevice=hw=1.0:arate=96000 \
-rawaudio rate=96000 \
radio://<frequency>/capture
Module parameter
127-134Module을 load한 뒤에도 sysfs mount의 `/sys/module/radio_si470x/parameters` 아래에서 일부 parameter에 접근할 수 있습니다. Read-only file(0444)의 내용은 private video control로 `space`, `band`, `de`가 바뀌어도 update되지 않습니다. 나머지 parameter는 runtime에 변경할 수 있습니다.
Error
135-145`-EIO` error가 자주 발생하면 `tune_timeout`을 늘리십시오.
Timeout이 발생하거나 band limit에 도달하면 `hw_freq_seek`는 `-EAGAIN`을 반환합니다.
`snd_usb_audio`에서 error가 발생하면 ALSA 담당자에게 report하십시오.
미해결 사항
146-161- V4L minor device 할당과 parameter 설정은 아직 완전하지 않으며 해결책을 논의 중입니다.
- 새 firmware image를 download/upload하는 USB interface가 있습니다. `request_firmware` interface를 사용해 지원을 구현할 수 있습니다.
- RDS interrupt mode가 있습니다. Driver는 RDS 정보를 polling할 때 이미 같은 interface를 사용하지만 현재 interrupt mode는 사용하지 않습니다.
- Firmware에 programming된 LED control을 override할 수 있는 LED interface가 있습니다. Kernel의 LED support function으로 이를 노출할 수 있습니다.
기타 정보와 링크
162-167위 URL은 원문에 다시 제시된 reference design 정보 위치입니다.
Driver 동작 경로
si470x.rst:1-167Si470x 계열은 I2C IC 또는 USB reference design 형태로 연결됩니다. Radio tuning은 V4L2 경로가, sound는 ALSA USB audio 경로가 담당하며 RDS와 firmware·LED 확장 지점도 별도로 존재합니다.