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