1 // SPDX-License-Identifier: GPL-2.0-or-later
6 this file has configuration information - card-specific stuff
7 like the big tvcards array for the most part
9 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
10 & Marcus Metzler (mocm@thp.uni-koeln.de)
11 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
16 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18 #include <linux/delay.h>
19 #include <linux/module.h>
20 #include <linux/kmod.h>
21 #include <linux/init.h>
22 #include <linux/pci.h>
23 #include <linux/vmalloc.h>
24 #include <linux/firmware.h>
25 #include <net/checksum.h>
27 #include <linux/unaligned.h>
31 #include <media/v4l2-common.h>
32 #include <media/i2c/tvaudio.h>
33 #include "bttv-audio-hook.h"
36 static void boot_msp34xx(struct bttv
*btv
, int pin
);
37 static void hauppauge_eeprom(struct bttv
*btv
);
38 static void avermedia_eeprom(struct bttv
*btv
);
39 static void osprey_eeprom(struct bttv
*btv
, const u8 ee
[256]);
40 static void modtec_eeprom(struct bttv
*btv
);
41 static void init_PXC200(struct bttv
*btv
);
42 static void init_RTV24(struct bttv
*btv
);
43 static void init_PCI8604PW(struct bttv
*btv
);
45 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
);
46 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
);
47 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
);
48 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
);
49 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
);
51 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
);
53 static void picolo_tetra_muxsel(struct bttv
*btv
, unsigned int input
);
54 static void picolo_tetra_init(struct bttv
*btv
);
56 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
);
57 static void tibetCS16_init(struct bttv
*btv
);
59 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
);
60 static void kodicom4400r_init(struct bttv
*btv
);
62 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
);
63 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
);
65 static void geovision_muxsel(struct bttv
*btv
, unsigned int input
);
67 static void phytec_muxsel(struct bttv
*btv
, unsigned int input
);
69 static void gv800s_muxsel(struct bttv
*btv
, unsigned int input
);
70 static void gv800s_init(struct bttv
*btv
);
72 static void td3116_muxsel(struct bttv
*btv
, unsigned int input
);
74 static int terratec_active_radio_upgrade(struct bttv
*btv
);
75 static int tea575x_init(struct bttv
*btv
);
76 static void identify_by_eeprom(struct bttv
*btv
,
77 unsigned char eeprom_data
[256]);
78 static int pvr_boot(struct bttv
*btv
);
80 /* config variables */
81 static unsigned int triton1
;
82 static unsigned int vsfx
;
83 static unsigned int latency
= UNSET
;
85 static unsigned int card
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
86 static unsigned int pll
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
87 static unsigned int tuner
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
88 static unsigned int svhs
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
89 static unsigned int remote
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
90 static unsigned int audiodev
[BTTV_MAX
];
91 static unsigned int saa6588
[BTTV_MAX
];
92 static struct bttv
*master
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = NULL
};
93 static unsigned int autoload
= UNSET
;
94 static unsigned int gpiomask
= UNSET
;
95 static unsigned int audioall
= UNSET
;
96 static unsigned int audiomux
[5] = { [ 0 ... 4 ] = UNSET
};
99 module_param(triton1
, int, 0444);
100 module_param(vsfx
, int, 0444);
101 module_param(latency
, int, 0444);
102 module_param(gpiomask
, int, 0444);
103 module_param(audioall
, int, 0444);
104 module_param(autoload
, int, 0444);
106 module_param_array(card
, int, NULL
, 0444);
107 module_param_array(pll
, int, NULL
, 0444);
108 module_param_array(tuner
, int, NULL
, 0444);
109 module_param_array(svhs
, int, NULL
, 0444);
110 module_param_array(remote
, int, NULL
, 0444);
111 module_param_array(audiodev
, int, NULL
, 0444);
112 module_param_array(audiomux
, int, NULL
, 0444);
114 MODULE_PARM_DESC(triton1
, "set ETBF pci config bit [enable bug compatibility for triton1 + others]");
115 MODULE_PARM_DESC(vsfx
, "set VSFX pci config bit [yet another chipset flaw workaround]");
116 MODULE_PARM_DESC(latency
,"pci latency timer");
117 MODULE_PARM_DESC(card
,"specify TV/grabber card model, see CARDLIST file for a list");
118 MODULE_PARM_DESC(pll
, "specify installed crystal (0=none, 28=28 MHz, 35=35 MHz, 14=14 MHz)");
119 MODULE_PARM_DESC(tuner
,"specify installed tuner type");
120 MODULE_PARM_DESC(autoload
, "obsolete option, please do not use anymore");
121 MODULE_PARM_DESC(audiodev
, "specify audio device:\n"
122 "\t\t-1 = no audio\n"
123 "\t\t 0 = autodetect (default)\n"
127 MODULE_PARM_DESC(saa6588
, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
129 MODULE_FIRMWARE("hcwamc.rbf");
131 /* I2C addresses list */
132 #define I2C_ADDR_TDA7432 0x8a
133 #define I2C_ADDR_MSP3400 0x80
134 #define I2C_ADDR_MSP3400_ALT 0x88
137 /* ----------------------------------------------------------------------- */
138 /* list of card IDs for bt878+ cards */
145 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV" },
146 { 0x39000070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV-D" },
147 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR
, "Hauppauge WinTV/PVR" },
148 { 0xff000070, BTTV_BOARD_OSPREY1x0
, "Osprey-100" },
149 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID
,"Osprey-200" },
150 { 0xff020070, BTTV_BOARD_OSPREY500
, "Osprey-500" },
151 { 0xff030070, BTTV_BOARD_OSPREY2000
, "Osprey-2000" },
152 { 0xff040070, BTTV_BOARD_OSPREY540
, "Osprey-540" },
153 { 0xff070070, BTTV_BOARD_OSPREY440
, "Osprey-440" },
155 { 0x00011002, BTTV_BOARD_ATI_TVWONDER
, "ATI TV Wonder" },
156 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE
,"ATI TV Wonder/VE" },
158 { 0x6606107d, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
159 { 0x6607107d, BTTV_BOARD_WINFASTVC100
, "Leadtek WinFast VC 100" },
160 { 0x6609107d, BTTV_BOARD_WINFAST2000
, "Leadtek TV 2000 XP" },
161 { 0x263610b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
162 { 0x264510b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
163 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI
, "I-O Data Co. GV-BCTV3/PCI" },
164 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI
, "I-O Data Co. GV-BCTV4/PCI" },
165 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
166 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
168 { 0x001211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
169 /* some cards ship with byteswapped IDs ... */
170 { 0x1200bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
171 { 0xff00bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
172 /* this seems to happen as well ... */
173 { 0xff1211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
175 { 0x3000121a, BTTV_BOARD_VOODOOTV_200
, "3Dfx VoodooTV 200" },
176 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM
, "3Dfx VoodooTV FM" },
177 { 0x3060121a, BTTV_BOARD_STB2
, "3Dfx VoodooTV 100/ STB OEM" },
179 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063
, "(Askey Magic/others) TView99 CPH06x" },
180 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063
, "CPH06X TView99-Card" },
181 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH05x" },
182 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
183 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061
, "Askey CPH050" },
184 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061
, "TView 99 (CPH061)" },
185 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS
, "Phoebe TV Master (CPH060)" },
187 { 0x00011461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
188 { 0x00021461, BTTV_BOARD_AVERMEDIA98
, "AVermedia TVCapture 98" },
189 { 0x00031461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
190 { 0x00041461, BTTV_BOARD_AVERMEDIA98
, "AVerMedia TVCapture 98" },
191 { 0x03001461, BTTV_BOARD_AVERMEDIA98
, "VDOMATE TV TUNER CARD" },
193 { 0x1117153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL B/G)" },
194 { 0x1118153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL B/G)" },
195 { 0x1119153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL I)" },
196 { 0x111a153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL I)" },
198 { 0x1123153b, BTTV_BOARD_TERRATVRADIO
, "Terratec TV Radio+" },
199 { 0x1127153b, BTTV_BOARD_TERRATV
, "Terratec TV+ (V1.05)" },
200 /* clashes with FlyVideo
201 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
202 { 0x1134153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (LR102)" },
203 { 0x1135153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* LR102 */
204 { 0x5018153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue" }, /* ?? */
205 { 0xff3b153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* ?? */
207 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
208 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
209 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
210 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
211 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
213 { 0x1430aa00, BTTV_BOARD_PV143
, "Provideo PV143A" },
214 { 0x1431aa00, BTTV_BOARD_PV143
, "Provideo PV143B" },
215 { 0x1432aa00, BTTV_BOARD_PV143
, "Provideo PV143C" },
216 { 0x1433aa00, BTTV_BOARD_PV143
, "Provideo PV143D" },
217 { 0x1433aa03, BTTV_BOARD_PV143
, "Security Eyes" },
219 { 0x1460aa00, BTTV_BOARD_PV150
, "Provideo PV150A-1" },
220 { 0x1461aa01, BTTV_BOARD_PV150
, "Provideo PV150A-2" },
221 { 0x1462aa02, BTTV_BOARD_PV150
, "Provideo PV150A-3" },
222 { 0x1463aa03, BTTV_BOARD_PV150
, "Provideo PV150A-4" },
224 { 0x1464aa04, BTTV_BOARD_PV150
, "Provideo PV150B-1" },
225 { 0x1465aa05, BTTV_BOARD_PV150
, "Provideo PV150B-2" },
226 { 0x1466aa06, BTTV_BOARD_PV150
, "Provideo PV150B-3" },
227 { 0x1467aa07, BTTV_BOARD_PV150
, "Provideo PV150B-4" },
229 { 0xa132ff00, BTTV_BOARD_IVC100
, "IVC-100" },
230 { 0xa1550000, BTTV_BOARD_IVC200
, "IVC-200" },
231 { 0xa1550001, BTTV_BOARD_IVC200
, "IVC-200" },
232 { 0xa1550002, BTTV_BOARD_IVC200
, "IVC-200" },
233 { 0xa1550003, BTTV_BOARD_IVC200
, "IVC-200" },
234 { 0xa1550100, BTTV_BOARD_IVC200
, "IVC-200G" },
235 { 0xa1550101, BTTV_BOARD_IVC200
, "IVC-200G" },
236 { 0xa1550102, BTTV_BOARD_IVC200
, "IVC-200G" },
237 { 0xa1550103, BTTV_BOARD_IVC200
, "IVC-200G" },
238 { 0xa1550800, BTTV_BOARD_IVC200
, "IVC-200" },
239 { 0xa1550801, BTTV_BOARD_IVC200
, "IVC-200" },
240 { 0xa1550802, BTTV_BOARD_IVC200
, "IVC-200" },
241 { 0xa1550803, BTTV_BOARD_IVC200
, "IVC-200" },
242 { 0xa182ff00, BTTV_BOARD_IVC120
, "IVC-120G" },
243 { 0xa182ff01, BTTV_BOARD_IVC120
, "IVC-120G" },
244 { 0xa182ff02, BTTV_BOARD_IVC120
, "IVC-120G" },
245 { 0xa182ff03, BTTV_BOARD_IVC120
, "IVC-120G" },
246 { 0xa182ff04, BTTV_BOARD_IVC120
, "IVC-120G" },
247 { 0xa182ff05, BTTV_BOARD_IVC120
, "IVC-120G" },
248 { 0xa182ff06, BTTV_BOARD_IVC120
, "IVC-120G" },
249 { 0xa182ff07, BTTV_BOARD_IVC120
, "IVC-120G" },
250 { 0xa182ff08, BTTV_BOARD_IVC120
, "IVC-120G" },
251 { 0xa182ff09, BTTV_BOARD_IVC120
, "IVC-120G" },
252 { 0xa182ff0a, BTTV_BOARD_IVC120
, "IVC-120G" },
253 { 0xa182ff0b, BTTV_BOARD_IVC120
, "IVC-120G" },
254 { 0xa182ff0c, BTTV_BOARD_IVC120
, "IVC-120G" },
255 { 0xa182ff0d, BTTV_BOARD_IVC120
, "IVC-120G" },
256 { 0xa182ff0e, BTTV_BOARD_IVC120
, "IVC-120G" },
257 { 0xa182ff0f, BTTV_BOARD_IVC120
, "IVC-120G" },
258 { 0xf0500000, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
259 { 0xf0500001, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
260 { 0xf0500002, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
261 { 0xf0500003, BTTV_BOARD_IVCE8784
, "IVCE-8784" },
263 { 0x41424344, BTTV_BOARD_GRANDTEC
, "GrandTec Multi Capture" },
264 { 0x01020304, BTTV_BOARD_XGUARD
, "Grandtec Grand X-Guard" },
266 { 0x18501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
267 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
268 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ
, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
269 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW
, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
270 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM
, "Lifeview FlyVideo 98 LR50 Rev Q" },
271 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98
, "Lifeview Flyvideo 98" },
273 { 0x010115cb, BTTV_BOARD_GMV1
, "AG GMV1" },
274 { 0x010114c7, BTTV_BOARD_MODTEC_205
, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
276 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878
, "STB ???" },
277 { 0x217d6606, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
278 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
279 { 0x03116000, BTTV_BOARD_SENSORAY311_611
, "Sensoray 311" },
280 { 0x06116000, BTTV_BOARD_SENSORAY311_611
, "Sensoray 611" },
281 { 0x00790e11, BTTV_BOARD_WINDVR
, "Canopus WinDVR PCI" },
282 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX
, "Face to Face Tvmax" },
283 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100
, "SIMUS GVC1100" },
284 { 0x146caa0c, BTTV_BOARD_PV951
, "ituner spectra8" },
285 { 0x200a1295, BTTV_BOARD_PXC200
, "ImageNation PXC200A" },
287 { 0x40111554, BTTV_BOARD_PV_BT878P_9B
, "Prolink Pixelview PV-BT" },
288 { 0x17de0a01, BTTV_BOARD_KWORLD
, "Mecer TV/FM/Video Tuner" },
290 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #1" },
291 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #2" },
292 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #3" },
293 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #4" },
295 { 0x15409511, BTTV_BOARD_ACORP_Y878F
, "Acorp Y878F" },
297 { 0x53534149, BTTV_BOARD_SSAI_SECURITY
, "SSAI Security Video Interface" },
298 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND
, "SSAI Ultrasound Video Interface" },
300 /* likely broken, vendor id doesn't match the other magic views ...
301 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
303 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
304 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
306 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2
, "Conceptronic CTVFMi v2"},
308 /* DVB cards (using pci function .1 for mpeg data xfer) */
309 { 0x001c11bd, BTTV_BOARD_PINNACLESAT
, "Pinnacle PCTV Sat" },
310 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV
, "Nebula Electronics DigiTV" },
311 { 0x20007063, BTTV_BOARD_PC_HDTV
, "pcHDTV HD-2000 TV"},
312 { 0x002611bd, BTTV_BOARD_TWINHAN_DST
, "Pinnacle PCTV SAT CI" },
313 { 0x00011822, BTTV_BOARD_TWINHAN_DST
, "Twinhan VisionPlus DVB" },
314 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST
, "ChainTech digitop DST-1000 DVB-S" },
315 { 0x07711461, BTTV_BOARD_AVDVBT_771
, "AVermedia AverTV DVB-T 771" },
316 { 0x07611461, BTTV_BOARD_AVDVBT_761
, "AverMedia AverTV DVB-T 761" },
317 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE
, "DViCO FusionHDTV DVB-T Lite" },
318 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE
, "Ultraview DVB-T Lite" },
319 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
, "DViCO FusionHDTV 5 Lite" },
320 { 0x00261822, BTTV_BOARD_TWINHAN_DST
, "DNTV Live! Mini "},
321 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2
, "DViCO FusionHDTV 2" },
322 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600
, "GeoVision GV-600" },
323 { 0x18011000, BTTV_BOARD_ENLTV_FM_2
, "Encore ENL TV-FM-2" },
324 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S
, "GeoVision GV-800(S) (master)" },
325 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
326 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
327 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL
, "GeoVision GV-800(S) (slave)" },
329 { 0x15401830, BTTV_BOARD_PV183
, "Provideo PV183-1" },
330 { 0x15401831, BTTV_BOARD_PV183
, "Provideo PV183-2" },
331 { 0x15401832, BTTV_BOARD_PV183
, "Provideo PV183-3" },
332 { 0x15401833, BTTV_BOARD_PV183
, "Provideo PV183-4" },
333 { 0x15401834, BTTV_BOARD_PV183
, "Provideo PV183-5" },
334 { 0x15401835, BTTV_BOARD_PV183
, "Provideo PV183-6" },
335 { 0x15401836, BTTV_BOARD_PV183
, "Provideo PV183-7" },
336 { 0x15401837, BTTV_BOARD_PV183
, "Provideo PV183-8" },
337 { 0x3116f200, BTTV_BOARD_TVT_TD3116
, "Tongwei Video Technology TD-3116" },
338 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR
, "Aposonic W-DVR" },
342 /* ----------------------------------------------------------------------- */
343 /* array with description for bt848 / bt878 tv/grabber cards */
345 struct tvcard bttv_tvcards
[] = {
346 /* ---- card 0x00 ---------------------------------- */
347 [BTTV_BOARD_UNKNOWN
] = {
348 .name
= " *** UNKNOWN/GENERIC *** ",
351 .muxsel
= MUXSEL(2, 3, 1, 0),
353 .tuner_addr
= ADDR_UNSET
,
355 [BTTV_BOARD_MIRO
] = {
358 /* .audio_inputs= 1, */
361 .muxsel
= MUXSEL(2, 3, 1, 1),
362 .gpiomux
= { 2, 0, 0, 0 },
365 .tuner_addr
= ADDR_UNSET
,
367 [BTTV_BOARD_HAUPPAUGE
] = {
368 .name
= "Hauppauge (bt848)",
370 /* .audio_inputs= 1, */
373 .muxsel
= MUXSEL(2, 3, 1, 1),
374 .gpiomux
= { 0, 1, 2, 3 },
377 .tuner_addr
= ADDR_UNSET
,
380 .name
= "STB, Gateway P/N 6000699 (bt848)",
382 /* .audio_inputs= 1, */
385 .muxsel
= MUXSEL(2, 3, 1, 1),
386 .gpiomux
= { 4, 0, 2, 3 },
389 .tuner_type
= TUNER_PHILIPS_NTSC
,
390 .tuner_addr
= ADDR_UNSET
,
395 /* ---- card 0x04 ---------------------------------- */
396 [BTTV_BOARD_INTEL
] = {
397 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
399 /* .audio_inputs= 0, */
402 .muxsel
= MUXSEL(2, 3, 1, 1),
404 .tuner_type
= TUNER_ABSENT
,
405 .tuner_addr
= ADDR_UNSET
,
407 [BTTV_BOARD_DIAMOND
] = {
408 .name
= "Diamond DTV2000",
410 /* .audio_inputs= 1, */
413 .muxsel
= MUXSEL(2, 3, 1, 0),
414 .gpiomux
= { 0, 1, 0, 1 },
417 .tuner_addr
= ADDR_UNSET
,
419 [BTTV_BOARD_AVERMEDIA
] = {
420 .name
= "AVerMedia TVPhone",
422 /* .audio_inputs= 1, */
424 .muxsel
= MUXSEL(2, 3, 1, 1),
426 .gpiomux
= { 0x0c, 0x04, 0x08, 0x04 },
427 /* 0x04 for some cards ?? */
429 .tuner_addr
= ADDR_UNSET
,
430 .audio_mode_gpio
= avermedia_tvphone_audio
,
433 [BTTV_BOARD_MATRIX_VISION
] = {
434 .name
= "MATRIX-Vision MV-Delta",
436 /* .audio_inputs= 1, */
439 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
441 .tuner_type
= TUNER_ABSENT
,
442 .tuner_addr
= ADDR_UNSET
,
445 /* ---- card 0x08 ---------------------------------- */
446 [BTTV_BOARD_FLYVIDEO
] = {
447 .name
= "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
449 /* .audio_inputs= 1, */
452 .muxsel
= MUXSEL(2, 3, 1, 1),
453 .gpiomux
= { 0, 0xc00, 0x800, 0x400 },
457 .tuner_addr
= ADDR_UNSET
,
459 [BTTV_BOARD_TURBOTV
] = {
460 .name
= "IMS/IXmicro TurboTV",
462 /* .audio_inputs= 1, */
465 .muxsel
= MUXSEL(2, 3, 1, 1),
466 .gpiomux
= { 1, 1, 2, 3 },
468 .tuner_type
= TUNER_TEMIC_PAL
,
469 .tuner_addr
= ADDR_UNSET
,
471 [BTTV_BOARD_HAUPPAUGE878
] = {
472 .name
= "Hauppauge (bt878)",
474 /* .audio_inputs= 1, */
476 .gpiomask
= 0x0f, /* old: 7 */
477 .muxsel
= MUXSEL(2, 0, 1, 1),
478 .gpiomux
= { 0, 1, 2, 3 },
482 .tuner_addr
= ADDR_UNSET
,
484 [BTTV_BOARD_MIROPRO
] = {
485 .name
= "MIRO PCTV pro",
487 /* .audio_inputs= 1, */
490 .muxsel
= MUXSEL(2, 3, 1, 1),
491 .gpiomux
= { 0x20001,0x10001, 0, 0 },
494 .tuner_addr
= ADDR_UNSET
,
497 /* ---- card 0x0c ---------------------------------- */
498 [BTTV_BOARD_ADSTECH_TV
] = {
499 .name
= "ADS Technologies Channel Surfer TV (bt848)",
501 /* .audio_inputs= 1, */
504 .muxsel
= MUXSEL(2, 3, 1, 1),
505 .gpiomux
= { 13, 14, 11, 7 },
507 .tuner_addr
= ADDR_UNSET
,
509 [BTTV_BOARD_AVERMEDIA98
] = {
510 .name
= "AVerMedia TVCapture 98",
512 /* .audio_inputs= 4, */
515 .muxsel
= MUXSEL(2, 3, 1, 1),
516 .gpiomux
= { 13, 14, 11, 7 },
519 .tuner_type
= TUNER_PHILIPS_PAL
,
520 .tuner_addr
= ADDR_UNSET
,
521 .audio_mode_gpio
= avermedia_tv_stereo_audio
,
525 .name
= "Aimslab Video Highway Xtreme (VHX)",
527 /* .audio_inputs= 1, */
530 .muxsel
= MUXSEL(2, 3, 1, 1),
531 .gpiomux
= { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
535 .tuner_addr
= ADDR_UNSET
,
537 [BTTV_BOARD_ZOLTRIX
] = {
538 .name
= "Zoltrix TV-Max",
540 /* .audio_inputs= 1, */
543 .muxsel
= MUXSEL(2, 3, 1, 1),
544 .gpiomux
= { 0, 0, 1, 0 },
547 .tuner_addr
= ADDR_UNSET
,
550 /* ---- card 0x10 ---------------------------------- */
551 [BTTV_BOARD_PIXVIEWPLAYTV
] = {
552 .name
= "Prolink Pixelview PlayTV (bt878)",
554 /* .audio_inputs= 1, */
556 .gpiomask
= 0x01fe00,
557 .muxsel
= MUXSEL(2, 3, 1, 1),
558 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
559 .gpiomux
= { 0x001e00, 0, 0x018000, 0x014000 },
560 .gpiomute
= 0x002000,
563 .tuner_addr
= ADDR_UNSET
,
565 [BTTV_BOARD_WINVIEW_601
] = {
566 .name
= "Leadtek WinView 601",
568 /* .audio_inputs= 1, */
570 .gpiomask
= 0x8300f8,
571 .muxsel
= MUXSEL(2, 3, 1, 1, 0),
572 .gpiomux
= { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
573 .gpiomute
= 0xcfa007,
575 .tuner_addr
= ADDR_UNSET
,
576 .volume_gpio
= winview_volume
,
579 [BTTV_BOARD_AVEC_INTERCAP
] = {
580 .name
= "AVEC Intercapture",
582 /* .audio_inputs= 2, */
585 .muxsel
= MUXSEL(2, 3, 1, 1),
586 .gpiomux
= { 1, 0, 0, 0 },
588 .tuner_addr
= ADDR_UNSET
,
590 [BTTV_BOARD_LIFE_FLYKIT
] = {
591 .name
= "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
593 /* .audio_inputs= 1, */
595 .gpiomask
= 0x8dff00,
596 .muxsel
= MUXSEL(2, 3, 1, 1),
599 .tuner_type
= TUNER_ABSENT
,
600 .tuner_addr
= ADDR_UNSET
,
603 /* ---- card 0x14 ---------------------------------- */
604 [BTTV_BOARD_CEI_RAFFLES
] = {
605 .name
= "CEI Raffles Card",
607 /* .audio_inputs= 3, */
609 .muxsel
= MUXSEL(2, 3, 1, 1),
611 .tuner_addr
= ADDR_UNSET
,
613 [BTTV_BOARD_CONFERENCETV
] = {
614 .name
= "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
616 /* .audio_inputs= 2, tuner, line in */
619 .muxsel
= MUXSEL(2, 3, 1, 1),
620 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
623 .tuner_type
= TUNER_PHILIPS_PAL_I
,
624 .tuner_addr
= ADDR_UNSET
,
626 [BTTV_BOARD_PHOEBE_TVMAS
] = {
627 .name
= "Askey CPH050/ Phoebe Tv Master + FM",
629 /* .audio_inputs= 1, */
632 .muxsel
= MUXSEL(2, 3, 1, 1),
633 .gpiomux
= { 0, 1, 0x800, 0x400 },
637 .tuner_addr
= ADDR_UNSET
,
639 [BTTV_BOARD_MODTEC_205
] = {
640 .name
= "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
642 /* .audio_inputs= 1, */
646 .muxsel
= MUXSEL(2, 3, 0), /* input 2 is digital */
647 /* .digital_mode= DIGITAL_MODE_CAMERA, */
648 .gpiomux
= { 0, 0, 0, 0 },
651 .tuner_type
= TUNER_ALPS_TSBB5_PAL_I
,
652 .tuner_addr
= ADDR_UNSET
,
655 /* ---- card 0x18 ---------------------------------- */
656 [BTTV_BOARD_MAGICTVIEW061
] = {
657 .name
= "Askey CPH05X/06X (bt878) [many vendors]",
659 /* .audio_inputs= 1, */
662 .muxsel
= MUXSEL(2, 3, 1, 1),
663 .gpiomux
= {0x400, 0x400, 0x400, 0x400 },
667 .tuner_addr
= ADDR_UNSET
,
669 .has_radio
= 1, /* not every card has radio */
671 [BTTV_BOARD_VOBIS_BOOSTAR
] = {
672 .name
= "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
674 /* .audio_inputs= 1, */
676 .gpiomask
= 0x1f0fff,
677 .muxsel
= MUXSEL(2, 3, 1, 1),
678 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0 },
680 .tuner_type
= TUNER_PHILIPS_PAL
,
681 .tuner_addr
= ADDR_UNSET
,
682 .audio_mode_gpio
= terratv_audio
,
684 [BTTV_BOARD_HAUPPAUG_WCAM
] = {
685 .name
= "Hauppauge WinCam newer (bt878)",
687 /* .audio_inputs= 1, */
690 .muxsel
= MUXSEL(2, 0, 1, 1),
691 .gpiomux
= { 0, 1, 2, 3 },
694 .tuner_addr
= ADDR_UNSET
,
696 [BTTV_BOARD_MAXI
] = {
697 .name
= "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
699 /* .audio_inputs= 2, */
702 .muxsel
= MUXSEL(2, 3, 1, 1),
703 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
706 .tuner_type
= TUNER_PHILIPS_SECAM
,
707 .tuner_addr
= ADDR_UNSET
,
710 /* ---- card 0x1c ---------------------------------- */
711 [BTTV_BOARD_TERRATV
] = {
712 .name
= "Terratec TerraTV+ Version 1.1 (bt878)",
714 /* .audio_inputs= 1, */
716 .gpiomask
= 0x1f0fff,
717 .muxsel
= MUXSEL(2, 3, 1, 1),
718 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0x00000 },
720 .tuner_type
= TUNER_PHILIPS_PAL
,
721 .tuner_addr
= ADDR_UNSET
,
722 .audio_mode_gpio
= terratv_audio
,
724 External 20 pin connector (for Active Radio Upgrade board)
730 gpio05: om5610-stereo
734 gpio09+10: nIOR, nSEL ?? (bt878)
738 gpio16: u2-A0 (1st 4052bt)
741 gpio19: u4-A0 (2nd 4052)
745 00000 : Cdrom (internal audio input)
746 10000 : ext. Video audio input
755 [BTTV_BOARD_PXC200
] = {
756 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
757 .name
= "Imagenation PXC200",
759 /* .audio_inputs= 1, */
760 .svhs
= 1, /* was: 4 */
762 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
764 .tuner_type
= TUNER_ABSENT
,
765 .tuner_addr
= ADDR_UNSET
,
766 .muxsel_hook
= PXC200_muxsel
,
769 [BTTV_BOARD_FLYVIDEO_98
] = {
770 .name
= "Lifeview FlyVideo 98 LR50",
772 /* .audio_inputs= 1, */
774 .gpiomask
= 0x1800, /* 0x8dfe00 */
775 .muxsel
= MUXSEL(2, 3, 1, 1),
776 .gpiomux
= { 0, 0x0800, 0x1000, 0x1000 },
780 .tuner_addr
= ADDR_UNSET
,
782 [BTTV_BOARD_IPROTV
] = {
783 .name
= "Formac iProTV, Formac ProTV I (bt848)",
785 /* .audio_inputs= 1, */
788 .muxsel
= MUXSEL(2, 3, 1, 1),
789 .gpiomux
= { 1, 0, 0, 0 },
791 .tuner_type
= TUNER_PHILIPS_PAL
,
792 .tuner_addr
= ADDR_UNSET
,
795 /* ---- card 0x20 ---------------------------------- */
796 [BTTV_BOARD_INTEL_C_S_PCI
] = {
797 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
799 /* .audio_inputs= 0, */
802 .muxsel
= MUXSEL(2, 3, 1, 1),
804 .tuner_type
= TUNER_ABSENT
,
805 .tuner_addr
= ADDR_UNSET
,
807 [BTTV_BOARD_TERRATVALUE
] = {
808 .name
= "Terratec TerraTValue Version Bt878",
810 /* .audio_inputs= 1, */
812 .gpiomask
= 0xffff00,
813 .muxsel
= MUXSEL(2, 3, 1, 1),
814 .gpiomux
= { 0x500, 0, 0x300, 0x900 },
817 .tuner_type
= TUNER_PHILIPS_PAL
,
818 .tuner_addr
= ADDR_UNSET
,
820 [BTTV_BOARD_WINFAST2000
] = {
821 .name
= "Leadtek WinFast 2000/ WinFast 2000 XP",
823 /* .audio_inputs= 1, */
825 /* TV, CVid, SVid, CVid over SVid connector */
826 .muxsel
= MUXSEL(2, 3, 1, 1, 0),
827 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
828 .gpiomask
= 0xb33000,
829 .gpiomux
= { 0x122000,0x1000,0x0000,0x620000 },
830 .gpiomute
= 0x800000,
831 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
832 gpio23 -- hef4052:nEnable (0x800000)
835 0x0000: external audio
839 Note: There exists another variant "Winfast 2000" with tv stereo !?
840 Note: eeprom only contains FF and pci subsystem id 107d:6606
844 .tuner_type
= TUNER_PHILIPS_PAL
, /* default for now, gpio reads BFFF06 for Pal bg+dk */
845 .tuner_addr
= ADDR_UNSET
,
846 .audio_mode_gpio
= winfast2000_audio
,
849 [BTTV_BOARD_CHRONOS_VS2
] = {
850 .name
= "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
852 /* .audio_inputs= 3, */
855 .muxsel
= MUXSEL(2, 3, 1, 1),
856 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
860 .tuner_addr
= ADDR_UNSET
,
863 /* ---- card 0x24 ---------------------------------- */
864 [BTTV_BOARD_TYPHOON_TVIEW
] = {
865 .name
= "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
867 /* .audio_inputs= 3, */
870 .muxsel
= MUXSEL(2, 3, 1, 1),
871 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
875 .tuner_addr
= ADDR_UNSET
,
878 [BTTV_BOARD_PXELVWPLTVPRO
] = {
879 .name
= "Prolink PixelView PlayTV pro",
881 /* .audio_inputs= 1, */
884 .muxsel
= MUXSEL(2, 3, 1, 1),
885 .gpiomux
= { 0x21, 0x20, 0x24, 0x2c },
890 .tuner_addr
= ADDR_UNSET
,
892 [BTTV_BOARD_MAGICTVIEW063
] = {
893 .name
= "Askey CPH06X TView99",
895 /* .audio_inputs= 1, */
897 .gpiomask
= 0x551e00,
898 .muxsel
= MUXSEL(2, 3, 1, 0),
899 .gpiomux
= { 0x551400, 0x551200, 0, 0 },
900 .gpiomute
= 0x551c00,
902 .tuner_type
= TUNER_PHILIPS_PAL_I
,
903 .tuner_addr
= ADDR_UNSET
,
906 [BTTV_BOARD_PINNACLE
] = {
907 .name
= "Pinnacle PCTV Studio/Rave",
909 /* .audio_inputs= 1, */
911 .gpiomask
= 0x03000F,
912 .muxsel
= MUXSEL(2, 3, 1, 1),
913 .gpiomux
= { 2, 0xd0001, 0, 0 },
917 .tuner_addr
= ADDR_UNSET
,
920 /* ---- card 0x28 ---------------------------------- */
921 [BTTV_BOARD_STB2
] = {
922 .name
= "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
924 /* .audio_inputs= 1, */
927 .muxsel
= MUXSEL(2, 3, 1, 1),
928 .gpiomux
= { 4, 0, 2, 3 },
931 .tuner_type
= TUNER_PHILIPS_NTSC
,
932 .tuner_addr
= ADDR_UNSET
,
936 [BTTV_BOARD_AVPHONE98
] = {
937 .name
= "AVerMedia TVPhone 98",
939 /* .audio_inputs= 4, */
942 .muxsel
= MUXSEL(2, 3, 1, 1),
943 .gpiomux
= { 13, 4, 11, 7 },
946 .tuner_addr
= ADDR_UNSET
,
948 .audio_mode_gpio
= avermedia_tvphone_audio
,
950 [BTTV_BOARD_PV951
] = {
951 .name
= "ProVideo PV951", /* pic16c54 */
953 /* .audio_inputs= 1, */
956 .muxsel
= MUXSEL(2, 3, 1, 1),
957 .gpiomux
= { 0, 0, 0, 0},
960 .tuner_type
= TUNER_PHILIPS_PAL_I
,
961 .tuner_addr
= ADDR_UNSET
,
963 [BTTV_BOARD_ONAIR_TV
] = {
964 .name
= "Little OnAir TV",
966 /* .audio_inputs= 1, */
969 .muxsel
= MUXSEL(2, 3, 1, 1),
970 .gpiomux
= { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
971 .gpiomute
= 0xff3ffc,
974 .tuner_addr
= ADDR_UNSET
,
977 /* ---- card 0x2c ---------------------------------- */
978 [BTTV_BOARD_SIGMA_TVII_FM
] = {
979 .name
= "Sigma TVII-FM",
981 /* .audio_inputs= 1, */
984 .muxsel
= MUXSEL(2, 3, 1, 1),
985 .gpiomux
= { 1, 1, 0, 2 },
990 .tuner_addr
= ADDR_UNSET
,
992 [BTTV_BOARD_MATRIX_VISION2
] = {
993 .name
= "MATRIX-Vision MV-Delta 2",
995 /* .audio_inputs= 1, */
998 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
1002 .tuner_type
= TUNER_ABSENT
,
1003 .tuner_addr
= ADDR_UNSET
,
1005 [BTTV_BOARD_ZOLTRIX_GENIE
] = {
1006 .name
= "Zoltrix Genie TV/FM",
1008 /* .audio_inputs= 1, */
1010 .gpiomask
= 0xbcf03f,
1011 .muxsel
= MUXSEL(2, 3, 1, 1),
1012 .gpiomux
= { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1013 .gpiomute
= 0xbcb03f,
1016 .tuner_type
= TUNER_TEMIC_4039FR5_NTSC
,
1017 .tuner_addr
= ADDR_UNSET
,
1019 [BTTV_BOARD_TERRATVRADIO
] = {
1020 .name
= "Terratec TV/Radio+",
1022 /* .audio_inputs= 1, */
1024 .gpiomask
= 0x70000,
1025 .muxsel
= MUXSEL(2, 3, 1, 1),
1026 .gpiomux
= { 0x20000, 0x30000, 0x10000, 0 },
1027 .gpiomute
= 0x40000,
1030 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1031 .tuner_addr
= ADDR_UNSET
,
1035 /* ---- card 0x30 ---------------------------------- */
1036 [BTTV_BOARD_DYNALINK
] = {
1037 .name
= "Askey CPH03x/ Dynalink Magic TView",
1039 /* .audio_inputs= 1, */
1042 .muxsel
= MUXSEL(2, 3, 1, 1),
1043 .gpiomux
= {2,0,0,0 },
1046 .tuner_type
= UNSET
,
1047 .tuner_addr
= ADDR_UNSET
,
1049 [BTTV_BOARD_GVBCTV3PCI
] = {
1050 .name
= "IODATA GV-BCTV3/PCI",
1052 /* .audio_inputs= 1, */
1054 .gpiomask
= 0x010f00,
1055 .muxsel
= MUXSEL(2, 3, 0, 0),
1056 .gpiomux
= {0x10000, 0, 0x10000, 0 },
1059 .tuner_type
= TUNER_ALPS_TSHC6_NTSC
,
1060 .tuner_addr
= ADDR_UNSET
,
1061 .audio_mode_gpio
= gvbctv3pci_audio
,
1063 [BTTV_BOARD_PXELVWPLTVPAK
] = {
1064 .name
= "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1066 /* .audio_inputs= 1, */
1069 .gpiomask
= 0xAA0000,
1070 .muxsel
= MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
1071 /* .digital_mode= DIGITAL_MODE_CAMERA, */
1072 .gpiomux
= { 0x20000, 0, 0x80000, 0x80000 },
1073 .gpiomute
= 0xa8000,
1076 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1077 .tuner_addr
= ADDR_UNSET
,
1079 /* GPIO wiring: (different from Rev.4C !)
1080 GPIO17: U4.A0 (first hef4052bt)
1082 GPIO20: U5.A1 (second hef4052bt)
1084 GPIO22: BT832 Reset Line
1085 GPIO23: A5,A0, U5,nEN
1086 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1089 [BTTV_BOARD_EAGLE
] = {
1090 .name
= "Eagle Wireless Capricorn2 (bt878A)",
1092 /* .audio_inputs= 1, */
1095 .muxsel
= MUXSEL(2, 0, 1, 1),
1096 .gpiomux
= { 0, 1, 2, 3 },
1099 .tuner_type
= UNSET
/* TUNER_ALPS_TMDH2_NTSC */,
1100 .tuner_addr
= ADDR_UNSET
,
1103 /* ---- card 0x34 ---------------------------------- */
1104 [BTTV_BOARD_PINNACLEPRO
] = {
1105 /* David Härdeman <david@2gen.com> */
1106 .name
= "Pinnacle PCTV Studio Pro",
1108 /* .audio_inputs= 1, */
1110 .gpiomask
= 0x03000F,
1111 .muxsel
= MUXSEL(2, 3, 1, 1),
1112 .gpiomux
= { 1, 0xd0001, 0, 0 },
1114 /* sound path (5 sources):
1115 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1118 2= Mono TV sound from Tuner
1120 MUX2 (mask 0x30000):
1122 1= FM stereo Radio from Tuner */
1124 .tuner_type
= UNSET
,
1125 .tuner_addr
= ADDR_UNSET
,
1127 [BTTV_BOARD_TVIEW_RDS_FM
] = {
1128 /* Claas Langbehn <claas@bigfoot.com>,
1129 Sven Grothklags <sven@upb.de> */
1130 .name
= "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1132 /* .audio_inputs= 3, */
1135 .muxsel
= MUXSEL(2, 3, 1, 1),
1136 .gpiomux
= { 0, 0, 0x10, 8 },
1139 .tuner_type
= TUNER_PHILIPS_PAL
,
1140 .tuner_addr
= ADDR_UNSET
,
1143 [BTTV_BOARD_LIFETEC_9415
] = {
1144 /* Tim Röstermundt <rosterm@uni-muenster.de>
1145 in de.comp.os.unix.linux.hardware:
1146 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1147 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1148 options tuner type=5 */
1149 .name
= "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1151 /* .audio_inputs= 1, */
1154 .muxsel
= MUXSEL(2, 3, 1, 1),
1155 .gpiomux
= { 0x0000,0x0800,0x1000,0x1000 },
1157 /* For cards with tda9820/tda9821:
1158 0x0000: Tuner normal stereo
1159 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1160 0x0880: Tuner A2 stereo */
1162 .tuner_type
= UNSET
,
1163 .tuner_addr
= ADDR_UNSET
,
1165 [BTTV_BOARD_BESTBUY_EASYTV
] = {
1166 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1167 old Easy TV BT848 version (model CPH031) */
1168 .name
= "Askey CPH031/ BESTBUY Easy TV",
1170 /* .audio_inputs= 1, */
1173 .muxsel
= MUXSEL(2, 3, 1, 0),
1174 .gpiomux
= { 2, 0, 0, 0 },
1177 .tuner_type
= TUNER_TEMIC_PAL
,
1178 .tuner_addr
= ADDR_UNSET
,
1181 /* ---- card 0x38 ---------------------------------- */
1182 [BTTV_BOARD_FLYVIDEO_98FM
] = {
1183 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1184 .name
= "Lifeview FlyVideo 98FM LR50",
1186 /* .audio_inputs= 3, */
1189 .muxsel
= MUXSEL(2, 3, 1, 1),
1190 .gpiomux
= { 0, 0x800, 0x1000, 0x1000 },
1193 .tuner_type
= TUNER_PHILIPS_PAL
,
1194 .tuner_addr
= ADDR_UNSET
,
1196 /* This is the ultimate cheapo capture card
1197 * just a BT848A on a small PCB!
1198 * Steve Hosgood <steve@equiinet.com> */
1199 [BTTV_BOARD_GRANDTEC
] = {
1200 .name
= "GrandTec 'Grand Video Capture' (Bt848)",
1202 /* .audio_inputs= 0, */
1205 .muxsel
= MUXSEL(3, 1),
1209 .tuner_type
= TUNER_ABSENT
,
1210 .tuner_addr
= ADDR_UNSET
,
1212 [BTTV_BOARD_ASKEY_CPH060
] = {
1213 /* Daniel Herrington <daniel.herrington@home.com> */
1214 .name
= "Askey CPH060/ Phoebe TV Master Only (No FM)",
1216 /* .audio_inputs= 1, */
1219 .muxsel
= MUXSEL(2, 3, 1, 1),
1220 .gpiomux
= { 0x400, 0x400, 0x400, 0x400 },
1223 .tuner_type
= TUNER_TEMIC_4036FY5_NTSC
,
1224 .tuner_addr
= ADDR_UNSET
,
1226 [BTTV_BOARD_ASKEY_CPH03X
] = {
1227 /* Matti Mottus <mottus@physic.ut.ee> */
1228 .name
= "Askey CPH03x TV Capturer",
1230 /* .audio_inputs= 1, */
1232 .gpiomask
= 0x03000F,
1233 .muxsel
= MUXSEL(2, 3, 1, 0),
1234 .gpiomux
= { 2, 0, 0, 0 },
1237 .tuner_type
= TUNER_TEMIC_PAL
,
1238 .tuner_addr
= ADDR_UNSET
,
1242 /* ---- card 0x3c ---------------------------------- */
1243 [BTTV_BOARD_MM100PCTV
] = {
1244 /* Philip Blundell <philb@gnu.org> */
1245 .name
= "Modular Technology MM100PCTV",
1247 /* .audio_inputs= 2, */
1250 .muxsel
= MUXSEL(2, 3, 1, 1),
1251 .gpiomux
= { 2, 0, 0, 1 },
1254 .tuner_type
= TUNER_TEMIC_PAL
,
1255 .tuner_addr
= ADDR_UNSET
,
1257 [BTTV_BOARD_GMV1
] = {
1258 /* Adrian Cox <adrian@humboldt.co.uk */
1259 .name
= "AG Electronics GMV1",
1261 /* .audio_inputs= 0, */
1264 .muxsel
= MUXSEL(2, 2),
1268 .tuner_type
= TUNER_ABSENT
,
1269 .tuner_addr
= ADDR_UNSET
,
1271 [BTTV_BOARD_BESTBUY_EASYTV2
] = {
1272 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1273 new Easy TV BT878 version (model CPH061)
1274 special thanks to Informatica Mieres for providing the card */
1275 .name
= "Askey CPH061/ BESTBUY Easy TV (bt878)",
1277 /* .audio_inputs= 2, */
1280 .muxsel
= MUXSEL(2, 3, 1, 0),
1281 .gpiomux
= { 1, 0, 4, 4 },
1284 .tuner_type
= TUNER_PHILIPS_PAL
,
1285 .tuner_addr
= ADDR_UNSET
,
1287 [BTTV_BOARD_ATI_TVWONDER
] = {
1288 /* Lukas Gebauer <geby@volny.cz> */
1289 .name
= "ATI TV-Wonder",
1291 /* .audio_inputs= 1, */
1294 .muxsel
= MUXSEL(2, 3, 1, 0),
1295 .gpiomux
= { 0xbffe, 0, 0xbfff, 0 },
1298 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1299 .tuner_addr
= ADDR_UNSET
,
1302 /* ---- card 0x40 ---------------------------------- */
1303 [BTTV_BOARD_ATI_TVWONDERVE
] = {
1304 /* Lukas Gebauer <geby@volny.cz> */
1305 .name
= "ATI TV-Wonder VE",
1307 /* .audio_inputs= 1, */
1310 .muxsel
= MUXSEL(2, 3, 0, 1),
1311 .gpiomux
= { 0, 0, 1, 0 },
1314 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1315 .tuner_addr
= ADDR_UNSET
,
1317 [BTTV_BOARD_FLYVIDEO2000
] = {
1318 /* DeeJay <deejay@westel900.net (2000S) */
1319 .name
= "Lifeview FlyVideo 2000S LR90",
1321 /* .audio_inputs= 3, */
1324 .muxsel
= MUXSEL(2, 3, 0, 1),
1325 /* Radio changed from 1e80 to 0x800 to make
1326 FlyVideo2000S in .hu happy (gm)*/
1327 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1328 .gpiomux
= { 0x0000,0x0800,0x1000,0x1000 },
1330 .audio_mode_gpio
= fv2000s_audio
,
1333 .tuner_type
= TUNER_PHILIPS_PAL
,
1334 .tuner_addr
= ADDR_UNSET
,
1336 [BTTV_BOARD_TERRATVALUER
] = {
1337 .name
= "Terratec TValueRadio",
1339 /* .audio_inputs= 1, */
1341 .gpiomask
= 0xffff00,
1342 .muxsel
= MUXSEL(2, 3, 1, 1),
1343 .gpiomux
= { 0x500, 0x500, 0x300, 0x900 },
1346 .tuner_type
= TUNER_PHILIPS_PAL
,
1347 .tuner_addr
= ADDR_UNSET
,
1350 [BTTV_BOARD_GVBCTV4PCI
] = {
1351 /* TANAKA Kei <peg00625@nifty.com> */
1352 .name
= "IODATA GV-BCTV4/PCI",
1354 /* .audio_inputs= 1, */
1356 .gpiomask
= 0x010f00,
1357 .muxsel
= MUXSEL(2, 3, 0, 0),
1358 .gpiomux
= {0x10000, 0, 0x10000, 0 },
1361 .tuner_type
= TUNER_SHARP_2U5JF5540_NTSC
,
1362 .tuner_addr
= ADDR_UNSET
,
1363 .audio_mode_gpio
= gvbctv3pci_audio
,
1366 /* ---- card 0x44 ---------------------------------- */
1367 [BTTV_BOARD_VOODOOTV_FM
] = {
1368 .name
= "3Dfx VoodooTV FM (Euro)",
1369 /* try "insmod msp3400 simple=0" if you have
1370 * sound problems with this card. */
1372 /* .audio_inputs= 1, */
1374 .gpiomask
= 0x4f8a00,
1375 /* 0x100000: 1=MSP enabled (0=disable again)
1376 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1377 .gpiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff },
1378 .gpiomute
= 0x947fff,
1379 /* tvtuner, radio, external,internal, mute, stereo
1380 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1381 .muxsel
= MUXSEL(2, 3, 0, 1),
1382 .tuner_type
= TUNER_MT2032
,
1383 .tuner_addr
= ADDR_UNSET
,
1387 [BTTV_BOARD_VOODOOTV_200
] = {
1388 .name
= "VoodooTV 200 (USA)",
1389 /* try "insmod msp3400 simple=0" if you have
1390 * sound problems with this card. */
1392 /* .audio_inputs= 1, */
1394 .gpiomask
= 0x4f8a00,
1395 /* 0x100000: 1=MSP enabled (0=disable again)
1396 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1397 .gpiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff },
1398 .gpiomute
= 0x947fff,
1399 /* tvtuner, radio, external,internal, mute, stereo
1400 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1401 .muxsel
= MUXSEL(2, 3, 0, 1),
1402 .tuner_type
= TUNER_MT2032
,
1403 .tuner_addr
= ADDR_UNSET
,
1407 [BTTV_BOARD_AIMMS
] = {
1408 /* Philip Blundell <pb@nexus.co.uk> */
1409 .name
= "Active Imaging AIMMS",
1411 /* .audio_inputs= 0, */
1412 .tuner_type
= TUNER_ABSENT
,
1413 .tuner_addr
= ADDR_UNSET
,
1415 .muxsel
= MUXSEL(2),
1418 [BTTV_BOARD_PV_BT878P_PLUS
] = {
1419 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1420 .name
= "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1422 /* .audio_inputs= 4, */
1425 .muxsel
= MUXSEL(2, 3, 1, 1),
1426 .gpiomux
= { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1429 .tuner_type
= TUNER_LG_PAL_I_FM
,
1430 .tuner_addr
= ADDR_UNSET
,
1433 GPIO0: U4.A0 (hef4052bt)
1435 GPIO2: U4.A1 (second hef4052bt)
1436 GPIO3: U4.nEN, U5.A0, A5.nEN
1440 [BTTV_BOARD_FLYVIDEO98EZ
] = {
1441 .name
= "Lifeview FlyVideo 98EZ (capture only) LR51",
1443 /* .audio_inputs= 0, */
1445 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1446 .muxsel
= MUXSEL(2, 3, 1, 1),
1449 .tuner_type
= TUNER_ABSENT
,
1450 .tuner_addr
= ADDR_UNSET
,
1453 /* ---- card 0x48 ---------------------------------- */
1454 [BTTV_BOARD_PV_BT878P_9B
] = {
1455 /* Dariusz Kowalewski <darekk@automex.pl> */
1456 .name
= "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1458 /* .audio_inputs= 1, */
1461 .muxsel
= MUXSEL(2, 3, 1, 1),
1462 .gpiomux
= { 0x01, 0x00, 0x03, 0x03 },
1466 .tuner_type
= TUNER_PHILIPS_PAL
,
1467 .tuner_addr
= ADDR_UNSET
,
1468 .audio_mode_gpio
= pvbt878p9b_audio
, /* Note: not all cards have stereo */
1469 .has_radio
= 1, /* Note: not all cards have radio */
1476 GPIO20,22,23: R30,R29,R28
1479 [BTTV_BOARD_SENSORAY311_611
] = {
1480 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1481 /* you must jumper JP5 for the 311 card (PC/104+) to work */
1482 .name
= "Sensoray 311/611",
1484 /* .audio_inputs= 0, */
1487 .muxsel
= MUXSEL(2, 3, 1, 0, 0),
1489 .tuner_type
= TUNER_ABSENT
,
1490 .tuner_addr
= ADDR_UNSET
,
1492 [BTTV_BOARD_RV605
] = {
1493 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1494 .name
= "RemoteVision MX (RV605)",
1496 /* .audio_inputs= 0, */
1499 .gpiomask2
= 0x07ff,
1500 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
1502 .tuner_type
= TUNER_ABSENT
,
1503 .tuner_addr
= ADDR_UNSET
,
1504 .muxsel_hook
= rv605_muxsel
,
1506 [BTTV_BOARD_POWERCLR_MTV878
] = {
1507 .name
= "Powercolor MTV878/ MTV878R/ MTV878F",
1509 /* .audio_inputs= 2, */
1511 .gpiomask
= 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1512 .muxsel
= MUXSEL(2, 1, 1),
1513 .gpiomux
= { 0, 1, 2, 2 },
1515 .tuner_type
= TUNER_PHILIPS_PAL
,
1516 .tuner_addr
= ADDR_UNSET
,
1521 /* ---- card 0x4c ---------------------------------- */
1522 [BTTV_BOARD_WINDVR
] = {
1523 /* Masaki Suzuki <masaki@btree.org> */
1524 .name
= "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1526 /* .audio_inputs= 1, */
1528 .gpiomask
= 0x140007,
1529 .muxsel
= MUXSEL(2, 3, 1, 1),
1530 .gpiomux
= { 0, 1, 2, 3 },
1532 .tuner_type
= TUNER_PHILIPS_NTSC
,
1533 .tuner_addr
= ADDR_UNSET
,
1534 .audio_mode_gpio
= windvr_audio
,
1536 [BTTV_BOARD_GRANDTEC_MULTI
] = {
1537 .name
= "GrandTec Multi Capture Card (Bt878)",
1539 /* .audio_inputs= 0, */
1542 .muxsel
= MUXSEL(2, 3, 1, 0),
1546 .tuner_type
= TUNER_ABSENT
,
1547 .tuner_addr
= ADDR_UNSET
,
1549 [BTTV_BOARD_KWORLD
] = {
1550 .name
= "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1552 /* .audio_inputs= 3, */
1555 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1556 .muxsel
= MUXSEL(2, 3, 1, 1),
1557 .gpiomux
= { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
1558 * This card lacks external Audio In, so we mute it on Ext. & Int.
1559 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1560 * This card lacks PCI subsystem ID, sigh.
1561 * gpiomux =1: lower volume, 2+3: mute
1562 * btwincap uses 0x80000/0x80003
1567 .tuner_type
= TUNER_PHILIPS_PAL
,
1568 .tuner_addr
= ADDR_UNSET
,
1569 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1570 radio signal strength indicators work fine. */
1573 GPIO0,1: HEF4052 A0,A1
1574 GPIO2: HEF4052 nENABLE
1576 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1580 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1582 [BTTV_BOARD_DSP_TCVIDEO
] = {
1583 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1584 .name
= "DSP Design TCVIDEO",
1587 .muxsel
= MUXSEL(2, 3, 1, 0),
1589 .tuner_type
= UNSET
,
1590 .tuner_addr
= ADDR_UNSET
,
1593 /* ---- card 0x50 ---------------------------------- */
1594 [BTTV_BOARD_HAUPPAUGEPVR
] = {
1595 .name
= "Hauppauge WinTV PVR",
1597 /* .audio_inputs= 1, */
1599 .muxsel
= MUXSEL(2, 0, 1, 1),
1601 .tuner_type
= UNSET
,
1602 .tuner_addr
= ADDR_UNSET
,
1607 [BTTV_BOARD_GVBCTV5PCI
] = {
1608 .name
= "IODATA GV-BCTV5/PCI",
1610 /* .audio_inputs= 1, */
1612 .gpiomask
= 0x0f0f80,
1613 .muxsel
= MUXSEL(2, 3, 1, 0),
1614 .gpiomux
= {0x030000, 0x010000, 0, 0 },
1615 .gpiomute
= 0x020000,
1618 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
1619 .tuner_addr
= ADDR_UNSET
,
1620 .audio_mode_gpio
= gvbctv5pci_audio
,
1623 [BTTV_BOARD_OSPREY1x0
] = {
1624 .name
= "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1625 .video_inputs
= 4, /* id-inputs-clock */
1626 /* .audio_inputs= 0, */
1628 .muxsel
= MUXSEL(3, 2, 0, 1),
1630 .tuner_type
= TUNER_ABSENT
,
1631 .tuner_addr
= ADDR_UNSET
,
1635 [BTTV_BOARD_OSPREY1x0_848
] = {
1636 .name
= "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1638 /* .audio_inputs= 0, */
1640 .muxsel
= MUXSEL(2, 3, 1),
1642 .tuner_type
= TUNER_ABSENT
,
1643 .tuner_addr
= ADDR_UNSET
,
1648 /* ---- card 0x54 ---------------------------------- */
1649 [BTTV_BOARD_OSPREY101_848
] = {
1650 .name
= "Osprey 101 (848)", /* 0x05-40C0-C1 */
1652 /* .audio_inputs= 0, */
1654 .muxsel
= MUXSEL(3, 1),
1656 .tuner_type
= TUNER_ABSENT
,
1657 .tuner_addr
= ADDR_UNSET
,
1661 [BTTV_BOARD_OSPREY1x1
] = {
1662 .name
= "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1664 /* .audio_inputs= 0, */
1666 .muxsel
= MUXSEL(0),
1668 .tuner_type
= TUNER_ABSENT
,
1669 .tuner_addr
= ADDR_UNSET
,
1673 [BTTV_BOARD_OSPREY1x1_SVID
] = {
1674 .name
= "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1676 /* .audio_inputs= 0, */
1678 .muxsel
= MUXSEL(0, 1),
1680 .tuner_type
= TUNER_ABSENT
,
1681 .tuner_addr
= ADDR_UNSET
,
1685 [BTTV_BOARD_OSPREY2xx
] = {
1686 .name
= "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1688 /* .audio_inputs= 1, */
1690 .muxsel
= MUXSEL(0),
1692 .tuner_type
= TUNER_ABSENT
,
1693 .tuner_addr
= ADDR_UNSET
,
1698 /* ---- card 0x58 ---------------------------------- */
1699 [BTTV_BOARD_OSPREY2x0_SVID
] = {
1700 .name
= "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1702 /* .audio_inputs= 1, */
1704 .muxsel
= MUXSEL(0, 1),
1706 .tuner_type
= TUNER_ABSENT
,
1707 .tuner_addr
= ADDR_UNSET
,
1711 [BTTV_BOARD_OSPREY2x0
] = {
1712 .name
= "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1714 /* .audio_inputs= 1, */
1716 .muxsel
= MUXSEL(2, 3),
1718 .tuner_type
= TUNER_ABSENT
,
1719 .tuner_addr
= ADDR_UNSET
,
1723 [BTTV_BOARD_OSPREY500
] = {
1724 .name
= "Osprey 500", /* 500 */
1726 /* .audio_inputs= 1, */
1728 .muxsel
= MUXSEL(2, 3),
1730 .tuner_type
= TUNER_ABSENT
,
1731 .tuner_addr
= ADDR_UNSET
,
1735 [BTTV_BOARD_OSPREY540
] = {
1736 .name
= "Osprey 540", /* 540 */
1738 /* .audio_inputs= 1, */
1740 .tuner_type
= TUNER_ABSENT
,
1741 .tuner_addr
= ADDR_UNSET
,
1746 /* ---- card 0x5C ---------------------------------- */
1747 [BTTV_BOARD_OSPREY2000
] = {
1748 .name
= "Osprey 2000", /* 2000 */
1750 /* .audio_inputs= 1, */
1752 .muxsel
= MUXSEL(2, 3),
1754 .tuner_type
= TUNER_ABSENT
,
1755 .tuner_addr
= ADDR_UNSET
,
1757 .no_tda7432
= 1, /* must avoid, conflicts with the bt860 */
1759 [BTTV_BOARD_IDS_EAGLE
] = {
1760 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1761 .name
= "IDS Eagle",
1763 /* .audio_inputs= 0, */
1764 .tuner_type
= TUNER_ABSENT
,
1765 .tuner_addr
= ADDR_UNSET
,
1768 .muxsel
= MUXSEL(2, 2, 2, 2),
1769 .muxsel_hook
= eagle_muxsel
,
1773 [BTTV_BOARD_PINNACLESAT
] = {
1774 .name
= "Pinnacle PCTV Sat",
1776 /* .audio_inputs= 0, */
1778 .tuner_type
= TUNER_ABSENT
,
1779 .tuner_addr
= ADDR_UNSET
,
1782 .muxsel
= MUXSEL(3, 1),
1787 [BTTV_BOARD_FORMAC_PROTV
] = {
1788 .name
= "Formac ProTV II (bt878)",
1790 /* .audio_inputs= 1, */
1793 /* TV, Comp1, Composite over SVID con, SVID */
1794 .muxsel
= MUXSEL(2, 3, 1, 1),
1795 .gpiomux
= { 2, 2, 0, 0 },
1798 .tuner_type
= TUNER_PHILIPS_PAL
,
1799 .tuner_addr
= ADDR_UNSET
,
1801 GPIO=0x00,0x01,0x03: mute (?)
1802 0x02: both TV and radio (tuner: FM1216/I)
1803 The card has onboard audio connectors labeled "cdrom" and "board",
1804 not soldered here, though unknown wiring.
1805 Card lacks: external audio in, pci subsystem id.
1809 /* ---- card 0x60 ---------------------------------- */
1810 [BTTV_BOARD_MACHTV
] = {
1813 /* .audio_inputs= 1, */
1816 .muxsel
= MUXSEL(2, 3, 1, 1),
1817 .gpiomux
= { 0, 1, 2, 3},
1819 .tuner_type
= TUNER_PHILIPS_PAL
,
1820 .tuner_addr
= ADDR_UNSET
,
1823 [BTTV_BOARD_EURESYS_PICOLO
] = {
1824 .name
= "Euresys Picolo",
1826 /* .audio_inputs= 0, */
1831 .muxsel
= MUXSEL(2, 0, 1),
1833 .tuner_type
= TUNER_ABSENT
,
1834 .tuner_addr
= ADDR_UNSET
,
1836 [BTTV_BOARD_PV150
] = {
1837 /* Luc Van Hoeylandt <luc@e-magic.be> */
1838 .name
= "ProVideo PV150", /* 0x4f */
1840 /* .audio_inputs= 0, */
1843 .muxsel
= MUXSEL(2, 3),
1847 .tuner_type
= TUNER_ABSENT
,
1848 .tuner_addr
= ADDR_UNSET
,
1850 [BTTV_BOARD_AD_TVK503
] = {
1851 /* Hiroshi Takekawa <sian@big.or.jp> */
1852 /* This card lacks subsystem ID */
1853 .name
= "AD-TVK503", /* 0x63 */
1855 /* .audio_inputs= 1, */
1857 .gpiomask
= 0x001e8007,
1858 .muxsel
= MUXSEL(2, 3, 1, 0),
1859 /* Tuner, Radio, external, internal, off, on */
1860 .gpiomux
= { 0x08, 0x0f, 0x0a, 0x08 },
1864 .tuner_type
= TUNER_PHILIPS_NTSC
,
1865 .tuner_addr
= ADDR_UNSET
,
1866 .audio_mode_gpio
= adtvk503_audio
,
1869 /* ---- card 0x64 ---------------------------------- */
1870 [BTTV_BOARD_HERCULES_SM_TV
] = {
1871 .name
= "Hercules Smart TV Stereo",
1873 /* .audio_inputs= 1, */
1876 .muxsel
= MUXSEL(2, 3, 1, 1),
1879 .tuner_type
= TUNER_PHILIPS_PAL
,
1880 .tuner_addr
= ADDR_UNSET
,
1882 - card lacks subsystem ID
1883 - stereo variant w/ daughter board with tda9874a @0xb0
1885 always from tda9874 independent of GPIO (?)
1886 external line in: unknown
1887 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1888 hef4053 (instead 4052) for unknown function
1891 [BTTV_BOARD_PACETV
] = {
1892 .name
= "Pace TV & Radio Card",
1894 /* .audio_inputs= 1, */
1896 /* Tuner, CVid, SVid, CVid over SVid connector */
1897 .muxsel
= MUXSEL(2, 3, 1, 1),
1900 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1901 .tuner_addr
= ADDR_UNSET
,
1904 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1905 only internal line out: (4pin header) RGGL
1906 Radio must be decoded by msp3410d (not routed through)*/
1908 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1911 [BTTV_BOARD_IVC200
] = {
1912 /* Chris Willing <chris@vislab.usyd.edu.au> */
1915 /* .audio_inputs= 0, */
1916 .tuner_type
= TUNER_ABSENT
,
1917 .tuner_addr
= ADDR_UNSET
,
1920 .muxsel
= MUXSEL(2),
1923 [BTTV_BOARD_IVCE8784
] = {
1924 .name
= "IVCE-8784",
1926 /* .audio_inputs= 0, */
1927 .tuner_type
= TUNER_ABSENT
,
1928 .tuner_addr
= ADDR_UNSET
,
1931 .muxsel
= MUXSEL(2),
1934 [BTTV_BOARD_XGUARD
] = {
1935 .name
= "Grand X-Guard / Trust 814PCI",
1937 /* .audio_inputs= 0, */
1939 .tuner_type
= TUNER_ABSENT
,
1940 .tuner_addr
= ADDR_UNSET
,
1942 .muxsel
= MUXSEL(2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0),
1943 .muxsel_hook
= xguard_muxsel
,
1949 /* ---- card 0x68 ---------------------------------- */
1950 [BTTV_BOARD_NEBULA_DIGITV
] = {
1951 .name
= "Nebula Electronics DigiTV",
1954 .muxsel
= MUXSEL(2, 3, 1, 0),
1958 .tuner_type
= TUNER_ABSENT
,
1959 .tuner_addr
= ADDR_UNSET
,
1965 [BTTV_BOARD_PV143
] = {
1966 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1967 .name
= "ProVideo PV143",
1969 /* .audio_inputs= 0, */
1972 .muxsel
= MUXSEL(2, 3, 1, 0),
1976 .tuner_type
= TUNER_ABSENT
,
1977 .tuner_addr
= ADDR_UNSET
,
1979 [BTTV_BOARD_VD009X1_VD011_MINIDIN
] = {
1980 /* M.Klahr@phytec.de */
1981 .name
= "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
1983 /* .audio_inputs= 0, */
1986 .muxsel
= MUXSEL(2, 3, 1, 0),
1987 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
1989 .tuner_type
= TUNER_ABSENT
,
1990 .tuner_addr
= ADDR_UNSET
,
1992 [BTTV_BOARD_VD009X1_VD011_COMBI
] = {
1993 .name
= "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
1995 /* .audio_inputs= 0, */
1998 .muxsel
= MUXSEL(2, 3, 1, 1),
1999 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2001 .tuner_type
= TUNER_ABSENT
,
2002 .tuner_addr
= ADDR_UNSET
,
2005 /* ---- card 0x6c ---------------------------------- */
2006 [BTTV_BOARD_VD009_MINIDIN
] = {
2007 .name
= "PHYTEC VD-009 MiniDIN (bt878)",
2009 /* .audio_inputs= 0, */
2012 .gpiomask2
= 0x03, /* used for external video mux */
2013 .muxsel
= MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
2014 .muxsel_hook
= phytec_muxsel
,
2015 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2017 .tuner_type
= TUNER_ABSENT
,
2018 .tuner_addr
= ADDR_UNSET
,
2020 [BTTV_BOARD_VD009_COMBI
] = {
2021 .name
= "PHYTEC VD-009 Combi (bt878)",
2023 /* .audio_inputs= 0, */
2026 .gpiomask2
= 0x03, /* used for external video mux */
2027 .muxsel
= MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
2028 .muxsel_hook
= phytec_muxsel
,
2029 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2031 .tuner_type
= TUNER_ABSENT
,
2032 .tuner_addr
= ADDR_UNSET
,
2034 [BTTV_BOARD_IVC100
] = {
2037 /* .audio_inputs= 0, */
2038 .tuner_type
= TUNER_ABSENT
,
2039 .tuner_addr
= ADDR_UNSET
,
2042 .muxsel
= MUXSEL(2, 3, 1, 0),
2045 [BTTV_BOARD_IVC120
] = {
2046 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2049 /* .audio_inputs= 0, */
2050 .tuner_type
= TUNER_ABSENT
,
2051 .tuner_addr
= ADDR_UNSET
,
2052 .svhs
= NO_SVHS
, /* card has no svhs */
2056 .muxsel
= MUXSEL(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
2057 .muxsel_hook
= ivc120_muxsel
,
2061 /* ---- card 0x70 ---------------------------------- */
2062 [BTTV_BOARD_PC_HDTV
] = {
2063 .name
= "pcHDTV HD-2000 TV",
2065 /* .audio_inputs= 1, */
2067 .muxsel
= MUXSEL(2, 3, 1, 0),
2068 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
2069 .tuner_addr
= ADDR_UNSET
,
2072 [BTTV_BOARD_TWINHAN_DST
] = {
2073 .name
= "Twinhan DST + clones",
2076 .tuner_type
= TUNER_ABSENT
,
2077 .tuner_addr
= ADDR_UNSET
,
2081 [BTTV_BOARD_WINFASTVC100
] = {
2082 .name
= "Winfast VC100",
2084 /* .audio_inputs= 0, */
2086 /* Vid In, SVid In, Vid over SVid in connector */
2087 .muxsel
= MUXSEL(3, 1, 1, 3),
2090 .tuner_type
= TUNER_ABSENT
,
2091 .tuner_addr
= ADDR_UNSET
,
2094 [BTTV_BOARD_TEV560
] = {
2095 .name
= "Teppro TEV-560/InterVision IV-560",
2097 /* .audio_inputs= 1, */
2100 .muxsel
= MUXSEL(2, 3, 1, 1),
2101 .gpiomux
= { 1, 1, 1, 1 },
2102 .tuner_type
= TUNER_PHILIPS_PAL
,
2103 .tuner_addr
= ADDR_UNSET
,
2107 /* ---- card 0x74 ---------------------------------- */
2108 [BTTV_BOARD_SIMUS_GVC1100
] = {
2109 .name
= "SIMUS GVC1100",
2111 /* .audio_inputs= 0, */
2113 .tuner_type
= TUNER_ABSENT
,
2114 .tuner_addr
= ADDR_UNSET
,
2116 .muxsel
= MUXSEL(2, 2, 2, 2),
2118 .muxsel_hook
= gvc1100_muxsel
,
2120 [BTTV_BOARD_NGSTV_PLUS
] = {
2121 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2122 .name
= "NGS NGSTV+",
2125 .gpiomask
= 0x008007,
2126 .muxsel
= MUXSEL(2, 3, 0, 0),
2127 .gpiomux
= { 0, 0, 0, 0 },
2128 .gpiomute
= 0x000003,
2130 .tuner_type
= TUNER_PHILIPS_PAL
,
2131 .tuner_addr
= ADDR_UNSET
,
2134 [BTTV_BOARD_LMLBT4
] = {
2135 /* http://linuxmedialabs.com */
2137 .video_inputs
= 4, /* IN1,IN2,IN3,IN4 */
2138 /* .audio_inputs= 0, */
2140 .muxsel
= MUXSEL(2, 3, 1, 0),
2143 .tuner_type
= TUNER_ABSENT
,
2144 .tuner_addr
= ADDR_UNSET
,
2146 [BTTV_BOARD_TEKRAM_M205
] = {
2147 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2148 .name
= "Tekram M205 PRO",
2150 /* .audio_inputs= 1, */
2151 .tuner_type
= TUNER_PHILIPS_PAL
,
2152 .tuner_addr
= ADDR_UNSET
,
2155 .muxsel
= MUXSEL(2, 3, 1),
2156 .gpiomux
= { 0x68, 0x68, 0x61, 0x61 },
2160 /* ---- card 0x78 ---------------------------------- */
2161 [BTTV_BOARD_CONTVFMI
] = {
2162 /* Javier Cendan Ares <jcendan@lycos.es> */
2163 /* bt878 TV + FM without subsystem ID */
2164 .name
= "Conceptronic CONTVFMi",
2166 /* .audio_inputs= 1, */
2168 .gpiomask
= 0x008007,
2169 .muxsel
= MUXSEL(2, 3, 1, 1),
2170 .gpiomux
= { 0, 1, 2, 2 },
2173 .tuner_type
= TUNER_PHILIPS_PAL
,
2174 .tuner_addr
= ADDR_UNSET
,
2178 [BTTV_BOARD_PICOLO_TETRA_CHIP
] = {
2179 /*Eric DEBIEF <debief@telemsa.com>*/
2180 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2181 /*adds picolo_tetra_muxsel(), picolo_tetra_init(), the following declaration*/
2182 /*structure and #define BTTV_BOARD_PICOLO_TETRA_CHIP 0x79 in bttv.h*/
2183 .name
= "Euresys Picolo Tetra",
2185 /* .audio_inputs= 0, */
2188 .gpiomask2
= 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2191 /*878A input is always MUX0, see above.*/
2192 .muxsel
= MUXSEL(2, 2, 2, 2),
2193 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2195 .muxsel_hook
= picolo_tetra_muxsel
,/*Required as it doesn't follow the classic input selection policy*/
2196 .tuner_type
= TUNER_ABSENT
,
2197 .tuner_addr
= ADDR_UNSET
,
2199 [BTTV_BOARD_SPIRIT_TV
] = {
2200 /* Spirit TV Tuner from http://spiritmodems.com.au */
2201 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2202 .name
= "Spirit TV Tuner",
2204 /* .audio_inputs= 1, */
2206 .gpiomask
= 0x0000000f,
2207 .muxsel
= MUXSEL(2, 1, 1),
2208 .gpiomux
= { 0x02, 0x00, 0x00, 0x00 },
2209 .tuner_type
= TUNER_TEMIC_PAL
,
2210 .tuner_addr
= ADDR_UNSET
,
2213 [BTTV_BOARD_AVDVBT_771
] = {
2214 /* Wolfram Joost <wojo@frokaschwei.de> */
2215 .name
= "AVerMedia AVerTV DVB-T 771",
2218 .tuner_type
= TUNER_ABSENT
,
2219 .tuner_addr
= ADDR_UNSET
,
2220 .muxsel
= MUXSEL(3, 3),
2228 /* ---- card 0x7c ---------------------------------- */
2229 [BTTV_BOARD_AVDVBT_761
] = {
2230 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
2231 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
2232 .name
= "AverMedia AverTV DVB-T 761",
2235 .muxsel
= MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2239 .tuner_type
= TUNER_ABSENT
,
2240 .tuner_addr
= ADDR_UNSET
,
2245 [BTTV_BOARD_MATRIX_VISIONSQ
] = {
2246 /* andre.schwarz@matrix-vision.de */
2247 .name
= "MATRIX Vision Sigma-SQ",
2249 /* .audio_inputs= 0, */
2252 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3),
2253 .muxsel_hook
= sigmaSQ_muxsel
,
2257 .tuner_type
= TUNER_ABSENT
,
2258 .tuner_addr
= ADDR_UNSET
,
2260 [BTTV_BOARD_MATRIX_VISIONSLC
] = {
2261 /* andre.schwarz@matrix-vision.de */
2262 .name
= "MATRIX Vision Sigma-SLC",
2264 /* .audio_inputs= 0, */
2267 .muxsel
= MUXSEL(2, 2, 2, 2),
2268 .muxsel_hook
= sigmaSLC_muxsel
,
2272 .tuner_type
= TUNER_ABSENT
,
2273 .tuner_addr
= ADDR_UNSET
,
2275 /* BTTV_BOARD_APAC_VIEWCOMP */
2276 [BTTV_BOARD_APAC_VIEWCOMP
] = {
2277 /* Attila Kondoros <attila.kondoros@chello.hu> */
2278 /* bt878 TV + FM 0x00000000 subsystem ID */
2279 .name
= "APAC Viewcomp 878(AMAX)",
2281 /* .audio_inputs= 1, */
2284 .muxsel
= MUXSEL(2, 3, 1, 1),
2285 .gpiomux
= { 2, 0, 0, 0 },
2288 .tuner_type
= TUNER_PHILIPS_PAL
,
2289 .tuner_addr
= ADDR_UNSET
,
2290 .has_remote
= 1, /* miniremote works, see ir-kbd-gpio.c */
2291 .has_radio
= 1, /* not every card has radio */
2294 /* ---- card 0x80 ---------------------------------- */
2295 [BTTV_BOARD_DVICO_DVBT_LITE
] = {
2296 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2297 .name
= "DViCO FusionHDTV DVB-T Lite",
2303 .tuner_type
= TUNER_ABSENT
,
2304 .tuner_addr
= ADDR_UNSET
,
2306 [BTTV_BOARD_VGEAR_MYVCD
] = {
2307 /* Steven <photon38@pchome.com.tw> */
2308 .name
= "V-Gear MyVCD",
2310 /* .audio_inputs= 1, */
2313 .muxsel
= MUXSEL(2, 3, 1, 0),
2314 .gpiomux
= {0x31, 0x31, 0x31, 0x31 },
2318 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
2319 .tuner_addr
= ADDR_UNSET
,
2322 [BTTV_BOARD_SUPER_TV
] = {
2323 /* Rick C <cryptdragoon@gmail.com> */
2324 .name
= "Super TV Tuner",
2326 /* .audio_inputs= 1, */
2328 .muxsel
= MUXSEL(2, 3, 1, 0),
2329 .tuner_type
= TUNER_PHILIPS_NTSC
,
2330 .tuner_addr
= ADDR_UNSET
,
2331 .gpiomask
= 0x008007,
2332 .gpiomux
= { 0, 0x000001,0,0 },
2335 [BTTV_BOARD_TIBET_CS16
] = {
2336 /* Chris Fanning <video4linux@haydon.net> */
2337 .name
= "Tibet Systems 'Progress DVR' CS16",
2339 /* .audio_inputs= 0, */
2341 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2345 .tuner_type
= TUNER_ABSENT
,
2346 .tuner_addr
= ADDR_UNSET
,
2347 .muxsel_hook
= tibetCS16_muxsel
,
2349 [BTTV_BOARD_KODICOM_4400R
] = {
2350 /* Bill Brack <wbrack@mmm.com.hk> */
2352 * Note that, because of the card's wiring, the "master"
2353 * BT878A chip (i.e. the one which controls the analog switch
2354 * and must use this card type) is the 2nd one detected. The
2355 * other 3 chips should use card type 0x85, whose description
2356 * follows this one. There is a EEPROM on the card (which is
2357 * connected to the I2C of one of those other chips), but is
2358 * not currently handled. There is also a facility for a
2359 * "monitor", which is also not currently implemented.
2361 .name
= "Kodicom 4400R (master)",
2363 /* .audio_inputs= 0, */
2364 .tuner_type
= TUNER_ABSENT
,
2365 .tuner_addr
= ADDR_UNSET
,
2367 /* GPIO bits 0-9 used for analog switch:
2368 * 00 - 03: camera selector
2369 * 04 - 06: channel (controller) selector
2370 * 07: data (1->on, 0->off)
2373 * bit 16 is input from sync separator for the channel
2375 .gpiomask
= 0x0003ff,
2377 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2381 .muxsel_hook
= kodicom4400r_muxsel
,
2383 [BTTV_BOARD_KODICOM_4400R_SL
] = {
2384 /* Bill Brack <wbrack@mmm.com.hk> */
2385 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2386 * one which controls the analog switch, and must use the card type)
2387 * is the 2nd one detected. The other 3 chips should use this card
2390 .name
= "Kodicom 4400R (slave)",
2392 /* .audio_inputs= 0, */
2393 .tuner_type
= TUNER_ABSENT
,
2394 .tuner_addr
= ADDR_UNSET
,
2396 .gpiomask
= 0x010000,
2398 .muxsel
= MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2402 .muxsel_hook
= kodicom4400r_muxsel
,
2404 /* ---- card 0x86---------------------------------- */
2405 [BTTV_BOARD_ADLINK_RTV24
] = {
2406 /* Michael Henson <mhenson@clarityvi.com> */
2407 /* Adlink RTV24 with special unlock codes */
2408 .name
= "Adlink RTV24",
2410 /* .audio_inputs= 1, */
2412 .muxsel
= MUXSEL(2, 3, 1, 0),
2413 .tuner_type
= UNSET
,
2414 .tuner_addr
= ADDR_UNSET
,
2417 /* ---- card 0x87---------------------------------- */
2418 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
] = {
2419 /* Michael Krufky <mkrufky@linuxtv.org> */
2420 .name
= "DViCO FusionHDTV 5 Lite",
2421 .tuner_type
= TUNER_LG_TDVS_H06XF
, /* TDVS-H064F */
2422 .tuner_addr
= ADDR_UNSET
,
2424 /* .audio_inputs= 1, */
2426 .muxsel
= MUXSEL(2, 3, 1),
2427 .gpiomask
= 0x00e00007,
2428 .gpiomux
= { 0x00400005, 0, 0x00000001, 0 },
2429 .gpiomute
= 0x00c00007,
2434 /* ---- card 0x88---------------------------------- */
2435 [BTTV_BOARD_ACORP_Y878F
] = {
2436 /* Mauro Carvalho Chehab <mchehab@kernel.org> */
2437 .name
= "Acorp Y878F",
2439 /* .audio_inputs= 1, */
2441 .gpiomask
= 0x01fe00,
2442 .muxsel
= MUXSEL(2, 3, 1, 1),
2443 .gpiomux
= { 0x001e00, 0, 0x018000, 0x014000 },
2444 .gpiomute
= 0x002000,
2446 .tuner_type
= TUNER_YMEC_TVF66T5_B_DFF
,
2447 .tuner_addr
= 0xc1 >>1,
2450 /* ---- card 0x89 ---------------------------------- */
2451 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2
] = {
2452 .name
= "Conceptronic CTVFMi v2",
2454 /* .audio_inputs= 1, */
2456 .gpiomask
= 0x001c0007,
2457 .muxsel
= MUXSEL(2, 3, 1, 1),
2458 .gpiomux
= { 0, 1, 2, 2 },
2461 .tuner_type
= TUNER_TENA_9533_DI
,
2462 .tuner_addr
= ADDR_UNSET
,
2466 /* ---- card 0x8a ---------------------------------- */
2467 [BTTV_BOARD_PV_BT878P_2E
] = {
2468 .name
= "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2470 /* .audio_inputs= 1, */
2473 .gpiomask
= 0x01fe00,
2474 .muxsel
= MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
2475 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2476 .gpiomux
= { 0x00400, 0x10400, 0x04400, 0x80000 },
2477 .gpiomute
= 0x12400,
2480 .tuner_type
= TUNER_LG_PAL_FM
,
2481 .tuner_addr
= ADDR_UNSET
,
2484 /* ---- card 0x8b ---------------------------------- */
2485 [BTTV_BOARD_PV_M4900
] = {
2486 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2487 .name
= "Prolink PixelView PlayTV MPEG2 PV-M4900",
2489 /* .audio_inputs= 1, */
2492 .muxsel
= MUXSEL(2, 3, 1, 1),
2493 .gpiomux
= { 0x21, 0x20, 0x24, 0x2c },
2497 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
2498 .tuner_addr
= ADDR_UNSET
,
2502 /* ---- card 0x8c ---------------------------------- */
2503 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2504 one external BNC composite input (mux 2)
2505 three internal composite inputs (unknown muxes)
2506 an 18-bit stereo A/D (CS5331A), which has:
2507 one external stereo unbalanced (RCA) audio connection
2508 one (or 3?) internal stereo balanced (XLR) audio connection
2509 input is selected via gpio to a 14052B mux
2510 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2511 gain is controlled via an X9221A chip on the I2C bus @0x28
2512 sample rate is controlled via gpio to an MK1413S
2513 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2514 There is neither a tuner nor an svideo input. */
2515 [BTTV_BOARD_OSPREY440
] = {
2516 .name
= "Osprey 440",
2518 /* .audio_inputs= 2, */
2520 .muxsel
= MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
2522 .gpiomute
= 0x000, /* int + 32kHz */
2523 .gpiomux
= { 0, 0, 0x000, 0x100},
2525 .tuner_type
= TUNER_ABSENT
,
2526 .tuner_addr
= ADDR_UNSET
,
2530 /* ---- card 0x8d ---------------------------------- */
2531 [BTTV_BOARD_ASOUND_SKYEYE
] = {
2532 .name
= "Asound Skyeye PCTV",
2534 /* .audio_inputs= 1, */
2537 .muxsel
= MUXSEL(2, 3, 1, 1),
2538 .gpiomux
= { 2, 0, 0, 0 },
2541 .tuner_type
= TUNER_PHILIPS_NTSC
,
2542 .tuner_addr
= ADDR_UNSET
,
2544 /* ---- card 0x8e ---------------------------------- */
2545 [BTTV_BOARD_SABRENT_TVFM
] = {
2546 .name
= "Sabrent TV-FM (bttv version)",
2548 /* .audio_inputs= 1, */
2550 .gpiomask
= 0x108007,
2551 .muxsel
= MUXSEL(2, 3, 1, 1),
2552 .gpiomux
= { 100000, 100002, 100002, 100000 },
2556 .tuner_type
= TUNER_TNF_5335MF
,
2557 .tuner_addr
= ADDR_UNSET
,
2560 /* ---- card 0x8f ---------------------------------- */
2561 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB
] = {
2562 .name
= "Hauppauge ImpactVCB (bt878)",
2564 /* .audio_inputs= 0, */
2566 .gpiomask
= 0x0f, /* old: 7 */
2567 .muxsel
= MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2570 .tuner_type
= TUNER_ABSENT
,
2571 .tuner_addr
= ADDR_UNSET
,
2573 [BTTV_BOARD_MACHTV_MAGICTV
] = {
2574 /* Julian Calaby <julian.calaby@gmail.com>
2575 * Slightly different from original MachTV definition (0x60)
2577 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2578 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2579 * properly (methinks) causing no keyup bits being set */
2581 .name
= "MagicTV", /* rebranded MachTV */
2583 /* .audio_inputs= 1, */
2586 .muxsel
= MUXSEL(2, 3, 1, 1),
2587 .gpiomux
= { 0, 1, 2, 3 },
2589 .tuner_type
= TUNER_TEMIC_4009FR5_PAL
,
2590 .tuner_addr
= ADDR_UNSET
,
2595 [BTTV_BOARD_SSAI_SECURITY
] = {
2596 .name
= "SSAI Security Video Interface",
2598 /* .audio_inputs= 0, */
2600 .muxsel
= MUXSEL(0, 1, 2, 3),
2601 .tuner_type
= TUNER_ABSENT
,
2602 .tuner_addr
= ADDR_UNSET
,
2604 [BTTV_BOARD_SSAI_ULTRASOUND
] = {
2605 .name
= "SSAI Ultrasound Video Interface",
2607 /* .audio_inputs= 0, */
2609 .muxsel
= MUXSEL(2, 0, 1, 3),
2610 .tuner_type
= TUNER_ABSENT
,
2611 .tuner_addr
= ADDR_UNSET
,
2613 /* ---- card 0x94---------------------------------- */
2614 [BTTV_BOARD_DVICO_FUSIONHDTV_2
] = {
2615 .name
= "DViCO FusionHDTV 2",
2616 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
2617 .tuner_addr
= ADDR_UNSET
,
2619 /* .audio_inputs= 1, */
2621 .muxsel
= MUXSEL(2, 3, 1),
2622 .gpiomask
= 0x00e00007,
2623 .gpiomux
= { 0x00400005, 0, 0x00000001, 0 },
2624 .gpiomute
= 0x00c00007,
2628 /* ---- card 0x95---------------------------------- */
2629 [BTTV_BOARD_TYPHOON_TVTUNERPCI
] = {
2630 .name
= "Typhoon TV-Tuner PCI (50684)",
2632 /* .audio_inputs= 1, */
2634 .gpiomask
= 0x3014f,
2635 .muxsel
= MUXSEL(2, 3, 1, 1),
2636 .gpiomux
= { 0x20001,0x10001, 0, 0 },
2639 .tuner_type
= TUNER_PHILIPS_PAL_I
,
2640 .tuner_addr
= ADDR_UNSET
,
2642 [BTTV_BOARD_GEOVISION_GV600
] = {
2644 .name
= "Geovision GV-600",
2646 /* .audio_inputs= 0, */
2649 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2650 .muxsel_hook
= geovision_muxsel
,
2654 .tuner_type
= TUNER_ABSENT
,
2655 .tuner_addr
= ADDR_UNSET
,
2657 [BTTV_BOARD_KOZUMI_KTV_01C
] = {
2658 /* Mauro Lacy <mauro@lacy.com.ar>
2659 * Based on MagicTV and Conceptronic CONTVFMi */
2661 .name
= "Kozumi KTV-01C",
2663 /* .audio_inputs= 1, */
2665 .gpiomask
= 0x008007,
2666 .muxsel
= MUXSEL(2, 3, 1, 1),
2667 .gpiomux
= { 0, 1, 2, 2 }, /* CONTVFMi */
2668 .gpiomute
= 3, /* CONTVFMi */
2669 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
, /* TCL MK3 */
2670 .tuner_addr
= ADDR_UNSET
,
2675 [BTTV_BOARD_ENLTV_FM_2
] = {
2676 /* Encore TV Tuner Pro ENL TV-FM-2
2677 Mauro Carvalho Chehab <mchehab@kernel.org> */
2678 .name
= "Encore ENL TV-FM-2",
2680 /* .audio_inputs= 1, */
2682 /* bit 6 -> IR disabled
2683 bit 18/17 = 00 -> mute
2684 01 -> enable external audio input
2685 10 -> internal audio input (mono?)
2686 11 -> internal audio input
2688 .gpiomask
= 0x060040,
2689 .muxsel
= MUXSEL(2, 3, 3),
2690 .gpiomux
= { 0x60000, 0x60000, 0x20000, 0x20000 },
2692 .tuner_type
= TUNER_TCL_MF02GIP_5N
,
2693 .tuner_addr
= ADDR_UNSET
,
2698 [BTTV_BOARD_VD012
] = {
2699 /* D.Heer@Phytec.de */
2700 .name
= "PHYTEC VD-012 (bt878)",
2702 /* .audio_inputs= 0, */
2705 .muxsel
= MUXSEL(0, 2, 3, 1),
2706 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2708 .tuner_type
= TUNER_ABSENT
,
2709 .tuner_addr
= ADDR_UNSET
,
2711 [BTTV_BOARD_VD012_X1
] = {
2712 /* D.Heer@Phytec.de */
2713 .name
= "PHYTEC VD-012-X1 (bt878)",
2715 /* .audio_inputs= 0, */
2718 .muxsel
= MUXSEL(2, 3, 1),
2719 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2721 .tuner_type
= TUNER_ABSENT
,
2722 .tuner_addr
= ADDR_UNSET
,
2724 [BTTV_BOARD_VD012_X2
] = {
2725 /* D.Heer@Phytec.de */
2726 .name
= "PHYTEC VD-012-X2 (bt878)",
2728 /* .audio_inputs= 0, */
2731 .muxsel
= MUXSEL(3, 2, 1),
2732 .gpiomux
= { 0, 0, 0, 0 }, /* card has no audio */
2734 .tuner_type
= TUNER_ABSENT
,
2735 .tuner_addr
= ADDR_UNSET
,
2737 [BTTV_BOARD_GEOVISION_GV800S
] = {
2738 /* Bruno Christo <bchristo@inf.ufsm.br>
2740 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2741 * 1 audio input per BT878A = 4 audio inputs
2742 * 4 video inputs per BT878A = 16 video inputs
2743 * This is the first BT878A chip of the GV-800(S). It's the
2744 * "master" chip and it controls the video inputs through an
2745 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2746 * slaves should use card type 0x9e (following this one).
2747 * There is a EEPROM on the card which is currently not handled.
2748 * The audio input is not working yet.
2750 .name
= "Geovision GV-800(S) (master)",
2752 /* .audio_inputs= 1, */
2753 .tuner_type
= TUNER_ABSENT
,
2754 .tuner_addr
= ADDR_UNSET
,
2756 .gpiomask
= 0xf107f,
2758 .muxsel
= MUXSEL(2, 2, 2, 2),
2762 .muxsel_hook
= gv800s_muxsel
,
2764 [BTTV_BOARD_GEOVISION_GV800S_SL
] = {
2765 /* Bruno Christo <bchristo@inf.ufsm.br>
2767 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2768 * 1 audio input per BT878A = 4 audio inputs
2769 * 4 video inputs per BT878A = 16 video inputs
2770 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2771 * and should use this card type.
2772 * The audio input is not working yet.
2774 .name
= "Geovision GV-800(S) (slave)",
2776 /* .audio_inputs= 1, */
2777 .tuner_type
= TUNER_ABSENT
,
2778 .tuner_addr
= ADDR_UNSET
,
2782 .muxsel
= MUXSEL(2, 2, 2, 2),
2786 .muxsel_hook
= gv800s_muxsel
,
2788 [BTTV_BOARD_PV183
] = {
2789 .name
= "ProVideo PV183", /* 0x9f */
2791 /* .audio_inputs= 0, */
2794 .muxsel
= MUXSEL(2, 3),
2798 .tuner_type
= TUNER_ABSENT
,
2799 .tuner_addr
= ADDR_UNSET
,
2801 /* ---- card 0xa0---------------------------------- */
2802 [BTTV_BOARD_TVT_TD3116
] = {
2803 .name
= "Tongwei Video Technology TD-3116",
2805 .gpiomask
= 0xc00ff,
2806 .muxsel
= MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2807 .muxsel_hook
= td3116_muxsel
,
2810 .tuner_type
= TUNER_ABSENT
,
2812 [BTTV_BOARD_APOSONIC_WDVR
] = {
2813 .name
= "Aposonic W-DVR",
2816 .muxsel
= MUXSEL(2, 3, 1, 0),
2817 .tuner_type
= TUNER_ABSENT
,
2819 [BTTV_BOARD_ADLINK_MPG24
] = {
2821 .name
= "Adlink MPG24",
2823 /* .audio_inputs= 1, */
2825 .muxsel
= MUXSEL(2, 2, 2, 2),
2826 .tuner_type
= UNSET
,
2827 .tuner_addr
= ADDR_UNSET
,
2830 [BTTV_BOARD_BT848_CAP_14
] = {
2831 .name
= "Bt848 Capture 14MHz",
2834 .muxsel
= MUXSEL(2, 3, 1, 0),
2836 .tuner_type
= TUNER_ABSENT
,
2838 [BTTV_BOARD_CYBERVISION_CV06
] = {
2839 .name
= "CyberVision CV06 (SV)",
2841 /* .audio_inputs= 0, */
2843 .muxsel
= MUXSEL(2, 3, 1, 0),
2845 .tuner_type
= TUNER_ABSENT
,
2846 .tuner_addr
= ADDR_UNSET
,
2848 [BTTV_BOARD_KWORLD_VSTREAM_XPERT
] = {
2849 /* Pojar George <geoubuntu@gmail.com> */
2850 .name
= "Kworld V-Stream Xpert TV PVR878",
2852 /* .audio_inputs= 1, */
2854 .gpiomask
= 0x001c0007,
2855 .muxsel
= MUXSEL(2, 3, 1, 1),
2856 .gpiomux
= { 0, 1, 2, 2 },
2859 .tuner_type
= TUNER_TENA_9533_DI
,
2860 .tuner_addr
= ADDR_UNSET
,
2864 /* ---- card 0xa6---------------------------------- */
2865 [BTTV_BOARD_PCI_8604PW
] = {
2866 /* PCI-8604PW with special unlock sequence */
2867 .name
= "PCI-8604PW",
2869 /* .audio_inputs= 0, */
2871 /* The second input is available on CN4, if populated.
2872 * The other 5x2 header (CN2?) connects to the same inputs
2873 * as the on-board BNCs */
2874 .muxsel
= MUXSEL(2, 3),
2875 .tuner_type
= TUNER_ABSENT
,
2882 static const unsigned int bttv_num_tvcards
= ARRAY_SIZE(bttv_tvcards
);
2884 /* ----------------------------------------------------------------------- */
2886 static unsigned char eeprom_data
[256];
2891 void bttv_idcard(struct bttv
*btv
)
2893 unsigned int gpiobits
;
2896 /* read PCI subsystem ID */
2897 btv
->cardid
= btv
->c
.pci
->subsystem_device
<< 16;
2898 btv
->cardid
|= btv
->c
.pci
->subsystem_vendor
;
2900 if (0 != btv
->cardid
&& 0xffffffff != btv
->cardid
) {
2901 /* look for the card */
2902 for (type
= -1, i
= 0; cards
[i
].id
!= 0; i
++)
2903 if (cards
[i
].id
== btv
->cardid
)
2908 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2909 btv
->c
.nr
, cards
[type
].name
, cards
[type
].cardnr
,
2910 btv
->cardid
& 0xffff,
2911 (btv
->cardid
>> 16) & 0xffff);
2912 btv
->c
.type
= cards
[type
].cardnr
;
2915 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2916 btv
->c
.nr
, btv
->cardid
& 0xffff,
2917 (btv
->cardid
>> 16) & 0xffff);
2918 pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kernel.org\n");
2922 /* let the user override the autodetected type */
2923 if (card
[btv
->c
.nr
] < bttv_num_tvcards
)
2924 btv
->c
.type
=card
[btv
->c
.nr
];
2926 /* print which card config we are using */
2927 pr_info("%d: using: %s [card=%d,%s]\n",
2928 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
,
2929 card
[btv
->c
.nr
] < bttv_num_tvcards
2930 ? "insmod option" : "autodetected");
2932 /* overwrite gpio stuff ?? */
2933 if (UNSET
== audioall
&& UNSET
== audiomux
[0])
2936 if (UNSET
!= audiomux
[0]) {
2938 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2939 bttv_tvcards
[btv
->c
.type
].gpiomux
[i
] = audiomux
[i
];
2940 gpiobits
|= audiomux
[i
];
2943 gpiobits
= audioall
;
2944 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2945 bttv_tvcards
[btv
->c
.type
].gpiomux
[i
] = audioall
;
2948 bttv_tvcards
[btv
->c
.type
].gpiomask
= (UNSET
!= gpiomask
) ? gpiomask
: gpiobits
;
2949 pr_info("%d: gpio config override: mask=0x%x, mux=",
2950 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].gpiomask
);
2951 for (i
= 0; i
< ARRAY_SIZE(bttv_tvcards
->gpiomux
); i
++) {
2953 i
? "," : "", bttv_tvcards
[btv
->c
.type
].gpiomux
[i
]);
2959 * (most) board specific initialisations goes here
2962 /* Some Modular Technology cards have an eeprom, but no subsystem ID */
2963 static void identify_by_eeprom(struct bttv
*btv
, unsigned char eeprom_data
[256])
2967 if (0 == strncmp(eeprom_data
,"GET MM20xPCTV",13))
2968 type
= BTTV_BOARD_MODTEC_205
;
2969 else if (0 == strncmp(eeprom_data
+20,"Picolo",7))
2970 type
= BTTV_BOARD_EURESYS_PICOLO
;
2971 else if (eeprom_data
[0] == 0x84 && eeprom_data
[2]== 0)
2972 type
= BTTV_BOARD_HAUPPAUGE
; /* old bt848 */
2976 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2977 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
);
2981 static void flyvideo_gpio(struct bttv
*btv
)
2983 int gpio
, has_remote
, has_radio
, is_capture_only
;
2984 int is_lr90
, has_tda9820_tda9821
;
2985 int tuner_type
= UNSET
, ttype
;
2987 gpio_inout(0xffffff, 0);
2988 udelay(8); /* without this we would see the 0x1800 mask */
2990 /* FIXME: must restore OUR_EN ??? */
2992 /* all cards provide GPIO info, some have an additional eeprom
2993 * LR50: GPIO coding can be found lower right CP1 .. CP9
2994 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2996 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
2998 * lowest 3 bytes are remote control codes (no handshake needed)
2999 * xxxFFF: No remote control chip soldered
3000 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3001 * Note: Some bits are Audio_Mask !
3003 ttype
= (gpio
& 0x0f0000) >> 16;
3006 tuner_type
= 2; /* NTSC, e.g. TPI8NSR11P */
3009 tuner_type
= 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
3012 tuner_type
= 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
3015 tuner_type
= 37; /* LG PAL (newer TAPC series) TAPC-G702P */
3018 tuner_type
= 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
3021 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv
->c
.nr
);
3025 has_remote
= gpio
& 0x800000;
3026 has_radio
= gpio
& 0x400000;
3027 /* unknown 0x200000;
3028 * unknown2 0x100000; */
3029 is_capture_only
= !(gpio
& 0x008000); /* GPIO15 */
3030 has_tda9820_tda9821
= !(gpio
& 0x004000);
3031 is_lr90
= !(gpio
& 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3033 * gpio & 0x001000 output bit for audio routing */
3035 if (is_capture_only
)
3036 tuner_type
= TUNER_ABSENT
; /* No tuner present */
3038 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3039 btv
->c
.nr
, has_radio
? "yes" : "no",
3040 has_remote
? "yes" : "no", tuner_type
, gpio
);
3041 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3042 btv
->c
.nr
, is_lr90
? "yes" : "no",
3043 has_tda9820_tda9821
? "yes" : "no",
3044 is_capture_only
? "yes" : "no");
3046 if (tuner_type
!= UNSET
) /* only set if known tuner autodetected, else let insmod option through */
3047 btv
->tuner_type
= tuner_type
;
3048 btv
->has_radio
= has_radio
;
3050 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3051 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3052 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
3053 if (has_tda9820_tda9821
)
3054 btv
->audio_mode_gpio
= lt9415_audio
;
3055 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
3058 static int miro_tunermap
[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3059 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3060 static int miro_fmtuner
[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3061 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3063 static void miro_pinnacle_gpio(struct bttv
*btv
)
3068 gpio_inout(0xffffff, 0);
3070 id
= ((gpio
>>10) & 63) -1;
3071 msp
= bttv_I2CRead(btv
, I2C_ADDR_MSP3400
, "MSP34xx");
3073 btv
->tuner_type
= miro_tunermap
[id
];
3074 if (0 == (gpio
& 0x20)) {
3076 if (!miro_fmtuner
[id
]) {
3077 btv
->has_tea575x
= 1;
3078 btv
->tea_gpio
.wren
= 6;
3079 btv
->tea_gpio
.most
= 7;
3080 btv
->tea_gpio
.clk
= 8;
3081 btv
->tea_gpio
.data
= 9;
3088 if (btv
->c
.type
== BTTV_BOARD_MIRO
)
3089 btv
->c
.type
= BTTV_BOARD_MIROPRO
;
3090 if (btv
->c
.type
== BTTV_BOARD_PINNACLE
)
3091 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3093 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3094 btv
->c
.nr
, id
+1, btv
->tuner_type
,
3095 !btv
->has_radio
? "no" :
3096 (btv
->has_tea575x
? "tea575x" : "fmtuner"),
3097 (-1 == msp
) ? "no" : "yes");
3099 /* new cards with microtune tuner */
3104 info
= "PAL / mono";
3105 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3108 info
= "PAL+SECAM / stereo";
3110 btv
->tda9887_conf
= TDA9887_QSS
;
3113 info
= "NTSC / stereo";
3115 btv
->tda9887_conf
= TDA9887_QSS
;
3118 info
= "PAL+SECAM / mono";
3119 btv
->tda9887_conf
= TDA9887_QSS
;
3122 info
= "NTSC / mono";
3123 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3126 info
= "NTSC / stereo";
3127 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3130 info
= "PAL / stereo";
3131 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3134 info
= "oops: unknown card";
3138 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3139 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3140 btv
->c
.nr
, id
, info
, btv
->has_radio
? "yes" : "no");
3141 btv
->tuner_type
= TUNER_MT2032
;
3145 /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3146 #define LM1882_SYNC_DRIVE 0x200000L
3148 static void init_ids_eagle(struct bttv
*btv
)
3150 gpio_inout(0xffffff,0xFFFF37);
3151 gpio_write(0x200020);
3153 /* flash strobe inverter ?! */
3154 gpio_write(0x200024);
3156 /* switch sync drive off */
3157 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3159 /* set BT848 muxel to 2 */
3160 btaor((2)<<5, ~(2<<5), BT848_IFORM
);
3163 /* Muxsel helper for the IDS Eagle.
3164 * the eagles does not use the standard muxsel-bits but
3165 * has its own multiplexer */
3166 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
)
3168 gpio_bits(3, input
& 3);
3171 /* set chroma ADC to sleep */
3172 btor(BT848_ADC_C_SLEEP
, BT848_ADC
);
3173 /* set to composite video */
3174 btand(~BT848_CONTROL_COMP
, BT848_E_CONTROL
);
3175 btand(~BT848_CONTROL_COMP
, BT848_O_CONTROL
);
3177 /* switch sync drive off */
3178 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3181 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
)
3183 static const int masks
[] = {0x30, 0x01, 0x12, 0x23};
3184 gpio_write(masks
[input
%4]);
3187 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3190 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3191 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3193 IN - sensor inputs, INx - sensor inputs and TI XORed together
3194 O1,O2,O3 - alarm outputs (relays)
3196 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3200 static void init_lmlbt4x(struct bttv
*btv
)
3202 pr_debug("LMLBT4x init\n");
3203 btwrite(0x000000, BT848_GPIO_REG_INP
);
3204 gpio_inout(0xffffff, 0x0006C0);
3205 gpio_write(0x000000);
3208 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
)
3210 unsigned int inmux
= input
% 8;
3211 gpio_inout( 0xf, 0xf );
3212 gpio_bits( 0xf, inmux
);
3215 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
)
3217 unsigned int inmux
= input
% 4;
3218 gpio_inout( 3<<9, 3<<9 );
3219 gpio_bits( 3<<9, inmux
<<9 );
3222 static void geovision_muxsel(struct bttv
*btv
, unsigned int input
)
3224 unsigned int inmux
= input
% 16;
3225 gpio_inout(0xf, 0xf);
3226 gpio_bits(0xf, inmux
);
3230 * The TD3116 has 2 74HC4051 muxes wired to the MUX0 input of a bt878.
3231 * The first 74HC4051 has the lower 8 inputs, the second one the higher 8.
3232 * The muxes are controlled via a 74HC373 latch which is connected to
3233 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3234 * Q0 of the latch is connected to the Enable (~E) input of the first
3235 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3236 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3239 static void td3116_latch_value(struct bttv
*btv
, u32 value
)
3241 gpio_bits((1<<18) | 0xff, value
);
3242 gpio_bits((1<<18) | 0xff, (1<<18) | value
);
3244 gpio_bits((1<<18) | 0xff, value
);
3247 static void td3116_muxsel(struct bttv
*btv
, unsigned int input
)
3252 highbit
= (input
& 0x8) >> 3 ;
3254 /* Disable outputs and set value in the mux */
3255 value
= 0x11; /* Disable outputs */
3256 value
|= ((input
& 0x7) << 1) << (4 * highbit
);
3257 td3116_latch_value(btv
, value
);
3259 /* Enable the correct output */
3261 value
|= ((highbit
^ 0x1) << 4) | highbit
;
3262 td3116_latch_value(btv
, value
);
3265 /* ----------------------------------------------------------------------- */
3267 static void bttv_reset_audio(struct bttv
*btv
)
3270 * BT878A has a audio-reset register.
3271 * 1. This register is an audio reset function but it is in
3272 * function-0 (video capture) address space.
3273 * 2. It is enough to do this once per power-up of the card.
3274 * 3. There is a typo in the Conexant doc -- it is not at
3275 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3276 * --//Shrikumar 030609
3282 pr_debug("%d: BT878A ARESET\n", btv
->c
.nr
);
3283 btwrite((1<<7), 0x058);
3288 /* initialization part one -- before registering i2c bus */
3289 void bttv_init_card1(struct bttv
*btv
)
3291 switch (btv
->c
.type
) {
3292 case BTTV_BOARD_HAUPPAUGE
:
3293 case BTTV_BOARD_HAUPPAUGE878
:
3294 boot_msp34xx(btv
,5);
3296 case BTTV_BOARD_VOODOOTV_200
:
3297 case BTTV_BOARD_VOODOOTV_FM
:
3298 boot_msp34xx(btv
,20);
3300 case BTTV_BOARD_AVERMEDIA98
:
3301 boot_msp34xx(btv
,11);
3303 case BTTV_BOARD_HAUPPAUGEPVR
:
3306 case BTTV_BOARD_TWINHAN_DST
:
3307 case BTTV_BOARD_AVDVBT_771
:
3308 case BTTV_BOARD_PINNACLESAT
:
3309 btv
->use_i2c_hw
= 1;
3311 case BTTV_BOARD_ADLINK_RTV24
:
3314 case BTTV_BOARD_PCI_8604PW
:
3315 init_PCI8604PW(btv
);
3319 if (!bttv_tvcards
[btv
->c
.type
].has_dvb
)
3320 bttv_reset_audio(btv
);
3323 /* initialization part two -- after registering i2c bus */
3324 void bttv_init_card2(struct bttv
*btv
)
3326 btv
->tuner_type
= UNSET
;
3328 if (BTTV_BOARD_UNKNOWN
== btv
->c
.type
) {
3329 bttv_readee(btv
,eeprom_data
,0xa0);
3330 identify_by_eeprom(btv
,eeprom_data
);
3333 switch (btv
->c
.type
) {
3334 case BTTV_BOARD_MIRO
:
3335 case BTTV_BOARD_MIROPRO
:
3336 case BTTV_BOARD_PINNACLE
:
3337 case BTTV_BOARD_PINNACLEPRO
:
3339 miro_pinnacle_gpio(btv
);
3341 case BTTV_BOARD_FLYVIDEO_98
:
3342 case BTTV_BOARD_MAXI
:
3343 case BTTV_BOARD_LIFE_FLYKIT
:
3344 case BTTV_BOARD_FLYVIDEO
:
3345 case BTTV_BOARD_TYPHOON_TVIEW
:
3346 case BTTV_BOARD_CHRONOS_VS2
:
3347 case BTTV_BOARD_FLYVIDEO_98FM
:
3348 case BTTV_BOARD_FLYVIDEO2000
:
3349 case BTTV_BOARD_FLYVIDEO98EZ
:
3350 case BTTV_BOARD_CONFERENCETV
:
3351 case BTTV_BOARD_LIFETEC_9415
:
3354 case BTTV_BOARD_HAUPPAUGE
:
3355 case BTTV_BOARD_HAUPPAUGE878
:
3356 case BTTV_BOARD_HAUPPAUGEPVR
:
3357 /* pick up some config infos from the eeprom */
3358 bttv_readee(btv
,eeprom_data
,0xa0);
3359 hauppauge_eeprom(btv
);
3361 case BTTV_BOARD_AVERMEDIA98
:
3362 case BTTV_BOARD_AVPHONE98
:
3363 bttv_readee(btv
,eeprom_data
,0xa0);
3364 avermedia_eeprom(btv
);
3366 case BTTV_BOARD_PXC200
:
3369 case BTTV_BOARD_PICOLO_TETRA_CHIP
:
3370 picolo_tetra_init(btv
);
3372 case BTTV_BOARD_VHX
:
3374 btv
->has_tea575x
= 1;
3375 btv
->tea_gpio
.wren
= 5;
3376 btv
->tea_gpio
.most
= 6;
3377 btv
->tea_gpio
.clk
= 3;
3378 btv
->tea_gpio
.data
= 4;
3381 case BTTV_BOARD_VOBIS_BOOSTAR
:
3382 case BTTV_BOARD_TERRATV
:
3383 terratec_active_radio_upgrade(btv
);
3385 case BTTV_BOARD_MAGICTVIEW061
:
3386 if (btv
->cardid
== 0x3002144f) {
3388 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3392 case BTTV_BOARD_STB2
:
3393 if (btv
->cardid
== 0x3060121a) {
3394 /* Fix up entry for 3DFX VoodooTV 100,
3395 which is an OEM STB card variant. */
3397 btv
->tuner_type
=TUNER_TEMIC_NTSC
;
3400 case BTTV_BOARD_OSPREY1x0
:
3401 case BTTV_BOARD_OSPREY1x0_848
:
3402 case BTTV_BOARD_OSPREY101_848
:
3403 case BTTV_BOARD_OSPREY1x1
:
3404 case BTTV_BOARD_OSPREY1x1_SVID
:
3405 case BTTV_BOARD_OSPREY2xx
:
3406 case BTTV_BOARD_OSPREY2x0_SVID
:
3407 case BTTV_BOARD_OSPREY2x0
:
3408 case BTTV_BOARD_OSPREY440
:
3409 case BTTV_BOARD_OSPREY500
:
3410 case BTTV_BOARD_OSPREY540
:
3411 case BTTV_BOARD_OSPREY2000
:
3412 bttv_readee(btv
,eeprom_data
,0xa0);
3413 osprey_eeprom(btv
, eeprom_data
);
3415 case BTTV_BOARD_IDS_EAGLE
:
3416 init_ids_eagle(btv
);
3418 case BTTV_BOARD_MODTEC_205
:
3419 bttv_readee(btv
,eeprom_data
,0xa0);
3422 case BTTV_BOARD_LMLBT4
:
3425 case BTTV_BOARD_TIBET_CS16
:
3426 tibetCS16_init(btv
);
3428 case BTTV_BOARD_KODICOM_4400R
:
3429 kodicom4400r_init(btv
);
3431 case BTTV_BOARD_GEOVISION_GV800S
:
3436 /* pll configuration */
3437 if (!(btv
->id
==848 && btv
->revision
==0x11)) {
3438 /* defaults from card list */
3439 if (PLL_28
== bttv_tvcards
[btv
->c
.type
].pll
) {
3440 btv
->pll
.pll_ifreq
=28636363;
3441 btv
->pll
.pll_crystal
=BT848_IFORM_XT0
;
3443 if (PLL_35
== bttv_tvcards
[btv
->c
.type
].pll
) {
3444 btv
->pll
.pll_ifreq
=35468950;
3445 btv
->pll
.pll_crystal
=BT848_IFORM_XT1
;
3447 if (PLL_14
== bttv_tvcards
[btv
->c
.type
].pll
) {
3448 btv
->pll
.pll_ifreq
= 14318181;
3449 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3451 /* insmod options can override */
3452 switch (pll
[btv
->c
.nr
]) {
3454 btv
->pll
.pll_crystal
= 0;
3455 btv
->pll
.pll_ifreq
= 0;
3456 btv
->pll
.pll_ofreq
= 0;
3458 case 1: /* 28 MHz */
3460 btv
->pll
.pll_ifreq
= 28636363;
3461 btv
->pll
.pll_ofreq
= 0;
3462 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3464 case 2: /* 35 MHz */
3466 btv
->pll
.pll_ifreq
= 35468950;
3467 btv
->pll
.pll_ofreq
= 0;
3468 btv
->pll
.pll_crystal
= BT848_IFORM_XT1
;
3470 case 3: /* 14 MHz */
3472 btv
->pll
.pll_ifreq
= 14318181;
3473 btv
->pll
.pll_ofreq
= 0;
3474 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3478 btv
->pll
.pll_current
= -1;
3480 /* tuner configuration (from card list / autodetect / insmod option) */
3481 if (UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_type
)
3482 if (UNSET
== btv
->tuner_type
)
3483 btv
->tuner_type
= bttv_tvcards
[btv
->c
.type
].tuner_type
;
3484 if (UNSET
!= tuner
[btv
->c
.nr
])
3485 btv
->tuner_type
= tuner
[btv
->c
.nr
];
3487 if (btv
->tuner_type
== TUNER_ABSENT
)
3488 pr_info("%d: tuner absent\n", btv
->c
.nr
);
3489 else if (btv
->tuner_type
== UNSET
)
3490 pr_warn("%d: tuner type unset\n", btv
->c
.nr
);
3492 pr_info("%d: tuner type=%d\n", btv
->c
.nr
, btv
->tuner_type
);
3494 if (autoload
!= UNSET
) {
3495 pr_warn("%d: the autoload option is obsolete\n", btv
->c
.nr
);
3496 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3500 if (UNSET
== btv
->tuner_type
)
3501 btv
->tuner_type
= TUNER_ABSENT
;
3503 btv
->dig
= bttv_tvcards
[btv
->c
.type
].has_dig_in
?
3504 bttv_tvcards
[btv
->c
.type
].video_inputs
- 1 : UNSET
;
3505 btv
->svhs
= bttv_tvcards
[btv
->c
.type
].svhs
== NO_SVHS
?
3506 UNSET
: bttv_tvcards
[btv
->c
.type
].svhs
;
3507 if (svhs
[btv
->c
.nr
] != UNSET
)
3508 btv
->svhs
= svhs
[btv
->c
.nr
];
3509 if (remote
[btv
->c
.nr
] != UNSET
)
3510 btv
->has_remote
= remote
[btv
->c
.nr
];
3512 if (bttv_tvcards
[btv
->c
.type
].has_radio
)
3514 if (bttv_tvcards
[btv
->c
.type
].has_remote
)
3515 btv
->has_remote
= 1;
3516 if (!bttv_tvcards
[btv
->c
.type
].no_gpioirq
)
3518 if (bttv_tvcards
[btv
->c
.type
].volume_gpio
)
3519 btv
->volume_gpio
= bttv_tvcards
[btv
->c
.type
].volume_gpio
;
3520 if (bttv_tvcards
[btv
->c
.type
].audio_mode_gpio
)
3521 btv
->audio_mode_gpio
= bttv_tvcards
[btv
->c
.type
].audio_mode_gpio
;
3523 if (btv
->tuner_type
== TUNER_ABSENT
)
3524 return; /* no tuner or related drivers to load */
3526 if (btv
->has_saa6588
|| saa6588
[btv
->c
.nr
]) {
3527 /* Probe for RDS receiver chip */
3528 static const unsigned short addrs
[] = {
3533 struct v4l2_subdev
*sd
;
3535 sd
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3536 &btv
->c
.i2c_adap
, "saa6588", 0, addrs
);
3537 btv
->has_saa6588
= (sd
!= NULL
);
3540 /* try to detect audio/fader chips */
3542 /* First check if the user specified the audio chip via a module
3545 switch (audiodev
[btv
->c
.nr
]) {
3547 return; /* do not load any audio module */
3549 case 0: /* autodetect */
3553 /* The user specified that we should probe for msp3400 */
3554 static const unsigned short addrs
[] = {
3555 I2C_ADDR_MSP3400
>> 1,
3556 I2C_ADDR_MSP3400_ALT
>> 1,
3560 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3561 &btv
->c
.i2c_adap
, "msp3400", 0, addrs
);
3562 if (btv
->sd_msp34xx
)
3568 /* The user specified that we should probe for tda7432 */
3569 static const unsigned short addrs
[] = {
3570 I2C_ADDR_TDA7432
>> 1,
3574 if (v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3575 &btv
->c
.i2c_adap
, "tda7432", 0, addrs
))
3581 /* The user specified that we should probe for tvaudio */
3582 btv
->sd_tvaudio
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3583 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3584 if (btv
->sd_tvaudio
)
3590 pr_warn("%d: unknown audiodev value!\n", btv
->c
.nr
);
3594 /* There were no overrides, so now we try to discover this through the
3597 /* probe for msp3400 first: this driver can detect whether or not
3598 it really is a msp3400, so it will return NULL when the device
3599 found is really something else (e.g. a tea6300). */
3600 if (!bttv_tvcards
[btv
->c
.type
].no_msp34xx
) {
3601 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3602 &btv
->c
.i2c_adap
, "msp3400",
3603 0, I2C_ADDRS(I2C_ADDR_MSP3400
>> 1));
3604 } else if (bttv_tvcards
[btv
->c
.type
].msp34xx_alt
) {
3605 btv
->sd_msp34xx
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3606 &btv
->c
.i2c_adap
, "msp3400",
3607 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT
>> 1));
3610 /* If we found a msp34xx, then we're done. */
3611 if (btv
->sd_msp34xx
)
3614 /* Now see if we can find one of the tvaudio devices. */
3615 btv
->sd_tvaudio
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3616 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3617 if (btv
->sd_tvaudio
) {
3618 /* There may be two tvaudio chips on the card, so try to
3620 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3621 &btv
->c
.i2c_adap
, "tvaudio", 0, tvaudio_addrs());
3624 /* it might also be a tda7432. */
3625 if (!bttv_tvcards
[btv
->c
.type
].no_tda7432
) {
3626 static const unsigned short addrs
[] = {
3627 I2C_ADDR_TDA7432
>> 1,
3631 btv
->sd_tda7432
= v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3632 &btv
->c
.i2c_adap
, "tda7432", 0, addrs
);
3633 if (btv
->sd_tda7432
)
3636 if (btv
->sd_tvaudio
)
3640 pr_warn("%d: audio absent, no audio device found!\n", btv
->c
.nr
);
3644 /* initialize the tuner */
3645 void bttv_init_tuner(struct bttv
*btv
)
3647 int addr
= ADDR_UNSET
;
3649 if (ADDR_UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_addr
)
3650 addr
= bttv_tvcards
[btv
->c
.type
].tuner_addr
;
3652 if (btv
->tuner_type
!= TUNER_ABSENT
) {
3653 struct tuner_setup tun_setup
;
3655 /* Load tuner module before issuing tuner config call! */
3657 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3658 &btv
->c
.i2c_adap
, "tuner",
3659 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO
));
3660 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3661 &btv
->c
.i2c_adap
, "tuner",
3662 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD
));
3663 v4l2_i2c_new_subdev(&btv
->c
.v4l2_dev
,
3664 &btv
->c
.i2c_adap
, "tuner",
3665 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD
));
3667 tun_setup
.mode_mask
= T_ANALOG_TV
;
3668 tun_setup
.type
= btv
->tuner_type
;
3669 tun_setup
.addr
= addr
;
3672 tun_setup
.mode_mask
|= T_RADIO
;
3674 bttv_call_all(btv
, tuner
, s_type_addr
, &tun_setup
);
3677 if (btv
->tda9887_conf
) {
3678 struct v4l2_priv_tun_config tda9887_cfg
;
3680 tda9887_cfg
.tuner
= TUNER_TDA9887
;
3681 tda9887_cfg
.priv
= &btv
->tda9887_conf
;
3683 bttv_call_all(btv
, tuner
, s_config
, &tda9887_cfg
);
3687 /* ----------------------------------------------------------------------- */
3689 static void modtec_eeprom(struct bttv
*btv
)
3691 if( strncmp(&(eeprom_data
[0x1e]),"Temic 4066 FY5",14) ==0) {
3692 btv
->tuner_type
=TUNER_TEMIC_4066FY5_PAL_I
;
3693 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3694 btv
->c
.nr
, &eeprom_data
[0x1e]);
3695 } else if (strncmp(&(eeprom_data
[0x1e]),"Alps TSBB5",10) ==0) {
3696 btv
->tuner_type
=TUNER_ALPS_TSBB5_PAL_I
;
3697 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3698 btv
->c
.nr
, &eeprom_data
[0x1e]);
3699 } else if (strncmp(&(eeprom_data
[0x1e]),"Philips FM1246",14) ==0) {
3700 btv
->tuner_type
=TUNER_PHILIPS_NTSC
;
3701 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3702 btv
->c
.nr
, &eeprom_data
[0x1e]);
3704 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3705 btv
->c
.nr
, &eeprom_data
[0x1e]);
3709 static void hauppauge_eeprom(struct bttv
*btv
)
3713 tveeprom_hauppauge_analog(&tv
, eeprom_data
);
3714 btv
->tuner_type
= tv
.tuner_type
;
3715 btv
->has_radio
= tv
.has_radio
;
3717 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
3718 btv
->c
.nr
, tv
.model
);
3721 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3722 * type based on model #.
3724 if(tv
.model
== 64900) {
3725 pr_info("%d: Switching board type from %s to %s\n",
3727 bttv_tvcards
[btv
->c
.type
].name
,
3728 bttv_tvcards
[BTTV_BOARD_HAUPPAUGE_IMPACTVCB
].name
);
3729 btv
->c
.type
= BTTV_BOARD_HAUPPAUGE_IMPACTVCB
;
3732 /* The 61334 needs the msp3410 to do the radio demod to get sound */
3733 if (tv
.model
== 61334)
3734 btv
->radio_uses_msp_demodulator
= 1;
3737 /* ----------------------------------------------------------------------- */
3739 static void bttv_tea575x_set_pins(struct snd_tea575x
*tea
, u8 pins
)
3741 struct bttv
*btv
= tea
->private_data
;
3742 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3745 val
|= (pins
& TEA575X_DATA
) ? (1 << gpio
.data
) : 0;
3746 val
|= (pins
& TEA575X_CLK
) ? (1 << gpio
.clk
) : 0;
3747 val
|= (pins
& TEA575X_WREN
) ? (1 << gpio
.wren
) : 0;
3749 gpio_bits((1 << gpio
.data
) | (1 << gpio
.clk
) | (1 << gpio
.wren
), val
);
3750 if (btv
->mbox_ior
) {
3751 /* IOW and CSEL active */
3752 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3755 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3756 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3760 static u8
bttv_tea575x_get_pins(struct snd_tea575x
*tea
)
3762 struct bttv
*btv
= tea
->private_data
;
3763 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3767 if (btv
->mbox_ior
) {
3768 /* IOR and CSEL active */
3769 gpio_bits(btv
->mbox_ior
| btv
->mbox_csel
, 0);
3773 if (btv
->mbox_ior
) {
3775 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3776 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3779 if (val
& (1 << gpio
.data
))
3780 ret
|= TEA575X_DATA
;
3781 if (val
& (1 << gpio
.most
))
3782 ret
|= TEA575X_MOST
;
3787 static void bttv_tea575x_set_direction(struct snd_tea575x
*tea
, bool output
)
3789 struct bttv
*btv
= tea
->private_data
;
3790 struct bttv_tea575x_gpio gpio
= btv
->tea_gpio
;
3791 u32 mask
= (1 << gpio
.clk
) | (1 << gpio
.wren
) | (1 << gpio
.data
) |
3795 gpio_inout(mask
, (1 << gpio
.data
) | (1 << gpio
.clk
) |
3798 gpio_inout(mask
, (1 << gpio
.clk
) | (1 << gpio
.wren
));
3801 static const struct snd_tea575x_ops bttv_tea_ops
= {
3802 .set_pins
= bttv_tea575x_set_pins
,
3803 .get_pins
= bttv_tea575x_get_pins
,
3804 .set_direction
= bttv_tea575x_set_direction
,
3807 static int tea575x_init(struct bttv
*btv
)
3809 btv
->tea
.private_data
= btv
;
3810 btv
->tea
.ops
= &bttv_tea_ops
;
3811 if (!snd_tea575x_hw_init(&btv
->tea
)) {
3812 pr_info("%d: detected TEA575x radio\n", btv
->c
.nr
);
3813 btv
->tea
.mute
= false;
3817 btv
->has_tea575x
= 0;
3823 /* ----------------------------------------------------------------------- */
3825 static int terratec_active_radio_upgrade(struct bttv
*btv
)
3828 btv
->has_tea575x
= 1;
3829 btv
->tea_gpio
.wren
= 4;
3830 btv
->tea_gpio
.most
= 5;
3831 btv
->tea_gpio
.clk
= 3;
3832 btv
->tea_gpio
.data
= 2;
3834 btv
->mbox_iow
= 1 << 8;
3835 btv
->mbox_ior
= 1 << 9;
3836 btv
->mbox_csel
= 1 << 10;
3838 if (!tea575x_init(btv
)) {
3839 pr_info("%d: Terratec Active Radio Upgrade found\n", btv
->c
.nr
);
3840 btv
->has_saa6588
= 1;
3847 /* ----------------------------------------------------------------------- */
3850 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3852 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3853 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3854 * unpacked with unzip).
3856 #define PVR_GPIO_DELAY 10
3858 #define BTTV_ALT_DATA 0x000001
3859 #define BTTV_ALT_DCLK 0x100000
3860 #define BTTV_ALT_NCONFIG 0x800000
3862 static int pvr_altera_load(struct bttv
*btv
, const u8
*micro
, u32 microlen
)
3868 gpio_inout(0xffffff,BTTV_ALT_DATA
|BTTV_ALT_DCLK
|BTTV_ALT_NCONFIG
);
3870 udelay(PVR_GPIO_DELAY
);
3872 gpio_write(BTTV_ALT_NCONFIG
);
3873 udelay(PVR_GPIO_DELAY
);
3875 for (n
= 0; n
< microlen
; n
++) {
3877 for (i
= 0 ; i
< 8 ; i
++) {
3878 gpio_bits(BTTV_ALT_DCLK
,0);
3880 gpio_bits(BTTV_ALT_DATA
,BTTV_ALT_DATA
);
3882 gpio_bits(BTTV_ALT_DATA
,0);
3883 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3887 gpio_bits(BTTV_ALT_DCLK
,0);
3888 udelay(PVR_GPIO_DELAY
);
3890 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3891 for (i
= 0 ; i
< 30 ; i
++) {
3892 gpio_bits(BTTV_ALT_DCLK
,0);
3893 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3895 gpio_bits(BTTV_ALT_DCLK
,0);
3899 static int pvr_boot(struct bttv
*btv
)
3901 const struct firmware
*fw_entry
;
3904 rc
= request_firmware(&fw_entry
, "hcwamc.rbf", &btv
->c
.pci
->dev
);
3906 pr_warn("%d: no altera firmware [via hotplug]\n", btv
->c
.nr
);
3909 rc
= pvr_altera_load(btv
, fw_entry
->data
, fw_entry
->size
);
3910 pr_info("%d: altera firmware upload %s\n",
3911 btv
->c
.nr
, (rc
< 0) ? "failed" : "ok");
3912 release_firmware(fw_entry
);
3916 /* ----------------------------------------------------------------------- */
3917 /* some osprey specific stuff */
3919 static void osprey_eeprom(struct bttv
*btv
, const u8 ee
[256])
3925 /* This code will never actually get called in this case.... */
3926 if (btv
->c
.type
== BTTV_BOARD_UNKNOWN
) {
3927 /* this might be an antique... check for MMAC label in eeprom */
3928 if (!strncmp(ee
, "MMAC", 4)) {
3930 for (i
= 0; i
< 21; i
++)
3932 if (checksum
!= ee
[21])
3934 cardid
= BTTV_BOARD_OSPREY1x0_848
;
3935 for (i
= 12; i
< 21; i
++) {
3937 serial
+= ee
[i
] - '0';
3941 unsigned short type
;
3943 for (i
= 4 * 16; i
< 8 * 16; i
+= 16) {
3944 u16 checksum
= (__force u16
)ip_compute_csum(ee
+ i
, 16);
3946 if ((checksum
& 0xff) + (checksum
>> 8) == 0xff)
3953 /* found a valid descriptor */
3954 type
= get_unaligned_be16((__be16
*)(ee
+4));
3959 cardid
= BTTV_BOARD_OSPREY1x0_848
;
3962 cardid
= BTTV_BOARD_OSPREY101_848
;
3968 cardid
= BTTV_BOARD_OSPREY1x0
;
3972 cardid
= BTTV_BOARD_OSPREY1x1
;
3977 cardid
= BTTV_BOARD_OSPREY1x1_SVID
;
3983 cardid
= BTTV_BOARD_OSPREY2xx
;
3987 cardid
= BTTV_BOARD_OSPREY2x0_SVID
;
3990 cardid
= BTTV_BOARD_OSPREY500
;
3994 cardid
= BTTV_BOARD_OSPREY540
;
3995 /* bttv_osprey_540_init(btv); */
4000 cardid
= BTTV_BOARD_OSPREY2x0
;
4001 /* enable output on select control lines */
4002 gpio_inout(0xffffff,0x000303);
4005 cardid
= BTTV_BOARD_OSPREY440
;
4008 /* unknown...leave generic, but get serial # */
4009 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
4013 serial
= get_unaligned_be32((__be32
*)(ee
+6));
4016 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
4018 cardid
> 0 ? bttv_tvcards
[cardid
].name
: "Unknown", serial
);
4020 if (cardid
<0 || btv
->c
.type
== cardid
)
4023 /* card type isn't set correctly */
4024 if (card
[btv
->c
.nr
] < bttv_num_tvcards
) {
4025 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
4028 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
4029 btv
->c
.nr
, btv
->c
.type
, cardid
);
4030 btv
->c
.type
= cardid
;
4034 /* ----------------------------------------------------------------------- */
4035 /* AVermedia specific stuff, from bktr_card.c */
4037 static int tuner_0_table
[] = {
4038 TUNER_PHILIPS_NTSC
, TUNER_PHILIPS_PAL
/* PAL-BG*/,
4039 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
/* PAL-I*/,
4040 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
,
4041 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_SECAM
,
4042 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_PAL
,
4043 TUNER_PHILIPS_FM1216ME_MK3
};
4045 static int tuner_1_table
[] = {
4046 TUNER_TEMIC_NTSC
, TUNER_TEMIC_PAL
,
4047 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
4048 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
4049 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_4012FY5
, /* TUNER_TEMIC_SECAM */
4050 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_PAL
};
4052 static void avermedia_eeprom(struct bttv
*btv
)
4054 int tuner_make
, tuner_tv_fm
, tuner_format
, tuner_type
= 0;
4056 tuner_make
= (eeprom_data
[0x41] & 0x7);
4057 tuner_tv_fm
= (eeprom_data
[0x41] & 0x18) >> 3;
4058 tuner_format
= (eeprom_data
[0x42] & 0xf0) >> 4;
4059 btv
->has_remote
= (eeprom_data
[0x42] & 0x01);
4061 if (tuner_make
== 0 || tuner_make
== 2)
4062 if (tuner_format
<= 0x0a)
4063 tuner_type
= tuner_0_table
[tuner_format
];
4064 if (tuner_make
== 1)
4065 if (tuner_format
<= 9)
4066 tuner_type
= tuner_1_table
[tuner_format
];
4068 if (tuner_make
== 4)
4069 if (tuner_format
== 0x09)
4070 tuner_type
= TUNER_LG_NTSC_NEW_TAPC
; /* TAPC-G702P */
4072 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
4073 btv
->c
.nr
, eeprom_data
[0x41], eeprom_data
[0x42]);
4075 btv
->tuner_type
= tuner_type
;
4076 pr_cont("%d", tuner_type
);
4078 pr_cont("Unknown type");
4079 pr_cont(" radio:%s remote control:%s\n",
4080 tuner_tv_fm
? "yes" : "no",
4081 btv
->has_remote
? "yes" : "no");
4085 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
4086 * analog demod, which is not I2C controlled like the newer and more common
4087 * TDA9887 series. Instead it has two tri-state input pins, S0 and S1,
4088 * that control the IF for the video and audio. Apparently, bttv GPIO
4089 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
4090 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
4092 u32
bttv_tda9880_setnorm(struct bttv
*btv
, u32 gpiobits
)
4095 if (btv
->audio_input
== TVAUDIO_INPUT_TUNER
) {
4096 if (bttv_tvnorms
[btv
->tvnorm
].v4l2_id
& V4L2_STD_MN
)
4097 gpiobits
|= 0x10000;
4099 gpiobits
&= ~0x10000;
4102 gpio_bits(bttv_tvcards
[btv
->c
.type
].gpiomask
, gpiobits
);
4108 * reset/enable the MSP on some Hauppauge cards
4109 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
4114 static void boot_msp34xx(struct bttv
*btv
, int pin
)
4116 int mask
= (1 << pin
);
4118 gpio_inout(mask
,mask
);
4122 gpio_bits(mask
,mask
);
4125 bttv_gpio_tracking(btv
,"msp34xx");
4127 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
4131 /* ----------------------------------------------------------------------- */
4132 /* Imagenation L-Model PXC200 Framegrabber */
4133 /* This is basically the same procedure as
4134 * used by Alessandro Rubini in his pxc200
4135 * driver, but using BTTV functions */
4137 static void init_PXC200(struct bttv
*btv
)
4139 static int vals
[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02,
4140 0x03, 0x04, 0x05, 0x06, 0x00 };
4145 /* Initialise GPIO-connected stuff */
4146 gpio_inout(0xffffff, (1<<13));
4150 /* GPIO inputs are pulled up, so no need to drive
4151 * reset pin any longer */
4152 gpio_bits(0xffffff, 0);
4154 bttv_gpio_tracking(btv
,"pxc200");
4156 /* we could/should try and reset/control the AD pots? but
4157 right now we simply turned off the crushing. Without
4158 this the AGC drifts drifts
4159 remember the EN is reverse logic -->
4160 setting BT848_ADC_AGC_EN disable the AGC
4161 tboult@eecs.lehigh.edu
4164 btwrite(BT848_ADC_RESERVED
|BT848_ADC_AGC_EN
, BT848_ADC
);
4166 /* Initialise MAX517 DAC */
4167 pr_info("Setting DAC reference voltage level ...\n");
4168 bttv_I2CWrite(btv
,0x5E,0,0x80,1);
4170 /* Initialise 12C508 PIC */
4171 /* The I2CWrite and I2CRead commands are actually to the
4172 * same chips - but the R/W bit is included in the address
4173 * argument so the numbers are different */
4176 pr_info("Initialising 12C508 PIC chip ...\n");
4178 /* First of all, enable the clock line. This is used in the PXC200-F */
4179 val
= btread(BT848_GPIO_DMA_CTL
);
4180 val
|= BT848_GPIO_DMA_CTL_GPCLKMODE
;
4181 btwrite(val
, BT848_GPIO_DMA_CTL
);
4183 /* Then, push to 0 the reset pin long enough to reset the *
4184 * device same as above for the reset line, but not the same
4185 * value sent to the GPIO-connected stuff
4186 * which one is the good one? */
4187 gpio_inout(0xffffff,(1<<2));
4192 for (i
= 0; i
< ARRAY_SIZE(vals
); i
++) {
4193 tmp
=bttv_I2CWrite(btv
,0x1E,0,vals
[i
],1);
4195 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4196 vals
[i
],tmp
,bttv_I2CRead(btv
,0x1F,NULL
));
4200 pr_info("PXC200 Initialised\n");
4205 /* ----------------------------------------------------------------------- */
4207 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4208 * it. This apparently involves the following procedure for each 878 chip:
4210 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4212 * 2) write to GPIO_DATA
4218 * read from GPIO_DATA into buf (uint_32)
4219 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4220 * error. ERROR_CPLD_Check_Failed stop.
4222 * 3) write to GPIO_DATA
4223 * - write 0x4400 + 0x0E
4225 * - write 0x4410 + 0x0E
4228 * read from GPIO_DATA into buf (uint_32)
4229 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
4230 * error. ERROR_CPLD_Check_Failed.
4232 /* ----------------------------------------------------------------------- */
4234 init_RTV24 (struct bttv
*btv
)
4236 uint32_t dataRead
= 0;
4237 long watchdog_value
= 0x0E;
4239 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
4242 btwrite (0x00c3feff, BT848_GPIO_OUT_EN
);
4244 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
4246 btwrite (0x10 + watchdog_value
, BT848_GPIO_DATA
);
4248 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
4250 dataRead
= btread (BT848_GPIO_DATA
);
4252 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 1)) {
4253 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4254 btv
->c
.nr
, dataRead
);
4257 btwrite (0x4400 + watchdog_value
, BT848_GPIO_DATA
);
4259 btwrite (0x4410 + watchdog_value
, BT848_GPIO_DATA
);
4261 btwrite (watchdog_value
, BT848_GPIO_DATA
);
4263 dataRead
= btread (BT848_GPIO_DATA
);
4265 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 0)) {
4266 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4267 btv
->c
.nr
, dataRead
);
4272 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv
->c
.nr
);
4277 /* ----------------------------------------------------------------------- */
4279 * The PCI-8604PW contains a CPLD, probably an ispMACH 4A, that filters
4280 * the PCI REQ signals coming from the four BT878 chips. After power
4281 * up, the CPLD does not forward requests to the bus, which prevents
4282 * the BT878 from fetching RISC instructions from memory. While the
4283 * CPLD is connected to most of the GPIOs of PCI device 0xD, only
4284 * five appear to play a role in unlocking the REQ signal. The following
4285 * sequence has been determined by trial and error without access to the
4288 * Eight GPIOs of device 0xC are provided on connector CN4 (4 in, 4 out).
4289 * Devices 0xE and 0xF do not appear to have anything connected to their
4292 * The correct GPIO_OUT_EN value might have some more bits set. It should
4293 * be possible to derive it from a boundary scan of the CPLD. Its JTAG
4294 * pins are routed to test points.
4297 /* ----------------------------------------------------------------------- */
4299 init_PCI8604PW(struct bttv
*btv
)
4303 if ((PCI_SLOT(btv
->c
.pci
->devfn
) & ~3) != 0xC) {
4304 pr_warn("This is not a PCI-8604PW\n");
4308 if (PCI_SLOT(btv
->c
.pci
->devfn
) != 0xD)
4311 btwrite(0x080002, BT848_GPIO_OUT_EN
);
4313 state
= (btread(BT848_GPIO_DATA
) >> 21) & 7;
4321 pr_debug("PCI-8604PW in state %i, toggling pin\n",
4323 btwrite(0x080000, BT848_GPIO_DATA
);
4325 btwrite(0x000000, BT848_GPIO_DATA
);
4329 pr_info("PCI-8604PW unlocked\n");
4332 /* FIXME: If we are in state 7 and toggle GPIO[19] one
4333 more time, the CPLD goes into state 0, where PCI bus
4334 mastering is inhibited again. We have not managed to
4335 get out of that state. */
4337 pr_err("PCI-8604PW locked until reset\n");
4340 pr_err("PCI-8604PW in unknown state %i\n", state
);
4344 state
= (state
<< 4) | ((btread(BT848_GPIO_DATA
) >> 21) & 7);
4351 /* The transition from state 7 to state 0 is, as explained
4352 above, valid but undesired and with this code impossible
4353 as we exit as soon as we are in state 7.
4357 pr_err("PCI-8604PW invalid transition %i -> %i\n",
4358 state
>> 4, state
& 7);
4365 /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4367 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4368 * switch instead (CD22M3494E). This IC can have multiple active connections
4369 * between Xn (input) and Yn (output) pins. We need to clear any existing
4370 * connection prior to establish a new one, pulsing the STROBE pin.
4372 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4373 * GPIO pins are wired as:
4374 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4375 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4376 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4377 * GPIO[8] - - P3[5] (microcontroller)
4378 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4379 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4380 * GPINTR - - P3[4] (microcontroller)
4382 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4383 * configuration either directly (as we are doing) or using the microcontroller
4384 * which is also wired to I2C interface. I have no further info on the
4385 * microcontroller features, one would need to disassembly the firmware.
4386 * note: the vendor refused to give any information on this product, all
4387 * that stuff was found using a multimeter! :)
4389 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
)
4391 static const u8 muxgpio
[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4392 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4394 gpio_bits(0x07f, muxgpio
[input
]);
4396 /* reset all connections */
4397 gpio_bits(0x200,0x200);
4399 gpio_bits(0x200,0x000);
4402 /* create a new connection */
4403 gpio_bits(0x480,0x480);
4405 gpio_bits(0x480,0x080);
4409 /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4411 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4412 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
4413 * chips, ten eight input analog multiplexors, a not chip and a few
4416 * 16 inputs on a secondary bracket are provided and can be selected
4417 * from each of the four capture chips. Two of the eight input
4418 * multiplexors are used to select from any of the 16 input signals.
4420 * Unsupported hardware capabilities:
4421 * . A video output monitor on the secondary bracket can be selected from
4422 * one of the 878A chips.
4423 * . Another passthrough but I haven't spent any time investigating it.
4424 * . Digital I/O (logic level connected to GPIO) is available from an
4427 * The on chip input mux should always be set to 2.
4428 * GPIO[16:19] - Video input selection
4429 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4430 * GPIO[?:?] - Digital I/O.
4432 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4433 * determined what function (if any) it provides. With the microcontroller
4434 * and sync separator chips a guess is that it might have to do with video
4435 * switching and maybe some digital I/O.
4437 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
)
4440 gpio_bits(0x0f0000, input
<< 16);
4443 static void tibetCS16_init(struct bttv
*btv
)
4445 /* enable gpio bits, mask obtained via btSpy */
4446 gpio_inout(0xffffff, 0x0f7fff);
4447 gpio_write(0x0f7fff);
4451 * The following routines for the Kodicom-4400r get a little mind-twisting.
4452 * There is a "master" controller and three "slave" controllers, together
4453 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4454 * The analog switch is controlled by the "master", but the detection order
4455 * of the four BT878A chips is in an order which I just don't understand.
4456 * The "master" is actually the second controller to be detected. The
4457 * logic on the board uses logical numbers for the 4 controllers, but
4458 * those numbers are different from the detection sequence. When working
4459 * with the analog switch, we need to "map" from the detection sequence
4460 * over to the board's logical controller number. This mapping sequence
4461 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4462 * unit 3, the second (which is the master) is logical unit 0, etc.
4463 * We need to maintain the status of the analog switch (which of the 16
4464 * cameras is connected to which of the 4 controllers) in sw_status array.
4468 * First a routine to set the analog switch, which controls which camera
4469 * is routed to which controller. The switch comprises an X-address
4470 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4471 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4472 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4473 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4474 * specified address. The idea is to set the address and data, then bring
4475 * STROBE high, and finally bring STROBE back to low.
4477 static void kodicom4400r_write(struct bttv
*btv
,
4478 unsigned char xaddr
,
4479 unsigned char yaddr
,
4480 unsigned char data
) {
4483 udata
= (data
<< 7) | ((yaddr
&3) << 4) | (xaddr
&0xf);
4484 gpio_bits(0x1ff, udata
); /* write ADDR and DAT */
4485 gpio_bits(0x1ff, udata
| (1 << 8)); /* strobe high */
4486 gpio_bits(0x1ff, udata
); /* strobe low */
4490 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4491 * use this routine. The routine finds the "master" for the card, maps
4492 * the controller number from the detected position over to the logical
4493 * number, writes the appropriate data to the analog switch, and housekeeps
4494 * the local copy of the switch information. The parameter 'input' is the
4495 * requested camera number (0 - 15).
4497 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
)
4501 static unsigned char map
[4] = {3, 0, 2, 1};
4503 mctlr
= master
[btv
->c
.nr
];
4504 if (mctlr
== NULL
) { /* ignore if master not yet detected */
4507 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
+ 1) & 3; /* the '&' is for safety */
4509 xaddr
= input
& 0xf;
4510 /* Check if the controller/camera pair has changed, else ignore */
4511 if (mctlr
->sw_status
[yaddr
] != xaddr
)
4513 /* "open" the old switch, "close" the new one, save the new */
4514 kodicom4400r_write(mctlr
, mctlr
->sw_status
[yaddr
], yaddr
, 0);
4515 mctlr
->sw_status
[yaddr
] = xaddr
;
4516 kodicom4400r_write(mctlr
, xaddr
, yaddr
, 1);
4521 * During initialisation, we need to reset the analog switch. We
4522 * also preset the switch to map the 4 connectors on the card to the
4523 * *user's* (see above description of kodicom4400r_muxsel) channels
4526 static void kodicom4400r_init(struct bttv
*btv
)
4530 gpio_inout(0x0003ff, 0x0003ff);
4531 gpio_write(1 << 9); /* reset MUX */
4533 /* Preset camera 0 to the 4 controllers */
4534 for (ix
= 0; ix
< 4; ix
++) {
4535 btv
->sw_status
[ix
] = ix
;
4536 kodicom4400r_write(btv
, ix
, ix
, 1);
4539 * Since this is the "master", we need to set up the
4540 * other three controller chips' pointers to this structure
4541 * for later use in the muxsel routine.
4543 if ((btv
->c
.nr
<1) || (btv
->c
.nr
>BTTV_MAX
-3))
4545 master
[btv
->c
.nr
-1] = btv
;
4546 master
[btv
->c
.nr
] = btv
;
4547 master
[btv
->c
.nr
+1] = btv
;
4548 master
[btv
->c
.nr
+2] = btv
;
4551 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4552 * video multiplexers to provide up to 16 video inputs. These
4553 * multiplexers are controlled by the lower 8 GPIO pins of the
4554 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
4556 * xxx0 is pin xxx of multiplexer U5,
4557 * yyy1 is pin yyy of multiplexer U2
4569 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
)
4571 static const int masks
[] = {
4572 ENB0
, ENB0
|IN00
, ENB0
|IN10
, ENB0
|IN00
|IN10
,
4573 ENA0
, ENA0
|IN00
, ENA0
|IN10
, ENA0
|IN00
|IN10
,
4574 ENB1
, ENB1
|IN01
, ENB1
|IN11
, ENB1
|IN01
|IN11
,
4575 ENA1
, ENA1
|IN01
, ENA1
|IN11
, ENA1
|IN01
|IN11
,
4577 gpio_write(masks
[input
%16]);
4579 static void picolo_tetra_init(struct bttv
*btv
)
4581 /*This is the video input redirection functionality : I DID NOT USE IT. */
4582 btwrite (0x08<<16,BT848_GPIO_DATA
);/*GPIO[19] [==> 4053 B+C] set to 1 */
4583 btwrite (0x04<<16,BT848_GPIO_DATA
);/*GPIO[18] [==> 4053 A] set to 1*/
4585 static void picolo_tetra_muxsel (struct bttv
* btv
, unsigned int input
)
4588 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv
->c
.nr
, input
);
4589 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4590 /*GPIO[20]&GPIO[21] used to choose the right input*/
4591 btwrite (input
<<20,BT848_GPIO_DATA
);
4596 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4598 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4599 * switchers to provide 16 channels to MUX0. The TDA8540's have
4600 * 4 independent outputs and as such the IVC120G also has the
4601 * optional "Monitor Out" bus. This allows the card to be looking
4602 * at one input while the monitor is looking at another.
4604 * Since I've couldn't be bothered figuring out how to add an
4605 * independent muxsel for the monitor bus, I've just set it to
4606 * whatever the card is looking at.
4608 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4609 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4611 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4612 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4613 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4614 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4618 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4619 #define I2C_TDA8540 0x90
4620 #define I2C_TDA8540_ALT1 0x92
4621 #define I2C_TDA8540_ALT2 0x94
4622 #define I2C_TDA8540_ALT3 0x96
4623 #define I2C_TDA8540_ALT4 0x98
4624 #define I2C_TDA8540_ALT5 0x9a
4625 #define I2C_TDA8540_ALT6 0x9c
4627 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
)
4630 int key
= input
% 4;
4631 int matrix
= input
/ 4;
4633 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4634 btv
->c
.nr
, input
, matrix
, key
);
4636 /* Handles the input selection on the TDA8540's */
4637 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x00,
4638 ((matrix
== 3) ? (key
| key
<< 2) : 0x00), 1);
4639 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x00,
4640 ((matrix
== 0) ? (key
| key
<< 2) : 0x00), 1);
4641 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x00,
4642 ((matrix
== 1) ? (key
| key
<< 2) : 0x00), 1);
4643 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x00,
4644 ((matrix
== 2) ? (key
| key
<< 2) : 0x00), 1);
4646 /* Handles the output enables on the TDA8540's */
4647 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x02,
4648 ((matrix
== 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
4649 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x02,
4650 ((matrix
== 0) ? 0x03 : 0x00), 1); /* 1-4 */
4651 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x02,
4652 ((matrix
== 1) ? 0x03 : 0x00), 1); /* 5-8 */
4653 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x02,
4654 ((matrix
== 2) ? 0x03 : 0x00), 1); /* 9-12 */
4656 /* 878's MUX0 is already selected for input via muxsel values */
4660 /* PXC200 muxsel helper
4661 * luke@syseng.anu.edu.au
4662 * another transplant
4663 * from Alessandro Rubini (rubini@linux.it)
4665 * There are 4 kinds of cards:
4666 * PXC200L which is bt848
4667 * PXC200F which is bt848 with PIC controlling mux
4668 * PXC200AL which is bt878
4669 * PXC200AF which is bt878 with PIC controlling mux
4671 #define PX_CFG_PXC200F 0x01
4672 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4673 #define PX_I2C_PIC 0x0f
4674 #define PX_PXC200A_CARDID 0x200a1295
4675 #define PX_I2C_CMD_CFG 0x00
4677 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
)
4682 unsigned char buf
[2];
4684 /* Read PIC config to determine if this is a PXC200F */
4688 rc
=bttv_I2CWrite(btv
,(PX_I2C_PIC
<<1),buf
[0],buf
[1],1);
4690 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4692 /* not PXC ? do nothing */
4696 rc
=bttv_I2CRead(btv
,(PX_I2C_PIC
<<1),NULL
);
4697 if (!(rc
& PX_CFG_PXC200F
)) {
4698 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4704 /* The multiplexer in the 200F is handled by the GPIO port */
4705 /* get correct mapping between inputs */
4706 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4707 /* ** not needed!? */
4710 /* make sure output pins are enabled */
4711 /* bitmask=0x30f; */
4713 /* check whether we have a PXC200A */
4714 if (btv
->cardid
== PX_PXC200A_CARDID
) {
4715 bitmask
^= 0x180; /* use 7 and 9, not 8 and 9 */
4716 bitmask
|= 7<<4; /* the DAC */
4718 btwrite(bitmask
, BT848_GPIO_OUT_EN
);
4720 bitmask
= btread(BT848_GPIO_DATA
);
4721 if (btv
->cardid
== PX_PXC200A_CARDID
)
4722 bitmask
= (bitmask
& ~0x280) | ((mux
& 2) << 8) | ((mux
& 1) << 7);
4723 else /* older device */
4724 bitmask
= (bitmask
& ~0x300) | ((mux
& 3) << 8);
4725 btwrite(bitmask
,BT848_GPIO_DATA
);
4728 * Was "to be safe, set the bt848 to input 0"
4729 * Actually, since it's ok at load time, better not messing
4730 * with these bits (on PXC200AF you need to set mux 2 here)
4732 * needed because bttv-driver sets mux before calling this function
4734 if (btv
->cardid
== PX_PXC200A_CARDID
)
4735 btaor(2<<5, ~BT848_IFORM_MUXSEL
, BT848_IFORM
);
4736 else /* older device */
4737 btand(~BT848_IFORM_MUXSEL
,BT848_IFORM
);
4739 pr_debug("%d: setting input channel to:%d\n", btv
->c
.nr
, (int)mux
);
4742 static void phytec_muxsel(struct bttv
*btv
, unsigned int input
)
4744 unsigned int mux
= input
% 4;
4746 if (input
== btv
->svhs
)
4749 gpio_bits(0x3, mux
);
4753 * GeoVision GV-800(S) functions
4754 * Bruno Christo <bchristo@inf.ufsm.br>
4757 /* This is a function to control the analog switch, which determines which
4758 * camera is routed to which controller. The switch comprises an X-address
4759 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4760 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4761 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4762 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4763 * specified address. There is also a chip select (gpio bit 16).
4764 * The idea is to set the address and chip select together, bring
4765 * STROBE high, write the data, and finally bring STROBE back to low.
4767 static void gv800s_write(struct bttv
*btv
,
4768 unsigned char xaddr
,
4769 unsigned char yaddr
,
4770 unsigned char data
) {
4771 /* On the "master" 878A:
4772 * GPIO bits 0-9 are used for the analog switch:
4773 * 00 - 03: camera selector
4774 * 04 - 06: 878A (controller) selector
4777 * 18: data (1->on, 0->off)
4780 const u32 ADDRESS
= ((xaddr
&0xf) | (yaddr
&3)<<4);
4781 const u32 CSELECT
= 1<<16;
4782 const u32 STROBE
= 1<<17;
4783 const u32 DATA
= data
<<18;
4785 gpio_bits(0x1007f, ADDRESS
| CSELECT
); /* write ADDRESS and CSELECT */
4786 gpio_bits(0x20000, STROBE
); /* STROBE high */
4787 gpio_bits(0x40000, DATA
); /* write DATA */
4788 gpio_bits(0x20000, ~STROBE
); /* STROBE low */
4792 * GeoVision GV-800(S) muxsel
4794 * Each of the 4 cards (controllers) use this function.
4795 * The controller using this function selects the input through the GPIO pins
4796 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4798 * The parameter 'input' is the requested camera number (0-4) on the controller.
4799 * The map array has the address of each input. Note that the addresses in the
4800 * array are in the sequence the original GeoVision driver uses, that is, set
4801 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4802 * the physical "camera 1" connector corresponds to controller 0 input 0,
4803 * "camera 2" corresponds to controller 1 input 0, and so on.
4805 * After getting the input address, the function then writes the appropriate
4806 * data to the analog switch, and housekeeps the local copy of the switch
4809 static void gv800s_muxsel(struct bttv
*btv
, unsigned int input
)
4813 static unsigned int map
[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4814 { 0x1, 0x5, 0xb, 0x7 },
4815 { 0x2, 0x8, 0xc, 0xe },
4816 { 0x3, 0x9, 0xd, 0xf } };
4818 mctlr
= master
[btv
->c
.nr
];
4819 if (mctlr
== NULL
) {
4820 /* do nothing until the "master" is detected */
4823 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
) & 3;
4824 xaddr
= map
[yaddr
][input
] & 0xf;
4826 /* Check if the controller/camera pair has changed, ignore otherwise */
4827 if (mctlr
->sw_status
[yaddr
] != xaddr
) {
4828 /* disable the old switch, enable the new one and save status */
4829 gv800s_write(mctlr
, mctlr
->sw_status
[yaddr
], yaddr
, 0);
4830 mctlr
->sw_status
[yaddr
] = xaddr
;
4831 gv800s_write(mctlr
, xaddr
, yaddr
, 1);
4835 /* GeoVision GV-800(S) "master" chip init */
4836 static void gv800s_init(struct bttv
*btv
)
4840 gpio_inout(0xf107f, 0xf107f);
4841 gpio_write(1<<19); /* reset the analog MUX */
4844 /* Preset camera 0 to the 4 controllers */
4845 for (ix
= 0; ix
< 4; ix
++) {
4846 btv
->sw_status
[ix
] = ix
;
4847 gv800s_write(btv
, ix
, ix
, 1);
4850 /* Inputs on the "master" controller need this brightness fix */
4851 bttv_I2CWrite(btv
, 0x18, 0x5, 0x90, 1);
4853 if (btv
->c
.nr
> BTTV_MAX
-4)
4856 * Store the "master" controller pointer in the master
4857 * array for later use in the muxsel function.
4859 master
[btv
->c
.nr
] = btv
;
4860 master
[btv
->c
.nr
+1] = btv
;
4861 master
[btv
->c
.nr
+2] = btv
;
4862 master
[btv
->c
.nr
+3] = btv
;
4865 /* ----------------------------------------------------------------------- */
4866 /* motherboard chipset specific stuff */
4868 void __init
bttv_check_chipset(void)
4870 struct pci_dev
*dev
= NULL
;
4872 if (pci_pci_problems
& (PCIPCI_TRITON
|PCIPCI_NATOMA
|PCIPCI_VIAETBF
))
4874 if (pci_pci_problems
& PCIPCI_VSFX
)
4876 #ifdef PCIPCI_ALIMAGIK
4877 if (pci_pci_problems
& PCIPCI_ALIMAGIK
)
4882 /* print warnings about any quirks found */
4884 pr_info("Host bridge needs ETBF enabled\n");
4886 pr_info("Host bridge needs VSFX enabled\n");
4887 if (UNSET
!= latency
)
4888 pr_info("pci latency fixup [%d]\n", latency
);
4889 while ((dev
= pci_get_device(PCI_VENDOR_ID_INTEL
,
4890 PCI_DEVICE_ID_INTEL_82441
, dev
))) {
4892 pci_read_config_byte(dev
, 0x53, &b
);
4894 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4899 int bttv_handle_chipset(struct bttv
*btv
)
4901 unsigned char command
;
4903 if (!triton1
&& !vsfx
&& UNSET
== latency
)
4908 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4910 if (vsfx
&& btv
->id
>= 878)
4911 pr_info("%d: enabling VSFX\n", btv
->c
.nr
);
4912 if (UNSET
!= latency
)
4913 pr_info("%d: setting pci timer to %d\n",
4914 btv
->c
.nr
, latency
);
4917 if (btv
->id
< 878) {
4918 /* bt848 (mis)uses a bit in the irq mask for etbf */
4920 btv
->triton1
= BT848_INT_ETBF
;
4922 /* bt878 has a bit in the pci config space for it */
4923 pci_read_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, &command
);
4925 command
|= BT878_EN_TBFX
;
4927 command
|= BT878_EN_VSFX
;
4928 pci_write_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, command
);
4930 if (UNSET
!= latency
)
4931 pci_write_config_byte(btv
->c
.pci
, PCI_LATENCY_TIMER
, latency
);