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