xref: /OK3568_Linux_fs/kernel/Documentation/admin-guide/media/si476x.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun.. include:: <isonum.txt>
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe SI476x Driver
7*4882a593Smuzhiyun=================
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunCopyright |copy| 2013 Andrey Smirnov <andrew.smirnov@gmail.com>
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunTODO for the driver
12*4882a593Smuzhiyun-------------------
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun- According to the SiLabs' datasheet it is possible to update the
15*4882a593Smuzhiyun  firmware of the radio chip in the run-time, thus bringing it to the
16*4882a593Smuzhiyun  most recent version. Unfortunately I couldn't find any mentioning of
17*4882a593Smuzhiyun  the said firmware update for the old chips that I tested the driver
18*4882a593Smuzhiyun  against, so for chips like that the driver only exposes the old
19*4882a593Smuzhiyun  functionality.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunParameters exposed over debugfs
23*4882a593Smuzhiyun-------------------------------
24*4882a593SmuzhiyunSI476x allow user to get multiple characteristics that can be very
25*4882a593Smuzhiyunuseful for EoL testing/RF performance estimation, parameters that have
26*4882a593Smuzhiyunvery little to do with V4L2 subsystem. Such parameters are exposed via
27*4882a593Smuzhiyundebugfs and can be accessed via regular file I/O operations.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunThe drivers exposes following files:
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun* /sys/kernel/debug/<device-name>/acf
32*4882a593Smuzhiyun  This file contains ACF(Automatically Controlled Features) status
33*4882a593Smuzhiyun  information. The contents of the file is binary data of the
34*4882a593Smuzhiyun  following layout:
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun  =============  ==============   ====================================
39*4882a593Smuzhiyun  Offset	 Name		  Description
40*4882a593Smuzhiyun  =============  ==============   ====================================
41*4882a593Smuzhiyun  0x00		 blend_int	  Flag, set when stereo separation has
42*4882a593Smuzhiyun				  crossed below the blend threshold
43*4882a593Smuzhiyun  0x01		 hblend_int	  Flag, set when HiBlend cutoff
44*4882a593Smuzhiyun				  frequency is lower than threshold
45*4882a593Smuzhiyun  0x02		 hicut_int	  Flag, set when HiCut cutoff
46*4882a593Smuzhiyun				  frequency is lower than threshold
47*4882a593Smuzhiyun  0x03		 chbw_int	  Flag, set when channel filter
48*4882a593Smuzhiyun				  bandwidth is less than threshold
49*4882a593Smuzhiyun  0x04		 softmute_int	  Flag indicating that softmute
50*4882a593Smuzhiyun				  attenuation has increased above
51*4882a593Smuzhiyun				  softmute threshold
52*4882a593Smuzhiyun  0x05		 smute		  0 - Audio is not soft muted
53*4882a593Smuzhiyun				  1 - Audio is soft muted
54*4882a593Smuzhiyun  0x06		 smattn		  Soft mute attenuation level in dB
55*4882a593Smuzhiyun  0x07		 chbw		  Channel filter bandwidth in kHz
56*4882a593Smuzhiyun  0x08		 hicut		  HiCut cutoff frequency in units of
57*4882a593Smuzhiyun				  100Hz
58*4882a593Smuzhiyun  0x09		 hiblend	  HiBlend cutoff frequency in units
59*4882a593Smuzhiyun				  of 100 Hz
60*4882a593Smuzhiyun  0x10		 pilot		  0 - Stereo pilot is not present
61*4882a593Smuzhiyun				  1 - Stereo pilot is present
62*4882a593Smuzhiyun  0x11		 stblend	  Stereo blend in %
63*4882a593Smuzhiyun  =============  ==============   ====================================
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun* /sys/kernel/debug/<device-name>/rds_blckcnt
67*4882a593Smuzhiyun  This file contains statistics about RDS receptions. It's binary data
68*4882a593Smuzhiyun  has the following layout:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun  =============  ==============   ====================================
73*4882a593Smuzhiyun  Offset	 Name		  Description
74*4882a593Smuzhiyun  =============  ==============   ====================================
75*4882a593Smuzhiyun  0x00		 expected	  Number of expected RDS blocks
76*4882a593Smuzhiyun  0x02		 received	  Number of received RDS blocks
77*4882a593Smuzhiyun  0x04		 uncorrectable	  Number of uncorrectable RDS blocks
78*4882a593Smuzhiyun  =============  ==============   ====================================
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun* /sys/kernel/debug/<device-name>/agc
81*4882a593Smuzhiyun  This file contains information about parameters pertaining to
82*4882a593Smuzhiyun  AGC(Automatic Gain Control)
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun  The layout is:
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun  =============  ==============   ====================================
89*4882a593Smuzhiyun  Offset	 Name		  Description
90*4882a593Smuzhiyun  =============  ==============   ====================================
91*4882a593Smuzhiyun  0x00		 mxhi		  0 - FM Mixer PD high threshold is
92*4882a593Smuzhiyun				  not tripped
93*4882a593Smuzhiyun				  1 - FM Mixer PD high threshold is
94*4882a593Smuzhiyun				  tripped
95*4882a593Smuzhiyun  0x01		 mxlo		  ditto for FM Mixer PD low
96*4882a593Smuzhiyun  0x02		 lnahi		  ditto for FM LNA PD high
97*4882a593Smuzhiyun  0x03		 lnalo		  ditto for FM LNA PD low
98*4882a593Smuzhiyun  0x04		 fmagc1		  FMAGC1 attenuator resistance
99*4882a593Smuzhiyun				  (see datasheet for more detail)
100*4882a593Smuzhiyun  0x05		 fmagc2		  ditto for FMAGC2
101*4882a593Smuzhiyun  0x06		 pgagain	  PGA gain in dB
102*4882a593Smuzhiyun  0x07		 fmwblang	  FM/WB LNA Gain in dB
103*4882a593Smuzhiyun  =============  ==============   ====================================
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun* /sys/kernel/debug/<device-name>/rsq
106*4882a593Smuzhiyun  This file contains information about parameters pertaining to
107*4882a593Smuzhiyun  RSQ(Received Signal Quality)
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun  The layout is:
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun  .. tabularcolumns:: |p{7ex}|p{12ex}|p{60ex}|
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun  =============  ==============   ====================================
114*4882a593Smuzhiyun  Offset	 Name		  Description
115*4882a593Smuzhiyun  =============  ==============   ====================================
116*4882a593Smuzhiyun  0x00		 multhint	  0 - multipath value has not crossed
117*4882a593Smuzhiyun				  the Multipath high threshold
118*4882a593Smuzhiyun				  1 - multipath value has crossed
119*4882a593Smuzhiyun				  the Multipath high threshold
120*4882a593Smuzhiyun  0x01		 multlint	  ditto for Multipath low threshold
121*4882a593Smuzhiyun  0x02		 snrhint	  0 - received signal's SNR has not
122*4882a593Smuzhiyun				  crossed high threshold
123*4882a593Smuzhiyun				  1 - received signal's SNR has
124*4882a593Smuzhiyun				  crossed high threshold
125*4882a593Smuzhiyun  0x03		 snrlint	  ditto for low threshold
126*4882a593Smuzhiyun  0x04		 rssihint	  ditto for RSSI high threshold
127*4882a593Smuzhiyun  0x05		 rssilint	  ditto for RSSI low threshold
128*4882a593Smuzhiyun  0x06		 bltf		  Flag indicating if seek command
129*4882a593Smuzhiyun				  reached/wrapped seek band limit
130*4882a593Smuzhiyun  0x07		 snr_ready	  Indicates that SNR metrics is ready
131*4882a593Smuzhiyun  0x08		 rssiready	  ditto for RSSI metrics
132*4882a593Smuzhiyun  0x09		 injside	  0 - Low-side injection is being used
133*4882a593Smuzhiyun				  1 - High-side injection is used
134*4882a593Smuzhiyun  0x10		 afcrl		  Flag indicating if AFC rails
135*4882a593Smuzhiyun  0x11		 valid		  Flag indicating if channel is valid
136*4882a593Smuzhiyun  0x12		 readfreq	  Current tuned frequency
137*4882a593Smuzhiyun  0x14		 freqoff	  Signed frequency offset in units of
138*4882a593Smuzhiyun				  2ppm
139*4882a593Smuzhiyun  0x15		 rssi		  Signed value of RSSI in dBuV
140*4882a593Smuzhiyun  0x16		 snr		  Signed RF SNR in dB
141*4882a593Smuzhiyun  0x17		 issi		  Signed Image Strength Signal
142*4882a593Smuzhiyun				  indicator
143*4882a593Smuzhiyun  0x18		 lassi		  Signed Low side adjacent Channel
144*4882a593Smuzhiyun				  Strength indicator
145*4882a593Smuzhiyun  0x19		 hassi		  ditto fpr High side
146*4882a593Smuzhiyun  0x20		 mult		  Multipath indicator
147*4882a593Smuzhiyun  0x21		 dev		  Frequency deviation
148*4882a593Smuzhiyun  0x24		 assi		  Adjacent channel SSI
149*4882a593Smuzhiyun  0x25		 usn		  Ultrasonic noise indicator
150*4882a593Smuzhiyun  0x26		 pilotdev	  Pilot deviation in units of 100 Hz
151*4882a593Smuzhiyun  0x27		 rdsdev		  ditto for RDS
152*4882a593Smuzhiyun  0x28		 assidev	  ditto for ASSI
153*4882a593Smuzhiyun  0x29		 strongdev	  Frequency deviation
154*4882a593Smuzhiyun  0x30		 rdspi		  RDS PI code
155*4882a593Smuzhiyun  =============  ==============   ====================================
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun* /sys/kernel/debug/<device-name>/rsq_primary
158*4882a593Smuzhiyun  This file contains information about parameters pertaining to
159*4882a593Smuzhiyun  RSQ(Received Signal Quality) for primary tuner only. Layout is as
160*4882a593Smuzhiyun  the one above.
161