5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
9 & Marcus Metzler (mocm@thp.uni-koeln.de)
10 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <linux/delay.h>
29 #include <linux/module.h>
30 #include <linux/kmod.h>
31 #include <linux/init.h>
32 #include <linux/pci.h>
33 #include <linux/vmalloc.h>
34 #include <linux/firmware.h>
35 #include <net/checksum.h>
37 #include <asm/unaligned.h>
41 #include <media/v4l2-common.h>
42 #include <media/tvaudio.h>
43 #include "bttv-audio-hook.h"
46 static void boot_msp34xx(struct bttv *btv, int pin);
47 static void hauppauge_eeprom(struct bttv *btv);
48 static void avermedia_eeprom(struct bttv *btv);
49 static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
50 static void modtec_eeprom(struct bttv *btv);
51 static void init_PXC200(struct bttv *btv);
52 static void init_RTV24(struct bttv *btv);
54 static void rv605_muxsel(struct bttv *btv, unsigned int input);
55 static void eagle_muxsel(struct bttv *btv, unsigned int input);
56 static void xguard_muxsel(struct bttv *btv, unsigned int input);
57 static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58 static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
60 static void PXC200_muxsel(struct bttv *btv, unsigned int input);
62 static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63 static void picolo_tetra_init(struct bttv *btv);
65 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66 static void tibetCS16_init(struct bttv *btv);
68 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69 static void kodicom4400r_init(struct bttv *btv);
71 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
74 static void geovision_muxsel(struct bttv *btv, unsigned int input);
76 static int terratec_active_radio_upgrade(struct bttv *btv);
77 static int tea5757_read(struct bttv *btv);
78 static int tea5757_write(struct bttv *btv, int value);
79 static void identify_by_eeprom(struct bttv *btv,
80 unsigned char eeprom_data[256]);
81 static int __devinit pvr_boot(struct bttv *btv);
83 /* config variables */
84 static unsigned int triton1;
85 static unsigned int vsfx;
86 static unsigned int latency = UNSET;
89 static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90 static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91 static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92 static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93 static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
94 static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
96 static unsigned int autoload = 1;
98 static unsigned int autoload;
100 static unsigned int gpiomask = UNSET;
101 static unsigned int audioall = UNSET;
102 static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
105 module_param(triton1, int, 0444);
106 module_param(vsfx, int, 0444);
107 module_param(no_overlay, int, 0444);
108 module_param(latency, int, 0444);
109 module_param(gpiomask, int, 0444);
110 module_param(audioall, int, 0444);
111 module_param(autoload, int, 0444);
113 module_param_array(card, int, NULL, 0444);
114 module_param_array(pll, int, NULL, 0444);
115 module_param_array(tuner, int, NULL, 0444);
116 module_param_array(svhs, int, NULL, 0444);
117 module_param_array(remote, int, NULL, 0444);
118 module_param_array(audiomux, int, NULL, 0444);
120 MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
121 "[enable bug compatibility for triton1 + others]");
122 MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
123 "[yet another chipset flaw workaround]");
124 MODULE_PARM_DESC(latency,"pci latency timer");
125 MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
126 MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
127 MODULE_PARM_DESC(tuner,"specify installed tuner type");
128 MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
129 MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
130 " [some VIA/SIS chipsets are known to have problem with overlay]");
132 /* ----------------------------------------------------------------------- */
133 /* list of card IDs for bt878+ cards */
139 } cards[] __devinitdata = {
140 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
141 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
142 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
143 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
144 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
145 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
146 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
147 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
148 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
150 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
151 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
153 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
154 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
155 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
156 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
157 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
158 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
159 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
160 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
161 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
163 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
164 /* some cards ship with byteswapped IDs ... */
165 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
166 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
167 /* this seems to happen as well ... */
168 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
170 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
171 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
172 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
174 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
175 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
176 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
177 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
178 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
179 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
180 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
182 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
183 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
184 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
185 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
186 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
188 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
189 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
190 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
191 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
193 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
194 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
195 /* clashes with FlyVideo
196 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
197 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
198 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
199 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
200 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
202 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
203 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
204 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
205 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
206 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
208 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
209 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
210 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
211 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
212 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
214 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
215 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
216 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
217 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
219 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
220 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
221 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
222 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
224 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
225 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
226 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
227 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
228 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
229 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
230 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
231 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
232 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
233 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
234 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
235 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
251 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
253 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
254 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
255 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
256 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
257 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
258 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
260 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
261 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
263 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
264 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
265 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
266 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
267 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
268 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
269 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
270 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
271 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
273 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
274 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
276 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
277 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
278 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
279 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
281 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
283 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
284 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
286 /* likely broken, vendor id doesn't match the other magic views ...
287 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
289 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
290 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
292 /* DVB cards (using pci function .1 for mpeg data xfer) */
293 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
294 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
295 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
296 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
297 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
298 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
299 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
300 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
301 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
302 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
303 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
304 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
305 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
306 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
307 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
311 /* ----------------------------------------------------------------------- */
312 /* array with description for bt848 / bt878 tv/grabber cards */
314 struct tvcard bttv_tvcards[] = {
315 /* ---- card 0x00 ---------------------------------- */
316 [BTTV_BOARD_UNKNOWN] = {
317 .name = " *** UNKNOWN/GENERIC *** ",
322 .muxsel = { 2, 3, 1, 0 },
324 .tuner_addr = ADDR_UNSET,
325 .radio_addr = ADDR_UNSET,
327 [BTTV_BOARD_MIRO] = {
334 .muxsel = { 2, 3, 1, 1 },
335 .gpiomux = { 2, 0, 0, 0 },
339 .tuner_addr = ADDR_UNSET,
340 .radio_addr = ADDR_UNSET,
342 [BTTV_BOARD_HAUPPAUGE] = {
343 .name = "Hauppauge (bt848)",
349 .muxsel = { 2, 3, 1, 1 },
350 .gpiomux = { 0, 1, 2, 3 },
354 .tuner_addr = ADDR_UNSET,
355 .radio_addr = ADDR_UNSET,
358 .name = "STB, Gateway P/N 6000699 (bt848)",
364 .muxsel = { 2, 3, 1, 1 },
365 .gpiomux = { 4, 0, 2, 3 },
369 .tuner_type = TUNER_PHILIPS_NTSC,
370 .tuner_addr = ADDR_UNSET,
371 .radio_addr = ADDR_UNSET,
376 /* ---- card 0x04 ---------------------------------- */
377 [BTTV_BOARD_INTEL] = {
378 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
384 .muxsel = { 2, 3, 1, 1 },
387 .tuner_type = TUNER_ABSENT,
388 .tuner_addr = ADDR_UNSET,
389 .radio_addr = ADDR_UNSET,
391 [BTTV_BOARD_DIAMOND] = {
392 .name = "Diamond DTV2000",
398 .muxsel = { 2, 3, 1, 0 },
399 .gpiomux = { 0, 1, 0, 1 },
403 .tuner_addr = ADDR_UNSET,
404 .radio_addr = ADDR_UNSET,
406 [BTTV_BOARD_AVERMEDIA] = {
407 .name = "AVerMedia TVPhone",
412 .muxsel = { 2, 3, 1, 1 },
414 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
415 /* 0x04 for some cards ?? */
418 .tuner_addr = ADDR_UNSET,
419 .radio_addr = ADDR_UNSET,
420 .audio_mode_gpio= avermedia_tvphone_audio,
423 [BTTV_BOARD_MATRIX_VISION] = {
424 .name = "MATRIX-Vision MV-Delta",
430 .muxsel = { 2, 3, 1, 0, 0 },
434 .tuner_addr = ADDR_UNSET,
435 .radio_addr = ADDR_UNSET,
438 /* ---- card 0x08 ---------------------------------- */
439 [BTTV_BOARD_FLYVIDEO] = {
440 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
446 .muxsel = { 2, 3, 1, 1 },
447 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
452 .tuner_addr = ADDR_UNSET,
453 .radio_addr = ADDR_UNSET,
455 [BTTV_BOARD_TURBOTV] = {
456 .name = "IMS/IXmicro TurboTV",
462 .muxsel = { 2, 3, 1, 1 },
463 .gpiomux = { 1, 1, 2, 3 },
466 .tuner_type = TUNER_TEMIC_PAL,
467 .tuner_addr = ADDR_UNSET,
468 .radio_addr = ADDR_UNSET,
470 [BTTV_BOARD_HAUPPAUGE878] = {
471 .name = "Hauppauge (bt878)",
476 .gpiomask = 0x0f, /* old: 7 */
477 .muxsel = { 2, 0, 1, 1 },
478 .gpiomux = { 0, 1, 2, 3 },
483 .tuner_addr = ADDR_UNSET,
484 .radio_addr = ADDR_UNSET,
486 [BTTV_BOARD_MIROPRO] = {
487 .name = "MIRO PCTV pro",
493 .muxsel = { 2, 3, 1, 1 },
494 .gpiomux = { 0x20001,0x10001, 0, 0 },
498 .tuner_addr = ADDR_UNSET,
499 .radio_addr = ADDR_UNSET,
502 /* ---- card 0x0c ---------------------------------- */
503 [BTTV_BOARD_ADSTECH_TV] = {
504 .name = "ADS Technologies Channel Surfer TV (bt848)",
510 .muxsel = { 2, 3, 1, 1 },
511 .gpiomux = { 13, 14, 11, 7 },
514 .tuner_addr = ADDR_UNSET,
515 .radio_addr = ADDR_UNSET,
517 [BTTV_BOARD_AVERMEDIA98] = {
518 .name = "AVerMedia TVCapture 98",
524 .muxsel = { 2, 3, 1, 1 },
525 .gpiomux = { 13, 14, 11, 7 },
529 .tuner_type = TUNER_PHILIPS_PAL,
530 .tuner_addr = ADDR_UNSET,
531 .radio_addr = ADDR_UNSET,
532 .audio_mode_gpio= avermedia_tv_stereo_audio,
536 .name = "Aimslab Video Highway Xtreme (VHX)",
542 .muxsel = { 2, 3, 1, 1 },
543 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
548 .tuner_addr = ADDR_UNSET,
549 .radio_addr = ADDR_UNSET,
551 [BTTV_BOARD_ZOLTRIX] = {
552 .name = "Zoltrix TV-Max",
558 .muxsel = { 2, 3, 1, 1 },
559 .gpiomux = { 0, 0, 1, 0 },
563 .tuner_addr = ADDR_UNSET,
564 .radio_addr = ADDR_UNSET,
567 /* ---- card 0x10 ---------------------------------- */
568 [BTTV_BOARD_PIXVIEWPLAYTV] = {
569 .name = "Prolink Pixelview PlayTV (bt878)",
574 .gpiomask = 0x01fe00,
575 .muxsel = { 2, 3, 1, 1 },
576 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
577 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
578 .gpiomute = 0x002000,
582 .tuner_addr = ADDR_UNSET,
583 .radio_addr = ADDR_UNSET,
585 [BTTV_BOARD_WINVIEW_601] = {
586 .name = "Leadtek WinView 601",
591 .gpiomask = 0x8300f8,
592 .muxsel = { 2, 3, 1, 1,0 },
593 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
594 .gpiomute = 0xcfa007,
597 .tuner_addr = ADDR_UNSET,
598 .radio_addr = ADDR_UNSET,
599 .volume_gpio = winview_volume,
602 [BTTV_BOARD_AVEC_INTERCAP] = {
603 .name = "AVEC Intercapture",
609 .muxsel = { 2, 3, 1, 1 },
610 .gpiomux = { 1, 0, 0, 0 },
613 .tuner_addr = ADDR_UNSET,
614 .radio_addr = ADDR_UNSET,
616 [BTTV_BOARD_LIFE_FLYKIT] = {
617 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
622 .gpiomask = 0x8dff00,
623 .muxsel = { 2, 3, 1, 1 },
627 .tuner_addr = ADDR_UNSET,
628 .radio_addr = ADDR_UNSET,
631 /* ---- card 0x14 ---------------------------------- */
632 [BTTV_BOARD_CEI_RAFFLES] = {
633 .name = "CEI Raffles Card",
638 .muxsel = { 2, 3, 1, 1 },
640 .tuner_addr = ADDR_UNSET,
641 .radio_addr = ADDR_UNSET,
643 [BTTV_BOARD_CONFERENCETV] = {
644 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
646 .audio_inputs = 2, /* tuner, line in */
650 .muxsel = { 2, 3, 1, 1 },
651 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
654 .tuner_type = TUNER_PHILIPS_PAL_I,
655 .tuner_addr = ADDR_UNSET,
656 .radio_addr = ADDR_UNSET,
658 [BTTV_BOARD_PHOEBE_TVMAS] = {
659 .name = "Askey CPH050/ Phoebe Tv Master + FM",
665 .muxsel = { 2, 3, 1, 1 },
666 .gpiomux = { 0, 1, 0x800, 0x400 },
671 .tuner_addr = ADDR_UNSET,
672 .radio_addr = ADDR_UNSET,
674 [BTTV_BOARD_MODTEC_205] = {
675 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
681 .muxsel = { 2, 3, -1 },
682 .digital_mode = DIGITAL_MODE_CAMERA,
683 .gpiomux = { 0, 0, 0, 0 },
686 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
687 .tuner_addr = ADDR_UNSET,
688 .radio_addr = ADDR_UNSET,
691 /* ---- card 0x18 ---------------------------------- */
692 [BTTV_BOARD_MAGICTVIEW061] = {
693 .name = "Askey CPH05X/06X (bt878) [many vendors]",
699 .muxsel = { 2, 3, 1, 1 },
700 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
705 .tuner_addr = ADDR_UNSET,
706 .radio_addr = ADDR_UNSET,
709 [BTTV_BOARD_VOBIS_BOOSTAR] = {
710 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
715 .gpiomask = 0x1f0fff,
716 .muxsel = { 2, 3, 1, 1 },
717 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
720 .tuner_type = TUNER_PHILIPS_PAL,
721 .tuner_addr = ADDR_UNSET,
722 .radio_addr = ADDR_UNSET,
723 .audio_mode_gpio= terratv_audio,
725 [BTTV_BOARD_HAUPPAUG_WCAM] = {
726 .name = "Hauppauge WinCam newer (bt878)",
732 .muxsel = { 2, 0, 1, 1 },
733 .gpiomux = { 0, 1, 2, 3 },
737 .tuner_addr = ADDR_UNSET,
738 .radio_addr = ADDR_UNSET,
740 [BTTV_BOARD_MAXI] = {
741 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
747 .muxsel = { 2, 3, 1, 1 },
748 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
751 .tuner_type = TUNER_PHILIPS_SECAM,
752 .tuner_addr = ADDR_UNSET,
753 .radio_addr = ADDR_UNSET,
756 /* ---- card 0x1c ---------------------------------- */
757 [BTTV_BOARD_TERRATV] = {
758 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
763 .gpiomask = 0x1f0fff,
764 .muxsel = { 2, 3, 1, 1 },
765 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
768 .tuner_type = TUNER_PHILIPS_PAL,
769 .tuner_addr = ADDR_UNSET,
770 .radio_addr = ADDR_UNSET,
771 .audio_mode_gpio= terratv_audio,
773 External 20 pin connector (for Active Radio Upgrade board)
779 gpio05: om5610-stereo
783 gpio09+10: nIOR, nSEL ?? (bt878)
787 gpio16: u2-A0 (1st 4052bt)
790 gpio19: u4-A0 (2nd 4052)
794 00000 : Cdrom (internal audio input)
795 10000 : ext. Video audio input
804 [BTTV_BOARD_PXC200] = {
805 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
806 .name = "Imagenation PXC200",
810 .svhs = 1, /* was: 4 */
812 .muxsel = { 2, 3, 1, 0, 0},
816 .tuner_addr = ADDR_UNSET,
817 .radio_addr = ADDR_UNSET,
818 .muxsel_hook = PXC200_muxsel,
821 [BTTV_BOARD_FLYVIDEO_98] = {
822 .name = "Lifeview FlyVideo 98 LR50",
827 .gpiomask = 0x1800, /* 0x8dfe00 */
828 .muxsel = { 2, 3, 1, 1 },
829 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
833 .tuner_addr = ADDR_UNSET,
834 .radio_addr = ADDR_UNSET,
836 [BTTV_BOARD_IPROTV] = {
837 .name = "Formac iProTV, Formac ProTV I (bt848)",
843 .muxsel = { 2, 3, 1, 1 },
844 .gpiomux = { 1, 0, 0, 0 },
846 .tuner_type = TUNER_PHILIPS_PAL,
847 .tuner_addr = ADDR_UNSET,
848 .radio_addr = ADDR_UNSET,
851 /* ---- card 0x20 ---------------------------------- */
852 [BTTV_BOARD_INTEL_C_S_PCI] = {
853 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
859 .muxsel = { 2, 3, 1, 1 },
862 .tuner_type = TUNER_ABSENT,
863 .tuner_addr = ADDR_UNSET,
864 .radio_addr = ADDR_UNSET,
866 [BTTV_BOARD_TERRATVALUE] = {
867 .name = "Terratec TerraTValue Version Bt878",
872 .gpiomask = 0xffff00,
873 .muxsel = { 2, 3, 1, 1 },
874 .gpiomux = { 0x500, 0, 0x300, 0x900 },
878 .tuner_type = TUNER_PHILIPS_PAL,
879 .tuner_addr = ADDR_UNSET,
880 .radio_addr = ADDR_UNSET,
882 [BTTV_BOARD_WINFAST2000] = {
883 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
888 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
889 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
890 .gpiomask = 0xb33000,
891 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
892 .gpiomute = 0x800000,
893 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
894 gpio23 -- hef4052:nEnable (0x800000)
897 0x0000: external audio
901 Note: There exists another variant "Winfast 2000" with tv stereo !?
902 Note: eeprom only contains FF and pci subsystem id 107d:6606
907 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
908 .tuner_addr = ADDR_UNSET,
909 .radio_addr = ADDR_UNSET,
910 .audio_mode_gpio= winfast2000_audio,
913 [BTTV_BOARD_CHRONOS_VS2] = {
914 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
920 .muxsel = { 2, 3, 1, 1 },
921 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
925 .tuner_addr = ADDR_UNSET,
926 .radio_addr = ADDR_UNSET,
929 /* ---- card 0x24 ---------------------------------- */
930 [BTTV_BOARD_TYPHOON_TVIEW] = {
931 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
937 .muxsel = { 2, 3, 1, 1 },
938 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
942 .tuner_addr = ADDR_UNSET,
943 .radio_addr = ADDR_UNSET,
946 [BTTV_BOARD_PXELVWPLTVPRO] = {
947 .name = "Prolink PixelView PlayTV pro",
953 .muxsel = { 2, 3, 1, 1 },
954 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
959 .tuner_addr = ADDR_UNSET,
960 .radio_addr = ADDR_UNSET,
962 [BTTV_BOARD_MAGICTVIEW063] = {
963 .name = "Askey CPH06X TView99",
968 .gpiomask = 0x551e00,
969 .muxsel = { 2, 3, 1, 0 },
970 .gpiomux = { 0x551400, 0x551200, 0, 0 },
971 .gpiomute = 0x551c00,
974 .tuner_type = TUNER_PHILIPS_PAL_I,
975 .tuner_addr = ADDR_UNSET,
976 .radio_addr = ADDR_UNSET,
979 [BTTV_BOARD_PINNACLE] = {
980 .name = "Pinnacle PCTV Studio/Rave",
985 .gpiomask = 0x03000F,
986 .muxsel = { 2, 3, 1, 1 },
987 .gpiomux = { 2, 0xd0001, 0, 0 },
992 .tuner_addr = ADDR_UNSET,
993 .radio_addr = ADDR_UNSET,
996 /* ---- card 0x28 ---------------------------------- */
997 [BTTV_BOARD_STB2] = {
998 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
1004 .muxsel = { 2, 3, 1, 1 },
1005 .gpiomux = { 4, 0, 2, 3 },
1009 .tuner_type = TUNER_PHILIPS_NTSC,
1010 .tuner_addr = ADDR_UNSET,
1011 .radio_addr = ADDR_UNSET,
1015 [BTTV_BOARD_AVPHONE98] = {
1016 .name = "AVerMedia TVPhone 98",
1022 .muxsel = { 2, 3, 1, 1 },
1023 .gpiomux = { 13, 4, 11, 7 },
1026 .tuner_type = UNSET,
1027 .tuner_addr = ADDR_UNSET,
1028 .radio_addr = ADDR_UNSET,
1030 .audio_mode_gpio= avermedia_tvphone_audio,
1032 [BTTV_BOARD_PV951] = {
1033 .name = "ProVideo PV951", /* pic16c54 */
1039 .muxsel = { 2, 3, 1, 1},
1040 .gpiomux = { 0, 0, 0, 0},
1044 .tuner_type = TUNER_PHILIPS_PAL_I,
1045 .tuner_addr = ADDR_UNSET,
1046 .radio_addr = ADDR_UNSET,
1048 [BTTV_BOARD_ONAIR_TV] = {
1049 .name = "Little OnAir TV",
1055 .muxsel = { 2, 3, 1, 1 },
1056 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1057 .gpiomute = 0xff3ffc,
1059 .tuner_type = UNSET,
1060 .tuner_addr = ADDR_UNSET,
1061 .radio_addr = ADDR_UNSET,
1064 /* ---- card 0x2c ---------------------------------- */
1065 [BTTV_BOARD_SIGMA_TVII_FM] = {
1066 .name = "Sigma TVII-FM",
1072 .muxsel = { 2, 3, 1, 1 },
1073 .gpiomux = { 1, 1, 0, 2 },
1077 .tuner_type = UNSET,
1078 .tuner_addr = ADDR_UNSET,
1079 .radio_addr = ADDR_UNSET,
1081 [BTTV_BOARD_MATRIX_VISION2] = {
1082 .name = "MATRIX-Vision MV-Delta 2",
1088 .muxsel = { 2, 3, 1, 0, 0 },
1092 .tuner_type = UNSET,
1093 .tuner_addr = ADDR_UNSET,
1094 .radio_addr = ADDR_UNSET,
1096 [BTTV_BOARD_ZOLTRIX_GENIE] = {
1097 .name = "Zoltrix Genie TV/FM",
1102 .gpiomask = 0xbcf03f,
1103 .muxsel = { 2, 3, 1, 1 },
1104 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1105 .gpiomute = 0xbcb03f,
1108 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
1109 .tuner_addr = ADDR_UNSET,
1110 .radio_addr = ADDR_UNSET,
1112 [BTTV_BOARD_TERRATVRADIO] = {
1113 .name = "Terratec TV/Radio+",
1118 .gpiomask = 0x70000,
1119 .muxsel = { 2, 3, 1, 1 },
1120 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1121 .gpiomute = 0x40000,
1125 .tuner_type = TUNER_PHILIPS_PAL_I,
1126 .tuner_addr = ADDR_UNSET,
1127 .radio_addr = ADDR_UNSET,
1131 /* ---- card 0x30 ---------------------------------- */
1132 [BTTV_BOARD_DYNALINK] = {
1133 .name = "Askey CPH03x/ Dynalink Magic TView",
1139 .muxsel = { 2, 3, 1, 1 },
1140 .gpiomux = {2,0,0,0 },
1144 .tuner_type = UNSET,
1145 .tuner_addr = ADDR_UNSET,
1146 .radio_addr = ADDR_UNSET,
1148 [BTTV_BOARD_GVBCTV3PCI] = {
1149 .name = "IODATA GV-BCTV3/PCI",
1154 .gpiomask = 0x010f00,
1155 .muxsel = {2, 3, 0, 0 },
1156 .gpiomux = {0x10000, 0, 0x10000, 0 },
1159 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1160 .tuner_addr = ADDR_UNSET,
1161 .radio_addr = ADDR_UNSET,
1162 .audio_mode_gpio= gvbctv3pci_audio,
1164 [BTTV_BOARD_PXELVWPLTVPAK] = {
1165 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1170 .gpiomask = 0xAA0000,
1171 .muxsel = { 2,3,1,1,-1 },
1172 .digital_mode = DIGITAL_MODE_CAMERA,
1173 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1174 .gpiomute = 0xa8000,
1177 .tuner_type = TUNER_PHILIPS_PAL_I,
1178 .tuner_addr = ADDR_UNSET,
1179 .radio_addr = ADDR_UNSET,
1181 /* GPIO wiring: (different from Rev.4C !)
1182 GPIO17: U4.A0 (first hef4052bt)
1184 GPIO20: U5.A1 (second hef4052bt)
1186 GPIO22: BT832 Reset Line
1187 GPIO23: A5,A0, U5,nEN
1188 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1191 [BTTV_BOARD_EAGLE] = {
1192 .name = "Eagle Wireless Capricorn2 (bt878A)",
1198 .muxsel = { 2, 0, 1, 1 },
1199 .gpiomux = { 0, 1, 2, 3 },
1202 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
1203 .tuner_addr = ADDR_UNSET,
1204 .radio_addr = ADDR_UNSET,
1207 /* ---- card 0x34 ---------------------------------- */
1208 [BTTV_BOARD_PINNACLEPRO] = {
1209 /* David Härdeman <david@2gen.com> */
1210 .name = "Pinnacle PCTV Studio Pro",
1215 .gpiomask = 0x03000F,
1216 .muxsel = { 2, 3, 1, 1 },
1217 .gpiomux = { 1, 0xd0001, 0, 0 },
1219 /* sound path (5 sources):
1220 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1223 2= Mono TV sound from Tuner
1225 MUX2 (mask 0x30000):
1227 1= FM stereo Radio from Tuner */
1230 .tuner_type = UNSET,
1231 .tuner_addr = ADDR_UNSET,
1232 .radio_addr = ADDR_UNSET,
1234 [BTTV_BOARD_TVIEW_RDS_FM] = {
1235 /* Claas Langbehn <claas@bigfoot.com>,
1236 Sven Grothklags <sven@upb.de> */
1237 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1243 .muxsel = { 2, 3, 1, 1 },
1244 .gpiomux = { 0, 0, 0x10, 8 },
1248 .tuner_type = TUNER_PHILIPS_PAL,
1249 .tuner_addr = ADDR_UNSET,
1250 .radio_addr = ADDR_UNSET,
1253 [BTTV_BOARD_LIFETEC_9415] = {
1254 /* Tim Röstermundt <rosterm@uni-muenster.de>
1255 in de.comp.os.unix.linux.hardware:
1256 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1257 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1258 options tuner type=5 */
1259 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1265 .muxsel = { 2, 3, 1, 1 },
1266 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1268 /* For cards with tda9820/tda9821:
1269 0x0000: Tuner normal stereo
1270 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1271 0x0880: Tuner A2 stereo */
1273 .tuner_type = UNSET,
1274 .tuner_addr = ADDR_UNSET,
1275 .radio_addr = ADDR_UNSET,
1277 [BTTV_BOARD_BESTBUY_EASYTV] = {
1278 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1279 old Easy TV BT848 version (model CPH031) */
1280 .name = "Askey CPH031/ BESTBUY Easy TV",
1286 .muxsel = { 2, 3, 1, 0 },
1287 .gpiomux = { 2, 0, 0, 0 },
1291 .tuner_type = TUNER_TEMIC_PAL,
1292 .tuner_addr = ADDR_UNSET,
1293 .radio_addr = ADDR_UNSET,
1296 /* ---- card 0x38 ---------------------------------- */
1297 [BTTV_BOARD_FLYVIDEO_98FM] = {
1298 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1299 .name = "Lifeview FlyVideo 98FM LR50",
1305 .muxsel = { 2, 3, 1, 1 },
1306 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1309 .tuner_type = TUNER_PHILIPS_PAL,
1310 .tuner_addr = ADDR_UNSET,
1311 .radio_addr = ADDR_UNSET,
1313 /* This is the ultimate cheapo capture card
1314 * just a BT848A on a small PCB!
1315 * Steve Hosgood <steve@equiinet.com> */
1316 [BTTV_BOARD_GRANDTEC] = {
1317 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1328 .tuner_type = UNSET,
1329 .tuner_addr = ADDR_UNSET,
1330 .radio_addr = ADDR_UNSET,
1332 [BTTV_BOARD_ASKEY_CPH060] = {
1333 /* Daniel Herrington <daniel.herrington@home.com> */
1334 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1340 .muxsel = { 2, 3, 1, 1},
1341 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1345 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1346 .tuner_addr = ADDR_UNSET,
1347 .radio_addr = ADDR_UNSET,
1349 [BTTV_BOARD_ASKEY_CPH03X] = {
1350 /* Matti Mottus <mottus@physic.ut.ee> */
1351 .name = "Askey CPH03x TV Capturer",
1356 .gpiomask = 0x03000F,
1357 .muxsel = { 2, 3, 1, 0 },
1358 .gpiomux = { 2, 0, 0, 0 },
1361 .tuner_type = TUNER_TEMIC_PAL,
1362 .tuner_addr = ADDR_UNSET,
1363 .radio_addr = ADDR_UNSET,
1366 /* ---- card 0x3c ---------------------------------- */
1367 [BTTV_BOARD_MM100PCTV] = {
1368 /* Philip Blundell <philb@gnu.org> */
1369 .name = "Modular Technology MM100PCTV",
1375 .muxsel = { 2, 3, 1, 1 },
1376 .gpiomux = { 2, 0, 0, 1 },
1379 .tuner_type = TUNER_TEMIC_PAL,
1380 .tuner_addr = ADDR_UNSET,
1381 .radio_addr = ADDR_UNSET,
1383 [BTTV_BOARD_GMV1] = {
1384 /* Adrian Cox <adrian@humboldt.co.uk */
1385 .name = "AG Electronics GMV1",
1396 .tuner_type = UNSET,
1397 .tuner_addr = ADDR_UNSET,
1398 .radio_addr = ADDR_UNSET,
1400 [BTTV_BOARD_BESTBUY_EASYTV2] = {
1401 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1402 new Easy TV BT878 version (model CPH061)
1403 special thanks to Informatica Mieres for providing the card */
1404 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1410 .muxsel = { 2, 3, 1, 0 },
1411 .gpiomux = { 1, 0, 4, 4 },
1415 .tuner_type = TUNER_PHILIPS_PAL,
1416 .tuner_addr = ADDR_UNSET,
1417 .radio_addr = ADDR_UNSET,
1419 [BTTV_BOARD_ATI_TVWONDER] = {
1420 /* Lukas Gebauer <geby@volny.cz> */
1421 .name = "ATI TV-Wonder",
1427 .muxsel = { 2, 3, 1, 0 },
1428 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1431 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1432 .tuner_addr = ADDR_UNSET,
1433 .radio_addr = ADDR_UNSET,
1436 /* ---- card 0x40 ---------------------------------- */
1437 [BTTV_BOARD_ATI_TVWONDERVE] = {
1438 /* Lukas Gebauer <geby@volny.cz> */
1439 .name = "ATI TV-Wonder VE",
1445 .muxsel = { 2, 3, 0, 1 },
1446 .gpiomux = { 0, 0, 1, 0 },
1449 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1450 .tuner_addr = ADDR_UNSET,
1451 .radio_addr = ADDR_UNSET,
1453 [BTTV_BOARD_FLYVIDEO2000] = {
1454 /* DeeJay <deejay@westel900.net (2000S) */
1455 .name = "Lifeview FlyVideo 2000S LR90",
1461 .muxsel = { 2, 3, 0, 1 },
1462 /* Radio changed from 1e80 to 0x800 to make
1463 FlyVideo2000S in .hu happy (gm)*/
1464 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1465 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1467 .audio_mode_gpio= fv2000s_audio,
1472 .tuner_type = TUNER_PHILIPS_PAL,
1473 .tuner_addr = ADDR_UNSET,
1474 .radio_addr = ADDR_UNSET,
1476 [BTTV_BOARD_TERRATVALUER] = {
1477 .name = "Terratec TValueRadio",
1482 .gpiomask = 0xffff00,
1483 .muxsel = { 2, 3, 1, 1 },
1484 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1488 .tuner_type = TUNER_PHILIPS_PAL,
1489 .tuner_addr = ADDR_UNSET,
1490 .radio_addr = ADDR_UNSET,
1493 [BTTV_BOARD_GVBCTV4PCI] = {
1494 /* TANAKA Kei <peg00625@nifty.com> */
1495 .name = "IODATA GV-BCTV4/PCI",
1500 .gpiomask = 0x010f00,
1501 .muxsel = {2, 3, 0, 0 },
1502 .gpiomux = {0x10000, 0, 0x10000, 0 },
1505 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1506 .tuner_addr = ADDR_UNSET,
1507 .radio_addr = ADDR_UNSET,
1508 .audio_mode_gpio= gvbctv3pci_audio,
1511 /* ---- card 0x44 ---------------------------------- */
1512 [BTTV_BOARD_VOODOOTV_FM] = {
1513 .name = "3Dfx VoodooTV FM (Euro)",
1514 /* try "insmod msp3400 simple=0" if you have
1515 * sound problems with this card. */
1520 .gpiomask = 0x4f8a00,
1521 /* 0x100000: 1=MSP enabled (0=disable again)
1522 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1523 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1524 .gpiomute = 0x947fff,
1525 /* tvtuner, radio, external,internal, mute, stereo
1526 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1527 .muxsel = { 2, 3 ,0 ,1 },
1528 .tuner_type = TUNER_MT2032,
1529 .tuner_addr = ADDR_UNSET,
1530 .radio_addr = ADDR_UNSET,
1534 [BTTV_BOARD_VOODOOTV_200] = {
1535 .name = "VoodooTV 200 (USA)",
1536 /* try "insmod msp3400 simple=0" if you have
1537 * sound problems with this card. */
1542 .gpiomask = 0x4f8a00,
1543 /* 0x100000: 1=MSP enabled (0=disable again)
1544 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1545 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1546 .gpiomute = 0x947fff,
1547 /* tvtuner, radio, external,internal, mute, stereo
1548 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1549 .muxsel = { 2, 3 ,0 ,1 },
1550 .tuner_type = TUNER_MT2032,
1551 .tuner_addr = ADDR_UNSET,
1552 .radio_addr = ADDR_UNSET,
1556 [BTTV_BOARD_AIMMS] = {
1557 /* Philip Blundell <pb@nexus.co.uk> */
1558 .name = "Active Imaging AIMMS",
1562 .tuner_type = UNSET,
1563 .tuner_addr = ADDR_UNSET,
1564 .radio_addr = ADDR_UNSET,
1569 [BTTV_BOARD_PV_BT878P_PLUS] = {
1570 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1571 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1577 .muxsel = { 2, 3, 1, 1 },
1578 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1582 .tuner_type = TUNER_LG_PAL_I_FM,
1583 .tuner_addr = ADDR_UNSET,
1584 .radio_addr = ADDR_UNSET,
1587 GPIO0: U4.A0 (hef4052bt)
1589 GPIO2: U4.A1 (second hef4052bt)
1590 GPIO3: U4.nEN, U5.A0, A5.nEN
1594 [BTTV_BOARD_FLYVIDEO98EZ] = {
1595 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1600 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
1603 .tuner_type = UNSET,
1604 .tuner_addr = ADDR_UNSET,
1605 .radio_addr = ADDR_UNSET,
1608 /* ---- card 0x48 ---------------------------------- */
1609 [BTTV_BOARD_PV_BT878P_9B] = {
1610 /* Dariusz Kowalewski <darekk@automex.pl> */
1611 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1617 .muxsel = { 2, 3, 1, 1 },
1618 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1624 .tuner_type = TUNER_PHILIPS_PAL,
1625 .tuner_addr = ADDR_UNSET,
1626 .radio_addr = ADDR_UNSET,
1627 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
1628 .has_radio = 1, /* Note: not all cards have radio */
1635 GPIO20,22,23: R30,R29,R28
1638 [BTTV_BOARD_SENSORAY311] = {
1639 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1640 /* you must jumper JP5 for the card to work */
1641 .name = "Sensoray 311",
1647 .muxsel = { 2, 3, 1, 0, 0 },
1650 .tuner_type = UNSET,
1651 .tuner_addr = ADDR_UNSET,
1652 .radio_addr = ADDR_UNSET,
1654 [BTTV_BOARD_RV605] = {
1655 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1656 .name = "RemoteVision MX (RV605)",
1662 .gpiomask2 = 0x07ff,
1663 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1664 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1667 .tuner_type = UNSET,
1668 .tuner_addr = ADDR_UNSET,
1669 .radio_addr = ADDR_UNSET,
1670 .muxsel_hook = rv605_muxsel,
1672 [BTTV_BOARD_POWERCLR_MTV878] = {
1673 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1678 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1679 .muxsel = { 2, 1, 1, },
1680 .gpiomux = { 0, 1, 2, 2 },
1683 .tuner_type = TUNER_PHILIPS_PAL,
1684 .tuner_addr = ADDR_UNSET,
1685 .radio_addr = ADDR_UNSET,
1690 /* ---- card 0x4c ---------------------------------- */
1691 [BTTV_BOARD_WINDVR] = {
1692 /* Masaki Suzuki <masaki@btree.org> */
1693 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1698 .gpiomask = 0x140007,
1699 .muxsel = { 2, 3, 1, 1 },
1700 .gpiomux = { 0, 1, 2, 3 },
1702 .tuner_type = TUNER_PHILIPS_NTSC,
1703 .tuner_addr = ADDR_UNSET,
1704 .radio_addr = ADDR_UNSET,
1705 .audio_mode_gpio= windvr_audio,
1707 [BTTV_BOARD_GRANDTEC_MULTI] = {
1708 .name = "GrandTec Multi Capture Card (Bt878)",
1714 .muxsel = { 2, 3, 1, 0 },
1719 .tuner_type = UNSET,
1720 .tuner_addr = ADDR_UNSET,
1721 .radio_addr = ADDR_UNSET,
1723 [BTTV_BOARD_KWORLD] = {
1724 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1730 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
1731 .gpiomux = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
1732 * This card lacks external Audio In, so we mute it on Ext. & Int.
1733 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1734 * This card lacks PCI subsystem ID, sigh.
1735 * gpiomux =1: lower volume, 2+3: mute
1736 * btwincap uses 0x80000/0x80003
1742 .tuner_type = TUNER_PHILIPS_PAL,
1743 .tuner_addr = ADDR_UNSET,
1744 .radio_addr = ADDR_UNSET,
1745 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1746 radio signal strength indicators work fine. */
1749 GPIO0,1: HEF4052 A0,A1
1750 GPIO2: HEF4052 nENABLE
1752 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1756 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1758 [BTTV_BOARD_DSP_TCVIDEO] = {
1759 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1760 .name = "DSP Design TCVIDEO",
1763 .muxsel = { 2, 3, 1, 0 },
1765 .tuner_type = UNSET,
1766 .tuner_addr = ADDR_UNSET,
1767 .radio_addr = ADDR_UNSET,
1770 /* ---- card 0x50 ---------------------------------- */
1771 [BTTV_BOARD_HAUPPAUGEPVR] = {
1772 .name = "Hauppauge WinTV PVR",
1777 .muxsel = { 2, 0, 1, 1 },
1780 .tuner_type = UNSET,
1781 .tuner_addr = ADDR_UNSET,
1782 .radio_addr = ADDR_UNSET,
1787 [BTTV_BOARD_GVBCTV5PCI] = {
1788 .name = "IODATA GV-BCTV5/PCI",
1793 .gpiomask = 0x0f0f80,
1794 .muxsel = {2, 3, 1, 0 },
1795 .gpiomux = {0x030000, 0x010000, 0, 0 },
1796 .gpiomute = 0x020000,
1799 .tuner_type = TUNER_PHILIPS_NTSC_M,
1800 .tuner_addr = ADDR_UNSET,
1801 .radio_addr = ADDR_UNSET,
1802 .audio_mode_gpio= gvbctv5pci_audio,
1805 [BTTV_BOARD_OSPREY1x0] = {
1806 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1807 .video_inputs = 4, /* id-inputs-clock */
1811 .muxsel = { 3, 2, 0, 1 },
1813 .tuner_type = UNSET,
1814 .tuner_addr = ADDR_UNSET,
1815 .radio_addr = ADDR_UNSET,
1820 [BTTV_BOARD_OSPREY1x0_848] = {
1821 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1826 .muxsel = { 2, 3, 1 },
1828 .tuner_type = UNSET,
1829 .tuner_addr = ADDR_UNSET,
1830 .radio_addr = ADDR_UNSET,
1836 /* ---- card 0x54 ---------------------------------- */
1837 [BTTV_BOARD_OSPREY101_848] = {
1838 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1845 .tuner_type = UNSET,
1846 .tuner_addr = ADDR_UNSET,
1847 .radio_addr = ADDR_UNSET,
1852 [BTTV_BOARD_OSPREY1x1] = {
1853 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1860 .tuner_type = UNSET,
1861 .tuner_addr = ADDR_UNSET,
1862 .radio_addr = ADDR_UNSET,
1867 [BTTV_BOARD_OSPREY1x1_SVID] = {
1868 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1875 .tuner_type = UNSET,
1876 .tuner_addr = ADDR_UNSET,
1877 .radio_addr = ADDR_UNSET,
1882 [BTTV_BOARD_OSPREY2xx] = {
1883 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1890 .tuner_type = UNSET,
1891 .tuner_addr = ADDR_UNSET,
1892 .radio_addr = ADDR_UNSET,
1898 /* ---- card 0x58 ---------------------------------- */
1899 [BTTV_BOARD_OSPREY2x0_SVID] = {
1900 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1907 .tuner_type = UNSET,
1908 .tuner_addr = ADDR_UNSET,
1909 .radio_addr = ADDR_UNSET,
1914 [BTTV_BOARD_OSPREY2x0] = {
1915 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1922 .tuner_type = UNSET,
1923 .tuner_addr = ADDR_UNSET,
1924 .radio_addr = ADDR_UNSET,
1929 [BTTV_BOARD_OSPREY500] = {
1930 .name = "Osprey 500", /* 500 */
1937 .tuner_type = UNSET,
1938 .tuner_addr = ADDR_UNSET,
1939 .radio_addr = ADDR_UNSET,
1944 [BTTV_BOARD_OSPREY540] = {
1945 .name = "Osprey 540", /* 540 */
1950 .tuner_type = UNSET,
1951 .tuner_addr = ADDR_UNSET,
1952 .radio_addr = ADDR_UNSET,
1958 /* ---- card 0x5C ---------------------------------- */
1959 [BTTV_BOARD_OSPREY2000] = {
1960 .name = "Osprey 2000", /* 2000 */
1967 .tuner_type = UNSET,
1968 .tuner_addr = ADDR_UNSET,
1969 .radio_addr = ADDR_UNSET,
1972 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1974 [BTTV_BOARD_IDS_EAGLE] = {
1975 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1976 .name = "IDS Eagle",
1980 .tuner_type = UNSET,
1981 .tuner_addr = ADDR_UNSET,
1982 .radio_addr = ADDR_UNSET,
1985 .muxsel = { 0, 1, 2, 3 },
1986 .muxsel_hook = eagle_muxsel,
1991 [BTTV_BOARD_PINNACLESAT] = {
1992 .name = "Pinnacle PCTV Sat",
1997 .tuner_type = UNSET,
1998 .tuner_addr = ADDR_UNSET,
1999 .radio_addr = ADDR_UNSET,
2008 [BTTV_BOARD_FORMAC_PROTV] = {
2009 .name = "Formac ProTV II (bt878)",
2015 /* TV, Comp1, Composite over SVID con, SVID */
2016 .muxsel = { 2, 3, 1, 1 },
2017 .gpiomux = { 2, 2, 0, 0 },
2020 .tuner_type = TUNER_PHILIPS_PAL,
2021 .tuner_addr = ADDR_UNSET,
2022 .radio_addr = ADDR_UNSET,
2024 GPIO=0x00,0x01,0x03: mute (?)
2025 0x02: both TV and radio (tuner: FM1216/I)
2026 The card has onboard audio connectors labeled "cdrom" and "board",
2027 not soldered here, though unknown wiring.
2028 Card lacks: external audio in, pci subsystem id.
2032 /* ---- card 0x60 ---------------------------------- */
2033 [BTTV_BOARD_MACHTV] = {
2040 .muxsel = { 2, 3, 1, 1},
2041 .gpiomux = { 0, 1, 2, 3},
2044 .tuner_type = TUNER_PHILIPS_PAL,
2045 .tuner_addr = ADDR_UNSET,
2046 .radio_addr = ADDR_UNSET,
2049 [BTTV_BOARD_EURESYS_PICOLO] = {
2050 .name = "Euresys Picolo",
2059 .muxsel = { 2, 0, 1},
2061 .tuner_type = UNSET,
2062 .tuner_addr = ADDR_UNSET,
2063 .radio_addr = ADDR_UNSET,
2065 [BTTV_BOARD_PV150] = {
2066 /* Luc Van Hoeylandt <luc@e-magic.be> */
2067 .name = "ProVideo PV150", /* 0x4f */
2078 .tuner_type = UNSET,
2079 .tuner_addr = ADDR_UNSET,
2080 .radio_addr = ADDR_UNSET,
2082 [BTTV_BOARD_AD_TVK503] = {
2083 /* Hiroshi Takekawa <sian@big.or.jp> */
2084 /* This card lacks subsystem ID */
2085 .name = "AD-TVK503", /* 0x63 */
2090 .gpiomask = 0x001e8007,
2091 .muxsel = { 2, 3, 1, 0 },
2092 /* Tuner, Radio, external, internal, off, on */
2093 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2098 .tuner_type = TUNER_PHILIPS_NTSC,
2099 .tuner_addr = ADDR_UNSET,
2100 .radio_addr = ADDR_UNSET,
2101 .audio_mode_gpio= adtvk503_audio,
2104 /* ---- card 0x64 ---------------------------------- */
2105 [BTTV_BOARD_HERCULES_SM_TV] = {
2106 .name = "Hercules Smart TV Stereo",
2112 .muxsel = { 2, 3, 1, 1 },
2116 .tuner_type = TUNER_PHILIPS_PAL,
2117 .tuner_addr = ADDR_UNSET,
2118 .radio_addr = ADDR_UNSET,
2120 - card lacks subsystem ID
2121 - stereo variant w/ daughter board with tda9874a @0xb0
2123 always from tda9874 independent of GPIO (?)
2124 external line in: unknown
2125 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2126 hef4053 (instead 4052) for unknown function
2129 [BTTV_BOARD_PACETV] = {
2130 .name = "Pace TV & Radio Card",
2135 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
2139 .tuner_type = TUNER_PHILIPS_PAL_I,
2140 .tuner_addr = ADDR_UNSET,
2141 .radio_addr = ADDR_UNSET,
2144 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2145 only internal line out: (4pin header) RGGL
2146 Radio must be decoded by msp3410d (not routed through)*/
2148 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2151 [BTTV_BOARD_IVC200] = {
2152 /* Chris Willing <chris@vislab.usyd.edu.au> */
2157 .tuner_type = UNSET,
2158 .tuner_addr = ADDR_UNSET,
2159 .radio_addr = ADDR_UNSET,
2165 [BTTV_BOARD_XGUARD] = {
2166 .name = "Grand X-Guard / Trust 814PCI",
2171 .tuner_type = TUNER_ABSENT,
2172 .tuner_addr = ADDR_UNSET,
2173 .radio_addr = ADDR_UNSET,
2175 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2176 .muxsel_hook = xguard_muxsel,
2183 /* ---- card 0x68 ---------------------------------- */
2184 [BTTV_BOARD_NEBULA_DIGITV] = {
2185 .name = "Nebula Electronics DigiTV",
2189 .muxsel = { 2, 3, 1, 0 },
2194 .tuner_type = UNSET,
2195 .tuner_addr = ADDR_UNSET,
2196 .radio_addr = ADDR_UNSET,
2202 [BTTV_BOARD_PV143] = {
2203 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2204 .name = "ProVideo PV143",
2210 .muxsel = { 2, 3, 1, 0 },
2215 .tuner_type = UNSET,
2216 .tuner_addr = ADDR_UNSET,
2217 .radio_addr = ADDR_UNSET,
2219 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
2220 /* M.Klahr@phytec.de */
2221 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
2224 .tuner = UNSET, /* card has no tuner */
2227 .muxsel = { 2, 3, 1, 0 },
2228 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2231 .tuner_type = UNSET,
2232 .tuner_addr = ADDR_UNSET,
2233 .radio_addr = ADDR_UNSET,
2235 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2236 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
2239 .tuner = UNSET, /* card has no tuner */
2242 .muxsel = { 2, 3, 1, 1 },
2243 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2246 .tuner_type = UNSET,
2247 .tuner_addr = ADDR_UNSET,
2248 .radio_addr = ADDR_UNSET,
2251 /* ---- card 0x6c ---------------------------------- */
2252 [BTTV_BOARD_VD009_MINIDIN] = {
2253 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2256 .tuner = UNSET, /* card has no tuner */
2259 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2260 via the upper nibble of muxsel. here: used for
2261 xternal video-mux */
2262 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
2263 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2266 .tuner_type = UNSET,
2267 .tuner_addr = ADDR_UNSET,
2268 .radio_addr = ADDR_UNSET,
2270 [BTTV_BOARD_VD009_COMBI] = {
2271 .name = "PHYTEC VD-009 Combi (bt878)",
2274 .tuner = UNSET, /* card has no tuner */
2277 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2278 via the upper nibble of muxsel. here: used for
2279 xternal video-mux */
2280 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
2281 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2284 .tuner_type = UNSET,
2285 .tuner_addr = ADDR_UNSET,
2286 .radio_addr = ADDR_UNSET,
2288 [BTTV_BOARD_IVC100] = {
2293 .tuner_type = UNSET,
2294 .tuner_addr = ADDR_UNSET,
2295 .radio_addr = ADDR_UNSET,
2298 .muxsel = { 2, 3, 1, 0 },
2301 [BTTV_BOARD_IVC120] = {
2302 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2305 .audio_inputs = 0, /* card has no audio */
2306 .tuner = UNSET, /* card has no tuner */
2307 .tuner_type = UNSET,
2308 .tuner_addr = ADDR_UNSET,
2309 .radio_addr = ADDR_UNSET,
2310 .svhs = UNSET, /* card has no svhs */
2316 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2317 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2318 .muxsel_hook = ivc120_muxsel,
2322 /* ---- card 0x70 ---------------------------------- */
2323 [BTTV_BOARD_PC_HDTV] = {
2324 .name = "pcHDTV HD-2000 TV",
2329 .muxsel = { 2, 3, 1, 0 },
2330 .tuner_type = TUNER_PHILIPS_FCV1236D,
2331 .tuner_addr = ADDR_UNSET,
2332 .radio_addr = ADDR_UNSET,
2335 [BTTV_BOARD_TWINHAN_DST] = {
2336 .name = "Twinhan DST + clones",
2340 .tuner_type = TUNER_ABSENT,
2341 .tuner_addr = ADDR_UNSET,
2342 .radio_addr = ADDR_UNSET,
2346 [BTTV_BOARD_WINFASTVC100] = {
2347 .name = "Winfast VC100",
2352 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
2356 .tuner_type = TUNER_ABSENT,
2357 .tuner_addr = ADDR_UNSET,
2358 .radio_addr = ADDR_UNSET,
2361 [BTTV_BOARD_TEV560] = {
2362 .name = "Teppro TEV-560/InterVision IV-560",
2368 .muxsel = { 2, 3, 1, 1 },
2369 .gpiomux = { 1, 1, 1, 1 },
2371 .tuner_type = TUNER_PHILIPS_PAL,
2372 .tuner_addr = ADDR_UNSET,
2373 .radio_addr = ADDR_UNSET,
2377 /* ---- card 0x74 ---------------------------------- */
2378 [BTTV_BOARD_SIMUS_GVC1100] = {
2379 .name = "SIMUS GVC1100",
2384 .tuner_type = UNSET,
2385 .tuner_addr = ADDR_UNSET,
2386 .radio_addr = ADDR_UNSET,
2388 .muxsel = { 2, 2, 2, 2 },
2390 .muxsel_hook = gvc1100_muxsel,
2392 [BTTV_BOARD_NGSTV_PLUS] = {
2393 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2394 .name = "NGS NGSTV+",
2398 .gpiomask = 0x008007,
2399 .muxsel = { 2, 3, 0, 0 },
2400 .gpiomux = { 0, 0, 0, 0 },
2401 .gpiomute = 0x000003,
2403 .tuner_type = TUNER_PHILIPS_PAL,
2404 .tuner_addr = ADDR_UNSET,
2405 .radio_addr = ADDR_UNSET,
2408 [BTTV_BOARD_LMLBT4] = {
2409 /* http://linuxmedialabs.com */
2411 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2415 .muxsel = { 2, 3, 1, 0 },
2420 .tuner_type = UNSET,
2421 .tuner_addr = ADDR_UNSET,
2422 .radio_addr = ADDR_UNSET,
2424 [BTTV_BOARD_TEKRAM_M205] = {
2425 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2426 .name = "Tekram M205 PRO",
2430 .tuner_type = TUNER_PHILIPS_PAL,
2431 .tuner_addr = ADDR_UNSET,
2432 .radio_addr = ADDR_UNSET,
2436 .muxsel = { 2, 3, 1 },
2437 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
2441 /* ---- card 0x78 ---------------------------------- */
2442 [BTTV_BOARD_CONTVFMI] = {
2443 /* Javier Cendan Ares <jcendan@lycos.es> */
2444 /* bt878 TV + FM without subsystem ID */
2445 .name = "Conceptronic CONTVFMi",
2450 .gpiomask = 0x008007,
2451 .muxsel = { 2, 3, 1, 1 },
2452 .gpiomux = { 0, 1, 2, 2 },
2456 .tuner_type = TUNER_PHILIPS_PAL,
2457 .tuner_addr = ADDR_UNSET,
2458 .radio_addr = ADDR_UNSET,
2462 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
2463 /*Eric DEBIEF <debief@telemsa.com>*/
2464 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
2465 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
2467 .name = "Euresys Picolo Tetra",
2473 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2477 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
2478 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2481 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
2482 .tuner_type = UNSET,
2483 .tuner_addr = ADDR_UNSET,
2484 .radio_addr = ADDR_UNSET,
2486 [BTTV_BOARD_SPIRIT_TV] = {
2487 /* Spirit TV Tuner from http://spiritmodems.com.au */
2488 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2489 .name = "Spirit TV Tuner",
2494 .gpiomask = 0x0000000f,
2495 .muxsel = { 2, 1, 1 },
2496 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
2497 .tuner_type = TUNER_TEMIC_PAL,
2498 .tuner_addr = ADDR_UNSET,
2499 .radio_addr = ADDR_UNSET,
2503 [BTTV_BOARD_AVDVBT_771] = {
2504 /* Wolfram Joost <wojo@frokaschwei.de> */
2505 .name = "AVerMedia AVerTV DVB-T 771",
2509 .tuner_type = TUNER_ABSENT,
2510 .tuner_addr = ADDR_UNSET,
2511 .radio_addr = ADDR_UNSET,
2512 .muxsel = { 3 , 3 },
2521 /* ---- card 0x7c ---------------------------------- */
2522 [BTTV_BOARD_AVDVBT_761] = {
2523 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
2524 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
2525 .name = "AverMedia AverTV DVB-T 761",
2529 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
2534 .tuner_type = UNSET,
2535 .tuner_addr = ADDR_UNSET,
2536 .radio_addr = ADDR_UNSET,
2541 [BTTV_BOARD_MATRIX_VISIONSQ] = {
2542 /* andre.schwarz@matrix-vision.de */
2543 .name = "MATRIX Vision Sigma-SQ",
2549 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2550 3, 3, 3, 3, 3, 3, 3, 3 },
2551 .muxsel_hook = sigmaSQ_muxsel,
2555 .tuner_type = UNSET,
2556 .tuner_addr = ADDR_UNSET,
2557 .radio_addr = ADDR_UNSET,
2559 [BTTV_BOARD_MATRIX_VISIONSLC] = {
2560 /* andre.schwarz@matrix-vision.de */
2561 .name = "MATRIX Vision Sigma-SLC",
2567 .muxsel = { 2, 2, 2, 2 },
2568 .muxsel_hook = sigmaSLC_muxsel,
2572 .tuner_type = UNSET,
2573 .tuner_addr = ADDR_UNSET,
2574 .radio_addr = ADDR_UNSET,
2576 /* BTTV_BOARD_APAC_VIEWCOMP */
2577 [BTTV_BOARD_APAC_VIEWCOMP] = {
2578 /* Attila Kondoros <attila.kondoros@chello.hu> */
2579 /* bt878 TV + FM 0x00000000 subsystem ID */
2580 .name = "APAC Viewcomp 878(AMAX)",
2586 .muxsel = { 2, 3, 1, 1 },
2587 .gpiomux = { 2, 0, 0, 0 },
2591 .tuner_type = TUNER_PHILIPS_PAL,
2592 .tuner_addr = ADDR_UNSET,
2593 .radio_addr = ADDR_UNSET,
2594 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2595 .has_radio = 1, /* not every card has radio */
2598 /* ---- card 0x80 ---------------------------------- */
2599 [BTTV_BOARD_DVICO_DVBT_LITE] = {
2600 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2601 .name = "DViCO FusionHDTV DVB-T Lite",
2609 .tuner_type = UNSET,
2610 .tuner_addr = ADDR_UNSET,
2611 .radio_addr = ADDR_UNSET,
2613 [BTTV_BOARD_VGEAR_MYVCD] = {
2614 /* Steven <photon38@pchome.com.tw> */
2615 .name = "V-Gear MyVCD",
2621 .muxsel = {2, 3, 1, 0 },
2622 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2626 .tuner_type = TUNER_PHILIPS_NTSC_M,
2627 .tuner_addr = ADDR_UNSET,
2628 .radio_addr = ADDR_UNSET,
2631 [BTTV_BOARD_SUPER_TV] = {
2632 /* Rick C <cryptdragoon@gmail.com> */
2633 .name = "Super TV Tuner",
2638 .muxsel = { 2, 3, 1, 0 },
2639 .tuner_type = TUNER_PHILIPS_NTSC,
2640 .tuner_addr = ADDR_UNSET,
2641 .radio_addr = ADDR_UNSET,
2642 .gpiomask = 0x008007,
2643 .gpiomux = { 0, 0x000001,0,0 },
2647 [BTTV_BOARD_TIBET_CS16] = {
2648 /* Chris Fanning <video4linux@haydon.net> */
2649 .name = "Tibet Systems 'Progress DVR' CS16",
2654 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2659 .tuner_type = UNSET,
2660 .tuner_addr = ADDR_UNSET,
2661 .radio_addr = ADDR_UNSET,
2662 .muxsel_hook = tibetCS16_muxsel,
2664 [BTTV_BOARD_KODICOM_4400R] = {
2665 /* Bill Brack <wbrack@mmm.com.hk> */
2667 * Note that, because of the card's wiring, the "master"
2668 * BT878A chip (i.e. the one which controls the analog switch
2669 * and must use this card type) is the 2nd one detected. The
2670 * other 3 chips should use card type 0x85, whose description
2671 * follows this one. There is a EEPROM on the card (which is
2672 * connected to the I2C of one of those other chips), but is
2673 * not currently handled. There is also a facility for a
2674 * "monitor", which is also not currently implemented.
2676 .name = "Kodicom 4400R (master)",
2680 .tuner_type = UNSET,
2681 .tuner_addr = ADDR_UNSET,
2682 .radio_addr = ADDR_UNSET,
2684 /* GPIO bits 0-9 used for analog switch:
2685 * 00 - 03: camera selector
2686 * 04 - 06: channel (controller) selector
2687 * 07: data (1->on, 0->off)
2690 * bit 16 is input from sync separator for the channel
2692 .gpiomask = 0x0003ff,
2694 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2699 .muxsel_hook = kodicom4400r_muxsel,
2701 [BTTV_BOARD_KODICOM_4400R_SL] = {
2702 /* Bill Brack <wbrack@mmm.com.hk> */
2703 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2704 * one which controls the analog switch, and must use the card type)
2705 * is the 2nd one detected. The other 3 chips should use this card
2708 .name = "Kodicom 4400R (slave)",
2712 .tuner_type = UNSET,
2713 .tuner_addr = ADDR_UNSET,
2714 .radio_addr = ADDR_UNSET,
2716 .gpiomask = 0x010000,
2718 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2723 .muxsel_hook = kodicom4400r_muxsel,
2725 /* ---- card 0x86---------------------------------- */
2726 [BTTV_BOARD_ADLINK_RTV24] = {
2727 /* Michael Henson <mhenson@clarityvi.com> */
2728 /* Adlink RTV24 with special unlock codes */
2729 .name = "Adlink RTV24",
2734 .muxsel = { 2, 3, 1, 0 },
2735 .tuner_type = UNSET,
2736 .tuner_addr = ADDR_UNSET,
2737 .radio_addr = ADDR_UNSET,
2740 /* ---- card 0x87---------------------------------- */
2741 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
2742 /* Michael Krufky <mkrufky@m1k.net> */
2743 .name = "DViCO FusionHDTV 5 Lite",
2745 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
2746 .tuner_addr = ADDR_UNSET,
2747 .radio_addr = ADDR_UNSET,
2751 .muxsel = { 2, 3, 1 },
2752 .gpiomask = 0x00e00007,
2753 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2754 .gpiomute = 0x00c00007,
2760 /* ---- card 0x88---------------------------------- */
2761 [BTTV_BOARD_ACORP_Y878F] = {
2762 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
2763 .name = "Acorp Y878F",
2768 .gpiomask = 0x01fe00,
2769 .muxsel = { 2, 3, 1, 1 },
2770 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2771 .gpiomute = 0x002000,
2774 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2775 .tuner_addr = 0xc1 >>1,
2776 .radio_addr = 0xc1 >>1,
2779 /* ---- card 0x89 ---------------------------------- */
2780 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
2781 .name = "Conceptronic CTVFMi v2",
2786 .gpiomask = 0x001c0007,
2787 .muxsel = { 2, 3, 1, 1 },
2788 .gpiomux = { 0, 1, 2, 2 },
2792 .tuner_type = TUNER_TENA_9533_DI,
2793 .tuner_addr = ADDR_UNSET,
2794 .radio_addr = ADDR_UNSET,
2798 /* ---- card 0x8a ---------------------------------- */
2799 [BTTV_BOARD_PV_BT878P_2E] = {
2800 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2805 .gpiomask = 0x01fe00,
2806 .muxsel = { 2,3,1,1,-1 },
2807 .digital_mode = DIGITAL_MODE_CAMERA,
2808 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2809 .gpiomute = 0x12400,
2812 .tuner_type = TUNER_LG_PAL_FM,
2813 .tuner_addr = ADDR_UNSET,
2814 .radio_addr = ADDR_UNSET,
2817 /* ---- card 0x8b ---------------------------------- */
2818 [BTTV_BOARD_PV_M4900] = {
2819 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2820 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2826 .muxsel = { 2, 3, 1, 1 },
2827 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2831 .tuner_type = TUNER_YMEC_TVF_5533MF,
2832 .tuner_addr = ADDR_UNSET,
2833 .radio_addr = ADDR_UNSET,
2837 /* ---- card 0x8c ---------------------------------- */
2838 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2839 one external BNC composite input (mux 2)
2840 three internal composite inputs (unknown muxes)
2841 an 18-bit stereo A/D (CS5331A), which has:
2842 one external stereo unblanced (RCA) audio connection
2843 one (or 3?) internal stereo balanced (XLR) audio connection
2844 input is selected via gpio to a 14052B mux
2845 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2846 gain is controlled via an X9221A chip on the I2C bus @0x28
2847 sample rate is controlled via gpio to an MK1413S
2848 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2849 There is neither a tuner nor an svideo input. */
2850 [BTTV_BOARD_OSPREY440] = {
2851 .name = "Osprey 440",
2853 .audio_inputs = 2, /* this is meaningless */
2856 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2858 .gpiomute = 0x000, /* int + 32kHz */
2859 .gpiomux = { 0, 0, 0x000, 0x100},
2861 .tuner_type = UNSET,
2862 .tuner_addr = ADDR_UNSET,
2863 .radio_addr = ADDR_UNSET,
2868 /* ---- card 0x8d ---------------------------------- */
2869 [BTTV_BOARD_ASOUND_SKYEYE] = {
2870 .name = "Asound Skyeye PCTV",
2876 .muxsel = { 2, 3, 1, 1 },
2877 .gpiomux = { 2, 0, 0, 0 },
2881 .tuner_type = TUNER_PHILIPS_NTSC,
2882 .tuner_addr = ADDR_UNSET,
2883 .radio_addr = ADDR_UNSET,
2885 /* ---- card 0x8e ---------------------------------- */
2886 [BTTV_BOARD_SABRENT_TVFM] = {
2887 .name = "Sabrent TV-FM (bttv version)",
2892 .gpiomask = 0x108007,
2893 .muxsel = { 2, 3, 1, 1 },
2894 .gpiomux = { 100000, 100002, 100002, 100000 },
2899 .tuner_type = TUNER_TNF_5335MF,
2900 .tuner_addr = ADDR_UNSET,
2903 /* ---- card 0x8f ---------------------------------- */
2904 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2905 .name = "Hauppauge ImpactVCB (bt878)",
2910 .gpiomask = 0x0f, /* old: 7 */
2911 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
2915 .tuner_type = UNSET,
2916 .tuner_addr = ADDR_UNSET,
2917 .radio_addr = ADDR_UNSET,
2919 [BTTV_BOARD_MACHTV_MAGICTV] = {
2920 /* Julian Calaby <julian.calaby@gmail.com>
2921 * Slightly different from original MachTV definition (0x60)
2923 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2924 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2925 * properly (methinks) causing no keyup bits being set */
2927 .name = "MagicTV", /* rebranded MachTV */
2933 .muxsel = { 2, 3, 1, 1 },
2934 .gpiomux = { 0, 1, 2, 3 },
2936 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2937 .tuner_addr = ADDR_UNSET,
2938 .radio_addr = ADDR_UNSET,
2943 [BTTV_BOARD_SSAI_SECURITY] = {
2944 .name = "SSAI Security Video Interface",
2949 .muxsel = { 0, 1, 2, 3 },
2950 .tuner_type = UNSET,
2951 .tuner_addr = ADDR_UNSET,
2952 .radio_addr = ADDR_UNSET,
2954 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2955 .name = "SSAI Ultrasound Video Interface",
2960 .muxsel = { 2, 0, 1, 3 },
2961 .tuner_type = UNSET,
2962 .tuner_addr = ADDR_UNSET,
2963 .radio_addr = ADDR_UNSET,
2965 /* ---- card 0x94---------------------------------- */
2966 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2967 .name = "DViCO FusionHDTV 2",
2969 .tuner_type = TUNER_PHILIPS_FCV1236D,
2970 .tuner_addr = ADDR_UNSET,
2971 .radio_addr = ADDR_UNSET,
2975 .muxsel = { 2, 3, 1 },
2976 .gpiomask = 0x00e00007,
2977 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2978 .gpiomute = 0x00c00007,
2983 /* ---- card 0x95---------------------------------- */
2984 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2985 .name = "Typhoon TV-Tuner PCI (50684)",
2990 .gpiomask = 0x3014f,
2991 .muxsel = { 2, 3, 1, 1 },
2992 .gpiomux = { 0x20001,0x10001, 0, 0 },
2996 .tuner_type = TUNER_PHILIPS_PAL_I,
2997 .tuner_addr = ADDR_UNSET,
2998 .radio_addr = ADDR_UNSET,
3000 [BTTV_BOARD_GEOVISION_GV600] = {
3002 .name = "Geovision GV-600",
3008 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
3009 2, 2, 2, 2, 2, 2, 2, 2 },
3010 .muxsel_hook = geovision_muxsel,
3014 .tuner_type = UNSET,
3015 .tuner_addr = ADDR_UNSET,
3016 .radio_addr = ADDR_UNSET,
3018 [BTTV_BOARD_KOZUMI_KTV_01C] = {
3019 /* Mauro Lacy <mauro@lacy.com.ar>
3020 * Based on MagicTV and Conceptronic CONTVFMi */
3022 .name = "Kozumi KTV-01C",
3027 .gpiomask = 0x008007,
3028 .muxsel = { 2, 3, 1, 1 },
3029 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
3030 .gpiomute = 3, /* CONTVFMi */
3032 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
3033 .tuner_addr = ADDR_UNSET,
3034 .radio_addr = ADDR_UNSET,
3039 [BTTV_BOARD_ENLTV_FM_2] = {
3040 /* Encore TV Tuner Pro ENL TV-FM-2
3041 Mauro Carvalho Chehab <mchehab@infradead.org */
3042 .name = "Encore ENL TV-FM-2",
3047 /* bit 6 -> IR disabled
3048 bit 18/17 = 00 -> mute
3049 01 -> enable external audio input
3050 10 -> internal audio input (mono?)
3051 11 -> internal audio input
3053 .gpiomask = 0x060040,
3054 .muxsel = { 2, 3, 3 },
3055 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
3057 .tuner_type = TUNER_TCL_MF02GIP_5N,
3058 .tuner_addr = ADDR_UNSET,
3059 .radio_addr = ADDR_UNSET,
3064 [BTTV_BOARD_VD012] = {
3065 /* D.Heer@Phytec.de */
3066 .name = "PHYTEC VD-012 (bt878)",
3069 .tuner = UNSET, /* card has no tuner */
3070 .svhs = UNSET, /* card has no s-video */
3072 .muxsel = { 0, 2, 3, 1 },
3073 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3076 .tuner_type = UNSET,
3077 .tuner_addr = ADDR_UNSET,
3078 .radio_addr = ADDR_UNSET,
3080 [BTTV_BOARD_VD012_X1] = {
3081 /* D.Heer@Phytec.de */
3082 .name = "PHYTEC VD-012-X1 (bt878)",
3085 .tuner = UNSET, /* card has no tuner */
3088 .muxsel = { 2, 3, 1 },
3089 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3092 .tuner_type = UNSET,
3093 .tuner_addr = ADDR_UNSET,
3094 .radio_addr = ADDR_UNSET,
3096 [BTTV_BOARD_VD012_X2] = {
3097 /* D.Heer@Phytec.de */
3098 .name = "PHYTEC VD-012-X2 (bt878)",
3101 .tuner = UNSET, /* card has no tuner */
3104 .muxsel = { 3, 2, 1 },
3105 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3108 .tuner_type = UNSET,
3109 .tuner_addr = ADDR_UNSET,
3110 .radio_addr = ADDR_UNSET,
3114 static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
3116 /* ----------------------------------------------------------------------- */
3118 static unsigned char eeprom_data[256];
3123 void __devinit bttv_idcard(struct bttv *btv)
3125 unsigned int gpiobits;
3129 /* read PCI subsystem ID */
3130 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3131 btv->cardid = tmp << 16;
3132 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3135 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3136 /* look for the card */
3137 for (type = -1, i = 0; cards[i].id != 0; i++)
3138 if (cards[i].id == btv->cardid)
3143 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3144 "PCI subsystem ID is %04x:%04x\n",
3145 btv->c.nr,cards[type].name,cards[type].cardnr,
3146 btv->cardid & 0xffff,
3147 (btv->cardid >> 16) & 0xffff);
3148 btv->c.type = cards[type].cardnr;
3151 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3152 btv->c.nr, btv->cardid & 0xffff,
3153 (btv->cardid >> 16) & 0xffff);
3154 printk(KERN_DEBUG "please mail id, board name and "
3155 "the correct card= insmod option to video4linux-list@redhat.com\n");
3159 /* let the user override the autodetected type */
3160 if (card[btv->c.nr] < bttv_num_tvcards)
3161 btv->c.type=card[btv->c.nr];
3163 /* print which card config we are using */
3164 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3165 bttv_tvcards[btv->c.type].name, btv->c.type,
3166 card[btv->c.nr] < bttv_num_tvcards
3167 ? "insmod option" : "autodetected");
3169 /* overwrite gpio stuff ?? */
3170 if (UNSET == audioall && UNSET == audiomux[0])
3173 if (UNSET != audiomux[0]) {
3175 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
3176 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
3177 gpiobits |= audiomux[i];
3180 gpiobits = audioall;
3181 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
3182 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
3185 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3186 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3187 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
3188 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
3189 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
3195 * (most) board specific initialisations goes here
3198 /* Some Modular Technology cards have an eeprom, but no subsystem ID */
3199 static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
3203 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
3204 type = BTTV_BOARD_MODTEC_205;
3205 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
3206 type = BTTV_BOARD_EURESYS_PICOLO;
3207 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
3208 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
3212 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3213 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3217 static void flyvideo_gpio(struct bttv *btv)
3219 int gpio, has_remote, has_radio, is_capture_only;
3220 int is_lr90, has_tda9820_tda9821;
3221 int tuner_type = UNSET, ttype;
3223 gpio_inout(0xffffff, 0);
3224 udelay(8); /* without this we would see the 0x1800 mask */
3226 /* FIXME: must restore OUR_EN ??? */
3228 /* all cards provide GPIO info, some have an additional eeprom
3229 * LR50: GPIO coding can be found lower right CP1 .. CP9
3230 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3232 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
3234 * lowest 3 bytes are remote control codes (no handshake needed)
3235 * xxxFFF: No remote control chip soldered
3236 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3237 * Note: Some bits are Audio_Mask !
3239 ttype = (gpio & 0x0f0000) >> 16;
3242 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
3245 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
3248 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
3251 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
3254 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
3257 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3261 has_remote = gpio & 0x800000;
3262 has_radio = gpio & 0x400000;
3263 /* unknown 0x200000;
3264 * unknown2 0x100000; */
3265 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
3266 has_tda9820_tda9821 = !(gpio & 0x004000);
3267 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3269 * gpio & 0x001000 output bit for audio routing */
3271 if (is_capture_only)
3272 tuner_type = TUNER_ABSENT; /* No tuner present */
3274 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3275 btv->c.nr, has_radio ? "yes" : "no ",
3276 has_remote ? "yes" : "no ", tuner_type, gpio);
3277 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3278 btv->c.nr, is_lr90 ? "yes" : "no ",
3279 has_tda9820_tda9821 ? "yes" : "no ",
3280 is_capture_only ? "yes" : "no ");
3282 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3283 btv->tuner_type = tuner_type;
3284 btv->has_radio = has_radio;
3286 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3287 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3288 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
3289 if (has_tda9820_tda9821)
3290 btv->audio_mode_gpio = lt9415_audio;
3291 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
3294 static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3295 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3296 static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3297 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3299 static void miro_pinnacle_gpio(struct bttv *btv)
3304 gpio_inout(0xffffff, 0);
3306 id = ((gpio>>10) & 63) -1;
3307 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
3309 btv->tuner_type = miro_tunermap[id];
3310 if (0 == (gpio & 0x20)) {
3312 if (!miro_fmtuner[id]) {
3313 btv->has_matchbox = 1;
3314 btv->mbox_we = (1<<6);
3315 btv->mbox_most = (1<<7);
3316 btv->mbox_clk = (1<<8);
3317 btv->mbox_data = (1<<9);
3318 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3324 if (btv->c.type == BTTV_BOARD_MIRO)
3325 btv->c.type = BTTV_BOARD_MIROPRO;
3326 if (btv->c.type == BTTV_BOARD_PINNACLE)
3327 btv->c.type = BTTV_BOARD_PINNACLEPRO;
3330 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3331 btv->c.nr, id+1, btv->tuner_type,
3332 !btv->has_radio ? "no" :
3333 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3334 (-1 == msp) ? "no" : "yes");
3336 /* new cards with microtune tuner */
3341 info = "PAL / mono";
3342 btv->tda9887_conf = TDA9887_INTERCARRIER;
3345 info = "PAL+SECAM / stereo";
3347 btv->tda9887_conf = TDA9887_QSS;
3350 info = "NTSC / stereo";
3352 btv->tda9887_conf = TDA9887_QSS;
3355 info = "PAL+SECAM / mono";
3356 btv->tda9887_conf = TDA9887_QSS;
3359 info = "NTSC / mono";
3360 btv->tda9887_conf = TDA9887_INTERCARRIER;
3363 info = "NTSC / stereo";
3364 btv->tda9887_conf = TDA9887_INTERCARRIER;
3367 info = "PAL / stereo";
3368 btv->tda9887_conf = TDA9887_INTERCARRIER;
3371 info = "oops: unknown card";
3375 btv->c.type = BTTV_BOARD_PINNACLEPRO;
3377 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3378 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
3379 btv->tuner_type = TUNER_MT2032;
3383 /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3384 #define LM1882_SYNC_DRIVE 0x200000L
3386 static void init_ids_eagle(struct bttv *btv)
3388 gpio_inout(0xffffff,0xFFFF37);
3389 gpio_write(0x200020);
3391 /* flash strobe inverter ?! */
3392 gpio_write(0x200024);
3394 /* switch sync drive off */
3395 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3397 /* set BT848 muxel to 2 */
3398 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3401 /* Muxsel helper for the IDS Eagle.
3402 * the eagles does not use the standard muxsel-bits but
3403 * has its own multiplexer */
3404 static void eagle_muxsel(struct bttv *btv, unsigned int input)
3406 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3407 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3410 /* set chroma ADC to sleep */
3411 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3412 /* set to composite video */
3413 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3414 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
3416 /* switch sync drive off */
3417 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3420 static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3422 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
3423 gpio_write(masks[input%4]);
3426 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3429 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3430 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3432 IN - sensor inputs, INx - sensor inputs and TI XORed together
3433 O1,O2,O3 - alarm outputs (relays)
3435 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3439 static void init_lmlbt4x(struct bttv *btv)
3441 printk(KERN_DEBUG "LMLBT4x init\n");
3442 btwrite(0x000000, BT848_GPIO_REG_INP);
3443 gpio_inout(0xffffff, 0x0006C0);
3444 gpio_write(0x000000);
3447 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3449 unsigned int inmux = input % 8;
3450 gpio_inout( 0xf, 0xf );
3451 gpio_bits( 0xf, inmux );
3454 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3456 unsigned int inmux = input % 4;
3457 gpio_inout( 3<<9, 3<<9 );
3458 gpio_bits( 3<<9, inmux<<9 );
3461 static void geovision_muxsel(struct bttv *btv, unsigned int input)
3463 unsigned int inmux = input % 16;
3464 gpio_inout(0xf, 0xf);
3465 gpio_bits(0xf, inmux);
3468 /* ----------------------------------------------------------------------- */
3470 static void bttv_reset_audio(struct bttv *btv)
3473 * BT878A has a audio-reset register.
3474 * 1. This register is an audio reset function but it is in
3475 * function-0 (video capture) address space.
3476 * 2. It is enough to do this once per power-up of the card.
3477 * 3. There is a typo in the Conexant doc -- it is not at
3478 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3479 * --//Shrikumar 030609
3485 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3486 btwrite((1<<7), 0x058);
3491 /* initialization part one -- before registering i2c bus */
3492 void __devinit bttv_init_card1(struct bttv *btv)
3494 switch (btv->c.type) {
3495 case BTTV_BOARD_HAUPPAUGE:
3496 case BTTV_BOARD_HAUPPAUGE878:
3497 boot_msp34xx(btv,5);
3499 case BTTV_BOARD_VOODOOTV_200:
3500 case BTTV_BOARD_VOODOOTV_FM:
3501 boot_msp34xx(btv,20);
3503 case BTTV_BOARD_AVERMEDIA98:
3504 boot_msp34xx(btv,11);
3506 case BTTV_BOARD_HAUPPAUGEPVR:
3509 case BTTV_BOARD_TWINHAN_DST:
3510 case BTTV_BOARD_AVDVBT_771:
3511 case BTTV_BOARD_PINNACLESAT:
3512 btv->use_i2c_hw = 1;
3514 case BTTV_BOARD_ADLINK_RTV24:
3519 if (!bttv_tvcards[btv->c.type].has_dvb)
3520 bttv_reset_audio(btv);
3523 /* initialization part two -- after registering i2c bus */
3524 void __devinit bttv_init_card2(struct bttv *btv)
3526 int addr=ADDR_UNSET;
3528 btv->tuner_type = UNSET;
3530 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
3531 bttv_readee(btv,eeprom_data,0xa0);
3532 identify_by_eeprom(btv,eeprom_data);
3535 switch (btv->c.type) {
3536 case BTTV_BOARD_MIRO:
3537 case BTTV_BOARD_MIROPRO:
3538 case BTTV_BOARD_PINNACLE:
3539 case BTTV_BOARD_PINNACLEPRO:
3541 miro_pinnacle_gpio(btv);
3543 case BTTV_BOARD_FLYVIDEO_98:
3544 case BTTV_BOARD_MAXI:
3545 case BTTV_BOARD_LIFE_FLYKIT:
3546 case BTTV_BOARD_FLYVIDEO:
3547 case BTTV_BOARD_TYPHOON_TVIEW:
3548 case BTTV_BOARD_CHRONOS_VS2:
3549 case BTTV_BOARD_FLYVIDEO_98FM:
3550 case BTTV_BOARD_FLYVIDEO2000:
3551 case BTTV_BOARD_FLYVIDEO98EZ:
3552 case BTTV_BOARD_CONFERENCETV:
3553 case BTTV_BOARD_LIFETEC_9415:
3556 case BTTV_BOARD_HAUPPAUGE:
3557 case BTTV_BOARD_HAUPPAUGE878:
3558 case BTTV_BOARD_HAUPPAUGEPVR:
3559 /* pick up some config infos from the eeprom */
3560 bttv_readee(btv,eeprom_data,0xa0);
3561 hauppauge_eeprom(btv);
3563 case BTTV_BOARD_AVERMEDIA98:
3564 case BTTV_BOARD_AVPHONE98:
3565 bttv_readee(btv,eeprom_data,0xa0);
3566 avermedia_eeprom(btv);
3568 case BTTV_BOARD_PXC200:
3571 case BTTV_BOARD_PICOLO_TETRA_CHIP:
3572 picolo_tetra_init(btv);
3574 case BTTV_BOARD_VHX:
3576 btv->has_matchbox = 1;
3577 btv->mbox_we = 0x20;
3579 btv->mbox_clk = 0x08;
3580 btv->mbox_data = 0x10;
3581 btv->mbox_mask = 0x38;
3583 case BTTV_BOARD_VOBIS_BOOSTAR:
3584 case BTTV_BOARD_TERRATV:
3585 terratec_active_radio_upgrade(btv);
3587 case BTTV_BOARD_MAGICTVIEW061:
3588 if (btv->cardid == 0x3002144f) {
3590 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3593 case BTTV_BOARD_STB2:
3594 if (btv->cardid == 0x3060121a) {
3595 /* Fix up entry for 3DFX VoodooTV 100,
3596 which is an OEM STB card variant. */
3598 btv->tuner_type=TUNER_TEMIC_NTSC;
3601 case BTTV_BOARD_OSPREY1x0:
3602 case BTTV_BOARD_OSPREY1x0_848:
3603 case BTTV_BOARD_OSPREY101_848:
3604 case BTTV_BOARD_OSPREY1x1:
3605 case BTTV_BOARD_OSPREY1x1_SVID:
3606 case BTTV_BOARD_OSPREY2xx:
3607 case BTTV_BOARD_OSPREY2x0_SVID:
3608 case BTTV_BOARD_OSPREY2x0:
3609 case BTTV_BOARD_OSPREY440:
3610 case BTTV_BOARD_OSPREY500:
3611 case BTTV_BOARD_OSPREY540:
3612 case BTTV_BOARD_OSPREY2000:
3613 bttv_readee(btv,eeprom_data,0xa0);
3614 osprey_eeprom(btv, eeprom_data);
3616 case BTTV_BOARD_IDS_EAGLE:
3617 init_ids_eagle(btv);
3619 case BTTV_BOARD_MODTEC_205:
3620 bttv_readee(btv,eeprom_data,0xa0);
3623 case BTTV_BOARD_LMLBT4:
3626 case BTTV_BOARD_TIBET_CS16:
3627 tibetCS16_init(btv);
3629 case BTTV_BOARD_KODICOM_4400R:
3630 kodicom4400r_init(btv);
3634 /* pll configuration */
3635 if (!(btv->id==848 && btv->revision==0x11)) {
3636 /* defaults from card list */
3637 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3638 btv->pll.pll_ifreq=28636363;
3639 btv->pll.pll_crystal=BT848_IFORM_XT0;
3641 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3642 btv->pll.pll_ifreq=35468950;
3643 btv->pll.pll_crystal=BT848_IFORM_XT1;
3645 /* insmod options can override */
3646 switch (pll[btv->c.nr]) {
3648 btv->pll.pll_crystal = 0;
3649 btv->pll.pll_ifreq = 0;
3650 btv->pll.pll_ofreq = 0;
3652 case 1: /* 28 MHz */
3654 btv->pll.pll_ifreq = 28636363;
3655 btv->pll.pll_ofreq = 0;
3656 btv->pll.pll_crystal = BT848_IFORM_XT0;
3658 case 2: /* 35 MHz */
3660 btv->pll.pll_ifreq = 35468950;
3661 btv->pll.pll_ofreq = 0;
3662 btv->pll.pll_crystal = BT848_IFORM_XT1;
3666 btv->pll.pll_current = -1;
3668 /* tuner configuration (from card list / autodetect / insmod option) */
3669 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3670 addr = bttv_tvcards[btv->c.type].tuner_addr;
3672 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
3673 if(UNSET == btv->tuner_type)
3674 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
3675 if (UNSET != tuner[btv->c.nr])
3676 btv->tuner_type = tuner[btv->c.nr];
3678 if (btv->tuner_type == TUNER_ABSENT ||
3679 bttv_tvcards[btv->c.type].tuner == UNSET)
3680 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3681 else if(btv->tuner_type == UNSET)
3682 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3684 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3687 if (btv->tuner_type != UNSET) {
3688 struct tuner_setup tun_setup;
3690 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
3691 tun_setup.type = btv->tuner_type;
3692 tun_setup.addr = addr;
3694 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3697 if (btv->tda9887_conf) {
3698 struct v4l2_priv_tun_config tda9887_cfg;
3700 tda9887_cfg.tuner = TUNER_TDA9887;
3701 tda9887_cfg.priv = &btv->tda9887_conf;
3703 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
3706 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3707 if (svhs[btv->c.nr] != UNSET)
3708 btv->svhs = svhs[btv->c.nr];
3709 if (remote[btv->c.nr] != UNSET)
3710 btv->has_remote = remote[btv->c.nr];
3712 if (bttv_tvcards[btv->c.type].has_radio)
3714 if (bttv_tvcards[btv->c.type].has_remote)
3716 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3718 if (bttv_tvcards[btv->c.type].volume_gpio)
3719 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3720 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3721 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
3726 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3727 return; /* no tuner or related drivers to load */
3729 /* try to detect audio/fader chips */
3730 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
3731 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
3732 request_module("msp3400");
3734 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
3735 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
3736 request_module("msp3400");
3738 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
3739 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
3740 request_module("tda9875");
3742 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
3743 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
3744 request_module("tda7432");
3746 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3747 request_module("tvaudio");
3749 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
3750 request_module("tuner");
3754 /* ----------------------------------------------------------------------- */
3756 static void modtec_eeprom(struct bttv *btv)
3758 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3759 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3760 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3761 btv->c.nr,&eeprom_data[0x1e]);
3762 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3763 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3764 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3765 btv->c.nr,&eeprom_data[0x1e]);
3766 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3767 btv->tuner_type=TUNER_PHILIPS_NTSC;
3768 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3769 btv->c.nr,&eeprom_data[0x1e]);
3771 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3772 btv->c.nr,&eeprom_data[0x1e]);
3776 static void __devinit hauppauge_eeprom(struct bttv *btv)
3780 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
3781 btv->tuner_type = tv.tuner_type;
3782 btv->has_radio = tv.has_radio;
3784 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3785 btv->c.nr, tv.model);
3788 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3789 * type based on model #.
3791 if(tv.model == 64900) {
3792 printk("bttv%d: Switching board type from %s to %s\n",
3794 bttv_tvcards[btv->c.type].name,
3795 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3796 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3800 static int terratec_active_radio_upgrade(struct bttv *btv)
3805 btv->has_matchbox = 1;
3806 btv->mbox_we = 0x10;
3807 btv->mbox_most = 0x20;
3808 btv->mbox_clk = 0x08;
3809 btv->mbox_data = 0x04;
3810 btv->mbox_mask = 0x3c;
3812 btv->mbox_iow = 1 << 8;
3813 btv->mbox_ior = 1 << 9;
3814 btv->mbox_csel = 1 << 10;
3817 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
3818 if (0x1ed8 == tea5757_read(btv)) {
3819 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3822 btv->has_matchbox = 1;
3825 btv->has_matchbox = 0;
3831 /* ----------------------------------------------------------------------- */
3834 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3836 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3837 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3838 * unpacked with unzip).
3840 #define PVR_GPIO_DELAY 10
3842 #define BTTV_ALT_DATA 0x000001
3843 #define BTTV_ALT_DCLK 0x100000
3844 #define BTTV_ALT_NCONFIG 0x800000
3846 static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3853 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3855 udelay(PVR_GPIO_DELAY);
3857 gpio_write(BTTV_ALT_NCONFIG);
3858 udelay(PVR_GPIO_DELAY);
3860 for (n = 0; n < microlen; n++) {
3862 for (i = 0 ; i < 8 ; i++) {
3863 gpio_bits(BTTV_ALT_DCLK,0);
3865 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3867 gpio_bits(BTTV_ALT_DATA,0);
3868 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3872 gpio_bits(BTTV_ALT_DCLK,0);
3873 udelay(PVR_GPIO_DELAY);
3875 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3876 for (i = 0 ; i < 30 ; i++) {
3877 gpio_bits(BTTV_ALT_DCLK,0);
3878 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3880 gpio_bits(BTTV_ALT_DCLK,0);
3884 static int __devinit pvr_boot(struct bttv *btv)
3886 const struct firmware *fw_entry;
3889 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3891 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3895 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3896 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3897 btv->c.nr, (rc < 0) ? "failed" : "ok");
3898 release_firmware(fw_entry);
3902 /* ----------------------------------------------------------------------- */
3903 /* some osprey specific stuff */
3905 static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
3911 /* This code will nevery actually get called in this case.... */
3912 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3913 /* this might be an antique... check for MMAC label in eeprom */
3914 if (!strncmp(ee, "MMAC", 4)) {
3916 for (i = 0; i < 21; i++)
3918 if (checksum != ee[21])
3920 cardid = BTTV_BOARD_OSPREY1x0_848;
3921 for (i = 12; i < 21; i++)
3922 serial *= 10, serial += ee[i] - '0';
3925 unsigned short type;
3927 for (i = 4*16; i < 8*16; i += 16) {
3928 u16 checksum = ip_compute_csum(ee + i, 16);
3930 if ((checksum&0xff) + (checksum>>8) == 0xff)
3937 /* found a valid descriptor */
3938 type = get_unaligned_be16((__be16 *)(ee+4));
3943 cardid = BTTV_BOARD_OSPREY1x0_848;
3946 cardid = BTTV_BOARD_OSPREY101_848;
3952 cardid = BTTV_BOARD_OSPREY1x0;
3956 cardid = BTTV_BOARD_OSPREY1x1;
3961 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3967 cardid = BTTV_BOARD_OSPREY2xx;
3971 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3974 cardid = BTTV_BOARD_OSPREY500;
3978 cardid = BTTV_BOARD_OSPREY540;
3979 /* bttv_osprey_540_init(btv); */
3984 cardid = BTTV_BOARD_OSPREY2x0;
3985 /* enable output on select control lines */
3986 gpio_inout(0xffffff,0x000303);
3989 cardid = BTTV_BOARD_OSPREY440;
3992 /* unknown...leave generic, but get serial # */
3993 printk(KERN_INFO "bttv%d: "
3994 "osprey eeprom: unknown card type 0x%04x\n",
3998 serial = get_unaligned_be32((__be32 *)(ee+6));
4001 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
4003 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
4005 if (cardid<0 || btv->c.type == cardid)
4008 /* card type isn't set correctly */
4009 if (card[btv->c.nr] < bttv_num_tvcards) {
4010 printk(KERN_WARNING "bttv%d: osprey eeprom: "
4011 "Not overriding user specified card type\n", btv->c.nr);
4013 printk(KERN_INFO "bttv%d: osprey eeprom: "
4014 "Changing card type from %d to %d\n", btv->c.nr,
4015 btv->c.type, cardid);
4016 btv->c.type = cardid;
4020 /* ----------------------------------------------------------------------- */
4021 /* AVermedia specific stuff, from bktr_card.c */
4023 static int tuner_0_table[] = {
4024 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
4025 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
4026 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
4027 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
4028 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
4029 TUNER_PHILIPS_FM1216ME_MK3 };
4031 static int tuner_1_table[] = {
4032 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
4033 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
4034 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
4035 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
4036 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
4038 static void __devinit avermedia_eeprom(struct bttv *btv)
4040 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
4042 tuner_make = (eeprom_data[0x41] & 0x7);
4043 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
4044 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
4045 btv->has_remote = (eeprom_data[0x42] & 0x01);
4047 if (tuner_make == 0 || tuner_make == 2)
4048 if (tuner_format <= 0x0a)
4049 tuner_type = tuner_0_table[tuner_format];
4050 if (tuner_make == 1)
4051 if (tuner_format <= 9)
4052 tuner_type = tuner_1_table[tuner_format];
4054 if (tuner_make == 4)
4055 if (tuner_format == 0x09)
4056 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
4058 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
4059 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
4061 btv->tuner_type = tuner_type;
4062 printk(KERN_CONT "%d", tuner_type);
4064 printk(KERN_CONT "Unknown type");
4065 printk(KERN_CONT " radio:%s remote control:%s\n",
4066 tuner_tv_fm ? "yes" : "no",
4067 btv->has_remote ? "yes" : "no");
4070 /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
4071 void bttv_tda9880_setnorm(struct bttv *btv, int norm)
4073 /* fix up our card entry */
4074 if(norm==V4L2_STD_NTSC) {
4075 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4076 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
4077 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4078 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
4079 dprintk("bttv_tda9880_setnorm to NTSC\n");
4082 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4083 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
4084 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4085 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
4086 dprintk("bttv_tda9880_setnorm to PAL\n");
4088 /* set GPIO according */
4089 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
4090 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
4095 * reset/enable the MSP on some Hauppauge cards
4096 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
4101 static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4103 int mask = (1 << pin);
4105 gpio_inout(mask,mask);
4109 gpio_bits(mask,mask);
4112 bttv_gpio_tracking(btv,"msp34xx");
4114 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
4115 "init [%d]\n", btv->c.nr, pin);
4118 /* ----------------------------------------------------------------------- */
4119 /* Imagenation L-Model PXC200 Framegrabber */
4120 /* This is basically the same procedure as
4121 * used by Alessandro Rubini in his pxc200
4122 * driver, but using BTTV functions */
4124 static void __devinit init_PXC200(struct bttv *btv)
4126 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4127 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4133 /* Initialise GPIO-connevted stuff */
4134 gpio_inout(0xffffff, (1<<13));
4138 /* GPIO inputs are pulled up, so no need to drive
4139 * reset pin any longer */
4140 gpio_bits(0xffffff, 0);
4142 bttv_gpio_tracking(btv,"pxc200");
4144 /* we could/should try and reset/control the AD pots? but
4145 right now we simply turned off the crushing. Without
4146 this the AGC drifts drifts
4147 remember the EN is reverse logic -->
4148 setting BT848_ADC_AGC_EN disable the AGC
4149 tboult@eecs.lehigh.edu
4152 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4154 /* Initialise MAX517 DAC */
4155 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4156 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4158 /* Initialise 12C508 PIC */
4159 /* The I2CWrite and I2CRead commmands are actually to the
4160 * same chips - but the R/W bit is included in the address
4161 * argument so the numbers are different */
4164 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4166 /* First of all, enable the clock line. This is used in the PXC200-F */
4167 val = btread(BT848_GPIO_DMA_CTL);
4168 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4169 btwrite(val, BT848_GPIO_DMA_CTL);
4171 /* Then, push to 0 the reset pin long enough to reset the *
4172 * device same as above for the reset line, but not the same
4173 * value sent to the GPIO-connected stuff
4174 * which one is the good one? */
4175 gpio_inout(0xffffff,(1<<2));
4180 for (i = 0; i < ARRAY_SIZE(vals); i++) {
4181 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4184 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4185 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4189 printk(KERN_INFO "PXC200 Initialised.\n");
4194 /* ----------------------------------------------------------------------- */
4196 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4197 * it. This apparently involves the following procedure for each 878 chip:
4199 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4201 * 2) write to GPIO_DATA
4207 * read from GPIO_DATA into buf (uint_32)
4208 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4209 * error. ERROR_CPLD_Check_Failed stop.
4211 * 3) write to GPIO_DATA
4212 * - write 0x4400 + 0x0E
4214 * - write 0x4410 + 0x0E
4217 * read from GPIO_DATA into buf (uint_32)
4218 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
4219 * error. ERROR_CPLD_Check_Failed.
4221 /* ----------------------------------------------------------------------- */
4223 init_RTV24 (struct bttv *btv)
4225 uint32_t dataRead = 0;
4226 long watchdog_value = 0x0E;
4229 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
4232 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
4234 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4236 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4238 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4240 dataRead = btread (BT848_GPIO_DATA);
4242 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4244 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4245 btv->c.nr, dataRead);
4248 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4250 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4252 btwrite (watchdog_value, BT848_GPIO_DATA);
4254 dataRead = btread (BT848_GPIO_DATA);
4256 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4258 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4259 btv->c.nr, dataRead);
4265 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
4270 /* ----------------------------------------------------------------------- */
4271 /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4273 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4274 * This code is placed under the terms of the GNU General Public License
4276 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4279 static void bus_low(struct bttv *btv, int bit)
4281 if (btv->mbox_ior) {
4282 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4283 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4290 if (btv->mbox_ior) {
4291 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4296 static void bus_high(struct bttv *btv, int bit)
4298 if (btv->mbox_ior) {
4299 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4300 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4307 if (btv->mbox_ior) {
4308 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4313 static int bus_in(struct bttv *btv, int bit)
4315 if (btv->mbox_ior) {
4316 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4317 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4320 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4323 return gpio_read() & (bit);
4326 /* TEA5757 register bits */
4327 #define TEA_FREQ 0:14
4328 #define TEA_BUFFER 15:15
4330 #define TEA_SIGNAL_STRENGTH 16:17
4332 #define TEA_PORT1 18:18
4333 #define TEA_PORT0 19:19
4335 #define TEA_BAND 20:21
4336 #define TEA_BAND_FM 0
4337 #define TEA_BAND_MW 1
4338 #define TEA_BAND_LW 2
4339 #define TEA_BAND_SW 3
4341 #define TEA_MONO 22:22
4342 #define TEA_ALLOW_STEREO 0
4343 #define TEA_FORCE_MONO 1
4345 #define TEA_SEARCH_DIRECTION 23:23
4346 #define TEA_SEARCH_DOWN 0
4347 #define TEA_SEARCH_UP 1
4349 #define TEA_STATUS 24:24
4350 #define TEA_STATUS_TUNED 0
4351 #define TEA_STATUS_SEARCHING 1
4353 /* Low-level stuff */
4354 static int tea5757_read(struct bttv *btv)
4356 unsigned long timeout;
4360 /* better safe than sorry */
4361 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4363 if (btv->mbox_ior) {
4364 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4365 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4370 bttv_gpio_tracking(btv,"tea5757 read");
4372 bus_low(btv,btv->mbox_we);
4373 bus_low(btv,btv->mbox_clk);
4376 timeout= jiffies + msecs_to_jiffies(1000);
4378 /* wait for DATA line to go low; error if it doesn't */
4379 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4381 if (bus_in(btv,btv->mbox_data)) {
4382 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4386 dprintk("bttv%d: tea5757:",btv->c.nr);
4387 for (i = 0; i < 24; i++) {
4389 bus_high(btv,btv->mbox_clk);
4391 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4392 bus_low(btv,btv->mbox_clk);
4394 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4395 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4397 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4401 static int tea5757_write(struct bttv *btv, int value)
4406 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4408 if (btv->mbox_ior) {
4409 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4410 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4414 bttv_gpio_tracking(btv,"tea5757 write");
4416 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4417 bus_low(btv,btv->mbox_clk);
4418 bus_high(btv,btv->mbox_we);
4419 for (i = 0; i < 25; i++) {
4420 if (reg & 0x1000000)
4421 bus_high(btv,btv->mbox_data);
4423 bus_low(btv,btv->mbox_data);
4425 bus_high(btv,btv->mbox_clk);
4427 bus_low(btv,btv->mbox_clk);
4430 bus_low(btv,btv->mbox_we); /* unmute !!! */
4434 void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4436 dprintk("tea5757_set_freq %d\n",freq);
4437 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
4440 /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4442 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4443 * switch instead (CD22M3494E). This IC can have multiple active connections
4444 * between Xn (input) and Yn (output) pins. We need to clear any existing
4445 * connection prior to establish a new one, pulsing the STROBE pin.
4447 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4448 * GPIO pins are wired as:
4449 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4450 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4451 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4452 * GPIO[8] - - P3[5] (microcontroller)
4453 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4454 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4455 * GPINTR - - P3[4] (microcontroller)
4457 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4458 * configuration either directly (as we are doing) or using the microcontroller
4459 * which is also wired to I2C interface. I have no further info on the
4460 * microcontroller features, one would need to disassembly the firmware.
4461 * note: the vendor refused to give any information on this product, all
4462 * that stuff was found using a multimeter! :)
4464 static void rv605_muxsel(struct bttv *btv, unsigned int input)
4466 /* reset all conections */
4467 gpio_bits(0x200,0x200);
4469 gpio_bits(0x200,0x000);
4472 /* create a new connection */
4473 gpio_bits(0x480,0x080);
4474 gpio_bits(0x480,0x480);
4476 gpio_bits(0x480,0x080);
4480 /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4482 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4483 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4484 * chips, ten eight input analog multiplexors, a not chip and a few
4487 * 16 inputs on a secondary bracket are provided and can be selected
4488 * from each of the four capture chips. Two of the eight input
4489 * multiplexors are used to select from any of the 16 input signals.
4491 * Unsupported hardware capabilities:
4492 * . A video output monitor on the secondary bracket can be selected from
4493 * one of the 878A chips.
4494 * . Another passthrough but I haven't spent any time investigating it.
4495 * . Digital I/O (logic level connected to GPIO) is available from an
4498 * The on chip input mux should always be set to 2.
4499 * GPIO[16:19] - Video input selection
4500 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4501 * GPIO[?:?] - Digital I/O.
4503 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4504 * determined what function (if any) it provides. With the microcontroller
4505 * and sync seperator chips a guess is that it might have to do with video
4506 * switching and maybe some digital I/O.
4508 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4511 gpio_bits(0x0f0000, input << 16);
4514 static void tibetCS16_init(struct bttv *btv)
4516 /* enable gpio bits, mask obtained via btSpy */
4517 gpio_inout(0xffffff, 0x0f7fff);
4518 gpio_write(0x0f7fff);
4522 * The following routines for the Kodicom-4400r get a little mind-twisting.
4523 * There is a "master" controller and three "slave" controllers, together
4524 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4525 * The analog switch is controlled by the "master", but the detection order
4526 * of the four BT878A chips is in an order which I just don't understand.
4527 * The "master" is actually the second controller to be detected. The
4528 * logic on the board uses logical numbers for the 4 controllers, but
4529 * those numbers are different from the detection sequence. When working
4530 * with the analog switch, we need to "map" from the detection sequence
4531 * over to the board's logical controller number. This mapping sequence
4532 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4533 * unit 3, the second (which is the master) is logical unit 0, etc.
4534 * We need to maintain the status of the analog switch (which of the 16
4535 * cameras is connected to which of the 4 controllers). Rather than
4536 * add to the bttv structure for this, we use the data reserved for
4537 * the mbox (unused for this card type).
4541 * First a routine to set the analog switch, which controls which camera
4542 * is routed to which controller. The switch comprises an X-address
4543 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4544 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4545 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4546 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4547 * specified address. The idea is to set the address and data, then bring
4548 * STROBE high, and finally bring STROBE back to low.
4550 static void kodicom4400r_write(struct bttv *btv,
4551 unsigned char xaddr,
4552 unsigned char yaddr,
4553 unsigned char data) {
4556 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4557 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4558 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4559 gpio_bits(0x1ff, udata); /* strobe low */
4563 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4564 * use this routine. The routine finds the "master" for the card, maps
4565 * the controller number from the detected position over to the logical
4566 * number, writes the appropriate data to the analog switch, and housekeeps
4567 * the local copy of the switch information. The parameter 'input' is the
4568 * requested camera number (0 - 15).
4570 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4575 static unsigned char map[4] = {3, 0, 2, 1};
4577 mctlr = master[btv->c.nr];
4578 if (mctlr == NULL) { /* ignore if master not yet detected */
4581 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4583 sw_status = (char *)(&mctlr->mbox_we);
4584 xaddr = input & 0xf;
4585 /* Check if the controller/camera pair has changed, else ignore */
4586 if (sw_status[yaddr] != xaddr)
4588 /* "open" the old switch, "close" the new one, save the new */
4589 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4590 sw_status[yaddr] = xaddr;
4591 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4596 * During initialisation, we need to reset the analog switch. We
4597 * also preset the switch to map the 4 connectors on the card to the
4598 * *user's* (see above description of kodicom4400r_muxsel) channels
4601 static void kodicom4400r_init(struct bttv *btv)
4603 char *sw_status = (char *)(&btv->mbox_we);
4606 gpio_inout(0x0003ff, 0x0003ff);
4607 gpio_write(1 << 9); /* reset MUX */
4609 /* Preset camera 0 to the 4 controllers */
4610 for (ix = 0; ix < 4; ix++) {
4612 kodicom4400r_write(btv, ix, ix, 1);
4615 * Since this is the "master", we need to set up the
4616 * other three controller chips' pointers to this structure
4617 * for later use in the muxsel routine.
4619 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4621 master[btv->c.nr-1] = btv;
4622 master[btv->c.nr] = btv;
4623 master[btv->c.nr+1] = btv;
4624 master[btv->c.nr+2] = btv;
4627 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4628 * video multiplexers to provide up to 16 video inputs. These
4629 * multiplexers are controlled by the lower 8 GPIO pins of the
4630 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
4632 * xxx0 is pin xxx of multiplexer U5,
4633 * yyy1 is pin yyy of multiplexer U2
4645 static void xguard_muxsel(struct bttv *btv, unsigned int input)
4647 static const int masks[] = {
4648 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4649 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4650 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4651 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
4653 gpio_write(masks[input%16]);
4655 static void picolo_tetra_init(struct bttv *btv)
4657 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4658 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4659 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4661 static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4664 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4665 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4666 /*GPIO[20]&GPIO[21] used to choose the right input*/
4667 btwrite (input<<20,BT848_GPIO_DATA);
4672 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4674 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4675 * swichers to provide 16 channels to MUX0. The TDA8540's have
4676 * 4 independent outputs and as such the IVC120G also has the
4677 * optional "Monitor Out" bus. This allows the card to be looking
4678 * at one input while the monitor is looking at another.
4680 * Since I've couldn't be bothered figuring out how to add an
4681 * independant muxsel for the monitor bus, I've just set it to
4682 * whatever the card is looking at.
4684 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4685 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4687 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4688 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4689 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4690 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4694 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4695 #define I2C_TDA8540 0x90
4696 #define I2C_TDA8540_ALT1 0x92
4697 #define I2C_TDA8540_ALT2 0x94
4698 #define I2C_TDA8540_ALT3 0x96
4699 #define I2C_TDA8540_ALT4 0x98
4700 #define I2C_TDA8540_ALT5 0x9a
4701 #define I2C_TDA8540_ALT6 0x9c
4703 static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4706 int key = input % 4;
4707 int matrix = input / 4;
4709 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4710 btv->c.nr, input, matrix, key);
4712 /* Handles the input selection on the TDA8540's */
4713 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4714 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4715 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4716 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4717 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4718 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4719 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4720 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4722 /* Handles the output enables on the TDA8540's */
4723 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
4724 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
4725 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
4726 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
4727 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
4728 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
4729 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
4730 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
4732 /* Selects MUX0 for input on the 878 */
4733 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4737 /* PXC200 muxsel helper
4738 * luke@syseng.anu.edu.au
4739 * another transplant
4740 * from Alessandro Rubini (rubini@linux.it)
4742 * There are 4 kinds of cards:
4743 * PXC200L which is bt848
4744 * PXC200F which is bt848 with PIC controlling mux
4745 * PXC200AL which is bt878
4746 * PXC200AF which is bt878 with PIC controlling mux
4748 #define PX_CFG_PXC200F 0x01
4749 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4750 #define PX_I2C_PIC 0x0f
4751 #define PX_PXC200A_CARDID 0x200a1295
4752 #define PX_I2C_CMD_CFG 0x00
4754 static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4759 unsigned char buf[2];
4761 /* Read PIC config to determine if this is a PXC200F */
4765 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4767 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4768 /* not PXC ? do nothing */
4772 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4773 if (!(rc & PX_CFG_PXC200F)) {
4774 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4779 /* The multiplexer in the 200F is handled by the GPIO port */
4780 /* get correct mapping between inputs */
4781 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4782 /* ** not needed!? */
4785 /* make sure output pins are enabled */
4786 /* bitmask=0x30f; */
4788 /* check whether we have a PXC200A */
4789 if (btv->cardid == PX_PXC200A_CARDID) {
4790 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4791 bitmask |= 7<<4; /* the DAC */
4793 btwrite(bitmask, BT848_GPIO_OUT_EN);
4795 bitmask = btread(BT848_GPIO_DATA);
4796 if (btv->cardid == PX_PXC200A_CARDID)
4797 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4798 else /* older device */
4799 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4800 btwrite(bitmask,BT848_GPIO_DATA);
4803 * Was "to be safe, set the bt848 to input 0"
4804 * Actually, since it's ok at load time, better not messing
4805 * with these bits (on PXC200AF you need to set mux 2 here)
4807 * needed because bttv-driver sets mux before calling this function
4809 if (btv->cardid == PX_PXC200A_CARDID)
4810 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4811 else /* older device */
4812 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4814 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4817 /* ----------------------------------------------------------------------- */
4818 /* motherboard chipset specific stuff */
4820 void __init bttv_check_chipset(void)
4822 int pcipci_fail = 0;
4823 struct pci_dev *dev = NULL;
4825 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
4827 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4829 if (pci_pci_problems & PCIPCI_VSFX)
4831 #ifdef PCIPCI_ALIMAGIK
4832 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4837 /* print warnings about any quirks found */
4839 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4841 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4843 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4846 printk(KERN_INFO "bttv: overlay will be disabled.\n");
4849 printk(KERN_INFO "bttv: overlay forced. Use this "
4850 "option at your own risk.\n");
4853 if (UNSET != latency)
4854 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
4855 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
4856 PCI_DEVICE_ID_INTEL_82441, dev))) {
4858 pci_read_config_byte(dev, 0x53, &b);
4860 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4861 "bufcon=0x%02x\n",b);
4865 int __devinit bttv_handle_chipset(struct bttv *btv)
4867 unsigned char command;
4869 if (!triton1 && !vsfx && UNSET == latency)
4874 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4875 if (vsfx && btv->id >= 878)
4876 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4877 if (UNSET != latency)
4878 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4882 if (btv->id < 878) {
4883 /* bt848 (mis)uses a bit in the irq mask for etbf */
4885 btv->triton1 = BT848_INT_ETBF;
4887 /* bt878 has a bit in the pci config space for it */
4888 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
4890 command |= BT878_EN_TBFX;
4892 command |= BT878_EN_VSFX;
4893 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4895 if (UNSET != latency)
4896 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);