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