Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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