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 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
30 #include <linux/delay.h>
31 #include <linux/module.h>
32 #include <linux/kmod.h>
33 #include <linux/init.h>
34 #include <linux/pci.h>
35 #include <linux/vmalloc.h>
36 #include <linux/firmware.h>
37 #include <net/checksum.h>
39 #include <asm/unaligned.h>
43 #include <media/v4l2-common.h>
44 #include <media/tvaudio.h>
45 #include "bttv-audio-hook.h"
48 static void boot_msp34xx(struct bttv
*btv
, int pin
);
49 static void hauppauge_eeprom(struct bttv
*btv
);
50 static void avermedia_eeprom(struct bttv
*btv
);
51 static void osprey_eeprom(struct bttv
*btv
, const u8 ee
[256]);
52 static void modtec_eeprom(struct bttv
*btv
);
53 static void init_PXC200(struct bttv
*btv
);
54 static void init_RTV24(struct bttv
*btv
);
55 static void init_PCI8604PW(struct bttv
*btv
);
57 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
);
58 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
);
59 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
);
60 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
);
61 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
);
63 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
);
65 static void picolo_tetra_muxsel(struct bttv
*btv
, unsigned int input
);
66 static void picolo_tetra_init(struct bttv
*btv
);
68 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
);
69 static void tibetCS16_init(struct bttv
*btv
);
71 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
);
72 static void kodicom4400r_init(struct bttv
*btv
);
74 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
);
75 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
);
77 static void geovision_muxsel(struct bttv
*btv
, unsigned int input
);
79 static void phytec_muxsel(struct bttv
*btv
, unsigned int input
);
81 static void gv800s_muxsel(struct bttv
*btv
, unsigned int input
);
82 static void gv800s_init(struct bttv
*btv
);
84 static void td3116_muxsel(struct bttv
*btv
, unsigned int input
);
86 static int terratec_active_radio_upgrade(struct bttv
*btv
);
87 static int tea575x_init(struct bttv
*btv
);
88 static void identify_by_eeprom(struct bttv
*btv
,
89 unsigned char eeprom_data
[256]);
90 static int pvr_boot(struct bttv
*btv
);
92 /* config variables */
93 static unsigned int triton1
;
94 static unsigned int vsfx
;
95 static unsigned int latency
= UNSET
;
98 static unsigned int card
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
99 static unsigned int pll
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
100 static unsigned int tuner
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
101 static unsigned int svhs
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
102 static unsigned int remote
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
103 static unsigned int audiodev
[BTTV_MAX
];
104 static unsigned int saa6588
[BTTV_MAX
];
105 static struct bttv
*master
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = NULL
};
106 static unsigned int autoload
= UNSET
;
107 static unsigned int gpiomask
= UNSET
;
108 static unsigned int audioall
= UNSET
;
109 static unsigned int audiomux
[5] = { [ 0 ... 4 ] = UNSET
};
112 module_param(triton1
, int, 0444);
113 module_param(vsfx
, int, 0444);
114 module_param(no_overlay
, int, 0444);
115 module_param(latency
, int, 0444);
116 module_param(gpiomask
, int, 0444);
117 module_param(audioall
, int, 0444);
118 module_param(autoload
, int, 0444);
120 module_param_array(card
, int, NULL
, 0444);
121 module_param_array(pll
, int, NULL
, 0444);
122 module_param_array(tuner
, int, NULL
, 0444);
123 module_param_array(svhs
, int, NULL
, 0444);
124 module_param_array(remote
, int, NULL
, 0444);
125 module_param_array(audiodev
, int, NULL
, 0444);
126 module_param_array(audiomux
, int, NULL
, 0444);
128 MODULE_PARM_DESC(triton1
,"set ETBF pci config bit "
129 "[enable bug compatibility for triton1 + others]");
130 MODULE_PARM_DESC(vsfx
,"set VSFX pci config bit "
131 "[yet another chipset flaw workaround]");
132 MODULE_PARM_DESC(latency
,"pci latency timer");
133 MODULE_PARM_DESC(card
,"specify TV/grabber card model, see CARDLIST file for a list");
134 MODULE_PARM_DESC(pll
, "specify installed crystal (0=none, 28=28 MHz, 35=35 MHz, 14=14 MHz)");
135 MODULE_PARM_DESC(tuner
,"specify installed tuner type");
136 MODULE_PARM_DESC(autoload
, "obsolete option, please do not use anymore");
137 MODULE_PARM_DESC(audiodev
, "specify audio device:\n"
138 "\t\t-1 = no audio\n"
139 "\t\t 0 = autodetect (default)\n"
143 MODULE_PARM_DESC(saa6588
, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
144 MODULE_PARM_DESC(no_overlay
,"allow override overlay default (0 disables, 1 enables)"
145 " [some VIA/SIS chipsets are known to have problem with overlay]");
147 /* ----------------------------------------------------------------------- */
148 /* list of card IDs for bt878+ cards */
155 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV" },
156 { 0x39000070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV-D" },
157 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR
, "Hauppauge WinTV/PVR" },
158 { 0xff000070, BTTV_BOARD_OSPREY1x0
, "Osprey-100" },
159 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID
,"Osprey-200" },
160 { 0xff020070, BTTV_BOARD_OSPREY500
, "Osprey-500" },
161 { 0xff030070, BTTV_BOARD_OSPREY2000
, "Osprey-2000" },
162 { 0xff040070, BTTV_BOARD_OSPREY540
, "Osprey-540" },
163 { 0xff070070, BTTV_BOARD_OSPREY440
, "Osprey-440" },
165 { 0x00011002, BTTV_BOARD_ATI_TVWONDER
, "ATI TV Wonder" },
166 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE
,"ATI TV Wonder/VE" },
168 { 0x6606107d, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
169 { 0x6607107d, BTTV_BOARD_WINFASTVC100
, "Leadtek WinFast VC 100" },
170 { 0x6609107d, BTTV_BOARD_WINFAST2000
, "Leadtek TV 2000 XP" },
171 { 0x263610b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
172 { 0x264510b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
173 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI
, "I-O Data Co. GV-BCTV3/PCI" },
174 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI
, "I-O Data Co. GV-BCTV4/PCI" },
175 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
176 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
178 { 0x001211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
179 /* some cards ship with byteswapped IDs ... */
180 { 0x1200bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
181 { 0xff00bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
182 /* this seems to happen as well ... */
183 { 0xff1211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
185 { 0x3000121a, BTTV_BOARD_VOODOOTV_200
, "3Dfx VoodooTV 200" },
186 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM
, "3Dfx VoodooTV FM" },
187 { 0x3060121a, BTTV_BOARD_STB2
, "3Dfx VoodooTV 100/ STB OEM" },
189 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063
, "(Askey Magic/others) TView99 CPH06x" },
190 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063
, "CPH06X TView99-Card" },
191 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH05x" },
192 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
193 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061
, "Askey CPH050" },
194 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061
, "TView 99 (CPH061)" },
195 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS
, "Phoebe TV Master (CPH060)" },
197 { 0x00011461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
198 { 0x00021461, BTTV_BOARD_AVERMEDIA98
, "AVermedia TVCapture 98" },
199 { 0x00031461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
200 { 0x00041461, BTTV_BOARD_AVERMEDIA98
, "AVerMedia TVCapture 98" },
201 { 0x03001461, BTTV_BOARD_AVERMEDIA98
, "VDOMATE TV TUNER CARD" },
203 { 0x1117153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL B/G)" },
204 { 0x1118153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL B/G)" },
205 { 0x1119153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL I)" },
206 { 0x111a153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL I)" },
208 { 0x1123153b, BTTV_BOARD_TERRATVRADIO
, "Terratec TV Radio+" },
209 { 0x1127153b, BTTV_BOARD_TERRATV
, "Terratec TV+ (V1.05)" },
210 /* clashes with FlyVideo
211 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
212 { 0x1134153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (LR102)" },
213 { 0x1135153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* LR102 */
214 { 0x5018153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue" }, /* ?? */
215 { 0xff3b153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* ?? */
217 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
218 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
219 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
220 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
221 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
223 { 0x1430aa00, BTTV_BOARD_PV143
, "Provideo PV143A" },
224 { 0x1431aa00, BTTV_BOARD_PV143
, "Provideo PV143B" },
225 { 0x1432aa00, BTTV_BOARD_PV143
, "Provideo PV143C" },
226 { 0x1433aa00, BTTV_BOARD_PV143
, "Provideo PV143D" },
227 { 0x1433aa03, BTTV_BOARD_PV143
, "Security Eyes" },
229 { 0x1460aa00, BTTV_BOARD_PV150
, "Provideo PV150A-1" },
230 { 0x1461aa01, BTTV_BOARD_PV150
, "Provideo PV150A-2" },
231 { 0x1462aa02, BTTV_BOARD_PV150
, "Provideo PV150A-3" },
232 { 0x1463aa03, BTTV_BOARD_PV150
, "Provideo PV150A-4" },
234 { 0x1464aa04, BTTV_BOARD_PV150
, "Provideo PV150B-1" },
235 { 0x1465aa05, BTTV_BOARD_PV150
, "Provideo PV150B-2" },
236 { 0x1466aa06, BTTV_BOARD_PV150
, "Provideo PV150B-3" },
237 { 0x1467aa07, BTTV_BOARD_PV150
, "Provideo PV150B-4" },
239 { 0xa132ff00, BTTV_BOARD_IVC100
, "IVC-100" },
240 { 0xa1550000, BTTV_BOARD_IVC200
, "IVC-200" },
241 { 0xa1550001, BTTV_BOARD_IVC200
, "IVC-200" },
242 { 0xa1550002, BTTV_BOARD_IVC200
, "IVC-200" },
243 { 0xa1550003, BTTV_BOARD_IVC200
, "IVC-200" },
244 { 0xa1550100, BTTV_BOARD_IVC200
, "IVC-200G" },
245 { 0xa1550101, BTTV_BOARD_IVC200
, "IVC-200G" },
246 { 0xa1550102, BTTV_BOARD_IVC200
, "IVC-200G" },
247 { 0xa1550103, BTTV_BOARD_IVC200
, "IVC-200G" },
248 { 0xa1550800, BTTV_BOARD_IVC200
, "IVC-200" },
249 { 0xa1550801, BTTV_BOARD_IVC200
, "IVC-200" },
250 { 0xa1550802, BTTV_BOARD_IVC200
, "IVC-200" },
251 { 0xa1550803, BTTV_BOARD_IVC200
, "IVC-200" },
252 { 0xa182ff00, BTTV_BOARD_IVC120
, "IVC-120G" },
253 { 0xa182ff01, BTTV_BOARD_IVC120
, "IVC-120G" },
254 { 0xa182ff02, BTTV_BOARD_IVC120
, "IVC-120G" },
255 { 0xa182ff03, BTTV_BOARD_IVC120
, "IVC-120G" },
256 { 0xa182ff04, BTTV_BOARD_IVC120
, "IVC-120G" },
257 { 0xa182ff05, BTTV_BOARD_IVC120
, "IVC-120G" },
258 { 0xa182ff06, BTTV_BOARD_IVC120
, "IVC-120G" },
259 { 0xa182ff07, BTTV_BOARD_IVC120
, "IVC-120G" },
260 { 0xa182ff08, BTTV_BOARD_IVC120
, "IVC-120G" },
261 { 0xa182ff09, BTTV_BOARD_IVC120
, "IVC-120G" },
262 { 0xa182ff0a, BTTV_BOARD_IVC120
, "IVC-120G" },
263 { 0xa182ff0b, BTTV_BOARD_IVC120
, "IVC-120G" },
264 { 0xa182ff0c, BTTV_BOARD_IVC120
, "IVC-120G" },
265 { 0xa182ff0d, BTTV_BOARD_IVC120
, "IVC-120G" },
266 { 0xa182ff0e, BTTV_BOARD_IVC120
, "IVC-120G" },
267 { 0xa182ff0f, BTTV_BOARD_IVC120
, "IVC-120G" },
268 { 0xf0500000, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
269 { 0xf0500001, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
270 { 0xf0500002, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
271 { 0xf0500003, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
273 { 0x41424344, BTTV_BOARD_GRANDTEC
, "GrandTec Multi Capture" },
274 { 0x01020304, BTTV_BOARD_XGUARD
, "Grandtec Grand X-Guard" },
276 { 0x18501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
277 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
278 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ
, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
279 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW
, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
280 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM
, "Lifeview FlyVideo 98 LR50 Rev Q" },
281 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98
, "Lifeview Flyvideo 98" },
283 { 0x010115cb, BTTV_BOARD_GMV1
, "AG GMV1" },
284 { 0x010114c7, BTTV_BOARD_MODTEC_205
, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
286 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878
, "STB ???" },
287 { 0x217d6606, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
288 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
289 { 0x03116000, BTTV_BOARD_SENSORAY311_611
, "Sensoray 311" },
290 { 0x06116000, BTTV_BOARD_SENSORAY311_611
, "Sensoray 611" },
291 { 0x00790e11, BTTV_BOARD_WINDVR
, "Canopus WinDVR PCI" },
292 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX
, "Face to Face Tvmax" },
293 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100
, "SIMUS GVC1100" },
294 { 0x146caa0c, BTTV_BOARD_PV951
, "ituner spectra8" },
295 { 0x200a1295, BTTV_BOARD_PXC200
, "ImageNation PXC200A" },
297 { 0x40111554, BTTV_BOARD_PV_BT878P_9B
, "Prolink Pixelview PV-BT" },
298 { 0x17de0a01, BTTV_BOARD_KWORLD
, "Mecer TV/FM/Video Tuner" },
300 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #1" },
301 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #2" },
302 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #3" },
303 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #4" },
305 { 0x15409511, BTTV_BOARD_ACORP_Y878F
, "Acorp Y878F" },
307 { 0x53534149, BTTV_BOARD_SSAI_SECURITY
, "SSAI Security Video Interface" },
308 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND
, "SSAI Ultrasound Video Interface" },
310 /* likely broken, vendor id doesn't match the other magic views ...
311 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
313 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
314 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
316 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2
, "Conceptronic CTVFMi v2"},
318 /* DVB cards (using pci function .1 for mpeg data xfer) */
319 { 0x001c11bd, BTTV_BOARD_PINNACLESAT
, "Pinnacle PCTV Sat" },
320 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV
, "Nebula Electronics DigiTV" },
321 { 0x20007063, BTTV_BOARD_PC_HDTV
, "pcHDTV HD-2000 TV"},
322 { 0x002611bd, BTTV_BOARD_TWINHAN_DST
, "Pinnacle PCTV SAT CI" },
323 { 0x00011822, BTTV_BOARD_TWINHAN_DST
, "Twinhan VisionPlus DVB" },
324 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST
, "ChainTech digitop DST-1000 DVB-S" },
325 { 0x07711461, BTTV_BOARD_AVDVBT_771
, "AVermedia AverTV DVB-T 771" },
326 { 0x07611461, BTTV_BOARD_AVDVBT_761
, "AverMedia AverTV DVB-T 761" },
327 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE
, "DViCO FusionHDTV DVB-T Lite" },
328 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE
, "Ultraview DVB-T Lite" },
329 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
, "DViCO FusionHDTV 5 Lite" },
330 { 0x00261822, BTTV_BOARD_TWINHAN_DST
, "DNTV Live! Mini "},
331 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2
, "DViCO FusionHDTV 2" },
332 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600
, "GeoVision GV-600" },
333 { 0x18011000, BTTV_BOARD_ENLTV_FM_2
, "Encore ENL TV-FM-2" },
334 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S
, "GeoVision GV-800(S) (master)" },
335 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
336 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
337 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
339 { 0x15401830, BTTV_BOARD_PV183
, "Provideo PV183-1" },
340 { 0x15401831, BTTV_BOARD_PV183
, "Provideo PV183-2" },
341 { 0x15401832, BTTV_BOARD_PV183
, "Provideo PV183-3" },
342 { 0x15401833, BTTV_BOARD_PV183
, "Provideo PV183-4" },
343 { 0x15401834, BTTV_BOARD_PV183
, "Provideo PV183-5" },
344 { 0x15401835, BTTV_BOARD_PV183
, "Provideo PV183-6" },
345 { 0x15401836, BTTV_BOARD_PV183
, "Provideo PV183-7" },
346 { 0x15401837, BTTV_BOARD_PV183
, "Provideo PV183-8" },
347 { 0x3116f200, BTTV_BOARD_TVT_TD3116
, "Tongwei Video Technology TD-3116" },
348 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR
, "Aposonic W-DVR" },
352 /* ----------------------------------------------------------------------- */
353 /* array with description for bt848 / bt878 tv/grabber cards */
355 struct tvcard bttv_tvcards
[] = {
356 /* ---- card 0x00 ---------------------------------- */
357 [BTTV_BOARD_UNKNOWN
] = {
358 .name
= " *** UNKNOWN/GENERIC *** ",
361 .muxsel
= MUXSEL(2, 3, 1, 0),
363 .tuner_addr
= ADDR_UNSET
,
365 [BTTV_BOARD_MIRO
] = {
368 /* .audio_inputs= 1, */
371 .muxsel
= MUXSEL(2, 3, 1, 1),
372 .gpiomux
= { 2, 0, 0, 0 },
375 .tuner_addr
= ADDR_UNSET
,
377 [BTTV_BOARD_HAUPPAUGE
] = {
378 .name
= "Hauppauge (bt848)",
380 /* .audio_inputs= 1, */
383 .muxsel
= MUXSEL(2, 3, 1, 1),
384 .gpiomux
= { 0, 1, 2, 3 },
387 .tuner_addr
= ADDR_UNSET
,
390 .name
= "STB, Gateway P/N 6000699 (bt848)",
392 /* .audio_inputs= 1, */
395 .muxsel
= MUXSEL(2, 3, 1, 1),
396 .gpiomux
= { 4, 0, 2, 3 },
399 .tuner_type
= TUNER_PHILIPS_NTSC
,
400 .tuner_addr
= ADDR_UNSET
,
405 /* ---- card 0x04 ---------------------------------- */
406 [BTTV_BOARD_INTEL
] = {
407 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
409 /* .audio_inputs= 0, */
412 .muxsel
= MUXSEL(2, 3, 1, 1),
414 .tuner_type
= TUNER_ABSENT
,
415 .tuner_addr
= ADDR_UNSET
,
417 [BTTV_BOARD_DIAMOND
] = {
418 .name
= "Diamond DTV2000",
420 /* .audio_inputs= 1, */
423 .muxsel
= MUXSEL(2, 3, 1, 0),
424 .gpiomux
= { 0, 1, 0, 1 },
427 .tuner_addr
= ADDR_UNSET
,
429 [BTTV_BOARD_AVERMEDIA
] = {
430 .name
= "AVerMedia TVPhone",
432 /* .audio_inputs= 1, */
434 .muxsel
= MUXSEL(2, 3, 1, 1),
436 .gpiomux
= { 0x0c, 0x04, 0x08, 0x04 },
437 /* 0x04 for some cards ?? */
439 .tuner_addr
= ADDR_UNSET
,
440 .audio_mode_gpio
= avermedia_tvphone_audio
,
443 [BTTV_BOARD_MATRIX_VISION
] = {
444 .name
= "MATRIX-Vision MV-Delta",
446 /* .audio_inputs= 1, */
449 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
451 .tuner_type
= TUNER_ABSENT
,
452 .tuner_addr
= ADDR_UNSET
,
455 /* ---- card 0x08 ---------------------------------- */
456 [BTTV_BOARD_FLYVIDEO
] = {
457 .name
= "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
459 /* .audio_inputs= 1, */
462 .muxsel
= MUXSEL(2, 3, 1, 1),
463 .gpiomux
= { 0, 0xc00, 0x800, 0x400 },
467 .tuner_addr
= ADDR_UNSET
,
469 [BTTV_BOARD_TURBOTV
] = {
470 .name
= "IMS/IXmicro TurboTV",
472 /* .audio_inputs= 1, */
475 .muxsel
= MUXSEL(2, 3, 1, 1),
476 .gpiomux
= { 1, 1, 2, 3 },
478 .tuner_type
= TUNER_TEMIC_PAL
,
479 .tuner_addr
= ADDR_UNSET
,
481 [BTTV_BOARD_HAUPPAUGE878
] = {
482 .name
= "Hauppauge (bt878)",
484 /* .audio_inputs= 1, */
486 .gpiomask
= 0x0f, /* old: 7 */
487 .muxsel
= MUXSEL(2, 0, 1, 1),
488 .gpiomux
= { 0, 1, 2, 3 },
492 .tuner_addr
= ADDR_UNSET
,
494 [BTTV_BOARD_MIROPRO
] = {
495 .name
= "MIRO PCTV pro",
497 /* .audio_inputs= 1, */
500 .muxsel
= MUXSEL(2, 3, 1, 1),
501 .gpiomux
= { 0x20001,0x10001, 0, 0 },
504 .tuner_addr
= ADDR_UNSET
,
507 /* ---- card 0x0c ---------------------------------- */
508 [BTTV_BOARD_ADSTECH_TV
] = {
509 .name
= "ADS Technologies Channel Surfer TV (bt848)",
511 /* .audio_inputs= 1, */
514 .muxsel
= MUXSEL(2, 3, 1, 1),
515 .gpiomux
= { 13, 14, 11, 7 },
517 .tuner_addr
= ADDR_UNSET
,
519 [BTTV_BOARD_AVERMEDIA98
] = {
520 .name
= "AVerMedia TVCapture 98",
522 /* .audio_inputs= 4, */
525 .muxsel
= MUXSEL(2, 3, 1, 1),
526 .gpiomux
= { 13, 14, 11, 7 },
529 .tuner_type
= TUNER_PHILIPS_PAL
,
530 .tuner_addr
= ADDR_UNSET
,
531 .audio_mode_gpio
= avermedia_tv_stereo_audio
,
535 .name
= "Aimslab Video Highway Xtreme (VHX)",
537 /* .audio_inputs= 1, */
540 .muxsel
= MUXSEL(2, 3, 1, 1),
541 .gpiomux
= { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
545 .tuner_addr
= ADDR_UNSET
,
547 [BTTV_BOARD_ZOLTRIX
] = {
548 .name
= "Zoltrix TV-Max",
550 /* .audio_inputs= 1, */
553 .muxsel
= MUXSEL(2, 3, 1, 1),
554 .gpiomux
= { 0, 0, 1, 0 },
557 .tuner_addr
= ADDR_UNSET
,
560 /* ---- card 0x10 ---------------------------------- */
561 [BTTV_BOARD_PIXVIEWPLAYTV
] = {
562 .name
= "Prolink Pixelview PlayTV (bt878)",
564 /* .audio_inputs= 1, */
566 .gpiomask
= 0x01fe00,
567 .muxsel
= MUXSEL(2, 3, 1, 1),
568 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
569 .gpiomux
= { 0x001e00, 0, 0x018000, 0x014000 },
570 .gpiomute
= 0x002000,
573 .tuner_addr
= ADDR_UNSET
,
575 [BTTV_BOARD_WINVIEW_601
] = {
576 .name
= "Leadtek WinView 601",
578 /* .audio_inputs= 1, */
580 .gpiomask
= 0x8300f8,
581 .muxsel
= MUXSEL(2, 3, 1, 1, 0),
582 .gpiomux
= { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
583 .gpiomute
= 0xcfa007,
585 .tuner_addr
= ADDR_UNSET
,
586 .volume_gpio
= winview_volume
,
589 [BTTV_BOARD_AVEC_INTERCAP
] = {
590 .name
= "AVEC Intercapture",
592 /* .audio_inputs= 2, */
595 .muxsel
= MUXSEL(2, 3, 1, 1),
596 .gpiomux
= { 1, 0, 0, 0 },
598 .tuner_addr
= ADDR_UNSET
,
600 [BTTV_BOARD_LIFE_FLYKIT
] = {
601 .name
= "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
603 /* .audio_inputs= 1, */
605 .gpiomask
= 0x8dff00,
606 .muxsel
= MUXSEL(2, 3, 1, 1),
609 .tuner_type
= TUNER_ABSENT
,
610 .tuner_addr
= ADDR_UNSET
,
613 /* ---- card 0x14 ---------------------------------- */
614 [BTTV_BOARD_CEI_RAFFLES
] = {
615 .name
= "CEI Raffles Card",
617 /* .audio_inputs= 3, */
619 .muxsel
= MUXSEL(2, 3, 1, 1),
621 .tuner_addr
= ADDR_UNSET
,
623 [BTTV_BOARD_CONFERENCETV
] = {
624 .name
= "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
626 /* .audio_inputs= 2, tuner, line in */
629 .muxsel
= MUXSEL(2, 3, 1, 1),
630 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
633 .tuner_type
= TUNER_PHILIPS_PAL_I
,
634 .tuner_addr
= ADDR_UNSET
,
636 [BTTV_BOARD_PHOEBE_TVMAS
] = {
637 .name
= "Askey CPH050/ Phoebe Tv Master + FM",
639 /* .audio_inputs= 1, */
642 .muxsel
= MUXSEL(2, 3, 1, 1),
643 .gpiomux
= { 0, 1, 0x800, 0x400 },
647 .tuner_addr
= ADDR_UNSET
,
649 [BTTV_BOARD_MODTEC_205
] = {
650 .name
= "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
652 /* .audio_inputs= 1, */
656 .muxsel
= MUXSEL(2, 3, 0), /* input 2 is digital */
657 /* .digital_mode= DIGITAL_MODE_CAMERA, */
658 .gpiomux
= { 0, 0, 0, 0 },
661 .tuner_type
= TUNER_ALPS_TSBB5_PAL_I
,
662 .tuner_addr
= ADDR_UNSET
,
665 /* ---- card 0x18 ---------------------------------- */
666 [BTTV_BOARD_MAGICTVIEW061
] = {
667 .name
= "Askey CPH05X/06X (bt878) [many vendors]",
669 /* .audio_inputs= 1, */
672 .muxsel
= MUXSEL(2, 3, 1, 1),
673 .gpiomux
= {0x400, 0x400, 0x400, 0x400 },
677 .tuner_addr
= ADDR_UNSET
,
679 .has_radio
= 1, /* not every card has radio */
681 [BTTV_BOARD_VOBIS_BOOSTAR
] = {
682 .name
= "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
684 /* .audio_inputs= 1, */
686 .gpiomask
= 0x1f0fff,
687 .muxsel
= MUXSEL(2, 3, 1, 1),
688 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0 },
690 .tuner_type
= TUNER_PHILIPS_PAL
,
691 .tuner_addr
= ADDR_UNSET
,
692 .audio_mode_gpio
= terratv_audio
,
694 [BTTV_BOARD_HAUPPAUG_WCAM
] = {
695 .name
= "Hauppauge WinCam newer (bt878)",
697 /* .audio_inputs= 1, */
700 .muxsel
= MUXSEL(2, 0, 1, 1),
701 .gpiomux
= { 0, 1, 2, 3 },
704 .tuner_addr
= ADDR_UNSET
,
706 [BTTV_BOARD_MAXI
] = {
707 .name
= "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
709 /* .audio_inputs= 2, */
712 .muxsel
= MUXSEL(2, 3, 1, 1),
713 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
716 .tuner_type
= TUNER_PHILIPS_SECAM
,
717 .tuner_addr
= ADDR_UNSET
,
720 /* ---- card 0x1c ---------------------------------- */
721 [BTTV_BOARD_TERRATV
] = {
722 .name
= "Terratec TerraTV+ Version 1.1 (bt878)",
724 /* .audio_inputs= 1, */
726 .gpiomask
= 0x1f0fff,
727 .muxsel
= MUXSEL(2, 3, 1, 1),
728 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0x00000 },
730 .tuner_type
= TUNER_PHILIPS_PAL
,
731 .tuner_addr
= ADDR_UNSET
,
732 .audio_mode_gpio
= terratv_audio
,
734 External 20 pin connector (for Active Radio Upgrade board)
740 gpio05: om5610-stereo
744 gpio09+10: nIOR, nSEL ?? (bt878)
748 gpio16: u2-A0 (1st 4052bt)
751 gpio19: u4-A0 (2nd 4052)
755 00000 : Cdrom (internal audio input)
756 10000 : ext. Video audio input
765 [BTTV_BOARD_PXC200
] = {
766 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
767 .name
= "Imagenation PXC200",
769 /* .audio_inputs= 1, */
770 .svhs
= 1, /* was: 4 */
772 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
774 .tuner_type
= TUNER_ABSENT
,
775 .tuner_addr
= ADDR_UNSET
,
776 .muxsel_hook
= PXC200_muxsel
,
779 [BTTV_BOARD_FLYVIDEO_98
] = {
780 .name
= "Lifeview FlyVideo 98 LR50",
782 /* .audio_inputs= 1, */
784 .gpiomask
= 0x1800, /* 0x8dfe00 */
785 .muxsel
= MUXSEL(2, 3, 1, 1),
786 .gpiomux
= { 0, 0x0800, 0x1000, 0x1000 },
790 .tuner_addr
= ADDR_UNSET
,
792 [BTTV_BOARD_IPROTV
] = {
793 .name
= "Formac iProTV, Formac ProTV I (bt848)",
795 /* .audio_inputs= 1, */
798 .muxsel
= MUXSEL(2, 3, 1, 1),
799 .gpiomux
= { 1, 0, 0, 0 },
801 .tuner_type
= TUNER_PHILIPS_PAL
,
802 .tuner_addr
= ADDR_UNSET
,
805 /* ---- card 0x20 ---------------------------------- */
806 [BTTV_BOARD_INTEL_C_S_PCI
] = {
807 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
809 /* .audio_inputs= 0, */
812 .muxsel
= MUXSEL(2, 3, 1, 1),
814 .tuner_type
= TUNER_ABSENT
,
815 .tuner_addr
= ADDR_UNSET
,
817 [BTTV_BOARD_TERRATVALUE
] = {
818 .name
= "Terratec TerraTValue Version Bt878",
820 /* .audio_inputs= 1, */
822 .gpiomask
= 0xffff00,
823 .muxsel
= MUXSEL(2, 3, 1, 1),
824 .gpiomux
= { 0x500, 0, 0x300, 0x900 },
827 .tuner_type
= TUNER_PHILIPS_PAL
,
828 .tuner_addr
= ADDR_UNSET
,
830 [BTTV_BOARD_WINFAST2000
] = {
831 .name
= "Leadtek WinFast 2000/ WinFast 2000 XP",
833 /* .audio_inputs= 1, */
835 /* TV, CVid, SVid, CVid over SVid connector */
836 .muxsel
= MUXSEL(2, 3, 1, 1, 0),
837 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
838 .gpiomask
= 0xb33000,
839 .gpiomux
= { 0x122000,0x1000,0x0000,0x620000 },
840 .gpiomute
= 0x800000,
841 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
842 gpio23 -- hef4052:nEnable (0x800000)
845 0x0000: external audio
849 Note: There exists another variant "Winfast 2000" with tv stereo !?
850 Note: eeprom only contains FF and pci subsystem id 107d:6606
854 .tuner_type
= TUNER_PHILIPS_PAL
, /* default for now, gpio reads BFFF06 for Pal bg+dk */
855 .tuner_addr
= ADDR_UNSET
,
856 .audio_mode_gpio
= winfast2000_audio
,
859 [BTTV_BOARD_CHRONOS_VS2
] = {
860 .name
= "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
862 /* .audio_inputs= 3, */
865 .muxsel
= MUXSEL(2, 3, 1, 1),
866 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
870 .tuner_addr
= ADDR_UNSET
,
873 /* ---- card 0x24 ---------------------------------- */
874 [BTTV_BOARD_TYPHOON_TVIEW
] = {
875 .name
= "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
877 /* .audio_inputs= 3, */
880 .muxsel
= MUXSEL(2, 3, 1, 1),
881 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
885 .tuner_addr
= ADDR_UNSET
,
888 [BTTV_BOARD_PXELVWPLTVPRO
] = {
889 .name
= "Prolink PixelView PlayTV pro",
891 /* .audio_inputs= 1, */
894 .muxsel
= MUXSEL(2, 3, 1, 1),
895 .gpiomux
= { 0x21, 0x20, 0x24, 0x2c },
900 .tuner_addr
= ADDR_UNSET
,
902 [BTTV_BOARD_MAGICTVIEW063
] = {
903 .name
= "Askey CPH06X TView99",
905 /* .audio_inputs= 1, */
907 .gpiomask
= 0x551e00,
908 .muxsel
= MUXSEL(2, 3, 1, 0),
909 .gpiomux
= { 0x551400, 0x551200, 0, 0 },
910 .gpiomute
= 0x551c00,
912 .tuner_type
= TUNER_PHILIPS_PAL_I
,
913 .tuner_addr
= ADDR_UNSET
,
916 [BTTV_BOARD_PINNACLE
] = {
917 .name
= "Pinnacle PCTV Studio/Rave",
919 /* .audio_inputs= 1, */
921 .gpiomask
= 0x03000F,
922 .muxsel
= MUXSEL(2, 3, 1, 1),
923 .gpiomux
= { 2, 0xd0001, 0, 0 },
927 .tuner_addr
= ADDR_UNSET
,
930 /* ---- card 0x28 ---------------------------------- */
931 [BTTV_BOARD_STB2
] = {
932 .name
= "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
934 /* .audio_inputs= 1, */
937 .muxsel
= MUXSEL(2, 3, 1, 1),
938 .gpiomux
= { 4, 0, 2, 3 },
941 .tuner_type
= TUNER_PHILIPS_NTSC
,
942 .tuner_addr
= ADDR_UNSET
,
946 [BTTV_BOARD_AVPHONE98
] = {
947 .name
= "AVerMedia TVPhone 98",
949 /* .audio_inputs= 4, */
952 .muxsel
= MUXSEL(2, 3, 1, 1),
953 .gpiomux
= { 13, 4, 11, 7 },
956 .tuner_addr
= ADDR_UNSET
,
958 .audio_mode_gpio
= avermedia_tvphone_audio
,
960 [BTTV_BOARD_PV951
] = {
961 .name
= "ProVideo PV951", /* pic16c54 */
963 /* .audio_inputs= 1, */
966 .muxsel
= MUXSEL(2, 3, 1, 1),
967 .gpiomux
= { 0, 0, 0, 0},
970 .tuner_type
= TUNER_PHILIPS_PAL_I
,
971 .tuner_addr
= ADDR_UNSET
,
973 [BTTV_BOARD_ONAIR_TV
] = {
974 .name
= "Little OnAir TV",
976 /* .audio_inputs= 1, */
979 .muxsel
= MUXSEL(2, 3, 1, 1),
980 .gpiomux
= { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
981 .gpiomute
= 0xff3ffc,
984 .tuner_addr
= ADDR_UNSET
,
987 /* ---- card 0x2c ---------------------------------- */
988 [BTTV_BOARD_SIGMA_TVII_FM
] = {
989 .name
= "Sigma TVII-FM",
991 /* .audio_inputs= 1, */
994 .muxsel
= MUXSEL(2, 3, 1, 1),
995 .gpiomux
= { 1, 1, 0, 2 },
1000 .tuner_addr
= ADDR_UNSET
,
1002 [BTTV_BOARD_MATRIX_VISION2
] = {
1003 .name
= "MATRIX-Vision MV-Delta 2",
1005 /* .audio_inputs= 1, */
1008 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
1012 .tuner_type
= TUNER_ABSENT
,
1013 .tuner_addr
= ADDR_UNSET
,
1015 [BTTV_BOARD_ZOLTRIX_GENIE
] = {
1016 .name
= "Zoltrix Genie TV/FM",
1018 /* .audio_inputs= 1, */
1020 .gpiomask
= 0xbcf03f,
1021 .muxsel
= MUXSEL(2, 3, 1, 1),
1022 .gpiomux
= { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1023 .gpiomute
= 0xbcb03f,
1026 .tuner_type
= TUNER_TEMIC_4039FR5_NTSC
,
1027 .tuner_addr
= ADDR_UNSET
,
1029 [BTTV_BOARD_TERRATVRADIO
] = {
1030 .name
= "Terratec TV/Radio+",
1032 /* .audio_inputs= 1, */
1034 .gpiomask
= 0x70000,
1035 .muxsel
= MUXSEL(2, 3, 1, 1),
1036 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0 },
1037 .gpiomute
= 0x40000,
1040 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1041 .tuner_addr
= ADDR_UNSET
,
1045 /* ---- card 0x30 ---------------------------------- */
1046 [BTTV_BOARD_DYNALINK
] = {
1047 .name
= "Askey CPH03x/ Dynalink Magic TView",
1049 /* .audio_inputs= 1, */
1052 .muxsel
= MUXSEL(2, 3, 1, 1),
1053 .gpiomux
= {2,0,0,0 },
1056 .tuner_type
= UNSET
,
1057 .tuner_addr
= ADDR_UNSET
,
1059 [BTTV_BOARD_GVBCTV3PCI
] = {
1060 .name
= "IODATA GV-BCTV3/PCI",
1062 /* .audio_inputs= 1, */
1064 .gpiomask
= 0x010f00,
1065 .muxsel
= MUXSEL(2, 3, 0, 0),
1066 .gpiomux
= {0x10000, 0, 0x10000, 0 },
1069 .tuner_type
= TUNER_ALPS_TSHC6_NTSC
,
1070 .tuner_addr
= ADDR_UNSET
,
1071 .audio_mode_gpio
= gvbctv3pci_audio
,
1073 [BTTV_BOARD_PXELVWPLTVPAK
] = {
1074 .name
= "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1076 /* .audio_inputs= 1, */
1079 .gpiomask
= 0xAA0000,
1080 .muxsel
= MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
1081 /* .digital_mode= DIGITAL_MODE_CAMERA, */
1082 .gpiomux
= { 0x20000, 0, 0x80000, 0x80000 },
1083 .gpiomute
= 0xa8000,
1086 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1087 .tuner_addr
= ADDR_UNSET
,
1089 /* GPIO wiring: (different from Rev.4C !)
1090 GPIO17: U4.A0 (first hef4052bt)
1092 GPIO20: U5.A1 (second hef4052bt)
1094 GPIO22: BT832 Reset Line
1095 GPIO23: A5,A0, U5,nEN
1096 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1099 [BTTV_BOARD_EAGLE
] = {
1100 .name
= "Eagle Wireless Capricorn2 (bt878A)",
1102 /* .audio_inputs= 1, */
1105 .muxsel
= MUXSEL(2, 0, 1, 1),
1106 .gpiomux
= { 0, 1, 2, 3 },
1109 .tuner_type
= UNSET
/* TUNER_ALPS_TMDH2_NTSC */,
1110 .tuner_addr
= ADDR_UNSET
,
1113 /* ---- card 0x34 ---------------------------------- */
1114 [BTTV_BOARD_PINNACLEPRO
] = {
1115 /* David Härdeman <david@2gen.com> */
1116 .name
= "Pinnacle PCTV Studio Pro",
1118 /* .audio_inputs= 1, */
1120 .gpiomask
= 0x03000F,
1121 .muxsel
= MUXSEL(2, 3, 1, 1),
1122 .gpiomux
= { 1, 0xd0001, 0, 0 },
1124 /* sound path (5 sources):
1125 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1128 2= Mono TV sound from Tuner
1130 MUX2 (mask 0x30000):
1132 1= FM stereo Radio from Tuner */
1134 .tuner_type
= UNSET
,
1135 .tuner_addr
= ADDR_UNSET
,
1137 [BTTV_BOARD_TVIEW_RDS_FM
] = {
1138 /* Claas Langbehn <claas@bigfoot.com>,
1139 Sven Grothklags <sven@upb.de> */
1140 .name
= "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1142 /* .audio_inputs= 3, */
1145 .muxsel
= MUXSEL(2, 3, 1, 1),
1146 .gpiomux
= { 0, 0, 0x10, 8 },
1149 .tuner_type
= TUNER_PHILIPS_PAL
,
1150 .tuner_addr
= ADDR_UNSET
,
1153 [BTTV_BOARD_LIFETEC_9415
] = {
1154 /* Tim Röstermundt <rosterm@uni-muenster.de>
1155 in de.comp.os.unix.linux.hardware:
1156 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1157 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1158 options tuner type=5 */
1159 .name
= "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1161 /* .audio_inputs= 1, */
1164 .muxsel
= MUXSEL(2, 3, 1, 1),
1165 .gpiomux
= { 0x0000,0x0800,0x1000,0x1000 },
1167 /* For cards with tda9820/tda9821:
1168 0x0000: Tuner normal stereo
1169 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1170 0x0880: Tuner A2 stereo */
1172 .tuner_type
= UNSET
,
1173 .tuner_addr
= ADDR_UNSET
,
1175 [BTTV_BOARD_BESTBUY_EASYTV
] = {
1176 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1177 old Easy TV BT848 version (model CPH031) */
1178 .name
= "Askey CPH031/ BESTBUY Easy TV",
1180 /* .audio_inputs= 1, */
1183 .muxsel
= MUXSEL(2, 3, 1, 0),
1184 .gpiomux
= { 2, 0, 0, 0 },
1187 .tuner_type
= TUNER_TEMIC_PAL
,
1188 .tuner_addr
= ADDR_UNSET
,
1191 /* ---- card 0x38 ---------------------------------- */
1192 [BTTV_BOARD_FLYVIDEO_98FM
] = {
1193 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1194 .name
= "Lifeview FlyVideo 98FM LR50",
1196 /* .audio_inputs= 3, */
1199 .muxsel
= MUXSEL(2, 3, 1, 1),
1200 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
1203 .tuner_type
= TUNER_PHILIPS_PAL
,
1204 .tuner_addr
= ADDR_UNSET
,
1206 /* This is the ultimate cheapo capture card
1207 * just a BT848A on a small PCB!
1208 * Steve Hosgood <steve@equiinet.com> */
1209 [BTTV_BOARD_GRANDTEC
] = {
1210 .name
= "GrandTec 'Grand Video Capture' (Bt848)",
1212 /* .audio_inputs= 0, */
1215 .muxsel
= MUXSEL(3, 1),
1219 .tuner_type
= TUNER_ABSENT
,
1220 .tuner_addr
= ADDR_UNSET
,
1222 [BTTV_BOARD_ASKEY_CPH060
] = {
1223 /* Daniel Herrington <daniel.herrington@home.com> */
1224 .name
= "Askey CPH060/ Phoebe TV Master Only (No FM)",
1226 /* .audio_inputs= 1, */
1229 .muxsel
= MUXSEL(2, 3, 1, 1),
1230 .gpiomux
= { 0x400, 0x400, 0x400, 0x400 },
1233 .tuner_type
= TUNER_TEMIC_4036FY5_NTSC
,
1234 .tuner_addr
= ADDR_UNSET
,
1236 [BTTV_BOARD_ASKEY_CPH03X
] = {
1237 /* Matti Mottus <mottus@physic.ut.ee> */
1238 .name
= "Askey CPH03x TV Capturer",
1240 /* .audio_inputs= 1, */
1242 .gpiomask
= 0x03000F,
1243 .muxsel
= MUXSEL(2, 3, 1, 0),
1244 .gpiomux
= { 2, 0, 0, 0 },
1247 .tuner_type
= TUNER_TEMIC_PAL
,
1248 .tuner_addr
= ADDR_UNSET
,
1252 /* ---- card 0x3c ---------------------------------- */
1253 [BTTV_BOARD_MM100PCTV
] = {
1254 /* Philip Blundell <philb@gnu.org> */
1255 .name
= "Modular Technology MM100PCTV",
1257 /* .audio_inputs= 2, */
1260 .muxsel
= MUXSEL(2, 3, 1, 1),
1261 .gpiomux
= { 2, 0, 0, 1 },
1264 .tuner_type
= TUNER_TEMIC_PAL
,
1265 .tuner_addr
= ADDR_UNSET
,
1267 [BTTV_BOARD_GMV1
] = {
1268 /* Adrian Cox <adrian@humboldt.co.uk */
1269 .name
= "AG Electronics GMV1",
1271 /* .audio_inputs= 0, */
1274 .muxsel
= MUXSEL(2, 2),
1278 .tuner_type
= TUNER_ABSENT
,
1279 .tuner_addr
= ADDR_UNSET
,
1281 [BTTV_BOARD_BESTBUY_EASYTV2
] = {
1282 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1283 new Easy TV BT878 version (model CPH061)
1284 special thanks to Informatica Mieres for providing the card */
1285 .name
= "Askey CPH061/ BESTBUY Easy TV (bt878)",
1287 /* .audio_inputs= 2, */
1290 .muxsel
= MUXSEL(2, 3, 1, 0),
1291 .gpiomux
= { 1, 0, 4, 4 },
1294 .tuner_type
= TUNER_PHILIPS_PAL
,
1295 .tuner_addr
= ADDR_UNSET
,
1297 [BTTV_BOARD_ATI_TVWONDER
] = {
1298 /* Lukas Gebauer <geby@volny.cz> */
1299 .name
= "ATI TV-Wonder",
1301 /* .audio_inputs= 1, */
1304 .muxsel
= MUXSEL(2, 3, 1, 0),
1305 .gpiomux
= { 0xbffe, 0, 0xbfff, 0 },
1308 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1309 .tuner_addr
= ADDR_UNSET
,
1312 /* ---- card 0x40 ---------------------------------- */
1313 [BTTV_BOARD_ATI_TVWONDERVE
] = {
1314 /* Lukas Gebauer <geby@volny.cz> */
1315 .name
= "ATI TV-Wonder VE",
1317 /* .audio_inputs= 1, */
1320 .muxsel
= MUXSEL(2, 3, 0, 1),
1321 .gpiomux
= { 0, 0, 1, 0 },
1324 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1325 .tuner_addr
= ADDR_UNSET
,
1327 [BTTV_BOARD_FLYVIDEO2000
] = {
1328 /* DeeJay <deejay@westel900.net (2000S) */
1329 .name
= "Lifeview FlyVideo 2000S LR90",
1331 /* .audio_inputs= 3, */
1334 .muxsel
= MUXSEL(2, 3, 0, 1),
1335 /* Radio changed from 1e80 to 0x800 to make
1336 FlyVideo2000S in .hu happy (gm)*/
1337 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1338 .gpiomux
= { 0x0000,0x0800,0x1000,0x1000 },
1340 .audio_mode_gpio
= fv2000s_audio
,
1343 .tuner_type
= TUNER_PHILIPS_PAL
,
1344 .tuner_addr
= ADDR_UNSET
,
1346 [BTTV_BOARD_TERRATVALUER
] = {
1347 .name
= "Terratec TValueRadio",
1349 /* .audio_inputs= 1, */
1351 .gpiomask
= 0xffff00,
1352 .muxsel
= MUXSEL(2, 3, 1, 1),
1353 .gpiomux
= { 0x500, 0x500, 0x300, 0x900 },
1356 .tuner_type
= TUNER_PHILIPS_PAL
,
1357 .tuner_addr
= ADDR_UNSET
,
1360 [BTTV_BOARD_GVBCTV4PCI
] = {
1361 /* TANAKA Kei <peg00625@nifty.com> */
1362 .name
= "IODATA GV-BCTV4/PCI",
1364 /* .audio_inputs= 1, */
1366 .gpiomask
= 0x010f00,
1367 .muxsel
= MUXSEL(2, 3, 0, 0),
1368 .gpiomux
= {0x10000, 0, 0x10000, 0 },
1371 .tuner_type
= TUNER_SHARP_2U5JF5540_NTSC
,
1372 .tuner_addr
= ADDR_UNSET
,
1373 .audio_mode_gpio
= gvbctv3pci_audio
,
1376 /* ---- card 0x44 ---------------------------------- */
1377 [BTTV_BOARD_VOODOOTV_FM
] = {
1378 .name
= "3Dfx VoodooTV FM (Euro)",
1379 /* try "insmod msp3400 simple=0" if you have
1380 * sound problems with this card. */
1382 /* .audio_inputs= 1, */
1384 .gpiomask
= 0x4f8a00,
1385 /* 0x100000: 1=MSP enabled (0=disable again)
1386 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1387 .gpiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff },
1388 .gpiomute
= 0x947fff,
1389 /* tvtuner, radio, external,internal, mute, stereo
1390 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1391 .muxsel
= MUXSEL(2, 3, 0, 1),
1392 .tuner_type
= TUNER_MT2032
,
1393 .tuner_addr
= ADDR_UNSET
,
1397 [BTTV_BOARD_VOODOOTV_200
] = {
1398 .name
= "VoodooTV 200 (USA)",
1399 /* try "insmod msp3400 simple=0" if you have
1400 * sound problems with this card. */
1402 /* .audio_inputs= 1, */
1404 .gpiomask
= 0x4f8a00,
1405 /* 0x100000: 1=MSP enabled (0=disable again)
1406 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1407 .gpiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff },
1408 .gpiomute
= 0x947fff,
1409 /* tvtuner, radio, external,internal, mute, stereo
1410 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1411 .muxsel
= MUXSEL(2, 3, 0, 1),
1412 .tuner_type
= TUNER_MT2032
,
1413 .tuner_addr
= ADDR_UNSET
,
1417 [BTTV_BOARD_AIMMS
] = {
1418 /* Philip Blundell <pb@nexus.co.uk> */
1419 .name
= "Active Imaging AIMMS",
1421 /* .audio_inputs= 0, */
1422 .tuner_type
= TUNER_ABSENT
,
1423 .tuner_addr
= ADDR_UNSET
,
1425 .muxsel
= MUXSEL(2),
1428 [BTTV_BOARD_PV_BT878P_PLUS
] = {
1429 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1430 .name
= "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1432 /* .audio_inputs= 4, */
1435 .muxsel
= MUXSEL(2, 3, 1, 1),
1436 .gpiomux
= { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1439 .tuner_type
= TUNER_LG_PAL_I_FM
,
1440 .tuner_addr
= ADDR_UNSET
,
1443 GPIO0: U4.A0 (hef4052bt)
1445 GPIO2: U4.A1 (second hef4052bt)
1446 GPIO3: U4.nEN, U5.A0, A5.nEN
1450 [BTTV_BOARD_FLYVIDEO98EZ
] = {
1451 .name
= "Lifeview FlyVideo 98EZ (capture only) LR51",
1453 /* .audio_inputs= 0, */
1455 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1456 .muxsel
= MUXSEL(2, 3, 1, 1),
1459 .tuner_type
= TUNER_ABSENT
,
1460 .tuner_addr
= ADDR_UNSET
,
1463 /* ---- card 0x48 ---------------------------------- */
1464 [BTTV_BOARD_PV_BT878P_9B
] = {
1465 /* Dariusz Kowalewski <darekk@automex.pl> */
1466 .name
= "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1468 /* .audio_inputs= 1, */
1471 .muxsel
= MUXSEL(2, 3, 1, 1),
1472 .gpiomux
= { 0x01, 0x00, 0x03, 0x03 },
1476 .tuner_type
= TUNER_PHILIPS_PAL
,
1477 .tuner_addr
= ADDR_UNSET
,
1478 .audio_mode_gpio
= pvbt878p9b_audio
, /* Note: not all cards have stereo */
1479 .has_radio
= 1, /* Note: not all cards have radio */
1486 GPIO20,22,23: R30,R29,R28
1489 [BTTV_BOARD_SENSORAY311_611
] = {
1490 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1491 /* you must jumper JP5 for the 311 card (PC/104+) to work */
1492 .name
= "Sensoray 311/611",
1494 /* .audio_inputs= 0, */
1497 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
1499 .tuner_type
= TUNER_ABSENT
,
1500 .tuner_addr
= ADDR_UNSET
,
1502 [BTTV_BOARD_RV605
] = {
1503 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1504 .name
= "RemoteVision MX (RV605)",
1506 /* .audio_inputs= 0, */
1509 .gpiomask2
= 0x07ff,
1510 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
1512 .tuner_type
= TUNER_ABSENT
,
1513 .tuner_addr
= ADDR_UNSET
,
1514 .muxsel_hook
= rv605_muxsel
,
1516 [BTTV_BOARD_POWERCLR_MTV878
] = {
1517 .name
= "Powercolor MTV878/ MTV878R/ MTV878F",
1519 /* .audio_inputs= 2, */
1521 .gpiomask
= 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1522 .muxsel
= MUXSEL(2, 1, 1),
1523 .gpiomux
= { 0, 1, 2, 2 },
1525 .tuner_type
= TUNER_PHILIPS_PAL
,
1526 .tuner_addr
= ADDR_UNSET
,
1531 /* ---- card 0x4c ---------------------------------- */
1532 [BTTV_BOARD_WINDVR
] = {
1533 /* Masaki Suzuki <masaki@btree.org> */
1534 .name
= "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1536 /* .audio_inputs= 1, */
1538 .gpiomask
= 0x140007,
1539 .muxsel
= MUXSEL(2, 3, 1, 1),
1540 .gpiomux
= { 0, 1, 2, 3 },
1542 .tuner_type
= TUNER_PHILIPS_NTSC
,
1543 .tuner_addr
= ADDR_UNSET
,
1544 .audio_mode_gpio
= windvr_audio
,
1546 [BTTV_BOARD_GRANDTEC_MULTI
] = {
1547 .name
= "GrandTec Multi Capture Card (Bt878)",
1549 /* .audio_inputs= 0, */
1552 .muxsel
= MUXSEL(2, 3, 1, 0),
1556 .tuner_type
= TUNER_ABSENT
,
1557 .tuner_addr
= ADDR_UNSET
,
1559 [BTTV_BOARD_KWORLD
] = {
1560 .name
= "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1562 /* .audio_inputs= 3, */
1565 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1566 .muxsel
= MUXSEL(2, 3, 1, 1),
1567 .gpiomux
= { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
1568 * This card lacks external Audio In, so we mute it on Ext. & Int.
1569 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1570 * This card lacks PCI subsystem ID, sigh.
1571 * gpiomux =1: lower volume, 2+3: mute
1572 * btwincap uses 0x80000/0x80003
1577 .tuner_type
= TUNER_PHILIPS_PAL
,
1578 .tuner_addr
= ADDR_UNSET
,
1579 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1580 radio signal strength indicators work fine. */
1583 GPIO0,1: HEF4052 A0,A1
1584 GPIO2: HEF4052 nENABLE
1586 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1590 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1592 [BTTV_BOARD_DSP_TCVIDEO
] = {
1593 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1594 .name
= "DSP Design TCVIDEO",
1597 .muxsel
= MUXSEL(2, 3, 1, 0),
1599 .tuner_type
= UNSET
,
1600 .tuner_addr
= ADDR_UNSET
,
1603 /* ---- card 0x50 ---------------------------------- */
1604 [BTTV_BOARD_HAUPPAUGEPVR
] = {
1605 .name
= "Hauppauge WinTV PVR",
1607 /* .audio_inputs= 1, */
1609 .muxsel
= MUXSEL(2, 0, 1, 1),
1611 .tuner_type
= UNSET
,
1612 .tuner_addr
= ADDR_UNSET
,
1617 [BTTV_BOARD_GVBCTV5PCI
] = {
1618 .name
= "IODATA GV-BCTV5/PCI",
1620 /* .audio_inputs= 1, */
1622 .gpiomask
= 0x0f0f80,
1623 .muxsel
= MUXSEL(2, 3, 1, 0),
1624 .gpiomux
= {0x030000, 0x010000, 0, 0 },
1625 .gpiomute
= 0x020000,
1628 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
1629 .tuner_addr
= ADDR_UNSET
,
1630 .audio_mode_gpio
= gvbctv5pci_audio
,
1633 [BTTV_BOARD_OSPREY1x0
] = {
1634 .name
= "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1635 .video_inputs
= 4, /* id-inputs-clock */
1636 /* .audio_inputs= 0, */
1638 .muxsel
= MUXSEL(3, 2, 0, 1),
1640 .tuner_type
= TUNER_ABSENT
,
1641 .tuner_addr
= ADDR_UNSET
,
1645 [BTTV_BOARD_OSPREY1x0_848
] = {
1646 .name
= "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1648 /* .audio_inputs= 0, */
1650 .muxsel
= MUXSEL(2, 3, 1),
1652 .tuner_type
= TUNER_ABSENT
,
1653 .tuner_addr
= ADDR_UNSET
,
1658 /* ---- card 0x54 ---------------------------------- */
1659 [BTTV_BOARD_OSPREY101_848
] = {
1660 .name
= "Osprey 101 (848)", /* 0x05-40C0-C1 */
1662 /* .audio_inputs= 0, */
1664 .muxsel
= MUXSEL(3, 1),
1666 .tuner_type
= TUNER_ABSENT
,
1667 .tuner_addr
= ADDR_UNSET
,
1671 [BTTV_BOARD_OSPREY1x1
] = {
1672 .name
= "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1674 /* .audio_inputs= 0, */
1676 .muxsel
= MUXSEL(0),
1678 .tuner_type
= TUNER_ABSENT
,
1679 .tuner_addr
= ADDR_UNSET
,
1683 [BTTV_BOARD_OSPREY1x1_SVID
] = {
1684 .name
= "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1686 /* .audio_inputs= 0, */
1688 .muxsel
= MUXSEL(0, 1),
1690 .tuner_type
= TUNER_ABSENT
,
1691 .tuner_addr
= ADDR_UNSET
,
1695 [BTTV_BOARD_OSPREY2xx
] = {
1696 .name
= "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1698 /* .audio_inputs= 1, */
1700 .muxsel
= MUXSEL(0),
1702 .tuner_type
= TUNER_ABSENT
,
1703 .tuner_addr
= ADDR_UNSET
,
1708 /* ---- card 0x58 ---------------------------------- */
1709 [BTTV_BOARD_OSPREY2x0_SVID
] = {
1710 .name
= "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1712 /* .audio_inputs= 1, */
1714 .muxsel
= MUXSEL(0, 1),
1716 .tuner_type
= TUNER_ABSENT
,
1717 .tuner_addr
= ADDR_UNSET
,
1721 [BTTV_BOARD_OSPREY2x0
] = {
1722 .name
= "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1724 /* .audio_inputs= 1, */
1726 .muxsel
= MUXSEL(2, 3),
1728 .tuner_type
= TUNER_ABSENT
,
1729 .tuner_addr
= ADDR_UNSET
,
1733 [BTTV_BOARD_OSPREY500
] = {
1734 .name
= "Osprey 500", /* 500 */
1736 /* .audio_inputs= 1, */
1738 .muxsel
= MUXSEL(2, 3),
1740 .tuner_type
= TUNER_ABSENT
,
1741 .tuner_addr
= ADDR_UNSET
,
1745 [BTTV_BOARD_OSPREY540
] = {
1746 .name
= "Osprey 540", /* 540 */
1748 /* .audio_inputs= 1, */
1750 .tuner_type
= TUNER_ABSENT
,
1751 .tuner_addr
= ADDR_UNSET
,
1756 /* ---- card 0x5C ---------------------------------- */
1757 [BTTV_BOARD_OSPREY2000
] = {
1758 .name
= "Osprey 2000", /* 2000 */
1760 /* .audio_inputs= 1, */
1762 .muxsel
= MUXSEL(2, 3),
1764 .tuner_type
= TUNER_ABSENT
,
1765 .tuner_addr
= ADDR_UNSET
,
1767 .no_tda7432
= 1, /* must avoid, conflicts with the bt860 */
1769 [BTTV_BOARD_IDS_EAGLE
] = {
1770 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1771 .name
= "IDS Eagle",
1773 /* .audio_inputs= 0, */
1774 .tuner_type
= TUNER_ABSENT
,
1775 .tuner_addr
= ADDR_UNSET
,
1778 .muxsel
= MUXSEL(2, 2, 2, 2),
1779 .muxsel_hook
= eagle_muxsel
,
1783 [BTTV_BOARD_PINNACLESAT
] = {
1784 .name
= "Pinnacle PCTV Sat",
1786 /* .audio_inputs= 0, */
1788 .tuner_type
= TUNER_ABSENT
,
1789 .tuner_addr
= ADDR_UNSET
,
1792 .muxsel
= MUXSEL(3, 1),
1797 [BTTV_BOARD_FORMAC_PROTV
] = {
1798 .name
= "Formac ProTV II (bt878)",
1800 /* .audio_inputs= 1, */
1803 /* TV, Comp1, Composite over SVID con, SVID */
1804 .muxsel
= MUXSEL(2, 3, 1, 1),
1805 .gpiomux
= { 2, 2, 0, 0 },
1808 .tuner_type
= TUNER_PHILIPS_PAL
,
1809 .tuner_addr
= ADDR_UNSET
,
1811 GPIO=0x00,0x01,0x03: mute (?)
1812 0x02: both TV and radio (tuner: FM1216/I)
1813 The card has onboard audio connectors labeled "cdrom" and "board",
1814 not soldered here, though unknown wiring.
1815 Card lacks: external audio in, pci subsystem id.
1819 /* ---- card 0x60 ---------------------------------- */
1820 [BTTV_BOARD_MACHTV
] = {
1823 /* .audio_inputs= 1, */
1826 .muxsel
= MUXSEL(2, 3, 1, 1),
1827 .gpiomux
= { 0, 1, 2, 3},
1829 .tuner_type
= TUNER_PHILIPS_PAL
,
1830 .tuner_addr
= ADDR_UNSET
,
1833 [BTTV_BOARD_EURESYS_PICOLO
] = {
1834 .name
= "Euresys Picolo",
1836 /* .audio_inputs= 0, */
1841 .muxsel
= MUXSEL(2, 0, 1),
1843 .tuner_type
= TUNER_ABSENT
,
1844 .tuner_addr
= ADDR_UNSET
,
1846 [BTTV_BOARD_PV150
] = {
1847 /* Luc Van Hoeylandt <luc@e-magic.be> */
1848 .name
= "ProVideo PV150", /* 0x4f */
1850 /* .audio_inputs= 0, */
1853 .muxsel
= MUXSEL(2, 3),
1857 .tuner_type
= TUNER_ABSENT
,
1858 .tuner_addr
= ADDR_UNSET
,
1860 [BTTV_BOARD_AD_TVK503
] = {
1861 /* Hiroshi Takekawa <sian@big.or.jp> */
1862 /* This card lacks subsystem ID */
1863 .name
= "AD-TVK503", /* 0x63 */
1865 /* .audio_inputs= 1, */
1867 .gpiomask
= 0x001e8007,
1868 .muxsel
= MUXSEL(2, 3, 1, 0),
1869 /* Tuner, Radio, external, internal, off, on */
1870 .gpiomux
= { 0x08, 0x0f, 0x0a, 0x08 },
1874 .tuner_type
= TUNER_PHILIPS_NTSC
,
1875 .tuner_addr
= ADDR_UNSET
,
1876 .audio_mode_gpio
= adtvk503_audio
,
1879 /* ---- card 0x64 ---------------------------------- */
1880 [BTTV_BOARD_HERCULES_SM_TV
] = {
1881 .name
= "Hercules Smart TV Stereo",
1883 /* .audio_inputs= 1, */
1886 .muxsel
= MUXSEL(2, 3, 1, 1),
1889 .tuner_type
= TUNER_PHILIPS_PAL
,
1890 .tuner_addr
= ADDR_UNSET
,
1892 - card lacks subsystem ID
1893 - stereo variant w/ daughter board with tda9874a @0xb0
1895 always from tda9874 independent of GPIO (?)
1896 external line in: unknown
1897 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1898 hef4053 (instead 4052) for unknown function
1901 [BTTV_BOARD_PACETV
] = {
1902 .name
= "Pace TV & Radio Card",
1904 /* .audio_inputs= 1, */
1906 /* Tuner, CVid, SVid, CVid over SVid connector */
1907 .muxsel
= MUXSEL(2, 3, 1, 1),
1910 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1911 .tuner_addr
= ADDR_UNSET
,
1914 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1915 only internal line out: (4pin header) RGGL
1916 Radio must be decoded by msp3410d (not routed through)*/
1918 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1921 [BTTV_BOARD_IVC200
] = {
1922 /* Chris Willing <chris@vislab.usyd.edu.au> */
1925 /* .audio_inputs= 0, */
1926 .tuner_type
= TUNER_ABSENT
,
1927 .tuner_addr
= ADDR_UNSET
,
1930 .muxsel
= MUXSEL(2),
1933 [BTTV_BOARD_IVCE8784
] = {
1934 .name
= "IVCE-8784",
1936 /* .audio_inputs= 0, */
1937 .tuner_type
= TUNER_ABSENT
,
1938 .tuner_addr
= ADDR_UNSET
,
1941 .muxsel
= MUXSEL(2),
1944 [BTTV_BOARD_XGUARD
] = {
1945 .name
= "Grand X-Guard / Trust 814PCI",
1947 /* .audio_inputs= 0, */
1949 .tuner_type
= TUNER_ABSENT
,
1950 .tuner_addr
= ADDR_UNSET
,
1952 .muxsel
= MUXSEL(2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0),
1953 .muxsel_hook
= xguard_muxsel
,
1959 /* ---- card 0x68 ---------------------------------- */
1960 [BTTV_BOARD_NEBULA_DIGITV
] = {
1961 .name
= "Nebula Electronics DigiTV",
1964 .muxsel
= MUXSEL(2, 3, 1, 0),
1968 .tuner_type
= TUNER_ABSENT
,
1969 .tuner_addr
= ADDR_UNSET
,
1975 [BTTV_BOARD_PV143
] = {
1976 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1977 .name
= "ProVideo PV143",
1979 /* .audio_inputs= 0, */
1982 .muxsel
= MUXSEL(2, 3, 1, 0),
1986 .tuner_type
= TUNER_ABSENT
,
1987 .tuner_addr
= ADDR_UNSET
,
1989 [BTTV_BOARD_VD009X1_VD011_MINIDIN
] = {
1990 /* M.Klahr@phytec.de */
1991 .name
= "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
1993 /* .audio_inputs= 0, */
1996 .muxsel
= MUXSEL(2, 3, 1, 0),
1997 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
1999 .tuner_type
= TUNER_ABSENT
,
2000 .tuner_addr
= ADDR_UNSET
,
2002 [BTTV_BOARD_VD009X1_VD011_COMBI
] = {
2003 .name
= "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
2005 /* .audio_inputs= 0, */
2008 .muxsel
= MUXSEL(2, 3, 1, 1),
2009 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2011 .tuner_type
= TUNER_ABSENT
,
2012 .tuner_addr
= ADDR_UNSET
,
2015 /* ---- card 0x6c ---------------------------------- */
2016 [BTTV_BOARD_VD009_MINIDIN
] = {
2017 .name
= "PHYTEC VD-009 MiniDIN (bt878)",
2019 /* .audio_inputs= 0, */
2022 .gpiomask2
= 0x03, /* used for external vodeo mux */
2023 .muxsel
= MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
2024 .muxsel_hook
= phytec_muxsel
,
2025 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2027 .tuner_type
= TUNER_ABSENT
,
2028 .tuner_addr
= ADDR_UNSET
,
2030 [BTTV_BOARD_VD009_COMBI
] = {
2031 .name
= "PHYTEC VD-009 Combi (bt878)",
2033 /* .audio_inputs= 0, */
2036 .gpiomask2
= 0x03, /* used for external vodeo mux */
2037 .muxsel
= MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
2038 .muxsel_hook
= phytec_muxsel
,
2039 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2041 .tuner_type
= TUNER_ABSENT
,
2042 .tuner_addr
= ADDR_UNSET
,
2044 [BTTV_BOARD_IVC100
] = {
2047 /* .audio_inputs= 0, */
2048 .tuner_type
= TUNER_ABSENT
,
2049 .tuner_addr
= ADDR_UNSET
,
2052 .muxsel
= MUXSEL(2, 3, 1, 0),
2055 [BTTV_BOARD_IVC120
] = {
2056 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2059 /* .audio_inputs= 0, */
2060 .tuner_type
= TUNER_ABSENT
,
2061 .tuner_addr
= ADDR_UNSET
,
2062 .svhs
= NO_SVHS
, /* card has no svhs */
2066 .muxsel
= MUXSEL(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
2067 .muxsel_hook
= ivc120_muxsel
,
2071 /* ---- card 0x70 ---------------------------------- */
2072 [BTTV_BOARD_PC_HDTV
] = {
2073 .name
= "pcHDTV HD-2000 TV",
2075 /* .audio_inputs= 1, */
2077 .muxsel
= MUXSEL(2, 3, 1, 0),
2078 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
2079 .tuner_addr
= ADDR_UNSET
,
2082 [BTTV_BOARD_TWINHAN_DST
] = {
2083 .name
= "Twinhan DST + clones",
2086 .tuner_type
= TUNER_ABSENT
,
2087 .tuner_addr
= ADDR_UNSET
,
2091 [BTTV_BOARD_WINFASTVC100
] = {
2092 .name
= "Winfast VC100",
2094 /* .audio_inputs= 0, */
2096 /* Vid In, SVid In, Vid over SVid in connector */
2097 .muxsel
= MUXSEL(3, 1, 1, 3),
2100 .tuner_type
= TUNER_ABSENT
,
2101 .tuner_addr
= ADDR_UNSET
,
2104 [BTTV_BOARD_TEV560
] = {
2105 .name
= "Teppro TEV-560/InterVision IV-560",
2107 /* .audio_inputs= 1, */
2110 .muxsel
= MUXSEL(2, 3, 1, 1),
2111 .gpiomux
= { 1, 1, 1, 1 },
2112 .tuner_type
= TUNER_PHILIPS_PAL
,
2113 .tuner_addr
= ADDR_UNSET
,
2117 /* ---- card 0x74 ---------------------------------- */
2118 [BTTV_BOARD_SIMUS_GVC1100
] = {
2119 .name
= "SIMUS GVC1100",
2121 /* .audio_inputs= 0, */
2123 .tuner_type
= TUNER_ABSENT
,
2124 .tuner_addr
= ADDR_UNSET
,
2126 .muxsel
= MUXSEL(2, 2, 2, 2),
2128 .muxsel_hook
= gvc1100_muxsel
,
2130 [BTTV_BOARD_NGSTV_PLUS
] = {
2131 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2132 .name
= "NGS NGSTV+",
2135 .gpiomask
= 0x008007,
2136 .muxsel
= MUXSEL(2, 3, 0, 0),
2137 .gpiomux
= { 0, 0, 0, 0 },
2138 .gpiomute
= 0x000003,
2140 .tuner_type
= TUNER_PHILIPS_PAL
,
2141 .tuner_addr
= ADDR_UNSET
,
2144 [BTTV_BOARD_LMLBT4
] = {
2145 /* http://linuxmedialabs.com */
2147 .video_inputs
= 4, /* IN1,IN2,IN3,IN4 */
2148 /* .audio_inputs= 0, */
2150 .muxsel
= MUXSEL(2, 3, 1, 0),
2153 .tuner_type
= TUNER_ABSENT
,
2154 .tuner_addr
= ADDR_UNSET
,
2156 [BTTV_BOARD_TEKRAM_M205
] = {
2157 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2158 .name
= "Tekram M205 PRO",
2160 /* .audio_inputs= 1, */
2161 .tuner_type
= TUNER_PHILIPS_PAL
,
2162 .tuner_addr
= ADDR_UNSET
,
2165 .muxsel
= MUXSEL(2, 3, 1),
2166 .gpiomux
= { 0x68, 0x68, 0x61, 0x61 },
2170 /* ---- card 0x78 ---------------------------------- */
2171 [BTTV_BOARD_CONTVFMI
] = {
2172 /* Javier Cendan Ares <jcendan@lycos.es> */
2173 /* bt878 TV + FM without subsystem ID */
2174 .name
= "Conceptronic CONTVFMi",
2176 /* .audio_inputs= 1, */
2178 .gpiomask
= 0x008007,
2179 .muxsel
= MUXSEL(2, 3, 1, 1),
2180 .gpiomux
= { 0, 1, 2, 2 },
2183 .tuner_type
= TUNER_PHILIPS_PAL
,
2184 .tuner_addr
= ADDR_UNSET
,
2188 [BTTV_BOARD_PICOLO_TETRA_CHIP
] = {
2189 /*Eric DEBIEF <debief@telemsa.com>*/
2190 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2191 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the following declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
2193 .name
= "Euresys Picolo Tetra",
2195 /* .audio_inputs= 0, */
2198 .gpiomask2
= 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2201 /*878A input is always MUX0, see above.*/
2202 .muxsel
= MUXSEL(2, 2, 2, 2),
2203 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2205 .muxsel_hook
= picolo_tetra_muxsel
,/*Required as it doesn't follow the classic input selection policy*/
2206 .tuner_type
= TUNER_ABSENT
,
2207 .tuner_addr
= ADDR_UNSET
,
2209 [BTTV_BOARD_SPIRIT_TV
] = {
2210 /* Spirit TV Tuner from http://spiritmodems.com.au */
2211 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2212 .name
= "Spirit TV Tuner",
2214 /* .audio_inputs= 1, */
2216 .gpiomask
= 0x0000000f,
2217 .muxsel
= MUXSEL(2, 1, 1),
2218 .gpiomux
= { 0x02, 0x00, 0x00, 0x00 },
2219 .tuner_type
= TUNER_TEMIC_PAL
,
2220 .tuner_addr
= ADDR_UNSET
,
2223 [BTTV_BOARD_AVDVBT_771
] = {
2224 /* Wolfram Joost <wojo@frokaschwei.de> */
2225 .name
= "AVerMedia AVerTV DVB-T 771",
2228 .tuner_type
= TUNER_ABSENT
,
2229 .tuner_addr
= ADDR_UNSET
,
2230 .muxsel
= MUXSEL(3, 3),
2238 /* ---- card 0x7c ---------------------------------- */
2239 [BTTV_BOARD_AVDVBT_761
] = {
2240 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
2241 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
2242 .name
= "AverMedia AverTV DVB-T 761",
2245 .muxsel
= MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2249 .tuner_type
= TUNER_ABSENT
,
2250 .tuner_addr
= ADDR_UNSET
,
2255 [BTTV_BOARD_MATRIX_VISIONSQ
] = {
2256 /* andre.schwarz@matrix-vision.de */
2257 .name
= "MATRIX Vision Sigma-SQ",
2259 /* .audio_inputs= 0, */
2262 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3),
2263 .muxsel_hook
= sigmaSQ_muxsel
,
2267 .tuner_type
= TUNER_ABSENT
,
2268 .tuner_addr
= ADDR_UNSET
,
2270 [BTTV_BOARD_MATRIX_VISIONSLC
] = {
2271 /* andre.schwarz@matrix-vision.de */
2272 .name
= "MATRIX Vision Sigma-SLC",
2274 /* .audio_inputs= 0, */
2277 .muxsel
= MUXSEL(2, 2, 2, 2),
2278 .muxsel_hook
= sigmaSLC_muxsel
,
2282 .tuner_type
= TUNER_ABSENT
,
2283 .tuner_addr
= ADDR_UNSET
,
2285 /* BTTV_BOARD_APAC_VIEWCOMP */
2286 [BTTV_BOARD_APAC_VIEWCOMP
] = {
2287 /* Attila Kondoros <attila.kondoros@chello.hu> */
2288 /* bt878 TV + FM 0x00000000 subsystem ID */
2289 .name
= "APAC Viewcomp 878(AMAX)",
2291 /* .audio_inputs= 1, */
2294 .muxsel
= MUXSEL(2, 3, 1, 1),
2295 .gpiomux
= { 2, 0, 0, 0 },
2298 .tuner_type
= TUNER_PHILIPS_PAL
,
2299 .tuner_addr
= ADDR_UNSET
,
2300 .has_remote
= 1, /* miniremote works, see ir-kbd-gpio.c */
2301 .has_radio
= 1, /* not every card has radio */
2304 /* ---- card 0x80 ---------------------------------- */
2305 [BTTV_BOARD_DVICO_DVBT_LITE
] = {
2306 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2307 .name
= "DViCO FusionHDTV DVB-T Lite",
2313 .tuner_type
= TUNER_ABSENT
,
2314 .tuner_addr
= ADDR_UNSET
,
2316 [BTTV_BOARD_VGEAR_MYVCD
] = {
2317 /* Steven <photon38@pchome.com.tw> */
2318 .name
= "V-Gear MyVCD",
2320 /* .audio_inputs= 1, */
2323 .muxsel
= MUXSEL(2, 3, 1, 0),
2324 .gpiomux
= {0x31, 0x31, 0x31, 0x31 },
2328 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
2329 .tuner_addr
= ADDR_UNSET
,
2332 [BTTV_BOARD_SUPER_TV
] = {
2333 /* Rick C <cryptdragoon@gmail.com> */
2334 .name
= "Super TV Tuner",
2336 /* .audio_inputs= 1, */
2338 .muxsel
= MUXSEL(2, 3, 1, 0),
2339 .tuner_type
= TUNER_PHILIPS_NTSC
,
2340 .tuner_addr
= ADDR_UNSET
,
2341 .gpiomask
= 0x008007,
2342 .gpiomux
= { 0, 0x000001,0,0 },
2345 [BTTV_BOARD_TIBET_CS16
] = {
2346 /* Chris Fanning <video4linux@haydon.net> */
2347 .name
= "Tibet Systems 'Progress DVR' CS16",
2349 /* .audio_inputs= 0, */
2351 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2355 .tuner_type
= TUNER_ABSENT
,
2356 .tuner_addr
= ADDR_UNSET
,
2357 .muxsel_hook
= tibetCS16_muxsel
,
2359 [BTTV_BOARD_KODICOM_4400R
] = {
2360 /* Bill Brack <wbrack@mmm.com.hk> */
2362 * Note that, because of the card's wiring, the "master"
2363 * BT878A chip (i.e. the one which controls the analog switch
2364 * and must use this card type) is the 2nd one detected. The
2365 * other 3 chips should use card type 0x85, whose description
2366 * follows this one. There is a EEPROM on the card (which is
2367 * connected to the I2C of one of those other chips), but is
2368 * not currently handled. There is also a facility for a
2369 * "monitor", which is also not currently implemented.
2371 .name
= "Kodicom 4400R (master)",
2373 /* .audio_inputs= 0, */
2374 .tuner_type
= TUNER_ABSENT
,
2375 .tuner_addr
= ADDR_UNSET
,
2377 /* GPIO bits 0-9 used for analog switch:
2378 * 00 - 03: camera selector
2379 * 04 - 06: channel (controller) selector
2380 * 07: data (1->on, 0->off)
2383 * bit 16 is input from sync separator for the channel
2385 .gpiomask
= 0x0003ff,
2387 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2391 .muxsel_hook
= kodicom4400r_muxsel
,
2393 [BTTV_BOARD_KODICOM_4400R_SL
] = {
2394 /* Bill Brack <wbrack@mmm.com.hk> */
2395 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2396 * one which controls the analog switch, and must use the card type)
2397 * is the 2nd one detected. The other 3 chips should use this card
2400 .name
= "Kodicom 4400R (slave)",
2402 /* .audio_inputs= 0, */
2403 .tuner_type
= TUNER_ABSENT
,
2404 .tuner_addr
= ADDR_UNSET
,
2406 .gpiomask
= 0x010000,
2408 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2412 .muxsel_hook
= kodicom4400r_muxsel
,
2414 /* ---- card 0x86---------------------------------- */
2415 [BTTV_BOARD_ADLINK_RTV24
] = {
2416 /* Michael Henson <mhenson@clarityvi.com> */
2417 /* Adlink RTV24 with special unlock codes */
2418 .name
= "Adlink RTV24",
2420 /* .audio_inputs= 1, */
2422 .muxsel
= MUXSEL(2, 3, 1, 0),
2423 .tuner_type
= UNSET
,
2424 .tuner_addr
= ADDR_UNSET
,
2427 /* ---- card 0x87---------------------------------- */
2428 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
] = {
2429 /* Michael Krufky <mkrufky@linuxtv.org> */
2430 .name
= "DViCO FusionHDTV 5 Lite",
2431 .tuner_type
= TUNER_LG_TDVS_H06XF
, /* TDVS-H064F */
2432 .tuner_addr
= ADDR_UNSET
,
2434 /* .audio_inputs= 1, */
2436 .muxsel
= MUXSEL(2, 3, 1),
2437 .gpiomask
= 0x00e00007,
2438 .gpiomux
= { 0x00400005, 0, 0x00000001, 0 },
2439 .gpiomute
= 0x00c00007,
2444 /* ---- card 0x88---------------------------------- */
2445 [BTTV_BOARD_ACORP_Y878F
] = {
2446 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
2447 .name
= "Acorp Y878F",
2449 /* .audio_inputs= 1, */
2451 .gpiomask
= 0x01fe00,
2452 .muxsel
= MUXSEL(2, 3, 1, 1),
2453 .gpiomux
= { 0x001e00, 0, 0x018000, 0x014000 },
2454 .gpiomute
= 0x002000,
2456 .tuner_type
= TUNER_YMEC_TVF66T5_B_DFF
,
2457 .tuner_addr
= 0xc1 >>1,
2460 /* ---- card 0x89 ---------------------------------- */
2461 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2
] = {
2462 .name
= "Conceptronic CTVFMi v2",
2464 /* .audio_inputs= 1, */
2466 .gpiomask
= 0x001c0007,
2467 .muxsel
= MUXSEL(2, 3, 1, 1),
2468 .gpiomux
= { 0, 1, 2, 2 },
2471 .tuner_type
= TUNER_TENA_9533_DI
,
2472 .tuner_addr
= ADDR_UNSET
,
2476 /* ---- card 0x8a ---------------------------------- */
2477 [BTTV_BOARD_PV_BT878P_2E
] = {
2478 .name
= "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2480 /* .audio_inputs= 1, */
2483 .gpiomask
= 0x01fe00,
2484 .muxsel
= MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
2485 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2486 .gpiomux
= { 0x00400, 0x10400, 0x04400, 0x80000 },
2487 .gpiomute
= 0x12400,
2490 .tuner_type
= TUNER_LG_PAL_FM
,
2491 .tuner_addr
= ADDR_UNSET
,
2494 /* ---- card 0x8b ---------------------------------- */
2495 [BTTV_BOARD_PV_M4900
] = {
2496 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2497 .name
= "Prolink PixelView PlayTV MPEG2 PV-M4900",
2499 /* .audio_inputs= 1, */
2502 .muxsel
= MUXSEL(2, 3, 1, 1),
2503 .gpiomux
= { 0x21, 0x20, 0x24, 0x2c },
2507 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
2508 .tuner_addr
= ADDR_UNSET
,
2512 /* ---- card 0x8c ---------------------------------- */
2513 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2514 one external BNC composite input (mux 2)
2515 three internal composite inputs (unknown muxes)
2516 an 18-bit stereo A/D (CS5331A), which has:
2517 one external stereo unblanced (RCA) audio connection
2518 one (or 3?) internal stereo balanced (XLR) audio connection
2519 input is selected via gpio to a 14052B mux
2520 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2521 gain is controlled via an X9221A chip on the I2C bus @0x28
2522 sample rate is controlled via gpio to an MK1413S
2523 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2524 There is neither a tuner nor an svideo input. */
2525 [BTTV_BOARD_OSPREY440
] = {
2526 .name
= "Osprey 440",
2528 /* .audio_inputs= 2, */
2530 .muxsel
= MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
2532 .gpiomute
= 0x000, /* int + 32kHz */
2533 .gpiomux
= { 0, 0, 0x000, 0x100},
2535 .tuner_type
= TUNER_ABSENT
,
2536 .tuner_addr
= ADDR_UNSET
,
2540 /* ---- card 0x8d ---------------------------------- */
2541 [BTTV_BOARD_ASOUND_SKYEYE
] = {
2542 .name
= "Asound Skyeye PCTV",
2544 /* .audio_inputs= 1, */
2547 .muxsel
= MUXSEL(2, 3, 1, 1),
2548 .gpiomux
= { 2, 0, 0, 0 },
2551 .tuner_type
= TUNER_PHILIPS_NTSC
,
2552 .tuner_addr
= ADDR_UNSET
,
2554 /* ---- card 0x8e ---------------------------------- */
2555 [BTTV_BOARD_SABRENT_TVFM
] = {
2556 .name
= "Sabrent TV-FM (bttv version)",
2558 /* .audio_inputs= 1, */
2560 .gpiomask
= 0x108007,
2561 .muxsel
= MUXSEL(2, 3, 1, 1),
2562 .gpiomux
= { 100000, 100002, 100002, 100000 },
2566 .tuner_type
= TUNER_TNF_5335MF
,
2567 .tuner_addr
= ADDR_UNSET
,
2570 /* ---- card 0x8f ---------------------------------- */
2571 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB
] = {
2572 .name
= "Hauppauge ImpactVCB (bt878)",
2574 /* .audio_inputs= 0, */
2576 .gpiomask
= 0x0f, /* old: 7 */
2577 .muxsel
= MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2580 .tuner_type
= TUNER_ABSENT
,
2581 .tuner_addr
= ADDR_UNSET
,
2583 [BTTV_BOARD_MACHTV_MAGICTV
] = {
2584 /* Julian Calaby <julian.calaby@gmail.com>
2585 * Slightly different from original MachTV definition (0x60)
2587 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2588 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2589 * properly (methinks) causing no keyup bits being set */
2591 .name
= "MagicTV", /* rebranded MachTV */
2593 /* .audio_inputs= 1, */
2596 .muxsel
= MUXSEL(2, 3, 1, 1),
2597 .gpiomux
= { 0, 1, 2, 3 },
2599 .tuner_type
= TUNER_TEMIC_4009FR5_PAL
,
2600 .tuner_addr
= ADDR_UNSET
,
2605 [BTTV_BOARD_SSAI_SECURITY
] = {
2606 .name
= "SSAI Security Video Interface",
2608 /* .audio_inputs= 0, */
2610 .muxsel
= MUXSEL(0, 1, 2, 3),
2611 .tuner_type
= TUNER_ABSENT
,
2612 .tuner_addr
= ADDR_UNSET
,
2614 [BTTV_BOARD_SSAI_ULTRASOUND
] = {
2615 .name
= "SSAI Ultrasound Video Interface",
2617 /* .audio_inputs= 0, */
2619 .muxsel
= MUXSEL(2, 0, 1, 3),
2620 .tuner_type
= TUNER_ABSENT
,
2621 .tuner_addr
= ADDR_UNSET
,
2623 /* ---- card 0x94---------------------------------- */
2624 [BTTV_BOARD_DVICO_FUSIONHDTV_2
] = {
2625 .name
= "DViCO FusionHDTV 2",
2626 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
2627 .tuner_addr
= ADDR_UNSET
,
2629 /* .audio_inputs= 1, */
2631 .muxsel
= MUXSEL(2, 3, 1),
2632 .gpiomask
= 0x00e00007,
2633 .gpiomux
= { 0x00400005, 0, 0x00000001, 0 },
2634 .gpiomute
= 0x00c00007,
2638 /* ---- card 0x95---------------------------------- */
2639 [BTTV_BOARD_TYPHOON_TVTUNERPCI
] = {
2640 .name
= "Typhoon TV-Tuner PCI (50684)",
2642 /* .audio_inputs= 1, */
2644 .gpiomask
= 0x3014f,
2645 .muxsel
= MUXSEL(2, 3, 1, 1),
2646 .gpiomux
= { 0x20001,0x10001, 0, 0 },
2649 .tuner_type
= TUNER_PHILIPS_PAL_I
,
2650 .tuner_addr
= ADDR_UNSET
,
2652 [BTTV_BOARD_GEOVISION_GV600
] = {
2654 .name
= "Geovision GV-600",
2656 /* .audio_inputs= 0, */
2659 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2660 .muxsel_hook
= geovision_muxsel
,
2664 .tuner_type
= TUNER_ABSENT
,
2665 .tuner_addr
= ADDR_UNSET
,
2667 [BTTV_BOARD_KOZUMI_KTV_01C
] = {
2668 /* Mauro Lacy <mauro@lacy.com.ar>
2669 * Based on MagicTV and Conceptronic CONTVFMi */
2671 .name
= "Kozumi KTV-01C",
2673 /* .audio_inputs= 1, */
2675 .gpiomask
= 0x008007,
2676 .muxsel
= MUXSEL(2, 3, 1, 1),
2677 .gpiomux
= { 0, 1, 2, 2 }, /* CONTVFMi */
2678 .gpiomute
= 3, /* CONTVFMi */
2679 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
, /* TCL MK3 */
2680 .tuner_addr
= ADDR_UNSET
,
2685 [BTTV_BOARD_ENLTV_FM_2
] = {
2686 /* Encore TV Tuner Pro ENL TV-FM-2
2687 Mauro Carvalho Chehab <mchehab@infradead.org */
2688 .name
= "Encore ENL TV-FM-2",
2690 /* .audio_inputs= 1, */
2692 /* bit 6 -> IR disabled
2693 bit 18/17 = 00 -> mute
2694 01 -> enable external audio input
2695 10 -> internal audio input (mono?)
2696 11 -> internal audio input
2698 .gpiomask
= 0x060040,
2699 .muxsel
= MUXSEL(2, 3, 3),
2700 .gpiomux
= { 0x60000, 0x60000, 0x20000, 0x20000 },
2702 .tuner_type
= TUNER_TCL_MF02GIP_5N
,
2703 .tuner_addr
= ADDR_UNSET
,
2708 [BTTV_BOARD_VD012
] = {
2709 /* D.Heer@Phytec.de */
2710 .name
= "PHYTEC VD-012 (bt878)",
2712 /* .audio_inputs= 0, */
2715 .muxsel
= MUXSEL(0, 2, 3, 1),
2716 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2718 .tuner_type
= TUNER_ABSENT
,
2719 .tuner_addr
= ADDR_UNSET
,
2721 [BTTV_BOARD_VD012_X1
] = {
2722 /* D.Heer@Phytec.de */
2723 .name
= "PHYTEC VD-012-X1 (bt878)",
2725 /* .audio_inputs= 0, */
2728 .muxsel
= MUXSEL(2, 3, 1),
2729 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2731 .tuner_type
= TUNER_ABSENT
,
2732 .tuner_addr
= ADDR_UNSET
,
2734 [BTTV_BOARD_VD012_X2
] = {
2735 /* D.Heer@Phytec.de */
2736 .name
= "PHYTEC VD-012-X2 (bt878)",
2738 /* .audio_inputs= 0, */
2741 .muxsel
= MUXSEL(3, 2, 1),
2742 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2744 .tuner_type
= TUNER_ABSENT
,
2745 .tuner_addr
= ADDR_UNSET
,
2747 [BTTV_BOARD_GEOVISION_GV800S
] = {
2748 /* Bruno Christo <bchristo@inf.ufsm.br>
2750 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2751 * 1 audio input per BT878A = 4 audio inputs
2752 * 4 video inputs per BT878A = 16 video inputs
2753 * This is the first BT878A chip of the GV-800(S). It's the
2754 * "master" chip and it controls the video inputs through an
2755 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2756 * slaves should use card type 0x9e (following this one).
2757 * There is a EEPROM on the card which is currently not handled.
2758 * The audio input is not working yet.
2760 .name
= "Geovision GV-800(S) (master)",
2762 /* .audio_inputs= 1, */
2763 .tuner_type
= TUNER_ABSENT
,
2764 .tuner_addr
= ADDR_UNSET
,
2766 .gpiomask
= 0xf107f,
2768 .muxsel
= MUXSEL(2, 2, 2, 2),
2772 .muxsel_hook
= gv800s_muxsel
,
2774 [BTTV_BOARD_GEOVISION_GV800S_SL
] = {
2775 /* Bruno Christo <bchristo@inf.ufsm.br>
2777 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2778 * 1 audio input per BT878A = 4 audio inputs
2779 * 4 video inputs per BT878A = 16 video inputs
2780 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2781 * and should use this card type.
2782 * The audio input is not working yet.
2784 .name
= "Geovision GV-800(S) (slave)",
2786 /* .audio_inputs= 1, */
2787 .tuner_type
= TUNER_ABSENT
,
2788 .tuner_addr
= ADDR_UNSET
,
2792 .muxsel
= MUXSEL(2, 2, 2, 2),
2796 .muxsel_hook
= gv800s_muxsel
,
2798 [BTTV_BOARD_PV183
] = {
2799 .name
= "ProVideo PV183", /* 0x9f */
2801 /* .audio_inputs= 0, */
2804 .muxsel
= MUXSEL(2, 3),
2808 .tuner_type
= TUNER_ABSENT
,
2809 .tuner_addr
= ADDR_UNSET
,
2811 /* ---- card 0xa0---------------------------------- */
2812 [BTTV_BOARD_TVT_TD3116
] = {
2813 .name
= "Tongwei Video Technology TD-3116",
2815 .gpiomask
= 0xc00ff,
2816 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2817 .muxsel_hook
= td3116_muxsel
,
2820 .tuner_type
= TUNER_ABSENT
,
2822 [BTTV_BOARD_APOSONIC_WDVR
] = {
2823 .name
= "Aposonic W-DVR",
2826 .muxsel
= MUXSEL(2, 3, 1, 0),
2827 .tuner_type
= TUNER_ABSENT
,
2829 [BTTV_BOARD_ADLINK_MPG24
] = {
2831 .name
= "Adlink MPG24",
2833 /* .audio_inputs= 1, */
2835 .muxsel
= MUXSEL(2, 2, 2, 2),
2836 .tuner_type
= UNSET
,
2837 .tuner_addr
= ADDR_UNSET
,
2840 [BTTV_BOARD_BT848_CAP_14
] = {
2841 .name
= "Bt848 Capture 14MHz",
2844 .muxsel
= MUXSEL(2, 3, 1, 0),
2846 .tuner_type
= TUNER_ABSENT
,
2848 [BTTV_BOARD_CYBERVISION_CV06
] = {
2849 .name
= "CyberVision CV06 (SV)",
2851 /* .audio_inputs= 0, */
2853 .muxsel
= MUXSEL(2, 3, 1, 0),
2855 .tuner_type
= TUNER_ABSENT
,
2856 .tuner_addr
= ADDR_UNSET
,
2858 [BTTV_BOARD_KWORLD_VSTREAM_XPERT
] = {
2859 /* Pojar George <geoubuntu@gmail.com> */
2860 .name
= "Kworld V-Stream Xpert TV PVR878",
2862 /* .audio_inputs= 1, */
2864 .gpiomask
= 0x001c0007,
2865 .muxsel
= MUXSEL(2, 3, 1, 1),
2866 .gpiomux
= { 0, 1, 2, 2 },
2869 .tuner_type
= TUNER_TENA_9533_DI
,
2870 .tuner_addr
= ADDR_UNSET
,
2874 /* ---- card 0xa6---------------------------------- */
2875 [BTTV_BOARD_PCI_8604PW
] = {
2876 /* PCI-8604PW with special unlock sequence */
2877 .name
= "PCI-8604PW",
2879 /* .audio_inputs= 0, */
2881 /* The second input is available on CN4, if populated.
2882 * The other 5x2 header (CN2?) connects to the same inputs
2883 * as the on-board BNCs */
2884 .muxsel
= MUXSEL(2, 3),
2885 .tuner_type
= TUNER_ABSENT
,
2892 static const unsigned int bttv_num_tvcards
= ARRAY_SIZE(bttv_tvcards
);
2894 /* ----------------------------------------------------------------------- */
2896 static unsigned char eeprom_data
[256];
2901 void bttv_idcard(struct bttv
*btv
)
2903 unsigned int gpiobits
;
2906 /* read PCI subsystem ID */
2907 btv
->cardid
= btv
->c
.pci
->subsystem_device
<< 16;
2908 btv
->cardid
|= btv
->c
.pci
->subsystem_vendor
;
2910 if (0 != btv
->cardid
&& 0xffffffff != btv
->cardid
) {
2911 /* look for the card */
2912 for (type
= -1, i
= 0; cards
[i
].id
!= 0; i
++)
2913 if (cards
[i
].id
== btv
->cardid
)
2918 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2919 btv
->c
.nr
, cards
[type
].name
, cards
[type
].cardnr
,
2920 btv
->cardid
& 0xffff,
2921 (btv
->cardid
>> 16) & 0xffff);
2922 btv
->c
.type
= cards
[type
].cardnr
;
2925 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2926 btv
->c
.nr
, btv
->cardid
& 0xffff,
2927 (btv
->cardid
>> 16) & 0xffff);
2928 pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kernel.org\n");
2932 /* let the user override the autodetected type */
2933 if (card
[btv
->c
.nr
] < bttv_num_tvcards
)
2934 btv
->c
.type
=card
[btv
->c
.nr
];
2936 /* print which card config we are using */
2937 pr_info("%d: using: %s [card=%d,%s]\n",
2938 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
,
2939 card
[btv
->c
.nr
] < bttv_num_tvcards
2940 ? "insmod option" : "autodetected");
2942 /* overwrite gpio stuff ?? */
2943 if (UNSET
== audioall
&& UNSET
== audiomux
[0])
2946 if (UNSET
!= audiomux
[0]) {
2948 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2949 bttv_tvcards
[btv
->c
.type
].gpiomux
[i
] = audiomux
[i
];
2950 gpiobits
|= audiomux
[i
];
2953 gpiobits
= audioall
;
2954 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2955 bttv_tvcards
[btv
->c
.type
].gpiomux
[i
] = audioall
;
2958 bttv_tvcards
[btv
->c
.type
].gpiomask
= (UNSET
!= gpiomask
) ? gpiomask
: gpiobits
;
2959 pr_info("%d: gpio config override: mask=0x%x, mux=",
2960 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].gpiomask
);
2961 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2963 i
? "," : "", bttv_tvcards
[btv
->c
.type
].gpiomux
[i
]);
2969 * (most) board specific initialisations goes here
2972 /* Some Modular Technology cards have an eeprom, but no subsystem ID */
2973 static void identify_by_eeprom(struct bttv
*btv
, unsigned char eeprom_data
[256])
2977 if (0 == strncmp(eeprom_data
,"GET MM20xPCTV",13))
2978 type
= BTTV_BOARD_MODTEC_205
;
2979 else if (0 == strncmp(eeprom_data
+20,"Picolo",7))
2980 type
= BTTV_BOARD_EURESYS_PICOLO
;
2981 else if (eeprom_data
[0] == 0x84 && eeprom_data
[2]== 0)
2982 type
= BTTV_BOARD_HAUPPAUGE
; /* old bt848 */
2986 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2987 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
);
2991 static void flyvideo_gpio(struct bttv
*btv
)
2993 int gpio
, has_remote
, has_radio
, is_capture_only
;
2994 int is_lr90
, has_tda9820_tda9821
;
2995 int tuner_type
= UNSET
, ttype
;
2997 gpio_inout(0xffffff, 0);
2998 udelay(8); /* without this we would see the 0x1800 mask */
3000 /* FIXME: must restore OUR_EN ??? */
3002 /* all cards provide GPIO info, some have an additional eeprom
3003 * LR50: GPIO coding can be found lower right CP1 .. CP9
3004 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3006 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
3008 * lowest 3 bytes are remote control codes (no handshake needed)
3009 * xxxFFF: No remote control chip soldered
3010 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3011 * Note: Some bits are Audio_Mask !
3013 ttype
= (gpio
& 0x0f0000) >> 16;
3016 tuner_type
= 2; /* NTSC, e.g. TPI8NSR11P */
3019 tuner_type
= 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
3022 tuner_type
= 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
3025 tuner_type
= 37; /* LG PAL (newer TAPC series) TAPC-G702P */
3028 tuner_type
= 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
3031 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv
->c
.nr
);
3035 has_remote
= gpio
& 0x800000;
3036 has_radio
= gpio
& 0x400000;
3037 /* unknown 0x200000;
3038 * unknown2 0x100000; */
3039 is_capture_only
= !(gpio
& 0x008000); /* GPIO15 */
3040 has_tda9820_tda9821
= !(gpio
& 0x004000);
3041 is_lr90
= !(gpio
& 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3043 * gpio & 0x001000 output bit for audio routing */
3045 if (is_capture_only
)
3046 tuner_type
= TUNER_ABSENT
; /* No tuner present */
3048 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3049 btv
->c
.nr
, has_radio
? "yes" : "no",
3050 has_remote
? "yes" : "no", tuner_type
, gpio
);
3051 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3052 btv
->c
.nr
, is_lr90
? "yes" : "no",
3053 has_tda9820_tda9821
? "yes" : "no",
3054 is_capture_only
? "yes" : "no");
3056 if (tuner_type
!= UNSET
) /* only set if known tuner autodetected, else let insmod option through */
3057 btv
->tuner_type
= tuner_type
;
3058 btv
->has_radio
= has_radio
;
3060 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3061 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3062 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
3063 if (has_tda9820_tda9821
)
3064 btv
->audio_mode_gpio
= lt9415_audio
;
3065 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
3068 static int miro_tunermap
[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3069 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3070 static int miro_fmtuner
[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3071 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3073 static void miro_pinnacle_gpio(struct bttv
*btv
)
3078 gpio_inout(0xffffff, 0);
3080 id
= ((gpio
>>10) & 63) -1;
3081 msp
= bttv_I2CRead(btv
, I2C_ADDR_MSP3400
, "MSP34xx");
3083 btv
->tuner_type
= miro_tunermap
[id
];
3084 if (0 == (gpio
& 0x20)) {
3086 if (!miro_fmtuner
[id
]) {
3087 btv
->has_tea575x
= 1;
3088 btv
->tea_gpio
.wren
= 6;
3089 btv
->tea_gpio
.most
= 7;
3090 btv
->tea_gpio
.clk
= 8;
3091 btv
->tea_gpio
.data
= 9;
3098 if (btv
->c
.type
== BTTV_BOARD_MIRO
)
3099 btv
->c
.type
= BTTV_BOARD_MIROPRO
;
3100 if (btv
->c
.type
== BTTV_BOARD_PINNACLE
)
3101 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3103 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3104 btv
->c
.nr
, id
+1, btv
->tuner_type
,
3105 !btv
->has_radio
? "no" :
3106 (btv
->has_tea575x
? "tea575x" : "fmtuner"),
3107 (-1 == msp
) ? "no" : "yes");
3109 /* new cards with microtune tuner */
3114 info
= "PAL / mono";
3115 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3118 info
= "PAL+SECAM / stereo";
3120 btv
->tda9887_conf
= TDA9887_QSS
;
3123 info
= "NTSC / stereo";
3125 btv
->tda9887_conf
= TDA9887_QSS
;
3128 info
= "PAL+SECAM / mono";
3129 btv
->tda9887_conf
= TDA9887_QSS
;
3132 info
= "NTSC / mono";
3133 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3136 info
= "NTSC / stereo";
3137 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3140 info
= "PAL / stereo";
3141 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3144 info
= "oops: unknown card";
3148 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3149 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3150 btv
->c
.nr
, id
, info
, btv
->has_radio
? "yes" : "no");
3151 btv
->tuner_type
= TUNER_MT2032
;
3155 /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3156 #define LM1882_SYNC_DRIVE 0x200000L
3158 static void init_ids_eagle(struct bttv
*btv
)
3160 gpio_inout(0xffffff,0xFFFF37);
3161 gpio_write(0x200020);
3163 /* flash strobe inverter ?! */
3164 gpio_write(0x200024);
3166 /* switch sync drive off */
3167 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3169 /* set BT848 muxel to 2 */
3170 btaor((2)<<5, ~(2<<5), BT848_IFORM
);
3173 /* Muxsel helper for the IDS Eagle.
3174 * the eagles does not use the standard muxsel-bits but
3175 * has its own multiplexer */
3176 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
)
3178 gpio_bits(3, input
& 3);
3181 /* set chroma ADC to sleep */
3182 btor(BT848_ADC_C_SLEEP
, BT848_ADC
);
3183 /* set to composite video */
3184 btand(~BT848_CONTROL_COMP
, BT848_E_CONTROL
);
3185 btand(~BT848_CONTROL_COMP
, BT848_O_CONTROL
);
3187 /* switch sync drive off */
3188 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3191 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
)
3193 static const int masks
[] = {0x30, 0x01, 0x12, 0x23};
3194 gpio_write(masks
[input
%4]);
3197 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3200 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3201 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3203 IN - sensor inputs, INx - sensor inputs and TI XORed together
3204 O1,O2,O3 - alarm outputs (relays)
3206 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3210 static void init_lmlbt4x(struct bttv
*btv
)
3212 pr_debug("LMLBT4x init\n");
3213 btwrite(0x000000, BT848_GPIO_REG_INP
);
3214 gpio_inout(0xffffff, 0x0006C0);
3215 gpio_write(0x000000);
3218 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
)
3220 unsigned int inmux
= input
% 8;
3221 gpio_inout( 0xf, 0xf );
3222 gpio_bits( 0xf, inmux
);
3225 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
)
3227 unsigned int inmux
= input
% 4;
3228 gpio_inout( 3<<9, 3<<9 );
3229 gpio_bits( 3<<9, inmux
<<9 );
3232 static void geovision_muxsel(struct bttv
*btv
, unsigned int input
)
3234 unsigned int inmux
= input
% 16;
3235 gpio_inout(0xf, 0xf);
3236 gpio_bits(0xf, inmux
);
3240 * The TD3116 has 2 74HC4051 muxes wired to the MUX0 input of a bt878.
3241 * The first 74HC4051 has the lower 8 inputs, the second one the higher 8.
3242 * The muxes are controlled via a 74HC373 latch which is connected to
3243 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3244 * Q0 of the latch is connected to the Enable (~E) input of the first
3245 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3246 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3249 static void td3116_latch_value(struct bttv
*btv
, u32 value
)
3251 gpio_bits((1<<18) | 0xff, value
);
3252 gpio_bits((1<<18) | 0xff, (1<<18) | value
);
3254 gpio_bits((1<<18) | 0xff, value
);
3257 static void td3116_muxsel(struct bttv
*btv
, unsigned int input
)
3262 highbit
= (input
& 0x8) >> 3 ;
3264 /* Disable outputs and set value in the mux */
3265 value
= 0x11; /* Disable outputs */
3266 value
|= ((input
& 0x7) << 1) << (4 * highbit
);
3267 td3116_latch_value(btv
, value
);
3269 /* Enable the correct output */
3271 value
|= ((highbit
^ 0x1) << 4) | highbit
;
3272 td3116_latch_value(btv
, value
);
3275 /* ----------------------------------------------------------------------- */
3277 static void bttv_reset_audio(struct bttv
*btv
)
3280 * BT878A has a audio-reset register.
3281 * 1. This register is an audio reset function but it is in
3282 * function-0 (video capture) address space.
3283 * 2. It is enough to do this once per power-up of the card.
3284 * 3. There is a typo in the Conexant doc -- it is not at
3285 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3286 * --//Shrikumar 030609
3292 pr_debug("%d: BT878A ARESET\n", btv
->c
.nr
);
3293 btwrite((1<<7), 0x058);
3298 /* initialization part one -- before registering i2c bus */
3299 void bttv_init_card1(struct bttv
*btv
)
3301 switch (btv
->c
.type
) {
3302 case BTTV_BOARD_HAUPPAUGE
:
3303 case BTTV_BOARD_HAUPPAUGE878
:
3304 boot_msp34xx(btv
,5);
3306 case BTTV_BOARD_VOODOOTV_200
:
3307 case BTTV_BOARD_VOODOOTV_FM
:
3308 boot_msp34xx(btv
,20);
3310 case BTTV_BOARD_AVERMEDIA98
:
3311 boot_msp34xx(btv
,11);
3313 case BTTV_BOARD_HAUPPAUGEPVR
:
3316 case BTTV_BOARD_TWINHAN_DST
:
3317 case BTTV_BOARD_AVDVBT_771
:
3318 case BTTV_BOARD_PINNACLESAT
:
3319 btv
->use_i2c_hw
= 1;
3321 case BTTV_BOARD_ADLINK_RTV24
:
3324 case BTTV_BOARD_PCI_8604PW
:
3325 init_PCI8604PW(btv
);
3329 if (!bttv_tvcards
[btv
->c
.type
].has_dvb
)
3330 bttv_reset_audio(btv
);
3333 /* initialization part two -- after registering i2c bus */
3334 void bttv_init_card2(struct bttv
*btv
)
3336 btv
->tuner_type
= UNSET
;
3338 if (BTTV_BOARD_UNKNOWN
== btv
->c
.type
) {
3339 bttv_readee(btv
,eeprom_data
,0xa0);
3340 identify_by_eeprom(btv
,eeprom_data
);
3343 switch (btv
->c
.type
) {
3344 case BTTV_BOARD_MIRO
:
3345 case BTTV_BOARD_MIROPRO
:
3346 case BTTV_BOARD_PINNACLE
:
3347 case BTTV_BOARD_PINNACLEPRO
:
3349 miro_pinnacle_gpio(btv
);
3351 case BTTV_BOARD_FLYVIDEO_98
:
3352 case BTTV_BOARD_MAXI
:
3353 case BTTV_BOARD_LIFE_FLYKIT
:
3354 case BTTV_BOARD_FLYVIDEO
:
3355 case BTTV_BOARD_TYPHOON_TVIEW
:
3356 case BTTV_BOARD_CHRONOS_VS2
:
3357 case BTTV_BOARD_FLYVIDEO_98FM
:
3358 case BTTV_BOARD_FLYVIDEO2000
:
3359 case BTTV_BOARD_FLYVIDEO98EZ
:
3360 case BTTV_BOARD_CONFERENCETV
:
3361 case BTTV_BOARD_LIFETEC_9415
:
3364 case BTTV_BOARD_HAUPPAUGE
:
3365 case BTTV_BOARD_HAUPPAUGE878
:
3366 case BTTV_BOARD_HAUPPAUGEPVR
:
3367 /* pick up some config infos from the eeprom */
3368 bttv_readee(btv
,eeprom_data
,0xa0);
3369 hauppauge_eeprom(btv
);
3371 case BTTV_BOARD_AVERMEDIA98
:
3372 case BTTV_BOARD_AVPHONE98
:
3373 bttv_readee(btv
,eeprom_data
,0xa0);
3374 avermedia_eeprom(btv
);
3376 case BTTV_BOARD_PXC200
:
3379 case BTTV_BOARD_PICOLO_TETRA_CHIP
:
3380 picolo_tetra_init(btv
);
3382 case BTTV_BOARD_VHX
:
3384 btv
->has_tea575x
= 1;
3385 btv
->tea_gpio
.wren
= 5;
3386 btv
->tea_gpio
.most
= 6;
3387 btv
->tea_gpio
.clk
= 3;
3388 btv
->tea_gpio
.data
= 4;
3391 case BTTV_BOARD_VOBIS_BOOSTAR
:
3392 case BTTV_BOARD_TERRATV
:
3393 terratec_active_radio_upgrade(btv
);
3395 case BTTV_BOARD_MAGICTVIEW061
:
3396 if (btv
->cardid
== 0x3002144f) {
3398 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3402 case BTTV_BOARD_STB2
:
3403 if (btv
->cardid
== 0x3060121a) {
3404 /* Fix up entry for 3DFX VoodooTV 100,
3405 which is an OEM STB card variant. */
3407 btv
->tuner_type
=TUNER_TEMIC_NTSC
;
3410 case BTTV_BOARD_OSPREY1x0
:
3411 case BTTV_BOARD_OSPREY1x0_848
:
3412 case BTTV_BOARD_OSPREY101_848
:
3413 case BTTV_BOARD_OSPREY1x1
:
3414 case BTTV_BOARD_OSPREY1x1_SVID
:
3415 case BTTV_BOARD_OSPREY2xx
:
3416 case BTTV_BOARD_OSPREY2x0_SVID
:
3417 case BTTV_BOARD_OSPREY2x0
:
3418 case BTTV_BOARD_OSPREY440
:
3419 case BTTV_BOARD_OSPREY500
:
3420 case BTTV_BOARD_OSPREY540
:
3421 case BTTV_BOARD_OSPREY2000
:
3422 bttv_readee(btv
,eeprom_data
,0xa0);
3423 osprey_eeprom(btv
, eeprom_data
);
3425 case BTTV_BOARD_IDS_EAGLE
:
3426 init_ids_eagle(btv
);
3428 case BTTV_BOARD_MODTEC_205
:
3429 bttv_readee(btv
,eeprom_data
,0xa0);
3432 case BTTV_BOARD_LMLBT4
:
3435 case BTTV_BOARD_TIBET_CS16
:
3436 tibetCS16_init(btv
);
3438 case BTTV_BOARD_KODICOM_4400R
:
3439 kodicom4400r_init(btv
);
3441 case BTTV_BOARD_GEOVISION_GV800S
:
3446 /* pll configuration */
3447 if (!(btv
->id
==848 && btv
->revision
==0x11)) {
3448 /* defaults from card list */
3449 if (PLL_28
== bttv_tvcards
[btv
->c
.type
].pll
) {
3450 btv
->pll
.pll_ifreq
=28636363;
3451 btv
->pll
.pll_crystal
=BT848_IFORM_XT0
;
3453 if (PLL_35
== bttv_tvcards
[btv
->c
.type
].pll
) {
3454 btv
->pll
.pll_ifreq
=35468950;
3455 btv
->pll
.pll_crystal
=BT848_IFORM_XT1
;
3457 if (PLL_14
== bttv_tvcards
[btv
->c
.type
].pll
) {
3458 btv
->pll
.pll_ifreq
= 14318181;
3459 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3461 /* insmod options can override */
3462 switch (pll
[btv
->c
.nr
]) {
3464 btv
->pll
.pll_crystal
= 0;
3465 btv
->pll
.pll_ifreq
= 0;
3466 btv
->pll
.pll_ofreq
= 0;
3468 case 1: /* 28 MHz */
3470 btv
->pll
.pll_ifreq
= 28636363;
3471 btv
->pll
.pll_ofreq
= 0;
3472 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3474 case 2: /* 35 MHz */
3476 btv
->pll
.pll_ifreq
= 35468950;
3477 btv
->pll
.pll_ofreq
= 0;
3478 btv
->pll
.pll_crystal
= BT848_IFORM_XT1
;
3480 case 3: /* 14 MHz */
3482 btv
->pll
.pll_ifreq
= 14318181;
3483 btv
->pll
.pll_ofreq
= 0;
3484 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3488 btv
->pll
.pll_current
= -1;
3490 /* tuner configuration (from card list / autodetect / insmod option) */
3491 if (UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_type
)
3492 if (UNSET
== btv
->tuner_type
)
3493 btv
->tuner_type
= bttv_tvcards
[btv
->c
.type
].tuner_type
;
3494 if (UNSET
!= tuner
[btv
->c
.nr
])
3495 btv
->tuner_type
= tuner
[btv
->c
.nr
];
3497 if (btv
->tuner_type
== TUNER_ABSENT
)
3498 pr_info("%d: tuner absent\n", btv
->c
.nr
);
3499 else if (btv
->tuner_type
== UNSET
)
3500 pr_warn("%d: tuner type unset\n", btv
->c
.nr
);
3502 pr_info("%d: tuner type=%d\n", btv
->c
.nr
, btv
->tuner_type
);
3504 if (autoload
!= UNSET
) {
3505 pr_warn("%d: the autoload option is obsolete\n", btv
->c
.nr
);
3506 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3510 if (UNSET
== btv
->tuner_type
)
3511 btv
->tuner_type
= TUNER_ABSENT
;
3513 btv
->dig
= bttv_tvcards
[btv
->c
.type
].has_dig_in
?
3514 bttv_tvcards
[btv
->c
.type
].video_inputs
- 1 : UNSET
;
3515 btv
->svhs
= bttv_tvcards
[btv
->c
.type
].svhs
== NO_SVHS
?
3516 UNSET
: bttv_tvcards
[btv
->c
.type
].svhs
;
3517 if (svhs
[btv
->c
.nr
] != UNSET
)
3518 btv
->svhs
= svhs
[btv
->c
.nr
];
3519 if (remote
[btv
->c
.nr
] != UNSET
)
3520 btv
->has_remote
= remote
[btv
->c
.nr
];
3522 if (bttv_tvcards
[btv
->c
.type
].has_radio
)
3524 if (bttv_tvcards
[btv
->c
.type
].has_remote
)
3525 btv
->has_remote
= 1;
3526 if (!bttv_tvcards
[btv
->c
.type
].no_gpioirq
)
3528 if (bttv_tvcards
[btv
->c
.type
].volume_gpio
)
3529 btv
->volume_gpio
= bttv_tvcards
[btv
->c
.type
].volume_gpio
;
3530 if (bttv_tvcards
[btv
->c
.type
].audio_mode_gpio
)
3531 btv
->audio_mode_gpio
= bttv_tvcards
[btv
->c
.type
].audio_mode_gpio
;
3533 if (btv
->tuner_type
== TUNER_ABSENT
)
3534 return; /* no tuner or related drivers to load */
3536 if (btv
->has_saa6588
|| saa6588
[btv
->c
.nr
]) {
3537 /* Probe for RDS receiver chip */
3538 static const unsigned short addrs
[] = {
3543 struct v4l2_subdev
*sd
;
3545 sd
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3546 &btv
->c
.i2c_adap
, "saa6588", 0, addrs
);
3547 btv
->has_saa6588
= (sd
!= NULL
);
3550 /* try to detect audio/fader chips */
3552 /* First check if the user specified the audio chip via a module
3555 switch (audiodev
[btv
->c
.nr
]) {
3557 return; /* do not load any audio module */
3559 case 0: /* autodetect */
3563 /* The user specified that we should probe for msp3400 */
3564 static const unsigned short addrs
[] = {
3565 I2C_ADDR_MSP3400
>> 1,
3566 I2C_ADDR_MSP3400_ALT
>> 1,
3570 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3571 &btv
->c
.i2c_adap
, "msp3400", 0, addrs
);
3572 if (btv
->sd_msp34xx
)
3578 /* The user specified that we should probe for tda7432 */
3579 static const unsigned short addrs
[] = {
3580 I2C_ADDR_TDA7432
>> 1,
3584 if (v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3585 &btv
->c
.i2c_adap
, "tda7432", 0, addrs
))
3591 /* The user specified that we should probe for tvaudio */
3592 btv
->sd_tvaudio
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3593 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3594 if (btv
->sd_tvaudio
)
3600 pr_warn("%d: unknown audiodev value!\n", btv
->c
.nr
);
3604 /* There were no overrides, so now we try to discover this through the
3607 /* probe for msp3400 first: this driver can detect whether or not
3608 it really is a msp3400, so it will return NULL when the device
3609 found is really something else (e.g. a tea6300). */
3610 if (!bttv_tvcards
[btv
->c
.type
].no_msp34xx
) {
3611 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3612 &btv
->c
.i2c_adap
, "msp3400",
3613 0, I2C_ADDRS(I2C_ADDR_MSP3400
>> 1));
3614 } else if (bttv_tvcards
[btv
->c
.type
].msp34xx_alt
) {
3615 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3616 &btv
->c
.i2c_adap
, "msp3400",
3617 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT
>> 1));
3620 /* If we found a msp34xx, then we're done. */
3621 if (btv
->sd_msp34xx
)
3624 /* Now see if we can find one of the tvaudio devices. */
3625 btv
->sd_tvaudio
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3626 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3627 if (btv
->sd_tvaudio
) {
3628 /* There may be two tvaudio chips on the card, so try to
3630 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3631 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3634 /* it might also be a tda7432. */
3635 if (!bttv_tvcards
[btv
->c
.type
].no_tda7432
) {
3636 static const unsigned short addrs
[] = {
3637 I2C_ADDR_TDA7432
>> 1,
3641 btv
->sd_tda7432
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3642 &btv
->c
.i2c_adap
, "tda7432", 0, addrs
);
3643 if (btv
->sd_tda7432
)
3646 if (btv
->sd_tvaudio
)
3650 pr_warn("%d: audio absent, no audio device found!\n", btv
->c
.nr
);
3654 /* initialize the tuner */
3655 void bttv_init_tuner(struct bttv
*btv
)
3657 int addr
= ADDR_UNSET
;
3659 if (ADDR_UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_addr
)
3660 addr
= bttv_tvcards
[btv
->c
.type
].tuner_addr
;
3662 if (btv
->tuner_type
!= TUNER_ABSENT
) {
3663 struct tuner_setup tun_setup
;
3665 /* Load tuner module before issuing tuner config call! */
3667 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3668 &btv
->c
.i2c_adap
, "tuner",
3669 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO
));
3670 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3671 &btv
->c
.i2c_adap
, "tuner",
3672 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD
));
3673 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3674 &btv
->c
.i2c_adap
, "tuner",
3675 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD
));
3677 tun_setup
.mode_mask
= T_ANALOG_TV
;
3678 tun_setup
.type
= btv
->tuner_type
;
3679 tun_setup
.addr
= addr
;
3682 tun_setup
.mode_mask
|= T_RADIO
;
3684 bttv_call_all(btv
, tuner
, s_type_addr
, &tun_setup
);
3687 if (btv
->tda9887_conf
) {
3688 struct v4l2_priv_tun_config tda9887_cfg
;
3690 tda9887_cfg
.tuner
= TUNER_TDA9887
;
3691 tda9887_cfg
.priv
= &btv
->tda9887_conf
;
3693 bttv_call_all(btv
, tuner
, s_config
, &tda9887_cfg
);
3697 /* ----------------------------------------------------------------------- */
3699 static void modtec_eeprom(struct bttv
*btv
)
3701 if( strncmp(&(eeprom_data
[0x1e]),"Temic 4066 FY5",14) ==0) {
3702 btv
->tuner_type
=TUNER_TEMIC_4066FY5_PAL_I
;
3703 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3704 btv
->c
.nr
, &eeprom_data
[0x1e]);
3705 } else if (strncmp(&(eeprom_data
[0x1e]),"Alps TSBB5",10) ==0) {
3706 btv
->tuner_type
=TUNER_ALPS_TSBB5_PAL_I
;
3707 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3708 btv
->c
.nr
, &eeprom_data
[0x1e]);
3709 } else if (strncmp(&(eeprom_data
[0x1e]),"Philips FM1246",14) ==0) {
3710 btv
->tuner_type
=TUNER_PHILIPS_NTSC
;
3711 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3712 btv
->c
.nr
, &eeprom_data
[0x1e]);
3714 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3715 btv
->c
.nr
, &eeprom_data
[0x1e]);
3719 static void hauppauge_eeprom(struct bttv
*btv
)
3723 tveeprom_hauppauge_analog(&btv
->i2c_client
, &tv
, eeprom_data
);
3724 btv
->tuner_type
= tv
.tuner_type
;
3725 btv
->has_radio
= tv
.has_radio
;
3727 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
3728 btv
->c
.nr
, tv
.model
);
3731 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3732 * type based on model #.
3734 if(tv
.model
== 64900) {
3735 pr_info("%d: Switching board type from %s to %s\n",
3737 bttv_tvcards
[btv
->c
.type
].name
,
3738 bttv_tvcards
[BTTV_BOARD_HAUPPAUGE_IMPACTVCB
].name
);
3739 btv
->c
.type
= BTTV_BOARD_HAUPPAUGE_IMPACTVCB
;
3742 /* The 61334 needs the msp3410 to do the radio demod to get sound */
3743 if (tv
.model
== 61334)
3744 btv
->radio_uses_msp_demodulator
= 1;
3747 /* ----------------------------------------------------------------------- */
3749 static void bttv_tea575x_set_pins(struct snd_tea575x
*tea
, u8 pins
)
3751 struct bttv
*btv
= tea
->private_data
;
3752 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3755 val
|= (pins
& TEA575X_DATA
) ? (1 << gpio
.data
) : 0;
3756 val
|= (pins
& TEA575X_CLK
) ? (1 << gpio
.clk
) : 0;
3757 val
|= (pins
& TEA575X_WREN
) ? (1 << gpio
.wren
) : 0;
3759 gpio_bits((1 << gpio
.data
) | (1 << gpio
.clk
) | (1 << gpio
.wren
), val
);
3760 if (btv
->mbox_ior
) {
3761 /* IOW and CSEL active */
3762 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3765 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3766 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3770 static u8
bttv_tea575x_get_pins(struct snd_tea575x
*tea
)
3772 struct bttv
*btv
= tea
->private_data
;
3773 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3777 if (btv
->mbox_ior
) {
3778 /* IOR and CSEL active */
3779 gpio_bits(btv
->mbox_ior
| btv
->mbox_csel
, 0);
3783 if (btv
->mbox_ior
) {
3785 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3786 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3789 if (val
& (1 << gpio
.data
))
3790 ret
|= TEA575X_DATA
;
3791 if (val
& (1 << gpio
.most
))
3792 ret
|= TEA575X_MOST
;
3797 static void bttv_tea575x_set_direction(struct snd_tea575x
*tea
, bool output
)
3799 struct bttv
*btv
= tea
->private_data
;
3800 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3801 u32 mask
= (1 << gpio
.clk
) | (1 << gpio
.wren
) | (1 << gpio
.data
) |
3805 gpio_inout(mask
, (1 << gpio
.data
) | (1 << gpio
.clk
) |
3808 gpio_inout(mask
, (1 << gpio
.clk
) | (1 << gpio
.wren
));
3811 static struct snd_tea575x_ops bttv_tea_ops
= {
3812 .set_pins
= bttv_tea575x_set_pins
,
3813 .get_pins
= bttv_tea575x_get_pins
,
3814 .set_direction
= bttv_tea575x_set_direction
,
3817 static int tea575x_init(struct bttv
*btv
)
3819 btv
->tea
.private_data
= btv
;
3820 btv
->tea
.ops
= &bttv_tea_ops
;
3821 if (!snd_tea575x_hw_init(&btv
->tea
)) {
3822 pr_info("%d: detected TEA575x radio\n", btv
->c
.nr
);
3823 btv
->tea
.mute
= false;
3827 btv
->has_tea575x
= 0;
3833 /* ----------------------------------------------------------------------- */
3835 static int terratec_active_radio_upgrade(struct bttv
*btv
)
3838 btv
->has_tea575x
= 1;
3839 btv
->tea_gpio
.wren
= 4;
3840 btv
->tea_gpio
.most
= 5;
3841 btv
->tea_gpio
.clk
= 3;
3842 btv
->tea_gpio
.data
= 2;
3844 btv
->mbox_iow
= 1 << 8;
3845 btv
->mbox_ior
= 1 << 9;
3846 btv
->mbox_csel
= 1 << 10;
3848 if (!tea575x_init(btv
)) {
3849 pr_info("%d: Terratec Active Radio Upgrade found\n", btv
->c
.nr
);
3850 btv
->has_saa6588
= 1;
3857 /* ----------------------------------------------------------------------- */
3860 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3862 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3863 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3864 * unpacked with unzip).
3866 #define PVR_GPIO_DELAY 10
3868 #define BTTV_ALT_DATA 0x000001
3869 #define BTTV_ALT_DCLK 0x100000
3870 #define BTTV_ALT_NCONFIG 0x800000
3872 static int pvr_altera_load(struct bttv
*btv
, const u8
*micro
, u32 microlen
)
3878 gpio_inout(0xffffff,BTTV_ALT_DATA
|BTTV_ALT_DCLK
|BTTV_ALT_NCONFIG
);
3880 udelay(PVR_GPIO_DELAY
);
3882 gpio_write(BTTV_ALT_NCONFIG
);
3883 udelay(PVR_GPIO_DELAY
);
3885 for (n
= 0; n
< microlen
; n
++) {
3887 for (i
= 0 ; i
< 8 ; i
++) {
3888 gpio_bits(BTTV_ALT_DCLK
,0);
3890 gpio_bits(BTTV_ALT_DATA
,BTTV_ALT_DATA
);
3892 gpio_bits(BTTV_ALT_DATA
,0);
3893 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3897 gpio_bits(BTTV_ALT_DCLK
,0);
3898 udelay(PVR_GPIO_DELAY
);
3900 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3901 for (i
= 0 ; i
< 30 ; i
++) {
3902 gpio_bits(BTTV_ALT_DCLK
,0);
3903 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3905 gpio_bits(BTTV_ALT_DCLK
,0);
3909 static int pvr_boot(struct bttv
*btv
)
3911 const struct firmware
*fw_entry
;
3914 rc
= request_firmware(&fw_entry
, "hcwamc.rbf", &btv
->c
.pci
->dev
);
3916 pr_warn("%d: no altera firmware [via hotplug]\n", btv
->c
.nr
);
3919 rc
= pvr_altera_load(btv
, fw_entry
->data
, fw_entry
->size
);
3920 pr_info("%d: altera firmware upload %s\n",
3921 btv
->c
.nr
, (rc
< 0) ? "failed" : "ok");
3922 release_firmware(fw_entry
);
3926 /* ----------------------------------------------------------------------- */
3927 /* some osprey specific stuff */
3929 static void osprey_eeprom(struct bttv
*btv
, const u8 ee
[256])
3935 /* This code will nevery actually get called in this case.... */
3936 if (btv
->c
.type
== BTTV_BOARD_UNKNOWN
) {
3937 /* this might be an antique... check for MMAC label in eeprom */
3938 if (!strncmp(ee
, "MMAC", 4)) {
3940 for (i
= 0; i
< 21; i
++)
3942 if (checksum
!= ee
[21])
3944 cardid
= BTTV_BOARD_OSPREY1x0_848
;
3945 for (i
= 12; i
< 21; i
++)
3946 serial
*= 10, serial
+= ee
[i
] - '0';
3949 unsigned short type
;
3951 for (i
= 4 * 16; i
< 8 * 16; i
+= 16) {
3952 u16 checksum
= (__force u16
)ip_compute_csum(ee
+ i
, 16);
3954 if ((checksum
& 0xff) + (checksum
>> 8) == 0xff)
3961 /* found a valid descriptor */
3962 type
= get_unaligned_be16((__be16
*)(ee
+4));
3967 cardid
= BTTV_BOARD_OSPREY1x0_848
;
3970 cardid
= BTTV_BOARD_OSPREY101_848
;
3976 cardid
= BTTV_BOARD_OSPREY1x0
;
3980 cardid
= BTTV_BOARD_OSPREY1x1
;
3985 cardid
= BTTV_BOARD_OSPREY1x1_SVID
;
3991 cardid
= BTTV_BOARD_OSPREY2xx
;
3995 cardid
= BTTV_BOARD_OSPREY2x0_SVID
;
3998 cardid
= BTTV_BOARD_OSPREY500
;
4002 cardid
= BTTV_BOARD_OSPREY540
;
4003 /* bttv_osprey_540_init(btv); */
4008 cardid
= BTTV_BOARD_OSPREY2x0
;
4009 /* enable output on select control lines */
4010 gpio_inout(0xffffff,0x000303);
4013 cardid
= BTTV_BOARD_OSPREY440
;
4016 /* unknown...leave generic, but get serial # */
4017 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
4021 serial
= get_unaligned_be32((__be32
*)(ee
+6));
4024 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
4026 cardid
> 0 ? bttv_tvcards
[cardid
].name
: "Unknown", serial
);
4028 if (cardid
<0 || btv
->c
.type
== cardid
)
4031 /* card type isn't set correctly */
4032 if (card
[btv
->c
.nr
] < bttv_num_tvcards
) {
4033 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
4036 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
4037 btv
->c
.nr
, btv
->c
.type
, cardid
);
4038 btv
->c
.type
= cardid
;
4042 /* ----------------------------------------------------------------------- */
4043 /* AVermedia specific stuff, from bktr_card.c */
4045 static int tuner_0_table
[] = {
4046 TUNER_PHILIPS_NTSC
, TUNER_PHILIPS_PAL
/* PAL-BG*/,
4047 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
/* PAL-I*/,
4048 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
,
4049 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_SECAM
,
4050 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_PAL
,
4051 TUNER_PHILIPS_FM1216ME_MK3
};
4053 static int tuner_1_table
[] = {
4054 TUNER_TEMIC_NTSC
, TUNER_TEMIC_PAL
,
4055 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
4056 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
4057 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_4012FY5
, /* TUNER_TEMIC_SECAM */
4058 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_PAL
};
4060 static void avermedia_eeprom(struct bttv
*btv
)
4062 int tuner_make
, tuner_tv_fm
, tuner_format
, tuner_type
= 0;
4064 tuner_make
= (eeprom_data
[0x41] & 0x7);
4065 tuner_tv_fm
= (eeprom_data
[0x41] & 0x18) >> 3;
4066 tuner_format
= (eeprom_data
[0x42] & 0xf0) >> 4;
4067 btv
->has_remote
= (eeprom_data
[0x42] & 0x01);
4069 if (tuner_make
== 0 || tuner_make
== 2)
4070 if (tuner_format
<= 0x0a)
4071 tuner_type
= tuner_0_table
[tuner_format
];
4072 if (tuner_make
== 1)
4073 if (tuner_format
<= 9)
4074 tuner_type
= tuner_1_table
[tuner_format
];
4076 if (tuner_make
== 4)
4077 if (tuner_format
== 0x09)
4078 tuner_type
= TUNER_LG_NTSC_NEW_TAPC
; /* TAPC-G702P */
4080 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
4081 btv
->c
.nr
, eeprom_data
[0x41], eeprom_data
[0x42]);
4083 btv
->tuner_type
= tuner_type
;
4084 pr_cont("%d", tuner_type
);
4086 pr_cont("Unknown type");
4087 pr_cont(" radio:%s remote control:%s\n",
4088 tuner_tv_fm
? "yes" : "no",
4089 btv
->has_remote
? "yes" : "no");
4093 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
4094 * analog demod, which is not I2C controlled like the newer and more common
4095 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
4096 * that control the IF for the video and audio. Apparently, bttv GPIO
4097 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
4098 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
4100 u32
bttv_tda9880_setnorm(struct bttv
*btv
, u32 gpiobits
)
4103 if (btv
->audio_input
== TVAUDIO_INPUT_TUNER
) {
4104 if (bttv_tvnorms
[btv
->tvnorm
].v4l2_id
& V4L2_STD_MN
)
4105 gpiobits
|= 0x10000;
4107 gpiobits
&= ~0x10000;
4110 gpio_bits(bttv_tvcards
[btv
->c
.type
].gpiomask
, gpiobits
);
4116 * reset/enable the MSP on some Hauppauge cards
4117 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
4122 static void boot_msp34xx(struct bttv
*btv
, int pin
)
4124 int mask
= (1 << pin
);
4126 gpio_inout(mask
,mask
);
4130 gpio_bits(mask
,mask
);
4133 bttv_gpio_tracking(btv
,"msp34xx");
4135 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
4139 /* ----------------------------------------------------------------------- */
4140 /* Imagenation L-Model PXC200 Framegrabber */
4141 /* This is basically the same procedure as
4142 * used by Alessandro Rubini in his pxc200
4143 * driver, but using BTTV functions */
4145 static void init_PXC200(struct bttv
*btv
)
4147 static int vals
[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02,
4148 0x03, 0x04, 0x05, 0x06, 0x00 };
4153 /* Initialise GPIO-connevted stuff */
4154 gpio_inout(0xffffff, (1<<13));
4158 /* GPIO inputs are pulled up, so no need to drive
4159 * reset pin any longer */
4160 gpio_bits(0xffffff, 0);
4162 bttv_gpio_tracking(btv
,"pxc200");
4164 /* we could/should try and reset/control the AD pots? but
4165 right now we simply turned off the crushing. Without
4166 this the AGC drifts drifts
4167 remember the EN is reverse logic -->
4168 setting BT848_ADC_AGC_EN disable the AGC
4169 tboult@eecs.lehigh.edu
4172 btwrite(BT848_ADC_RESERVED
|BT848_ADC_AGC_EN
, BT848_ADC
);
4174 /* Initialise MAX517 DAC */
4175 pr_info("Setting DAC reference voltage level ...\n");
4176 bttv_I2CWrite(btv
,0x5E,0,0x80,1);
4178 /* Initialise 12C508 PIC */
4179 /* The I2CWrite and I2CRead commmands are actually to the
4180 * same chips - but the R/W bit is included in the address
4181 * argument so the numbers are different */
4184 pr_info("Initialising 12C508 PIC chip ...\n");
4186 /* First of all, enable the clock line. This is used in the PXC200-F */
4187 val
= btread(BT848_GPIO_DMA_CTL
);
4188 val
|= BT848_GPIO_DMA_CTL_GPCLKMODE
;
4189 btwrite(val
, BT848_GPIO_DMA_CTL
);
4191 /* Then, push to 0 the reset pin long enough to reset the *
4192 * device same as above for the reset line, but not the same
4193 * value sent to the GPIO-connected stuff
4194 * which one is the good one? */
4195 gpio_inout(0xffffff,(1<<2));
4200 for (i
= 0; i
< ARRAY_SIZE(vals
); i
++) {
4201 tmp
=bttv_I2CWrite(btv
,0x1E,0,vals
[i
],1);
4203 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4204 vals
[i
],tmp
,bttv_I2CRead(btv
,0x1F,NULL
));
4208 pr_info("PXC200 Initialised\n");
4213 /* ----------------------------------------------------------------------- */
4215 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4216 * it. This apparently involves the following procedure for each 878 chip:
4218 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4220 * 2) write to GPIO_DATA
4226 * read from GPIO_DATA into buf (uint_32)
4227 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4228 * error. ERROR_CPLD_Check_Failed stop.
4230 * 3) write to GPIO_DATA
4231 * - write 0x4400 + 0x0E
4233 * - write 0x4410 + 0x0E
4236 * read from GPIO_DATA into buf (uint_32)
4237 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
4238 * error. ERROR_CPLD_Check_Failed.
4240 /* ----------------------------------------------------------------------- */
4242 init_RTV24 (struct bttv
*btv
)
4244 uint32_t dataRead
= 0;
4245 long watchdog_value
= 0x0E;
4247 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
4250 btwrite (0x00c3feff, BT848_GPIO_OUT_EN
);
4252 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
4254 btwrite (0x10 + watchdog_value
, BT848_GPIO_DATA
);
4256 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
4258 dataRead
= btread (BT848_GPIO_DATA
);
4260 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 1)) {
4261 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4262 btv
->c
.nr
, dataRead
);
4265 btwrite (0x4400 + watchdog_value
, BT848_GPIO_DATA
);
4267 btwrite (0x4410 + watchdog_value
, BT848_GPIO_DATA
);
4269 btwrite (watchdog_value
, BT848_GPIO_DATA
);
4271 dataRead
= btread (BT848_GPIO_DATA
);
4273 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 0)) {
4274 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4275 btv
->c
.nr
, dataRead
);
4280 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv
->c
.nr
);
4285 /* ----------------------------------------------------------------------- */
4287 * The PCI-8604PW contains a CPLD, probably an ispMACH 4A, that filters
4288 * the PCI REQ signals comming from the four BT878 chips. After power
4289 * up, the CPLD does not forward requests to the bus, which prevents
4290 * the BT878 from fetching RISC instructions from memory. While the
4291 * CPLD is connected to most of the GPIOs of PCI device 0xD, only
4292 * five appear to play a role in unlocking the REQ signal. The following
4293 * sequence has been determined by trial and error without access to the
4296 * Eight GPIOs of device 0xC are provided on connector CN4 (4 in, 4 out).
4297 * Devices 0xE and 0xF do not appear to have anything connected to their
4300 * The correct GPIO_OUT_EN value might have some more bits set. It should
4301 * be possible to derive it from a boundary scan of the CPLD. Its JTAG
4302 * pins are routed to test points.
4305 /* ----------------------------------------------------------------------- */
4307 init_PCI8604PW(struct bttv
*btv
)
4311 if ((PCI_SLOT(btv
->c
.pci
->devfn
) & ~3) != 0xC) {
4312 pr_warn("This is not a PCI-8604PW\n");
4316 if (PCI_SLOT(btv
->c
.pci
->devfn
) != 0xD)
4319 btwrite(0x080002, BT848_GPIO_OUT_EN
);
4321 state
= (btread(BT848_GPIO_DATA
) >> 21) & 7;
4329 pr_debug("PCI-8604PW in state %i, toggling pin\n",
4331 btwrite(0x080000, BT848_GPIO_DATA
);
4333 btwrite(0x000000, BT848_GPIO_DATA
);
4337 pr_info("PCI-8604PW unlocked\n");
4340 /* FIXME: If we are in state 7 and toggle GPIO[19] one
4341 more time, the CPLD goes into state 0, where PCI bus
4342 mastering is inhibited again. We have not managed to
4343 get out of that state. */
4345 pr_err("PCI-8604PW locked until reset\n");
4348 pr_err("PCI-8604PW in unknown state %i\n", state
);
4352 state
= (state
<< 4) | ((btread(BT848_GPIO_DATA
) >> 21) & 7);
4359 /* The transition from state 7 to state 0 is, as explained
4360 above, valid but undesired and with this code impossible
4361 as we exit as soon as we are in state 7.
4365 pr_err("PCI-8604PW invalid transition %i -> %i\n",
4366 state
>> 4, state
& 7);
4373 /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4375 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4376 * switch instead (CD22M3494E). This IC can have multiple active connections
4377 * between Xn (input) and Yn (output) pins. We need to clear any existing
4378 * connection prior to establish a new one, pulsing the STROBE pin.
4380 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4381 * GPIO pins are wired as:
4382 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4383 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4384 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4385 * GPIO[8] - - P3[5] (microcontroller)
4386 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4387 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4388 * GPINTR - - P3[4] (microcontroller)
4390 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4391 * configuration either directly (as we are doing) or using the microcontroller
4392 * which is also wired to I2C interface. I have no further info on the
4393 * microcontroller features, one would need to disassembly the firmware.
4394 * note: the vendor refused to give any information on this product, all
4395 * that stuff was found using a multimeter! :)
4397 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
)
4399 static const u8 muxgpio
[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4400 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4402 gpio_bits(0x07f, muxgpio
[input
]);
4404 /* reset all conections */
4405 gpio_bits(0x200,0x200);
4407 gpio_bits(0x200,0x000);
4410 /* create a new connection */
4411 gpio_bits(0x480,0x480);
4413 gpio_bits(0x480,0x080);
4417 /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4419 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4420 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
4421 * chips, ten eight input analog multiplexors, a not chip and a few
4424 * 16 inputs on a secondary bracket are provided and can be selected
4425 * from each of the four capture chips. Two of the eight input
4426 * multiplexors are used to select from any of the 16 input signals.
4428 * Unsupported hardware capabilities:
4429 * . A video output monitor on the secondary bracket can be selected from
4430 * one of the 878A chips.
4431 * . Another passthrough but I haven't spent any time investigating it.
4432 * . Digital I/O (logic level connected to GPIO) is available from an
4435 * The on chip input mux should always be set to 2.
4436 * GPIO[16:19] - Video input selection
4437 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4438 * GPIO[?:?] - Digital I/O.
4440 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4441 * determined what function (if any) it provides. With the microcontroller
4442 * and sync separator chips a guess is that it might have to do with video
4443 * switching and maybe some digital I/O.
4445 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
)
4448 gpio_bits(0x0f0000, input
<< 16);
4451 static void tibetCS16_init(struct bttv
*btv
)
4453 /* enable gpio bits, mask obtained via btSpy */
4454 gpio_inout(0xffffff, 0x0f7fff);
4455 gpio_write(0x0f7fff);
4459 * The following routines for the Kodicom-4400r get a little mind-twisting.
4460 * There is a "master" controller and three "slave" controllers, together
4461 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4462 * The analog switch is controlled by the "master", but the detection order
4463 * of the four BT878A chips is in an order which I just don't understand.
4464 * The "master" is actually the second controller to be detected. The
4465 * logic on the board uses logical numbers for the 4 controllers, but
4466 * those numbers are different from the detection sequence. When working
4467 * with the analog switch, we need to "map" from the detection sequence
4468 * over to the board's logical controller number. This mapping sequence
4469 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4470 * unit 3, the second (which is the master) is logical unit 0, etc.
4471 * We need to maintain the status of the analog switch (which of the 16
4472 * cameras is connected to which of the 4 controllers) in sw_status array.
4476 * First a routine to set the analog switch, which controls which camera
4477 * is routed to which controller. The switch comprises an X-address
4478 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4479 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4480 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4481 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4482 * specified address. The idea is to set the address and data, then bring
4483 * STROBE high, and finally bring STROBE back to low.
4485 static void kodicom4400r_write(struct bttv
*btv
,
4486 unsigned char xaddr
,
4487 unsigned char yaddr
,
4488 unsigned char data
) {
4491 udata
= (data
<< 7) | ((yaddr
&3) << 4) | (xaddr
&0xf);
4492 gpio_bits(0x1ff, udata
); /* write ADDR and DAT */
4493 gpio_bits(0x1ff, udata
| (1 << 8)); /* strobe high */
4494 gpio_bits(0x1ff, udata
); /* strobe low */
4498 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4499 * use this routine. The routine finds the "master" for the card, maps
4500 * the controller number from the detected position over to the logical
4501 * number, writes the appropriate data to the analog switch, and housekeeps
4502 * the local copy of the switch information. The parameter 'input' is the
4503 * requested camera number (0 - 15).
4505 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
)
4509 static unsigned char map
[4] = {3, 0, 2, 1};
4511 mctlr
= master
[btv
->c
.nr
];
4512 if (mctlr
== NULL
) { /* ignore if master not yet detected */
4515 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
+ 1) & 3; /* the '&' is for safety */
4517 xaddr
= input
& 0xf;
4518 /* Check if the controller/camera pair has changed, else ignore */
4519 if (mctlr
->sw_status
[yaddr
] != xaddr
)
4521 /* "open" the old switch, "close" the new one, save the new */
4522 kodicom4400r_write(mctlr
, mctlr
->sw_status
[yaddr
], yaddr
, 0);
4523 mctlr
->sw_status
[yaddr
] = xaddr
;
4524 kodicom4400r_write(mctlr
, xaddr
, yaddr
, 1);
4529 * During initialisation, we need to reset the analog switch. We
4530 * also preset the switch to map the 4 connectors on the card to the
4531 * *user's* (see above description of kodicom4400r_muxsel) channels
4534 static void kodicom4400r_init(struct bttv
*btv
)
4538 gpio_inout(0x0003ff, 0x0003ff);
4539 gpio_write(1 << 9); /* reset MUX */
4541 /* Preset camera 0 to the 4 controllers */
4542 for (ix
= 0; ix
< 4; ix
++) {
4543 btv
->sw_status
[ix
] = ix
;
4544 kodicom4400r_write(btv
, ix
, ix
, 1);
4547 * Since this is the "master", we need to set up the
4548 * other three controller chips' pointers to this structure
4549 * for later use in the muxsel routine.
4551 if ((btv
->c
.nr
<1) || (btv
->c
.nr
>BTTV_MAX
-3))
4553 master
[btv
->c
.nr
-1] = btv
;
4554 master
[btv
->c
.nr
] = btv
;
4555 master
[btv
->c
.nr
+1] = btv
;
4556 master
[btv
->c
.nr
+2] = btv
;
4559 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4560 * video multiplexers to provide up to 16 video inputs. These
4561 * multiplexers are controlled by the lower 8 GPIO pins of the
4562 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
4564 * xxx0 is pin xxx of multiplexer U5,
4565 * yyy1 is pin yyy of multiplexer U2
4577 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
)
4579 static const int masks
[] = {
4580 ENB0
, ENB0
|IN00
, ENB0
|IN10
, ENB0
|IN00
|IN10
,
4581 ENA0
, ENA0
|IN00
, ENA0
|IN10
, ENA0
|IN00
|IN10
,
4582 ENB1
, ENB1
|IN01
, ENB1
|IN11
, ENB1
|IN01
|IN11
,
4583 ENA1
, ENA1
|IN01
, ENA1
|IN11
, ENA1
|IN01
|IN11
,
4585 gpio_write(masks
[input
%16]);
4587 static void picolo_tetra_init(struct bttv
*btv
)
4589 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4590 btwrite (0x08<<16,BT848_GPIO_DATA
);/*GPIO[19] [==> 4053 B+C] set to 1 */
4591 btwrite (0x04<<16,BT848_GPIO_DATA
);/*GPIO[18] [==> 4053 A] set to 1*/
4593 static void picolo_tetra_muxsel (struct bttv
* btv
, unsigned int input
)
4596 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv
->c
.nr
, input
);
4597 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4598 /*GPIO[20]&GPIO[21] used to choose the right input*/
4599 btwrite (input
<<20,BT848_GPIO_DATA
);
4604 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4606 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4607 * swichers to provide 16 channels to MUX0. The TDA8540's have
4608 * 4 independent outputs and as such the IVC120G also has the
4609 * optional "Monitor Out" bus. This allows the card to be looking
4610 * at one input while the monitor is looking at another.
4612 * Since I've couldn't be bothered figuring out how to add an
4613 * independent muxsel for the monitor bus, I've just set it to
4614 * whatever the card is looking at.
4616 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4617 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4619 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4620 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4621 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4622 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4626 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4627 #define I2C_TDA8540 0x90
4628 #define I2C_TDA8540_ALT1 0x92
4629 #define I2C_TDA8540_ALT2 0x94
4630 #define I2C_TDA8540_ALT3 0x96
4631 #define I2C_TDA8540_ALT4 0x98
4632 #define I2C_TDA8540_ALT5 0x9a
4633 #define I2C_TDA8540_ALT6 0x9c
4635 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
)
4638 int key
= input
% 4;
4639 int matrix
= input
/ 4;
4641 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4642 btv
->c
.nr
, input
, matrix
, key
);
4644 /* Handles the input selection on the TDA8540's */
4645 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x00,
4646 ((matrix
== 3) ? (key
| key
<< 2) : 0x00), 1);
4647 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x00,
4648 ((matrix
== 0) ? (key
| key
<< 2) : 0x00), 1);
4649 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x00,
4650 ((matrix
== 1) ? (key
| key
<< 2) : 0x00), 1);
4651 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x00,
4652 ((matrix
== 2) ? (key
| key
<< 2) : 0x00), 1);
4654 /* Handles the output enables on the TDA8540's */
4655 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x02,
4656 ((matrix
== 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
4657 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x02,
4658 ((matrix
== 0) ? 0x03 : 0x00), 1); /* 1-4 */
4659 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x02,
4660 ((matrix
== 1) ? 0x03 : 0x00), 1); /* 5-8 */
4661 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x02,
4662 ((matrix
== 2) ? 0x03 : 0x00), 1); /* 9-12 */
4664 /* 878's MUX0 is already selected for input via muxsel values */
4668 /* PXC200 muxsel helper
4669 * luke@syseng.anu.edu.au
4670 * another transplant
4671 * from Alessandro Rubini (rubini@linux.it)
4673 * There are 4 kinds of cards:
4674 * PXC200L which is bt848
4675 * PXC200F which is bt848 with PIC controlling mux
4676 * PXC200AL which is bt878
4677 * PXC200AF which is bt878 with PIC controlling mux
4679 #define PX_CFG_PXC200F 0x01
4680 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4681 #define PX_I2C_PIC 0x0f
4682 #define PX_PXC200A_CARDID 0x200a1295
4683 #define PX_I2C_CMD_CFG 0x00
4685 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
)
4690 unsigned char buf
[2];
4692 /* Read PIC config to determine if this is a PXC200F */
4696 rc
=bttv_I2CWrite(btv
,(PX_I2C_PIC
<<1),buf
[0],buf
[1],1);
4698 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4700 /* not PXC ? do nothing */
4704 rc
=bttv_I2CRead(btv
,(PX_I2C_PIC
<<1),NULL
);
4705 if (!(rc
& PX_CFG_PXC200F
)) {
4706 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4712 /* The multiplexer in the 200F is handled by the GPIO port */
4713 /* get correct mapping between inputs */
4714 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4715 /* ** not needed!? */
4718 /* make sure output pins are enabled */
4719 /* bitmask=0x30f; */
4721 /* check whether we have a PXC200A */
4722 if (btv
->cardid
== PX_PXC200A_CARDID
) {
4723 bitmask
^= 0x180; /* use 7 and 9, not 8 and 9 */
4724 bitmask
|= 7<<4; /* the DAC */
4726 btwrite(bitmask
, BT848_GPIO_OUT_EN
);
4728 bitmask
= btread(BT848_GPIO_DATA
);
4729 if (btv
->cardid
== PX_PXC200A_CARDID
)
4730 bitmask
= (bitmask
& ~0x280) | ((mux
& 2) << 8) | ((mux
& 1) << 7);
4731 else /* older device */
4732 bitmask
= (bitmask
& ~0x300) | ((mux
& 3) << 8);
4733 btwrite(bitmask
,BT848_GPIO_DATA
);
4736 * Was "to be safe, set the bt848 to input 0"
4737 * Actually, since it's ok at load time, better not messing
4738 * with these bits (on PXC200AF you need to set mux 2 here)
4740 * needed because bttv-driver sets mux before calling this function
4742 if (btv
->cardid
== PX_PXC200A_CARDID
)
4743 btaor(2<<5, ~BT848_IFORM_MUXSEL
, BT848_IFORM
);
4744 else /* older device */
4745 btand(~BT848_IFORM_MUXSEL
,BT848_IFORM
);
4747 pr_debug("%d: setting input channel to:%d\n", btv
->c
.nr
, (int)mux
);
4750 static void phytec_muxsel(struct bttv
*btv
, unsigned int input
)
4752 unsigned int mux
= input
% 4;
4754 if (input
== btv
->svhs
)
4757 gpio_bits(0x3, mux
);
4761 * GeoVision GV-800(S) functions
4762 * Bruno Christo <bchristo@inf.ufsm.br>
4765 /* This is a function to control the analog switch, which determines which
4766 * camera is routed to which controller. The switch comprises an X-address
4767 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4768 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4769 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4770 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4771 * specified address. There is also a chip select (gpio bit 16).
4772 * The idea is to set the address and chip select together, bring
4773 * STROBE high, write the data, and finally bring STROBE back to low.
4775 static void gv800s_write(struct bttv
*btv
,
4776 unsigned char xaddr
,
4777 unsigned char yaddr
,
4778 unsigned char data
) {
4779 /* On the "master" 878A:
4780 * GPIO bits 0-9 are used for the analog switch:
4781 * 00 - 03: camera selector
4782 * 04 - 06: 878A (controller) selector
4785 * 18: data (1->on, 0->off)
4788 const u32 ADDRESS
= ((xaddr
&0xf) | (yaddr
&3)<<4);
4789 const u32 CSELECT
= 1<<16;
4790 const u32 STROBE
= 1<<17;
4791 const u32 DATA
= data
<<18;
4793 gpio_bits(0x1007f, ADDRESS
| CSELECT
); /* write ADDRESS and CSELECT */
4794 gpio_bits(0x20000, STROBE
); /* STROBE high */
4795 gpio_bits(0x40000, DATA
); /* write DATA */
4796 gpio_bits(0x20000, ~STROBE
); /* STROBE low */
4800 * GeoVision GV-800(S) muxsel
4802 * Each of the 4 cards (controllers) use this function.
4803 * The controller using this function selects the input through the GPIO pins
4804 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4806 * The parameter 'input' is the requested camera number (0-4) on the controller.
4807 * The map array has the address of each input. Note that the addresses in the
4808 * array are in the sequence the original GeoVision driver uses, that is, set
4809 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4810 * the physical "camera 1" connector corresponds to controller 0 input 0,
4811 * "camera 2" corresponds to controller 1 input 0, and so on.
4813 * After getting the input address, the function then writes the appropriate
4814 * data to the analog switch, and housekeeps the local copy of the switch
4817 static void gv800s_muxsel(struct bttv
*btv
, unsigned int input
)
4821 static unsigned int map
[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4822 { 0x1, 0x5, 0xb, 0x7 },
4823 { 0x2, 0x8, 0xc, 0xe },
4824 { 0x3, 0x9, 0xd, 0xf } };
4826 mctlr
= master
[btv
->c
.nr
];
4827 if (mctlr
== NULL
) {
4828 /* do nothing until the "master" is detected */
4831 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
) & 3;
4832 xaddr
= map
[yaddr
][input
] & 0xf;
4834 /* Check if the controller/camera pair has changed, ignore otherwise */
4835 if (mctlr
->sw_status
[yaddr
] != xaddr
) {
4836 /* disable the old switch, enable the new one and save status */
4837 gv800s_write(mctlr
, mctlr
->sw_status
[yaddr
], yaddr
, 0);
4838 mctlr
->sw_status
[yaddr
] = xaddr
;
4839 gv800s_write(mctlr
, xaddr
, yaddr
, 1);
4843 /* GeoVision GV-800(S) "master" chip init */
4844 static void gv800s_init(struct bttv
*btv
)
4848 gpio_inout(0xf107f, 0xf107f);
4849 gpio_write(1<<19); /* reset the analog MUX */
4852 /* Preset camera 0 to the 4 controllers */
4853 for (ix
= 0; ix
< 4; ix
++) {
4854 btv
->sw_status
[ix
] = ix
;
4855 gv800s_write(btv
, ix
, ix
, 1);
4858 /* Inputs on the "master" controller need this brightness fix */
4859 bttv_I2CWrite(btv
, 0x18, 0x5, 0x90, 1);
4861 if (btv
->c
.nr
> BTTV_MAX
-4)
4864 * Store the "master" controller pointer in the master
4865 * array for later use in the muxsel function.
4867 master
[btv
->c
.nr
] = btv
;
4868 master
[btv
->c
.nr
+1] = btv
;
4869 master
[btv
->c
.nr
+2] = btv
;
4870 master
[btv
->c
.nr
+3] = btv
;
4873 /* ----------------------------------------------------------------------- */
4874 /* motherboard chipset specific stuff */
4876 void __init
bttv_check_chipset(void)
4878 int pcipci_fail
= 0;
4879 struct pci_dev
*dev
= NULL
;
4881 if (pci_pci_problems
& (PCIPCI_FAIL
|PCIAGP_FAIL
)) /* should check if target is AGP */
4883 if (pci_pci_problems
& (PCIPCI_TRITON
|PCIPCI_NATOMA
|PCIPCI_VIAETBF
))
4885 if (pci_pci_problems
& PCIPCI_VSFX
)
4887 #ifdef PCIPCI_ALIMAGIK
4888 if (pci_pci_problems
& PCIPCI_ALIMAGIK
)
4893 /* print warnings about any quirks found */
4895 pr_info("Host bridge needs ETBF enabled\n");
4897 pr_info("Host bridge needs VSFX enabled\n");
4899 pr_info("bttv and your chipset may not work together\n");
4901 pr_info("overlay will be disabled\n");
4904 pr_info("overlay forced. Use this option at your own risk.\n");
4907 if (UNSET
!= latency
)
4908 pr_info("pci latency fixup [%d]\n", latency
);
4909 while ((dev
= pci_get_device(PCI_VENDOR_ID_INTEL
,
4910 PCI_DEVICE_ID_INTEL_82441
, dev
))) {
4912 pci_read_config_byte(dev
, 0x53, &b
);
4914 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4919 int bttv_handle_chipset(struct bttv
*btv
)
4921 unsigned char command
;
4923 if (!triton1
&& !vsfx
&& UNSET
== latency
)
4928 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4930 if (vsfx
&& btv
->id
>= 878)
4931 pr_info("%d: enabling VSFX\n", btv
->c
.nr
);
4932 if (UNSET
!= latency
)
4933 pr_info("%d: setting pci timer to %d\n",
4934 btv
->c
.nr
, latency
);
4937 if (btv
->id
< 878) {
4938 /* bt848 (mis)uses a bit in the irq mask for etbf */
4940 btv
->triton1
= BT848_INT_ETBF
;
4942 /* bt878 has a bit in the pci config space for it */
4943 pci_read_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, &command
);
4945 command
|= BT878_EN_TBFX
;
4947 command
|= BT878_EN_VSFX
;
4948 pci_write_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, command
);
4950 if (UNSET
!= latency
)
4951 pci_write_config_byte(btv
->c
.pci
, PCI_LATENCY_TIMER
, latency
);