xref: /OK3568_Linux_fs/kernel/Documentation/admin-guide/media/si470x.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun.. include:: <isonum.txt>
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunThe Silicon Labs Si470x FM Radio Receivers driver
6*4882a593Smuzhiyun=================================================
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunCopyright |copy| 2009 Tobias Lorenz <tobias.lorenz@gmx.net>
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunInformation from Silicon Labs
12*4882a593Smuzhiyun-----------------------------
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSilicon Laboratories is the manufacturer of the radio ICs, that nowadays are the
15*4882a593Smuzhiyunmost often used radio receivers in cell phones. Usually they are connected with
16*4882a593SmuzhiyunI2C. But SiLabs also provides a reference design, which integrates this IC,
17*4882a593Smuzhiyuntogether with a small microcontroller C8051F321, to form a USB radio.
18*4882a593SmuzhiyunPart of this reference design is also a radio application in binary and source
19*4882a593Smuzhiyuncode. The software also contains an automatic firmware upgrade to the most
20*4882a593Smuzhiyuncurrent version. Information on these can be downloaded here:
21*4882a593Smuzhiyunhttp://www.silabs.com/usbradio
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunSupported ICs
25*4882a593Smuzhiyun-------------
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunThe following ICs have a very similar register set, so that they are or will be
28*4882a593Smuzhiyunsupported somewhen by the driver:
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun- Si4700: FM radio receiver
31*4882a593Smuzhiyun- Si4701: FM radio receiver, RDS Support
32*4882a593Smuzhiyun- Si4702: FM radio receiver
33*4882a593Smuzhiyun- Si4703: FM radio receiver, RDS Support
34*4882a593Smuzhiyun- Si4704: FM radio receiver, no external antenna required
35*4882a593Smuzhiyun- Si4705: FM radio receiver, no external antenna required, RDS support, Dig I/O
36*4882a593Smuzhiyun- Si4706: Enhanced FM RDS/TMC radio receiver, no external antenna required, RDS
37*4882a593Smuzhiyun	  Support
38*4882a593Smuzhiyun- Si4707: Dedicated weather band radio receiver with SAME decoder, RDS Support
39*4882a593Smuzhiyun- Si4708: Smallest FM receivers
40*4882a593Smuzhiyun- Si4709: Smallest FM receivers, RDS Support
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunMore information on these can be downloaded here:
43*4882a593Smuzhiyunhttp://www.silabs.com/products/mcu/Pages/USBFMRadioRD.aspx
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunSupported USB devices
47*4882a593Smuzhiyun---------------------
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunCurrently the following USB radios (vendor:product) with the Silicon Labs si470x
50*4882a593Smuzhiyunchips are known to work:
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun- 10c4:818a: Silicon Labs USB FM Radio Reference Design
53*4882a593Smuzhiyun- 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF)
54*4882a593Smuzhiyun- 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700)
55*4882a593Smuzhiyun- 10c5:819a: Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear)
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunSoftware
59*4882a593Smuzhiyun--------
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunTesting is usually done with most application under Debian/testing:
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun- fmtools - Utility for managing FM tuner cards
64*4882a593Smuzhiyun- gnomeradio - FM-radio tuner for the GNOME desktop
65*4882a593Smuzhiyun- gradio - GTK FM radio tuner
66*4882a593Smuzhiyun- kradio - Comfortable Radio Application for KDE
67*4882a593Smuzhiyun- radio - ncurses-based radio application
68*4882a593Smuzhiyun- mplayer - The Ultimate Movie Player For Linux
69*4882a593Smuzhiyun- v4l2-ctl - Collection of command line video4linux utilities
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunFor example, you can use:
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun.. code-block:: none
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun	v4l2-ctl -d /dev/radio0 --set-ctrl=volume=10,mute=0 --set-freq=95.21 --all
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunThere is also a library libv4l, which can be used. It's going to have a function
78*4882a593Smuzhiyunfor frequency seeking, either by using hardware functionality as in radio-si470x
79*4882a593Smuzhiyunor by implementing a function as we currently have in every of the mentioned
80*4882a593Smuzhiyunprograms. Somewhen the radio programs should make use of libv4l.
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunFor processing RDS information, there is a project ongoing at:
83*4882a593Smuzhiyunhttp://rdsd.berlios.de/
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunThere is currently no project for making TMC sentences human readable.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunAudio Listing
89*4882a593Smuzhiyun-------------
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunUSB Audio is provided by the ALSA snd_usb_audio module. It is recommended to
92*4882a593Smuzhiyunalso select SND_USB_AUDIO, as this is required to get sound from the radio. For
93*4882a593Smuzhiyunlisting you have to redirect the sound, for example using one of the following
94*4882a593Smuzhiyuncommands. Please adjust the audio devices to your needs (/dev/dsp* and hw:x,x).
95*4882a593Smuzhiyun
96*4882a593SmuzhiyunIf you just want to test audio (very poor quality):
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun.. code-block:: none
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	cat /dev/dsp1 > /dev/dsp
101*4882a593Smuzhiyun
102*4882a593SmuzhiyunIf you use sox + OSS try:
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun.. code-block:: none
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun	sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp
107*4882a593Smuzhiyun
108*4882a593Smuzhiyunor using sox + alsa:
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun.. code-block:: none
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun	sox --endian little -c 2 -S -r 96000 -t alsa hw:1 -t alsa -r 96000 hw:0
113*4882a593Smuzhiyun
114*4882a593SmuzhiyunIf you use arts try:
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun.. code-block:: none
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun	arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
119*4882a593Smuzhiyun
120*4882a593SmuzhiyunIf you use mplayer try:
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun.. code-block:: none
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun	mplayer -radio adevice=hw=1.0:arate=96000 \
125*4882a593Smuzhiyun		-rawaudio rate=96000 \
126*4882a593Smuzhiyun		radio://<frequency>/capture
127*4882a593Smuzhiyun
128*4882a593SmuzhiyunModule Parameters
129*4882a593Smuzhiyun-----------------
130*4882a593Smuzhiyun
131*4882a593SmuzhiyunAfter loading the module, you still have access to some of them in the sysfs
132*4882a593Smuzhiyunmount under /sys/module/radio_si470x/parameters. The contents of read-only files
133*4882a593Smuzhiyun(0444) are not updated, even if space, band and de are changed using private
134*4882a593Smuzhiyunvideo controls. The others are runtime changeable.
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun
137*4882a593SmuzhiyunErrors
138*4882a593Smuzhiyun------
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunIncrease tune_timeout, if you often get -EIO errors.
141*4882a593Smuzhiyun
142*4882a593SmuzhiyunWhen timed out or band limit is reached, hw_freq_seek returns -EAGAIN.
143*4882a593Smuzhiyun
144*4882a593SmuzhiyunIf you get any errors from snd_usb_audio, please report them to the ALSA people.
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun
147*4882a593SmuzhiyunOpen Issues
148*4882a593Smuzhiyun-----------
149*4882a593Smuzhiyun
150*4882a593SmuzhiyunV4L minor device allocation and parameter setting is not perfect. A solution is
151*4882a593Smuzhiyuncurrently under discussion.
152*4882a593Smuzhiyun
153*4882a593SmuzhiyunThere is an USB interface for downloading/uploading new firmware images. Support
154*4882a593Smuzhiyunfor it can be implemented using the request_firmware interface.
155*4882a593Smuzhiyun
156*4882a593SmuzhiyunThere is a RDS interrupt mode. The driver is already using the same interface
157*4882a593Smuzhiyunfor polling RDS information, but is currently not using the interrupt mode.
158*4882a593Smuzhiyun
159*4882a593SmuzhiyunThere is a LED interface, which can be used to override the LED control
160*4882a593Smuzhiyunprogrammed in the firmware. This can be made available using the LED support
161*4882a593Smuzhiyunfunctions in the kernel.
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun
164*4882a593SmuzhiyunOther useful information and links
165*4882a593Smuzhiyun----------------------------------
166*4882a593Smuzhiyun
167*4882a593Smuzhiyunhttp://www.silabs.com/usbradio
168