1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct tuner_params</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-struct-tuner-range.html" title="struct tuner_range"><link rel="next" href="API-enum-tveeprom-audio-processor.html" title="enum tveeprom_audio_processor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct tuner_params</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-tuner-range.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-enum-tveeprom-audio-processor.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-tuner-params"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct tuner_params — 
2     Parameters to be used to setup the tuner. Those are used by drivers/media/tuners/tuner-types.c in order to specify the tuner properties. Most of the parameters are for tuners based on tda9887 IF-PLL multi-standard analog TV/Radio demodulator, with is very common on legacy analog tuners.
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct tuner_params {
5  enum param_type type;
6  unsigned int cb_first_if_lower_freq:1;
7  unsigned int has_tda9887:1;
8  unsigned int port1_fm_high_sensitivity:1;
9  unsigned int port2_fm_high_sensitivity:1;
10  unsigned int fm_gain_normal:1;
11  unsigned int intercarrier_mode:1;
12  unsigned int port1_active:1;
13  unsigned int port2_active:1;
14  unsigned int port1_invert_for_secam_lc:1;
15  unsigned int port2_invert_for_secam_lc:1;
16  unsigned int port1_set_for_fm_mono:1;
17  unsigned int default_pll_gating_18:1;
18  unsigned int radio_if:2;
19  signed int default_top_low:5;
20  signed int default_top_mid:5;
21  signed int default_top_high:5;
22  signed int default_top_secam_low:5;
23  signed int default_top_secam_mid:5;
24  signed int default_top_secam_high:5;
25  u16 iffreq;
26  unsigned int count;
27  struct tuner_range * ranges;
28};  </pre></div><div class="refsect1"><a name="id-1.8.2.6.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">type</span></dt><dd><p>
29   Type of the tuner parameters, as defined at
30   enum param_type. If the tuner supports multiple
31   standards, an array should be used, with one
32   row per different standard.
33      </p></dd><dt><span class="term">cb_first_if_lower_freq</span></dt><dd><p>
34   Many Philips-based tuners have a comment in
35   their datasheet like
36   <span class="quote">“<span class="quote">For channel selection involving band
37   switching, and to ensure smooth tuning to the
38   desired channel without causing unnecessary
39   charge pump action, it is recommended to
40   consider the difference between wanted channel
41   frequency and the current channel frequency.
42   Unnecessary charge pump action will result
43   in very low tuning voltage which may drive the
44   oscillator to extreme conditions</span>”</span>.
45   Set cb_first_if_lower_freq to 1, if this check
46   is required for this tuner. I tested this for
47   PAL by first setting the TV frequency to
48   203 MHz and then switching to 96.6 MHz FM
49   radio. The result was static unless the
50   control byte was sent first.
51      </p></dd><dt><span class="term">has_tda9887</span></dt><dd><p>
52   Set to 1 if this tuner uses a tda9887
53      </p></dd><dt><span class="term">port1_fm_high_sensitivity</span></dt><dd><p>
54   Many Philips tuners use tda9887 PORT1 to select
55   the FM radio sensitivity. If this setting is 1,
56   then set PORT1 to 1 to get proper FM reception.
57      </p></dd><dt><span class="term">port2_fm_high_sensitivity</span></dt><dd><p>
58   Some Philips tuners use tda9887 PORT2 to select
59   the FM radio sensitivity. If this setting is 1,
60   then set PORT2 to 1 to get proper FM reception.
61      </p></dd><dt><span class="term">fm_gain_normal</span></dt><dd><p>
62   Some Philips tuners use tda9887 cGainNormal to
63   select the FM radio sensitivity. If this
64   setting is 1, e register will use cGainNormal
65   instead of cGainLow.
66      </p></dd><dt><span class="term">intercarrier_mode</span></dt><dd><p>
67   Most tuners with a tda9887 use QSS mode.
68   Some (cheaper) tuners use Intercarrier mode.
69   If this setting is 1, then the tuner needs to
70   be set to intercarrier mode.
71      </p></dd><dt><span class="term">port1_active</span></dt><dd><p>
72   This setting sets the default value for PORT1.
73   0 means inactive, 1 means active. Note: the
74   actual bit value written to the tda9887 is
75   inverted. So a 0 here means a 1 in the B6 bit.
76      </p></dd><dt><span class="term">port2_active</span></dt><dd><p>
77   This setting sets the default value for PORT2.
78   0 means inactive, 1 means active. Note: the
79   actual bit value written to the tda9887 is
80   inverted. So a 0 here means a 1 in the B7 bit.
81      </p></dd><dt><span class="term">port1_invert_for_secam_lc</span></dt><dd><p>
82   Sometimes PORT1 is inverted when the SECAM-L'
83   standard is selected. Set this bit to 1 if this
84   is needed.
85      </p></dd><dt><span class="term">port2_invert_for_secam_lc</span></dt><dd><p>
86   Sometimes PORT2 is inverted when the SECAM-L'
87   standard is selected. Set this bit to 1 if this
88   is needed.
89      </p></dd><dt><span class="term">port1_set_for_fm_mono</span></dt><dd><p>
90   Some cards require PORT1 to be 1 for mono Radio
91   FM and 0 for stereo.
92      </p></dd><dt><span class="term">default_pll_gating_18</span></dt><dd><p>
93   Select 18% (or according to datasheet 0%)
94   L standard PLL gating, vs the driver default
95   of 36%.
96      </p></dd><dt><span class="term">radio_if</span></dt><dd><p>
97   IF to use in radio mode.  Tuners with a
98   separate radio IF filter seem to use 10.7,
99   while those without use 33.3 for PAL/SECAM
100   tuners and 41.3 for NTSC tuners.
101   0 = 10.7, 1 = 33.3, 2 = 41.3
102      </p></dd><dt><span class="term">default_top_low</span></dt><dd><p>
103   Default tda9887 TOP value in dB for the low
104   band. Default is 0. Range: -16:+15
105      </p></dd><dt><span class="term">default_top_mid</span></dt><dd><p>
106   Default tda9887 TOP value in dB for the mid
107   band. Default is 0. Range: -16:+15
108      </p></dd><dt><span class="term">default_top_high</span></dt><dd><p>
109   Default tda9887 TOP value in dB for the high
110   band. Default is 0. Range: -16:+15
111      </p></dd><dt><span class="term">default_top_secam_low</span></dt><dd><p>
112   Default tda9887 TOP value in dB for SECAM-L/L'
113   for the low band. Default is 0. Several tuners
114   require a different TOP value for the
115   SECAM-L/L' standards. Range: -16:+15
116      </p></dd><dt><span class="term">default_top_secam_mid</span></dt><dd><p>
117   Default tda9887 TOP value in dB for SECAM-L/L'
118   for the mid band. Default is 0. Several tuners
119   require a different TOP value for the
120   SECAM-L/L' standards. Range: -16:+15
121      </p></dd><dt><span class="term">default_top_secam_high</span></dt><dd><p>
122   Default tda9887 TOP value in dB for SECAM-L/L'
123   for the high band. Default is 0. Several tuners
124   require a different TOP value for the
125   SECAM-L/L' standards. Range: -16:+15
126      </p></dd><dt><span class="term">iffreq</span></dt><dd><p>
127   Intermediate frequency (IF) used by the tuner
128   on digital mode.
129      </p></dd><dt><span class="term">count</span></dt><dd><p>
130   Size of the ranges array.
131      </p></dd><dt><span class="term">ranges</span></dt><dd><p>
132   Array with the frequency ranges supported by
133   the tuner.
134      </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-tuner-range.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-enum-tveeprom-audio-processor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct tuner_range</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">enum tveeprom_audio_processor</span></td></tr></table></div></body></html>
135