[media] DocBook: convert struct tuner_parms to doc-nano format
[deliverable/linux.git] / include / media / tuner-types.h
CommitLineData
7b0ac9cd
MK
1/*
2 * descriptions for simple tuners.
3 */
4
5#ifndef __TUNER_TYPES_H__
6#define __TUNER_TYPES_H__
7
8enum param_type {
62325497
MK
9 TUNER_PARAM_TYPE_RADIO,
10 TUNER_PARAM_TYPE_PAL,
11 TUNER_PARAM_TYPE_SECAM,
12 TUNER_PARAM_TYPE_NTSC,
13 TUNER_PARAM_TYPE_DIGITAL,
7b0ac9cd
MK
14};
15
16struct tuner_range {
17 unsigned short limit;
3fc46d35 18 unsigned char config;
7b0ac9cd
MK
19 unsigned char cb;
20};
21
65fc6409
MCC
22/**
23 * struct tuner_params - Parameters to be used to setup the tuner. Those
24 * are used by drivers/media/tuners/tuner-types.c in
25 * order to specify the tuner properties. Most of
26 * the parameters are for tuners based on tda9887 IF-PLL
27 * multi-standard analog TV/Radio demodulator, with is
28 * very common on legacy analog tuners.
29 *
30 * @type: Type of the tuner parameters, as defined at
31 * enum param_type. If the tuner supports multiple
32 * standards, an array should be used, with one
33 * row per different standard.
34 * @cb_first_if_lower_freq: Many Philips-based tuners have a comment in
35 * their datasheet like
36 * "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".
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 * @has_tda9887: Set to 1 if this tuner uses a tda9887
52 * @port1_fm_high_sensitivity: Many Philips tuners use tda9887 PORT1 to select
53 * the FM radio sensitivity. If this setting is 1,
54 * then set PORT1 to 1 to get proper FM reception.
55 * @port2_fm_high_sensitivity: Some Philips tuners use tda9887 PORT2 to select
56 * the FM radio sensitivity. If this setting is 1,
57 * then set PORT2 to 1 to get proper FM reception.
58 * @fm_gain_normal: Some Philips tuners use tda9887 cGainNormal to
59 * select the FM radio sensitivity. If this
60 * setting is 1, e register will use cGainNormal
61 * instead of cGainLow.
62 * @intercarrier_mode: Most tuners with a tda9887 use QSS mode.
63 * Some (cheaper) tuners use Intercarrier mode.
64 * If this setting is 1, then the tuner needs to
65 * be set to intercarrier mode.
66 * @port1_active: This setting sets the default value for PORT1.
67 * 0 means inactive, 1 means active. Note: the
68 * actual bit value written to the tda9887 is
69 * inverted. So a 0 here means a 1 in the B6 bit.
70 * @port2_active: This setting sets the default value for PORT2.
71 * 0 means inactive, 1 means active. Note: the
72 * actual bit value written to the tda9887 is
73 * inverted. So a 0 here means a 1 in the B7 bit.
74 * @port1_invert_for_secam_lc: Sometimes PORT1 is inverted when the SECAM-L'
75 * standard is selected. Set this bit to 1 if this
76 * is needed.
77 * @port2_invert_for_secam_lc: Sometimes PORT2 is inverted when the SECAM-L'
78 * standard is selected. Set this bit to 1 if this
79 * is needed.
80 * @port1_set_for_fm_mono: Some cards require PORT1 to be 1 for mono Radio
81 * FM and 0 for stereo.
82 * @default_pll_gating_18: Select 18% (or according to datasheet 0%)
83 * L standard PLL gating, vs the driver default
84 * of 36%.
85 * @radio_if: IF to use in radio mode. Tuners with a
86 * separate radio IF filter seem to use 10.7,
87 * while those without use 33.3 for PAL/SECAM
88 * tuners and 41.3 for NTSC tuners.
89 * 0 = 10.7, 1 = 33.3, 2 = 41.3
90 * @default_top_low: Default tda9887 TOP value in dB for the low
91 * band. Default is 0. Range: -16:+15
92 * @default_top_mid: Default tda9887 TOP value in dB for the mid
93 * band. Default is 0. Range: -16:+15
94 * @default_top_high: Default tda9887 TOP value in dB for the high
95 * band. Default is 0. Range: -16:+15
96 * @default_top_secam_low: Default tda9887 TOP value in dB for SECAM-L/L'
97 * for the low band. Default is 0. Several tuners
98 * require a different TOP value for the
99 * SECAM-L/L' standards. Range: -16:+15
100 * @default_top_secam_mid: Default tda9887 TOP value in dB for SECAM-L/L'
101 * for the mid band. Default is 0. Several tuners
102 * require a different TOP value for the
103 * SECAM-L/L' standards. Range: -16:+15
104 * @default_top_secam_high: Default tda9887 TOP value in dB for SECAM-L/L'
105 * for the high band. Default is 0. Several tuners
106 * require a different TOP value for the
107 * SECAM-L/L' standards. Range: -16:+15
108 * @iffreq: Intermediate frequency (IF) used by the tuner
109 * on digital mode.
110 * @count: Size of the ranges array.
111 * @ranges: Array with the frequency ranges supported by
112 * the tuner.
113 */
7b0ac9cd
MK
114struct tuner_params {
115 enum param_type type;
ba8fc399 116
27487d44 117 unsigned int cb_first_if_lower_freq:1;
ba8fc399 118 unsigned int has_tda9887:1;
ba8fc399 119 unsigned int port1_fm_high_sensitivity:1;
ba8fc399 120 unsigned int port2_fm_high_sensitivity:1;
483deb0f 121 unsigned int fm_gain_normal:1;
ba8fc399 122 unsigned int intercarrier_mode:1;
ba8fc399 123 unsigned int port1_active:1;
ba8fc399 124 unsigned int port2_active:1;
ba8fc399 125 unsigned int port1_invert_for_secam_lc:1;
ba8fc399 126 unsigned int port2_invert_for_secam_lc:1;
ba8fc399 127 unsigned int port1_set_for_fm_mono:1;
d7304dee 128 unsigned int default_pll_gating_18:1;
5e082f15 129 unsigned int radio_if:2;
ba8fc399 130 signed int default_top_low:5;
ba8fc399 131 signed int default_top_mid:5;
ba8fc399 132 signed int default_top_high:5;
ba8fc399 133 signed int default_top_secam_low:5;
ba8fc399 134 signed int default_top_secam_mid:5;
ba8fc399
HV
135 signed int default_top_secam_high:5;
136
62325497 137 u16 iffreq;
7b0ac9cd
MK
138
139 unsigned int count;
140 struct tuner_range *ranges;
141};
142
143struct tunertype {
144 char *name;
bbab6fd8 145 unsigned int count;
7b0ac9cd 146 struct tuner_params *params;
62325497
MK
147
148 u16 min;
149 u16 max;
23a88108 150 u32 stepsize;
6f4a5729
MK
151
152 u8 *initdata;
153 u8 *sleepdata;
7b0ac9cd
MK
154};
155
156extern struct tunertype tuners[];
157extern unsigned const int tuner_count;
158
159#endif
This page took 0.621208 seconds and 5 git commands to generate.