aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:03 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:03 -0500
commit1faf11a3ed19d7d404fa867f572a1f23def9882e (patch)
treea68e5456fdd1da56bc4f9aa2a5c93fc0e9b39442 /drivers/media/video/tuner-simple.c
parent0e0351e3709023dbd015d09880b04f0aa8818fcb (diff)
V4L (0988): Tuner cleanups by removing Video IF from tuners struct
- Video IF was removed from tuners struct. - Each Video standard have its own Video IF frequency, so it is related to video standard. Of course tuner also needs saw filters for IF, but this way, similar tuners can be grouped into just one entry, if they have the same cut-off freqs and the same switch config and global config. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/tuner-simple.c')
-rw-r--r--drivers/media/video/tuner-simple.c306
1 files changed, 161 insertions, 145 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index e0c9fdb9914a..feaed92e2a69 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -80,8 +80,6 @@
80struct tunertype 80struct tunertype
81{ 81{
82 char *name; 82 char *name;
83 unsigned char Vendor;
84 unsigned char Type;
85 83
86 unsigned short thresh1; /* band switch VHF_LO <=> VHF_HI */ 84 unsigned short thresh1; /* band switch VHF_LO <=> VHF_HI */
87 unsigned short thresh2; /* band switch VHF_HI <=> UHF */ 85 unsigned short thresh2; /* band switch VHF_HI <=> UHF */
@@ -89,10 +87,6 @@ struct tunertype
89 unsigned char VHF_H; 87 unsigned char VHF_H;
90 unsigned char UHF; 88 unsigned char UHF;
91 unsigned char config; 89 unsigned char config;
92 unsigned short IFPCoff; /* 622.4=16*38.90 MHz PAL,
93 732 =16*45.75 NTSCi,
94 940 =16*58.75 NTSC-Japan
95 704 =16*44 ATSC */
96}; 90};
97 91
98/* 92/*
@@ -102,158 +96,158 @@ struct tunertype
102 */ 96 */
103static struct tunertype tuners[] = { 97static struct tunertype tuners[] = {
104 /* 0-9 */ 98 /* 0-9 */
105 { "Temic PAL (4002 FH5)", TEMIC, PAL, 99 { "Temic PAL (4002 FH5)", /* TEMIC PAL */
106 16*140.25,16*463.25,0x02,0x04,0x01,0x8e,623}, 100 16*140.25, 16*463.25, 0x02, 0x04, 0x01, 0x8e},
107 { "Philips PAL_I (FI1246 and compatibles)", Philips, PAL_I, 101 { "Philips PAL_I (FI1246 and compatibles)", /* Philips PAL_I */
108 16*140.25,16*463.25,0xa0,0x90,0x30,0x8e,623}, 102 16*140.25, 16*463.25, 0xa0, 0x90, 0x30, 0x8e},
109 { "Philips NTSC (FI1236,FM1236 and compatibles)", Philips, NTSC, 103 { "Philips NTSC (FI1236,FM1236 and compatibles)", /* Philips NTSC */
110 16*157.25,16*451.25,0xA0,0x90,0x30,0x8e,732}, 104 16*157.25, 16*451.25, 0xA0, 0x90, 0x30, 0x8e},
111 { "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)", Philips, SECAM, 105 { "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)",/* Philips SECAM */
112 16*168.25,16*447.25,0xA7,0x97,0x37,0x8e,623}, 106 16*168.25, 16*447.25, 0xA7, 0x97, 0x37, 0x8e},
113 { "NoTuner", NoTuner, NOTUNER, 107 { "NoTuner", /* NoTuner NOTUNER */
114 0,0,0x00,0x00,0x00,0x00,0x00}, 108 0, 0, 0x00, 0x00, 0x00, 0x00},
115 { "Philips PAL_BG (FI1216 and compatibles)", Philips, PAL, 109 { "Philips PAL_BG (FI1216 and compatibles)", /* Philips PAL */
116 16*168.25,16*447.25,0xA0,0x90,0x30,0x8e,623}, 110 16*168.25, 16*447.25, 0xA0, 0x90, 0x30, 0x8e},
117 { "Temic NTSC (4032 FY5)", TEMIC, NTSC, 111 { "Temic NTSC (4032 FY5)", /* TEMIC NTSC */
118 16*157.25,16*463.25,0x02,0x04,0x01,0x8e,732}, 112 16*157.25, 16*463.25, 0x02, 0x04, 0x01, 0x8e},
119 { "Temic PAL_I (4062 FY5)", TEMIC, PAL_I, 113 { "Temic PAL_I (4062 FY5)", /* TEMIC PAL_I */
120 16*170.00,16*450.00,0x02,0x04,0x01,0x8e,623}, 114 16*170.00, 16*450.00, 0x02, 0x04, 0x01, 0x8e},
121 { "Temic NTSC (4036 FY5)", TEMIC, NTSC, 115 { "Temic NTSC (4036 FY5)", /* TEMIC NTSC */
122 16*157.25,16*463.25,0xa0,0x90,0x30,0x8e,732}, 116 16*157.25, 16*463.25, 0xa0, 0x90, 0x30, 0x8e},
123 { "Alps HSBH1", TEMIC, NTSC, 117 { "Alps HSBH1", /* TEMIC NTSC */
124 16*137.25,16*385.25,0x01,0x02,0x08,0x8e,732}, 118 16*137.25, 16*385.25, 0x01, 0x02, 0x08, 0x8e},
125 119
126 /* 10-19 */ 120 /* 10-19 */
127 { "Alps TSBE1", TEMIC, PAL, 121 { "Alps TSBE1", /* TEMIC PAL */
128 16*137.25,16*385.25,0x01,0x02,0x08,0x8e,732}, 122 16*137.25, 16*385.25, 0x01, 0x02, 0x08, 0x8e},
129 { "Alps TSBB5", Alps, PAL_I, /* tested (UK UHF) with Modulartech MM205 */ 123 { "Alps TSBB5", /* Alps PAL_I */
130 16*133.25,16*351.25,0x01,0x02,0x08,0x8e,632}, 124 16*133.25, 16*351.25, 0x01, 0x02, 0x08, 0x8e},
131 { "Alps TSBE5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */ 125 { "Alps TSBE5", /* Alps PAL */
132 16*133.25,16*351.25,0x01,0x02,0x08,0x8e,622}, 126 16*133.25, 16*351.25, 0x01, 0x02, 0x08, 0x8e},
133 { "Alps TSBC5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */ 127 { "Alps TSBC5", /* Alps PAL */
134 16*133.25,16*351.25,0x01,0x02,0x08,0x8e,608}, 128 16*133.25, 16*351.25, 0x01, 0x02, 0x08, 0x8e},
135 { "Temic PAL_BG (4006FH5)", TEMIC, PAL, 129 { "Temic PAL_BG (4006FH5)", /* TEMIC PAL */
136 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 130 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
137 { "Alps TSCH6", Alps, NTSC, 131 { "Alps TSCH6", /* Alps NTSC */
138 16*137.25,16*385.25,0x14,0x12,0x11,0x8e,732}, 132 16*137.25, 16*385.25, 0x14, 0x12, 0x11, 0x8e},
139 { "Temic PAL_DK (4016 FY5)", TEMIC, PAL, 133 { "Temic PAL_DK (4016 FY5)", /* TEMIC PAL */
140 16*168.25,16*456.25,0xa0,0x90,0x30,0x8e,623}, 134 16*168.25, 16*456.25, 0xa0, 0x90, 0x30, 0x8e},
141 { "Philips NTSC_M (MK2)", Philips, NTSC, 135 { "Philips NTSC_M (MK2)", /* Philips NTSC */
142 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732}, 136 16*160.00, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
143 { "Temic PAL_I (4066 FY5)", TEMIC, PAL_I, 137 { "Temic PAL_I (4066 FY5)", /* TEMIC PAL_I */
144 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623}, 138 16*169.00, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
145 { "Temic PAL* auto (4006 FN5)", TEMIC, PAL, 139 { "Temic PAL* auto (4006 FN5)", /* TEMIC PAL */
146 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623}, 140 16*169.00, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
147 141
148 /* 20-29 */ 142 /* 20-29 */
149 { "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", TEMIC, PAL, 143 { "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", /* TEMIC PAL */
150 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623}, 144 16*141.00, 16*464.00, 0xa0, 0x90, 0x30, 0x8e},
151 { "Temic NTSC (4039 FR5)", TEMIC, NTSC, 145 { "Temic NTSC (4039 FR5)", /* TEMIC NTSC */
152 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732}, 146 16*158.00, 16*453.00, 0xa0, 0x90, 0x30, 0x8e},
153 { "Temic PAL/SECAM multi (4046 FM5)", TEMIC, PAL, 147 { "Temic PAL/SECAM multi (4046 FM5)", /* TEMIC PAL */
154 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623}, 148 16*169.00, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
155 { "Philips PAL_DK (FI1256 and compatibles)", Philips, PAL, 149 { "Philips PAL_DK (FI1256 and compatibles)", /* Philips PAL */
156 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 150 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
157 { "Philips PAL/SECAM multi (FQ1216ME)", Philips, PAL, 151 { "Philips PAL/SECAM multi (FQ1216ME)", /* Philips PAL */
158 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 152 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
159 { "LG PAL_I+FM (TAPC-I001D)", LGINNOTEK, PAL_I, 153 { "LG PAL_I+FM (TAPC-I001D)", /* LGINNOTEK PAL_I */
160 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 154 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
161 { "LG PAL_I (TAPC-I701D)", LGINNOTEK, PAL_I, 155 { "LG PAL_I (TAPC-I701D)", /* LGINNOTEK PAL_I */
162 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 156 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
163 { "LG NTSC+FM (TPI8NSR01F)", LGINNOTEK, NTSC, 157 { "LG NTSC+FM (TPI8NSR01F)", /* LGINNOTEK NTSC */
164 16*210.00,16*497.00,0xa0,0x90,0x30,0x8e,732}, 158 16*210.00, 16*497.00, 0xa0, 0x90, 0x30, 0x8e},
165 { "LG PAL_BG+FM (TPI8PSB01D)", LGINNOTEK, PAL, 159 { "LG PAL_BG+FM (TPI8PSB01D)", /* LGINNOTEK PAL */
166 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 160 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
167 { "LG PAL_BG (TPI8PSB11D)", LGINNOTEK, PAL, 161 { "LG PAL_BG (TPI8PSB11D)", /* LGINNOTEK PAL */
168 16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623}, 162 16*170.00, 16*450.00, 0xa0, 0x90, 0x30, 0x8e},
169 163
170 /* 30-39 */ 164 /* 30-39 */
171 { "Temic PAL* auto + FM (4009 FN5)", TEMIC, PAL, 165 { "Temic PAL* auto + FM (4009 FN5)", /* TEMIC PAL */
172 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623}, 166 16*141.00, 16*464.00, 0xa0, 0x90, 0x30, 0x8e},
173 { "SHARP NTSC_JP (2U5JF5540)", SHARP, NTSC, /* 940=16*58.75 NTSC@Japan */ 167 { "SHARP NTSC_JP (2U5JF5540)", /* SHARP NTSC */
174 16*137.25,16*317.25,0x01,0x02,0x08,0x8e,940 }, 168 16*137.25, 16*317.25, 0x01, 0x02, 0x08, 0x8e},
175 { "Samsung PAL TCPM9091PD27", Samsung, PAL, /* from sourceforge v3tv */ 169 { "Samsung PAL TCPM9091PD27", /* Samsung PAL */
176 16*169,16*464,0xA0,0x90,0x30,0x8e,623}, 170 16*169, 16*464, 0xA0, 0x90, 0x30, 0x8e},
177 { "MT20xx universal", Microtune, PAL|NTSC, 171 { "MT20xx universal", /* Microtune PAL|NTSC */
178 /* see mt20xx.c for details */ }, 172 /* see mt20xx.c for details */ },
179 { "Temic PAL_BG (4106 FH5)", TEMIC, PAL, 173 { "Temic PAL_BG (4106 FH5)", /* TEMIC PAL */
180 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623}, 174 16*141.00, 16*464.00, 0xa0, 0x90, 0x30, 0x8e},
181 { "Temic PAL_DK/SECAM_L (4012 FY5)", TEMIC, PAL, 175 { "Temic PAL_DK/SECAM_L (4012 FY5)", /* TEMIC PAL */
182 16*140.25, 16*463.25, 0x02,0x04,0x01,0x8e,623}, 176 16*140.25, 16*463.25, 0x02, 0x04, 0x01, 0x8e},
183 { "Temic NTSC (4136 FY5)", TEMIC, NTSC, 177 { "Temic NTSC (4136 FY5)", /* TEMIC NTSC */
184 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732}, 178 16*158.00, 16*453.00, 0xa0, 0x90, 0x30, 0x8e},
185 { "LG PAL (newer TAPC series)", LGINNOTEK, PAL, 179 { "LG PAL (newer TAPC series)", /* LGINNOTEK PAL */
186 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,623}, 180 16*170.00, 16*450.00, 0x01, 0x02, 0x08, 0x8e},
187 { "Philips PAL/SECAM multi (FM1216ME MK3)", Philips, PAL, 181 { "Philips PAL/SECAM multi (FM1216ME MK3)", /* Philips PAL */
188 16*158.00,16*442.00,0x01,0x02,0x04,0x8e,623 }, 182 16*158.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
189 { "LG NTSC (newer TAPC series)", LGINNOTEK, NTSC, 183 { "LG NTSC (newer TAPC series)", /* LGINNOTEK NTSC */
190 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,732}, 184 16*170.00, 16*450.00, 0x01, 0x02, 0x08, 0x8e},
191 185
192 /* 40-49 */ 186 /* 40-49 */
193 { "HITACHI V7-J180AT", HITACHI, NTSC, 187 { "HITACHI V7-J180AT", /* HITACHI NTSC */
194 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,940 }, 188 16*170.00, 16*450.00, 0x01, 0x02, 0x08, 0x8e},
195 { "Philips PAL_MK (FI1216 MK)", Philips, PAL, 189 { "Philips PAL_MK (FI1216 MK)", /* Philips PAL */
196 16*140.25,16*463.25,0x01,0xc2,0xcf,0x8e,623}, 190 16*140.25, 16*463.25, 0x01, 0xc2, 0xcf, 0x8e},
197 { "Philips 1236D ATSC/NTSC daul in", Philips, ATSC, 191 { "Philips 1236D ATSC/NTSC daul in", /* Philips ATSC */
198 16*157.25,16*454.00,0xa0,0x90,0x30,0x8e,732}, 192 16*157.25, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
199 { "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", Philips, NTSC, 193 { "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", /* Philips NTSC */
200 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732}, 194 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
201 { "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", Philips, NTSC, 195 { "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", /* Philips NTSC */
202 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732}, 196 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
203 { "Microtune 4049 FM5", Microtune, PAL, 197 { "Microtune 4049 FM5", /* Microtune PAL */
204 16*141.00,16*464.00,0xa0,0x90,0x30,0x8e,623}, 198 16*141.00, 16*464.00, 0xa0, 0x90, 0x30, 0x8e},
205 { "Panasonic VP27s/ENGE4324D", Panasonic, NTSC, 199 { "Panasonic VP27s/ENGE4324D", /* Panasonic NTSC */
206 16*160.00,16*454.00,0x01,0x02,0x08,0xce,940}, 200 16*160.00, 16*454.00, 0x01, 0x02, 0x08, 0xce},
207 { "LG NTSC (TAPE series)", LGINNOTEK, NTSC, 201 { "LG NTSC (TAPE series)", /* LGINNOTEK NTSC */
208 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 }, 202 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
209 { "Tenna TNF 8831 BGFF)", Philips, PAL, 203 { "Tenna TNF 8831 BGFF)", /* Philips PAL */
210 16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623}, 204 16*161.25, 16*463.25, 0xa0, 0x90, 0x30, 0x8e},
211 { "Microtune 4042 FI5 ATSC/NTSC dual in", Microtune, NTSC, 205 { "Microtune 4042 FI5 ATSC/NTSC dual in", /* Microtune NTSC */
212 16*162.00,16*457.00,0xa2,0x94,0x31,0x8e,732}, 206 16*162.00, 16*457.00, 0xa2, 0x94, 0x31, 0x8e},
213 207
214 /* 50-59 */ 208 /* 50-59 */
215 { "TCL 2002N", TCL, NTSC, 209 { "TCL 2002N", /* TCL NTSC */
216 16*172.00,16*448.00,0x01,0x02,0x08,0x8e,732}, 210 16*172.00, 16*448.00, 0x01, 0x02, 0x08, 0x8e},
217 { "Philips PAL/SECAM_D (FM 1256 I-H3)", Philips, PAL, 211 { "Philips PAL/SECAM_D (FM 1256 I-H3)", /* Philips PAL */
218 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,623 }, 212 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
219 { "Thomson DDT 7610 (ATSC/NTSC)", THOMSON, ATSC, 213 { "Thomson DDT 7610 (ATSC/NTSC)", /* THOMSON ATSC */
220 16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732}, 214 16*157.25, 16*454.00, 0x39, 0x3a, 0x3c, 0x8e},
221 { "Philips FQ1286", Philips, NTSC, 215 { "Philips FQ1286", /* Philips NTSC */
222 16*160.00,16*454.00,0x41,0x42,0x04,0x8e,940}, /* UHF band untested */ 216 16*160.00, 16*454.00, 0x41, 0x42, 0x04, 0x8e},
223 { "tda8290+75", Philips, PAL|NTSC, 217 { "tda8290+75", /* Philips PAL|NTSC */
224 /* see tda8290.c for details */ }, 218 /* see tda8290.c for details */ },
225 { "TCL 2002MB", TCL, PAL, 219 { "TCL 2002MB", /* TCL PAL */
226 16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623}, 220 16*170.00, 16*450.00, 0x01, 0x02, 0x08, 0xce},
227 { "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL, 221 { "Philips PAL/SECAM multi (FQ1216AME MK4)", /* Philips PAL */
228 16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 }, 222 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0xce},
229 { "Philips FQ1236A MK4", Philips, NTSC, 223 { "Philips FQ1236A MK4", /* Philips NTSC */
230 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 }, 224 16*160.00, 16*442.00, 0x01, 0x02, 0x04, 0x8e},
231 { "Ymec TVision TVF-8531MF/8831MF/8731MF", Philips, NTSC, 225 { "Ymec TVision TVF-8531MF/8831MF/8731MF", /* Philips NTSC */
232 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732}, 226 16*160.00, 16*454.00, 0xa0, 0x90, 0x30, 0x8e},
233 { "Ymec TVision TVF-5533MF", Philips, NTSC, 227 { "Ymec TVision TVF-5533MF", /* Philips NTSC */
234 16*160.00,16*454.00,0x01,0x02,0x04,0x8e,732}, 228 16*160.00, 16*454.00, 0x01, 0x02, 0x04, 0x8e},
235 229
236 /* 60-69 */ 230 /* 60-69 */
237 { "Thomson DDT 7611 (ATSC/NTSC)", THOMSON, ATSC, 231 { "Thomson DDT 7611 (ATSC/NTSC)", /* THOMSON ATSC */
238 16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732}, 232 16*157.25, 16*454.00, 0x39, 0x3a, 0x3c, 0x8e},
239 { "Tena TNF9533-D/IF/TNF9533-B/DF", Philips, PAL, 233 { "Tena TNF9533-D/IF/TNF9533-B/DF", /* Philips PAL */
240 16*160.25,16*464.25,0x01,0x02,0x04,0x8e,623}, 234 16*160.25, 16*464.25, 0x01, 0x02, 0x04, 0x8e},
241 { "Philips TEA5767HN FM Radio", Philips, RADIO, 235 { "Philips TEA5767HN FM Radio", /* Philips RADIO */
242 /* see tea5767.c for details */}, 236 /* see tea5767.c for details */},
243 { "Philips FMD1216ME MK3 Hybrid Tuner", Philips, PAL, 237 { "Philips FMD1216ME MK3 Hybrid Tuner", /* Philips PAL */
244 16*160.00,16*442.00,0x51,0x52,0x54,0x86,623 }, 238 16*160.00, 16*442.00, 0x51, 0x52, 0x54, 0x86},
245 { "LG TDVS-H062F/TUA6034", LGINNOTEK, ATSC, 239 { "LG TDVS-H062F/TUA6034", /* LGINNOTEK ATSC */
246 16*160.00,16*455.00,0x01,0x02,0x04,0x8e,732}, 240 16*160.00, 16*455.00, 0x01, 0x02, 0x04, 0x8e},
247 { "Ymec TVF66T5-B/DFF", Philips, PAL, 241 { "Ymec TVF66T5-B/DFF", /* Philips PAL */
248 16*160.25,16*464.25,0x01,0x02,0x08,0x8e,623}, 242 16*160.25, 16*464.25, 0x01, 0x02, 0x08, 0x8e},
249 { "LG NTSC (TALN mini series)", LGINNOTEK, NTSC, 243 { "LG NTSC (TALN mini series)", /* LGINNOTEK NTSC */
250 16*137.25,16*373.25,0x01,0x02,0x08,0x8e,732 }, 244 16*137.25, 16*373.25, 0x01, 0x02, 0x08, 0x8e},
251 { "Philips TD1316 Hybrid Tuner", Philips, PAL, 245 { "Philips TD1316 Hybrid Tuner", /* Philips PAL */
252 16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 }, 246 16*160.00, 16*442.00, 0xa1, 0xa2, 0xa4, 0xc8},
253 { "Philips TUV1236D ATSC/NTSC dual in", Philips, ATSC, 247 { "Philips TUV1236D ATSC/NTSC dual in", /* Philips ATSC */
254 16*157.25,16*454.00,0x01,0x02,0x04,0xce,732 }, 248 16*157.25, 16*454.00, 0x01, 0x02, 0x04, 0xce},
255 { "Tena TNF 5335 MF", Philips, NTSC, 249 { "Tena TNF 5335 MF", /* Philips NTSC */
256 16*157.25,16*454.00,0x01,0x02,0x04,0x8e,732 }, 250 16*157.25, 16*454.00, 0x01, 0x02, 0x04, 0x8e},
257}; 251};
258 252
259unsigned const int tuner_count = ARRAY_SIZE(tuners); 253unsigned const int tuner_count = ARRAY_SIZE(tuners);
@@ -305,7 +299,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
305 u16 div; 299 u16 div;
306 struct tunertype *tun; 300 struct tunertype *tun;
307 unsigned char buffer[4]; 301 unsigned char buffer[4];
308 int rc; 302 int rc, IFPCoff;
309 303
310 tun = &tuners[t->type]; 304 tun = &tuners[t->type];
311 if (freq < tun->thresh1) { 305 if (freq < tun->thresh1) {
@@ -420,7 +414,29 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
420 * frequency in case (wanted frequency < current frequency). 414 * frequency in case (wanted frequency < current frequency).
421 */ 415 */
422 416
423 div=freq + tun->IFPCoff; 417 /* IFPCoff = Video Intermediate Frequency - Vif:
418 940 =16*58.75 NTSC/J (Japan)
419 732 =16*45.75 M/N STD
420 704 =16*44 ATSC (at DVB code)
421 632 =16*39.50 I U.K.
422 622.4=16*38.90 B/G D/K I, L STD
423 592 =16*37.00 D China
424 590 =16.36.875 B Australia
425 543.2=16*33.95 L' STD
426 171.2=16*10.70 FM Radio (at set_radio_freq)
427 */
428
429 if (t->std & V4L2_STD_NTSC_M_JP) {
430 IFPCoff = 940;
431 } else if (t->std & V4L2_STD_MN) {
432 IFPCoff = 732;
433 } else if (t->std & V4L2_STD_SECAM_LC) {
434 IFPCoff = 543;
435 } else {
436 IFPCoff = 623;
437 }
438
439 div=freq + IFPCoff;
424 if (t->type == TUNER_PHILIPS_SECAM && freq < t->freq) { 440 if (t->type == TUNER_PHILIPS_SECAM && freq < t->freq) {
425 buffer[0] = tun->config; 441 buffer[0] = tun->config;
426 buffer[1] = config; 442 buffer[1] = config;