5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
9 & Marcus Metzler (mocm@thp.uni-koeln.de)
10 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <linux/config.h>
29 #include <linux/delay.h>
30 #include <linux/module.h>
31 #include <linux/moduleparam.h>
32 #include <linux/kmod.h>
33 #include <linux/init.h>
34 #include <linux/pci.h>
35 #include <linux/vmalloc.h>
36 #include <linux/firmware.h>
43 static void boot_msp34xx(struct bttv
*btv
, int pin
);
44 static void boot_bt832(struct bttv
*btv
);
45 static void hauppauge_eeprom(struct bttv
*btv
);
46 static void avermedia_eeprom(struct bttv
*btv
);
47 static void osprey_eeprom(struct bttv
*btv
);
48 static void modtec_eeprom(struct bttv
*btv
);
49 static void init_PXC200(struct bttv
*btv
);
50 static void init_RTV24(struct bttv
*btv
);
52 static void winview_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
53 static void lt9415_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
54 static void avermedia_tvphone_audio(struct bttv
*btv
, struct video_audio
*v
,
56 static void avermedia_tv_stereo_audio(struct bttv
*btv
, struct video_audio
*v
,
58 static void terratv_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
59 static void gvbctv3pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
60 static void gvbctv5pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
61 static void winfast2000_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
62 static void pvbt878p9b_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
63 static void fv2000s_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
64 static void windvr_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
65 static void adtvk503_audio(struct bttv
*btv
, struct video_audio
*v
, int set
);
66 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
);
67 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
);
68 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
);
69 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
);
70 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
);
72 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
);
74 static void picolo_tetra_muxsel(struct bttv
*btv
, unsigned int input
);
75 static void picolo_tetra_init(struct bttv
*btv
);
77 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
);
78 static void tibetCS16_init(struct bttv
*btv
);
80 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
);
81 static void kodicom4400r_init(struct bttv
*btv
);
83 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
);
84 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
);
86 static int terratec_active_radio_upgrade(struct bttv
*btv
);
87 static int tea5757_read(struct bttv
*btv
);
88 static int tea5757_write(struct bttv
*btv
, int value
);
89 static void identify_by_eeprom(struct bttv
*btv
,
90 unsigned char eeprom_data
[256]);
91 static int __devinit
pvr_boot(struct bttv
*btv
);
93 /* config variables */
94 static unsigned int triton1
=0;
95 static unsigned int vsfx
=0;
96 static unsigned int latency
= UNSET
;
99 static unsigned int card
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
100 static unsigned int pll
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
101 static unsigned int tuner
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
102 static unsigned int svhs
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
103 static unsigned int remote
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = UNSET
};
104 static struct bttv
*master
[BTTV_MAX
] = { [ 0 ... (BTTV_MAX
-1) ] = NULL
};
106 static unsigned int autoload
= 1;
108 static unsigned int autoload
= 0;
110 static unsigned int gpiomask
= UNSET
;
111 static unsigned int audioall
= UNSET
;
112 static unsigned int audiomux
[5] = { [ 0 ... 4 ] = UNSET
};
115 module_param(triton1
, int, 0444);
116 module_param(vsfx
, int, 0444);
117 module_param(no_overlay
, int, 0444);
118 module_param(latency
, int, 0444);
119 module_param(gpiomask
, int, 0444);
120 module_param(audioall
, int, 0444);
121 module_param(autoload
, int, 0444);
123 module_param_array(card
, int, NULL
, 0444);
124 module_param_array(pll
, int, NULL
, 0444);
125 module_param_array(tuner
, int, NULL
, 0444);
126 module_param_array(svhs
, int, NULL
, 0444);
127 module_param_array(remote
, int, NULL
, 0444);
128 module_param_array(audiomux
, int, NULL
, 0444);
130 MODULE_PARM_DESC(triton1
,"set ETBF pci config bit "
131 "[enable bug compatibility for triton1 + others]");
132 MODULE_PARM_DESC(vsfx
,"set VSFX pci config bit "
133 "[yet another chipset flaw workaround]");
134 MODULE_PARM_DESC(latency
,"pci latency timer");
135 MODULE_PARM_DESC(card
,"specify TV/grabber card model, see CARDLIST file for a list");
136 MODULE_PARM_DESC(pll
,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
137 MODULE_PARM_DESC(tuner
,"specify installed tuner type");
138 MODULE_PARM_DESC(autoload
,"automatically load i2c modules like tuner.o, default is 1 (yes)");
140 /* ----------------------------------------------------------------------- */
141 /* list of card IDs for bt878+ cards */
147 } cards
[] __devinitdata
= {
148 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV" },
149 { 0x39000070, BTTV_BOARD_HAUPPAUGE878
, "Hauppauge WinTV-D" },
150 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR
, "Hauppauge WinTV/PVR" },
151 { 0xff000070, BTTV_BOARD_OSPREY1x0
, "Osprey-100" },
152 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID
,"Osprey-200" },
153 { 0xff020070, BTTV_BOARD_OSPREY500
, "Osprey-500" },
154 { 0xff030070, BTTV_BOARD_OSPREY2000
, "Osprey-2000" },
155 { 0xff040070, BTTV_BOARD_OSPREY540
, "Osprey-540" },
156 { 0xff070070, BTTV_BOARD_OSPREY440
, "Osprey-440" },
158 { 0x00011002, BTTV_BOARD_ATI_TVWONDER
, "ATI TV Wonder" },
159 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE
,"ATI TV Wonder/VE" },
161 { 0x6606107d, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
162 { 0x6607107d, BTTV_BOARD_WINFASTVC100
, "Leadtek WinFast VC 100" },
163 { 0x6609107d, BTTV_BOARD_WINFAST2000
, "Leadtek TV 2000 XP" },
164 { 0x263610b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
165 { 0x264510b4, BTTV_BOARD_STB2
, "STB TV PCI FM, Gateway P/N 6000704" },
166 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI
, "I-O Data Co. GV-BCTV3/PCI" },
167 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI
, "I-O Data Co. GV-BCTV4/PCI" },
168 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
169 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI
, "I-O Data Co. GV-BCTV5/PCI" },
171 { 0x001211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
172 /* some cards ship with byteswapped IDs ... */
173 { 0x1200bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
174 { 0xff00bd11, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV [bswap]" },
175 /* this seems to happen as well ... */
176 { 0xff1211bd, BTTV_BOARD_PINNACLE
, "Pinnacle PCTV" },
178 { 0x3000121a, BTTV_BOARD_VOODOOTV_FM
, "3Dfx VoodooTV FM/ VoodooTV 200" },
179 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM
, "3Dfx VoodooTV FM/ VoodooTV 200" },
180 { 0x3060121a, BTTV_BOARD_STB2
, "3Dfx VoodooTV 100/ STB OEM" },
182 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063
, "(Askey Magic/others) TView99 CPH06x" },
183 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063
, "CPH06X TView99-Card" },
184 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH05x" },
185 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061
, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
186 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061
, "Askey CPH050" },
187 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061
, "TView 99 (CPH061)" },
188 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS
, "Phoebe TV Master (CPH060)" },
190 { 0x00011461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
191 { 0x00021461, BTTV_BOARD_AVERMEDIA98
, "AVermedia TVCapture 98" },
192 { 0x00031461, BTTV_BOARD_AVPHONE98
, "AVerMedia TVPhone98" },
193 { 0x00041461, BTTV_BOARD_AVERMEDIA98
, "AVerMedia TVCapture 98" },
194 { 0x03001461, BTTV_BOARD_AVERMEDIA98
, "VDOMATE TV TUNER CARD" },
196 { 0x1117153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL B/G)" },
197 { 0x1118153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL B/G)" },
198 { 0x1119153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Philips PAL I)" },
199 { 0x111a153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (Temic PAL I)" },
201 { 0x1123153b, BTTV_BOARD_TERRATVRADIO
, "Terratec TV Radio+" },
202 { 0x1127153b, BTTV_BOARD_TERRATV
, "Terratec TV+ (V1.05)" },
203 /* clashes with FlyVideo
204 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
205 { 0x1134153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue (LR102)" },
206 { 0x1135153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* LR102 */
207 { 0x5018153b, BTTV_BOARD_TERRATVALUE
, "Terratec TValue" }, /* ?? */
208 { 0xff3b153b, BTTV_BOARD_TERRATVALUER
, "Terratec TValue Radio" }, /* ?? */
210 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
211 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV" },
212 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
213 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
214 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE
, "Zoltrix Genie TV / Radio" },
216 { 0x1430aa00, BTTV_BOARD_PV143
, "Provideo PV143A" },
217 { 0x1431aa00, BTTV_BOARD_PV143
, "Provideo PV143B" },
218 { 0x1432aa00, BTTV_BOARD_PV143
, "Provideo PV143C" },
219 { 0x1433aa00, BTTV_BOARD_PV143
, "Provideo PV143D" },
220 { 0x1433aa03, BTTV_BOARD_PV143
, "Security Eyes" },
222 { 0x1460aa00, BTTV_BOARD_PV150
, "Provideo PV150A-1" },
223 { 0x1461aa01, BTTV_BOARD_PV150
, "Provideo PV150A-2" },
224 { 0x1462aa02, BTTV_BOARD_PV150
, "Provideo PV150A-3" },
225 { 0x1463aa03, BTTV_BOARD_PV150
, "Provideo PV150A-4" },
227 { 0x1464aa04, BTTV_BOARD_PV150
, "Provideo PV150B-1" },
228 { 0x1465aa05, BTTV_BOARD_PV150
, "Provideo PV150B-2" },
229 { 0x1466aa06, BTTV_BOARD_PV150
, "Provideo PV150B-3" },
230 { 0x1467aa07, BTTV_BOARD_PV150
, "Provideo PV150B-4" },
232 { 0xa132ff00, BTTV_BOARD_IVC100
, "IVC-100" },
233 { 0xa1550000, BTTV_BOARD_IVC200
, "IVC-200" },
234 { 0xa1550001, BTTV_BOARD_IVC200
, "IVC-200" },
235 { 0xa1550002, BTTV_BOARD_IVC200
, "IVC-200" },
236 { 0xa1550003, BTTV_BOARD_IVC200
, "IVC-200" },
237 { 0xa1550100, BTTV_BOARD_IVC200
, "IVC-200G" },
238 { 0xa1550101, BTTV_BOARD_IVC200
, "IVC-200G" },
239 { 0xa1550102, BTTV_BOARD_IVC200
, "IVC-200G" },
240 { 0xa1550103, BTTV_BOARD_IVC200
, "IVC-200G" },
241 { 0xa182ff00, BTTV_BOARD_IVC120
, "IVC-120G" },
242 { 0xa182ff01, BTTV_BOARD_IVC120
, "IVC-120G" },
243 { 0xa182ff02, BTTV_BOARD_IVC120
, "IVC-120G" },
244 { 0xa182ff03, BTTV_BOARD_IVC120
, "IVC-120G" },
245 { 0xa182ff04, BTTV_BOARD_IVC120
, "IVC-120G" },
246 { 0xa182ff05, BTTV_BOARD_IVC120
, "IVC-120G" },
247 { 0xa182ff06, BTTV_BOARD_IVC120
, "IVC-120G" },
248 { 0xa182ff07, BTTV_BOARD_IVC120
, "IVC-120G" },
249 { 0xa182ff08, BTTV_BOARD_IVC120
, "IVC-120G" },
250 { 0xa182ff09, BTTV_BOARD_IVC120
, "IVC-120G" },
251 { 0xa182ff0a, BTTV_BOARD_IVC120
, "IVC-120G" },
252 { 0xa182ff0b, BTTV_BOARD_IVC120
, "IVC-120G" },
253 { 0xa182ff0c, BTTV_BOARD_IVC120
, "IVC-120G" },
254 { 0xa182ff0d, BTTV_BOARD_IVC120
, "IVC-120G" },
255 { 0xa182ff0e, BTTV_BOARD_IVC120
, "IVC-120G" },
256 { 0xa182ff0f, BTTV_BOARD_IVC120
, "IVC-120G" },
258 { 0x41424344, BTTV_BOARD_GRANDTEC
, "GrandTec Multi Capture" },
259 { 0x01020304, BTTV_BOARD_XGUARD
, "Grandtec Grand X-Guard" },
261 { 0x18501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
262 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2
, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
263 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ
, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
264 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW
, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
265 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM
, "Lifeview FlyVideo 98 LR50 Rev Q" },
266 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98
, "Lifeview Flyvideo 98" },
268 { 0x010115cb, BTTV_BOARD_GMV1
, "AG GMV1" },
269 { 0x010114c7, BTTV_BOARD_MODTEC_205
, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
271 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878
, "STB ???" },
272 { 0x217d6606, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
273 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000
, "Leadtek WinFast TV 2000" },
274 { 0x03116000, BTTV_BOARD_SENSORAY311
, "Sensoray 311" },
275 { 0x00790e11, BTTV_BOARD_WINDVR
, "Canopus WinDVR PCI" },
276 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX
, "Face to Face Tvmax" },
277 { 0x20007063, BTTV_BOARD_PC_HDTV
, "pcHDTV HD-2000 TV"},
278 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100
, "SIMUS GVC1100" },
279 { 0x146caa0c, BTTV_BOARD_PV951
, "ituner spectra8" },
280 { 0x200a1295, BTTV_BOARD_PXC200
, "ImageNation PXC200A" },
282 { 0x40111554, BTTV_BOARD_PV_BT878P_9B
, "Prolink Pixelview PV-BT" },
283 { 0x17de0a01, BTTV_BOARD_KWORLD
, "Mecer TV/FM/Video Tuner" },
285 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #1" },
286 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #2" },
287 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #3" },
288 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP
, "Picolo Tetra Chip #4" },
290 { 0x15409511, BTTV_BOARD_ACORP_Y878F
, "Acorp Y878F" },
292 /* likely broken, vendor id doesn't match the other magic views ...
293 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
295 /* DVB cards (using pci function .1 for mpeg data xfer) */
296 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV
, "Nebula Electronics DigiTV" },
297 { 0x07611461, BTTV_BOARD_AVDVBT_761
, "AverMedia AverTV DVB-T 761" },
298 { 0x001c11bd, BTTV_BOARD_PINNACLESAT
, "Pinnacle PCTV Sat" },
299 { 0x002611bd, BTTV_BOARD_TWINHAN_DST
, "Pinnacle PCTV SAT CI" },
300 { 0x00011822, BTTV_BOARD_TWINHAN_DST
, "Twinhan VisionPlus DVB" },
301 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST
, "ChainTech digitop DST-1000 DVB-S" },
302 { 0x07711461, BTTV_BOARD_AVDVBT_771
, "AVermedia AverTV DVB-T 771" },
303 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE
, "DViCO FusionHDTV DVB-T Lite" },
304 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
, "DViCO FusionHDTV 5 Lite" },
309 /* ----------------------------------------------------------------------- */
310 /* array with description for bt848 / bt878 tv/grabber cards */
312 struct tvcard bttv_tvcards
[] = {
313 /* ---- card 0x00 ---------------------------------- */
314 [BTTV_BOARD_UNKNOWN
] = {
315 .name
= " *** UNKNOWN/GENERIC *** ",
320 .muxsel
= { 2, 3, 1, 0},
322 .tuner_addr
= ADDR_UNSET
,
323 .radio_addr
= ADDR_UNSET
,
325 [BTTV_BOARD_MIRO
] = {
332 .muxsel
= { 2, 3, 1, 1},
333 .audiomux
= { 2, 0, 0, 0, 10},
336 .tuner_addr
= ADDR_UNSET
,
337 .radio_addr
= ADDR_UNSET
,
339 [BTTV_BOARD_HAUPPAUGE
] = {
340 .name
= "Hauppauge (bt848)",
346 .muxsel
= { 2, 3, 1, 1},
347 .audiomux
= { 0, 1, 2, 3, 4},
350 .tuner_addr
= ADDR_UNSET
,
351 .radio_addr
= ADDR_UNSET
,
354 .name
= "STB, Gateway P/N 6000699 (bt848)",
360 .muxsel
= { 2, 3, 1, 1},
361 .audiomux
= { 4, 0, 2, 3, 1},
364 .tuner_type
= TUNER_PHILIPS_NTSC
,
365 .tuner_addr
= ADDR_UNSET
,
366 .radio_addr
= ADDR_UNSET
,
371 /* ---- card 0x04 ---------------------------------- */
372 [BTTV_BOARD_INTEL
] = {
373 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
379 .muxsel
= { 2, 3, 1, 1},
383 .tuner_addr
= ADDR_UNSET
,
384 .radio_addr
= ADDR_UNSET
,
386 [BTTV_BOARD_DIAMOND
] = {
387 .name
= "Diamond DTV2000",
393 .muxsel
= { 2, 3, 1, 0},
394 .audiomux
= { 0, 1, 0, 1, 3},
397 .tuner_addr
= ADDR_UNSET
,
398 .radio_addr
= ADDR_UNSET
,
400 [BTTV_BOARD_AVERMEDIA
] = {
401 .name
= "AVerMedia TVPhone",
406 .muxsel
= { 2, 3, 1, 1},
408 .audiomux
= { 0x0c, 0x04, 0x08, 0x04, 0},
409 /* 0x04 for some cards ?? */
412 .tuner_addr
= ADDR_UNSET
,
413 .radio_addr
= ADDR_UNSET
,
414 .audio_hook
= avermedia_tvphone_audio
,
417 [BTTV_BOARD_MATRIX_VISION
] = {
418 .name
= "MATRIX-Vision MV-Delta",
424 .muxsel
= { 2, 3, 1, 0, 0},
428 .tuner_addr
= ADDR_UNSET
,
429 .radio_addr
= ADDR_UNSET
,
432 /* ---- card 0x08 ---------------------------------- */
433 [BTTV_BOARD_FLYVIDEO
] = {
434 .name
= "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
440 .muxsel
= { 2, 3, 1, 1},
441 .audiomux
= { 0, 0xc00, 0x800, 0x400, 0xc00, 0},
445 .tuner_addr
= ADDR_UNSET
,
446 .radio_addr
= ADDR_UNSET
,
448 [BTTV_BOARD_TURBOTV
] = {
449 .name
= "IMS/IXmicro TurboTV",
455 .muxsel
= { 2, 3, 1, 1},
456 .audiomux
= { 1, 1, 2, 3, 0},
459 .tuner_type
= TUNER_TEMIC_PAL
,
460 .tuner_addr
= ADDR_UNSET
,
461 .radio_addr
= ADDR_UNSET
,
463 [BTTV_BOARD_HAUPPAUGE878
] = {
464 .name
= "Hauppauge (bt878)",
469 .gpiomask
= 0x0f, /* old: 7 */
470 .muxsel
= { 2, 0, 1, 1},
471 .audiomux
= { 0, 1, 2, 3, 4},
475 .tuner_addr
= ADDR_UNSET
,
476 .radio_addr
= ADDR_UNSET
,
478 [BTTV_BOARD_MIROPRO
] = {
479 .name
= "MIRO PCTV pro",
485 .muxsel
= { 2, 3, 1, 1},
486 .audiomux
= { 0x20001,0x10001, 0, 0,10},
489 .tuner_addr
= ADDR_UNSET
,
490 .radio_addr
= ADDR_UNSET
,
493 /* ---- card 0x0c ---------------------------------- */
494 [BTTV_BOARD_ADSTECH_TV
] = {
495 .name
= "ADS Technologies Channel Surfer TV (bt848)",
501 .muxsel
= { 2, 3, 1, 1},
502 .audiomux
= { 13, 14, 11, 7, 0, 0},
505 .tuner_addr
= ADDR_UNSET
,
506 .radio_addr
= ADDR_UNSET
,
508 [BTTV_BOARD_AVERMEDIA98
] = {
509 .name
= "AVerMedia TVCapture 98",
515 .muxsel
= { 2, 3, 1, 1},
516 .audiomux
= { 13, 14, 11, 7, 0, 0},
520 .tuner_type
= TUNER_PHILIPS_PAL
,
521 .tuner_addr
= ADDR_UNSET
,
522 .radio_addr
= ADDR_UNSET
,
523 .audio_hook
= avermedia_tv_stereo_audio
,
526 .name
= "Aimslab Video Highway Xtreme (VHX)",
532 .muxsel
= { 2, 3, 1, 1},
533 .audiomux
= { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */
537 .tuner_addr
= ADDR_UNSET
,
538 .radio_addr
= ADDR_UNSET
,
540 [BTTV_BOARD_ZOLTRIX
] = {
541 .name
= "Zoltrix TV-Max",
547 .muxsel
= { 2, 3, 1, 1},
548 .audiomux
= {0 , 0, 1 , 0, 10},
551 .tuner_addr
= ADDR_UNSET
,
552 .radio_addr
= ADDR_UNSET
,
555 /* ---- card 0x10 ---------------------------------- */
556 [BTTV_BOARD_PIXVIEWPLAYTV
] = {
557 .name
= "Prolink Pixelview PlayTV (bt878)",
562 .gpiomask
= 0x01fe00,
563 .muxsel
= { 2, 3, 1, 1},
566 .audiomux
= { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 },
568 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
569 .audiomux
= { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
575 [BTTV_BOARD_WINVIEW_601
] = {
576 .name
= "Leadtek WinView 601",
581 .gpiomask
= 0x8300f8,
582 .muxsel
= { 2, 3, 1, 1,0},
583 .audiomux
= { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007},
586 .tuner_addr
= ADDR_UNSET
,
587 .radio_addr
= ADDR_UNSET
,
588 .audio_hook
= winview_audio
,
591 [BTTV_BOARD_AVEC_INTERCAP
] = {
592 .name
= "AVEC Intercapture",
598 .muxsel
= {2, 3, 1, 1},
599 .audiomux
= {1, 0, 0, 0, 0},
602 .tuner_addr
= ADDR_UNSET
,
603 .radio_addr
= ADDR_UNSET
,
605 [BTTV_BOARD_LIFE_FLYKIT
] = {
606 .name
= "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
611 .gpiomask
= 0x8dff00,
612 .muxsel
= { 2, 3, 1, 1},
616 .tuner_addr
= ADDR_UNSET
,
617 .radio_addr
= ADDR_UNSET
,
620 /* ---- card 0x14 ---------------------------------- */
621 [BTTV_BOARD_CEI_RAFFLES
] = {
622 .name
= "CEI Raffles Card",
627 .muxsel
= {2, 3, 1, 1},
629 .tuner_addr
= ADDR_UNSET
,
630 .radio_addr
= ADDR_UNSET
,
632 [BTTV_BOARD_CONFERENCETV
] = {
633 .name
= "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
635 .audio_inputs
= 2, /* tuner, line in */
639 .muxsel
= { 2, 3, 1, 1},
640 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
642 .tuner_type
= TUNER_PHILIPS_PAL_I
,
643 .tuner_addr
= ADDR_UNSET
,
644 .radio_addr
= ADDR_UNSET
,
646 [BTTV_BOARD_PHOEBE_TVMAS
] = {
647 .name
= "Askey CPH050/ Phoebe Tv Master + FM",
653 .muxsel
= { 2, 3, 1, 1},
654 .audiomux
= {0, 1, 0x800, 0x400, 0xc00, 0},
658 .tuner_addr
= ADDR_UNSET
,
659 .radio_addr
= ADDR_UNSET
,
661 [BTTV_BOARD_MODTEC_205
] = {
662 .name
= "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
668 .muxsel
= { 2, 3, -1 },
669 .digital_mode
= DIGITAL_MODE_CAMERA
,
670 .audiomux
= { 0, 0, 0, 0, 0 },
673 .tuner_type
= TUNER_ALPS_TSBB5_PAL_I
,
674 .tuner_addr
= ADDR_UNSET
,
675 .radio_addr
= ADDR_UNSET
,
678 /* ---- card 0x18 ---------------------------------- */
679 [BTTV_BOARD_MAGICTVIEW061
] = {
680 .name
= "Askey CPH05X/06X (bt878) [many vendors]",
686 .muxsel
= { 2, 3, 1, 1},
687 .audiomux
= {0x400, 0x400, 0x400, 0x400, 0xc00},
691 .tuner_addr
= ADDR_UNSET
,
692 .radio_addr
= ADDR_UNSET
,
695 [BTTV_BOARD_VOBIS_BOOSTAR
] = {
696 .name
= "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
701 .gpiomask
= 0x1f0fff,
702 .muxsel
= { 2, 3, 1, 1},
703 .audiomux
= { 0x20000, 0x30000, 0x10000, 0, 0x40000},
705 .tuner_type
= TUNER_PHILIPS_PAL
,
706 .tuner_addr
= ADDR_UNSET
,
707 .radio_addr
= ADDR_UNSET
,
708 .audio_hook
= terratv_audio
,
710 [BTTV_BOARD_HAUPPAUG_WCAM
] = {
711 .name
= "Hauppauge WinCam newer (bt878)",
717 .muxsel
= { 2, 0, 1, 1},
718 .audiomux
= { 0, 1, 2, 3, 4},
721 .tuner_addr
= ADDR_UNSET
,
722 .radio_addr
= ADDR_UNSET
,
724 [BTTV_BOARD_MAXI
] = {
725 .name
= "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
731 .muxsel
= { 2, 3, 1, 1},
732 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
734 .tuner_type
= TUNER_PHILIPS_SECAM
,
735 .tuner_addr
= ADDR_UNSET
,
736 .radio_addr
= ADDR_UNSET
,
739 /* ---- card 0x1c ---------------------------------- */
740 [BTTV_BOARD_TERRATV
] = {
741 .name
= "Terratec TerraTV+ Version 1.1 (bt878)",
746 .gpiomask
= 0x1f0fff,
747 .muxsel
= { 2, 3, 1, 1},
748 .audiomux
= { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000},
750 .tuner_type
= TUNER_PHILIPS_PAL
,
751 .tuner_addr
= ADDR_UNSET
,
752 .radio_addr
= ADDR_UNSET
,
753 .audio_hook
= terratv_audio
,
755 External 20 pin connector (for Active Radio Upgrade board)
761 gpio05: om5610-stereo
765 gpio09+10: nIOR, nSEL ?? (bt878)
769 gpio16: u2-A0 (1st 4052bt)
772 gpio19: u4-A0 (2nd 4052)
776 00000 : Cdrom (internal audio input)
777 10000 : ext. Video audio input
786 [BTTV_BOARD_PXC200
] = {
787 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
788 .name
= "Imagenation PXC200",
792 .svhs
= 1, /* was: 4 */
794 .muxsel
= { 2, 3, 1, 0, 0},
798 .tuner_addr
= ADDR_UNSET
,
799 .radio_addr
= ADDR_UNSET
,
800 .muxsel_hook
= PXC200_muxsel
,
803 [BTTV_BOARD_FLYVIDEO_98
] = {
804 .name
= "Lifeview FlyVideo 98 LR50",
809 .gpiomask
= 0x1800, /* 0x8dfe00 */
810 .muxsel
= { 2, 3, 1, 1},
811 .audiomux
= { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 },
814 .tuner_addr
= ADDR_UNSET
,
815 .radio_addr
= ADDR_UNSET
,
817 [BTTV_BOARD_IPROTV
] = {
818 .name
= "Formac iProTV, Formac ProTV I (bt848)",
824 .muxsel
= { 2, 3, 1, 1},
825 .audiomux
= { 1, 0, 0, 0, 0 },
827 .tuner_type
= TUNER_PHILIPS_PAL
,
828 .tuner_addr
= ADDR_UNSET
,
829 .radio_addr
= ADDR_UNSET
,
832 /* ---- card 0x20 ---------------------------------- */
833 [BTTV_BOARD_INTEL_C_S_PCI
] = {
834 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
840 .muxsel
= { 2, 3, 1, 1},
844 .tuner_addr
= ADDR_UNSET
,
845 .radio_addr
= ADDR_UNSET
,
847 [BTTV_BOARD_TERRATVALUE
] = {
848 .name
= "Terratec TerraTValue Version Bt878",
853 .gpiomask
= 0xffff00,
854 .muxsel
= { 2, 3, 1, 1},
855 .audiomux
= { 0x500, 0, 0x300, 0x900, 0x900},
858 .tuner_type
= TUNER_PHILIPS_PAL
,
859 .tuner_addr
= ADDR_UNSET
,
860 .radio_addr
= ADDR_UNSET
,
862 [BTTV_BOARD_WINFAST2000
] = {
863 .name
= "Leadtek WinFast 2000/ WinFast 2000 XP",
868 .muxsel
= { 2, 3, 1, 1, 0}, /* TV, CVid, SVid, CVid over SVid connector */
870 .gpiomask
= 0xc33000,
871 .audiomux
= { 0x422000,0x1000,0x0000,0x620000,0x800000 },
873 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
874 .gpiomask
= 0xb33000,
875 .audiomux
= { 0x122000,0x1000,0x0000,0x620000,0x800000 },
877 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
878 gpio23 -- hef4052:nEnable (0x800000)
881 0x0000: external audio
885 Note: There exists another variant "Winfast 2000" with tv stereo !?
886 Note: eeprom only contains FF and pci subsystem id 107d:6606
891 .tuner_type
= 5, /* default for now, gpio reads BFFF06 for Pal bg+dk */
892 .tuner_addr
= ADDR_UNSET
,
893 .radio_addr
= ADDR_UNSET
,
894 .audio_hook
= winfast2000_audio
,
897 [BTTV_BOARD_CHRONOS_VS2
] = {
898 .name
= "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
904 .muxsel
= { 2, 3, 1, 1},
905 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
908 .tuner_addr
= ADDR_UNSET
,
909 .radio_addr
= ADDR_UNSET
,
912 /* ---- card 0x24 ---------------------------------- */
913 [BTTV_BOARD_TYPHOON_TVIEW
] = {
914 .name
= "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
920 .muxsel
= { 2, 3, 1, 1},
921 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
924 .tuner_addr
= ADDR_UNSET
,
925 .radio_addr
= ADDR_UNSET
,
928 [BTTV_BOARD_PXELVWPLTVPRO
] = {
929 .name
= "Prolink PixelView PlayTV pro",
935 .muxsel
= { 2, 3, 1, 1 },
936 .audiomux
= { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
940 .tuner_addr
= ADDR_UNSET
,
941 .radio_addr
= ADDR_UNSET
,
943 [BTTV_BOARD_MAGICTVIEW063
] = {
944 .name
= "Askey CPH06X TView99",
949 .gpiomask
= 0x551e00,
950 .muxsel
= { 2, 3, 1, 0},
951 .audiomux
= { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 },
955 .tuner_addr
= ADDR_UNSET
,
956 .radio_addr
= ADDR_UNSET
,
959 [BTTV_BOARD_PINNACLE
] = {
960 .name
= "Pinnacle PCTV Studio/Rave",
965 .gpiomask
= 0x03000F,
966 .muxsel
= { 2, 3, 1, 1},
967 .audiomux
= { 2, 0xd0001, 0, 0, 1},
971 .tuner_addr
= ADDR_UNSET
,
972 .radio_addr
= ADDR_UNSET
,
975 /* ---- card 0x28 ---------------------------------- */
976 [BTTV_BOARD_STB2
] = {
977 .name
= "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
983 .muxsel
= { 2, 3, 1, 1},
984 .audiomux
= { 4, 0, 2, 3, 1},
987 .tuner_type
= TUNER_PHILIPS_NTSC
,
988 .tuner_addr
= ADDR_UNSET
,
989 .radio_addr
= ADDR_UNSET
,
993 [BTTV_BOARD_AVPHONE98
] = {
994 .name
= "AVerMedia TVPhone 98",
1000 .muxsel
= { 2, 3, 1, 1},
1001 .audiomux
= { 13, 4, 11, 7, 0, 0},
1005 .tuner_addr
= ADDR_UNSET
,
1006 .radio_addr
= ADDR_UNSET
,
1008 .audio_hook
= avermedia_tvphone_audio
,
1010 [BTTV_BOARD_PV951
] = {
1011 .name
= "ProVideo PV951", /* pic16c54 */
1017 .muxsel
= { 2, 3, 1, 1},
1018 .audiomux
= { 0, 0, 0, 0, 0},
1023 .tuner_addr
= ADDR_UNSET
,
1024 .radio_addr
= ADDR_UNSET
,
1026 [BTTV_BOARD_ONAIR_TV
] = {
1027 .name
= "Little OnAir TV",
1033 .muxsel
= {2, 3, 1, 1},
1034 .audiomux
= {0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc},
1037 .tuner_addr
= ADDR_UNSET
,
1038 .radio_addr
= ADDR_UNSET
,
1041 /* ---- card 0x2c ---------------------------------- */
1042 [BTTV_BOARD_SIGMA_TVII_FM
] = {
1043 .name
= "Sigma TVII-FM",
1049 .muxsel
= {2, 3, 1, 1},
1050 .audiomux
= {1, 1, 0, 2, 3},
1054 .tuner_addr
= ADDR_UNSET
,
1055 .radio_addr
= ADDR_UNSET
,
1057 [BTTV_BOARD_MATRIX_VISION2
] = {
1058 .name
= "MATRIX-Vision MV-Delta 2",
1064 .muxsel
= { 2, 3, 1, 0, 0},
1069 .tuner_addr
= ADDR_UNSET
,
1070 .radio_addr
= ADDR_UNSET
,
1072 [BTTV_BOARD_ZOLTRIX_GENIE
] = {
1073 .name
= "Zoltrix Genie TV/FM",
1078 .gpiomask
= 0xbcf03f,
1079 .muxsel
= { 2, 3, 1, 1},
1080 .audiomux
= { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f},
1084 .tuner_addr
= ADDR_UNSET
,
1085 .radio_addr
= ADDR_UNSET
,
1087 [BTTV_BOARD_TERRATVRADIO
] = {
1088 .name
= "Terratec TV/Radio+",
1093 .gpiomask
= 0x70000,
1094 .muxsel
= { 2, 3, 1, 1},
1095 .audiomux
= { 0x20000, 0x30000, 0x10000, 0, 0x40000, 0x20000 },
1100 .tuner_addr
= ADDR_UNSET
,
1101 .radio_addr
= ADDR_UNSET
,
1105 /* ---- card 0x30 ---------------------------------- */
1106 [BTTV_BOARD_DYNALINK
] = {
1107 .name
= "Askey CPH03x/ Dynalink Magic TView",
1113 .muxsel
= { 2, 3, 1, 1},
1114 .audiomux
= {2,0,0,0,1},
1118 .tuner_addr
= ADDR_UNSET
,
1119 .radio_addr
= ADDR_UNSET
,
1121 [BTTV_BOARD_GVBCTV3PCI
] = {
1122 .name
= "IODATA GV-BCTV3/PCI",
1127 .gpiomask
= 0x010f00,
1128 .muxsel
= {2, 3, 0, 0},
1129 .audiomux
= {0x10000, 0, 0x10000, 0, 0, 0},
1132 .tuner_type
= TUNER_ALPS_TSHC6_NTSC
,
1133 .tuner_addr
= ADDR_UNSET
,
1134 .radio_addr
= ADDR_UNSET
,
1135 .audio_hook
= gvbctv3pci_audio
,
1137 [BTTV_BOARD_PXELVWPLTVPAK
] = {
1138 .name
= "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1143 .gpiomask
= 0xAA0000,
1144 .muxsel
= { 2,3,1,1,-1 },
1145 .digital_mode
= DIGITAL_MODE_CAMERA
,
1146 .audiomux
= { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 },
1149 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1150 .tuner_addr
= ADDR_UNSET
,
1151 .radio_addr
= ADDR_UNSET
,
1153 /* GPIO wiring: (different from Rev.4C !)
1154 GPIO17: U4.A0 (first hef4052bt)
1156 GPIO20: U5.A1 (second hef4052bt)
1158 GPIO22: BT832 Reset Line
1159 GPIO23: A5,A0, U5,nEN
1160 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1163 [BTTV_BOARD_EAGLE
] = {
1164 .name
= "Eagle Wireless Capricorn2 (bt878A)",
1170 .muxsel
= { 2, 0, 1, 1},
1171 .audiomux
= { 0, 1, 2, 3, 4},
1173 .tuner_type
= -1 /* TUNER_ALPS_TMDH2_NTSC */,
1174 .tuner_addr
= ADDR_UNSET
,
1175 .radio_addr
= ADDR_UNSET
,
1178 /* ---- card 0x34 ---------------------------------- */
1179 [BTTV_BOARD_PINNACLEPRO
] = {
1180 /* David Härdeman <david@2gen.com> */
1181 .name
= "Pinnacle PCTV Studio Pro",
1186 .gpiomask
= 0x03000F,
1187 .muxsel
= { 2, 3, 1, 1},
1188 .audiomux
= { 1, 0xd0001, 0, 0, 10},
1189 /* sound path (5 sources):
1190 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1193 2= Mono TV sound from Tuner
1195 MUX2 (mask 0x30000):
1197 1= FM stereo Radio from Tuner */
1201 .tuner_addr
= ADDR_UNSET
,
1202 .radio_addr
= ADDR_UNSET
,
1204 [BTTV_BOARD_TVIEW_RDS_FM
] = {
1205 /* Claas Langbehn <claas@bigfoot.com>,
1206 Sven Grothklags <sven@upb.de> */
1207 .name
= "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1213 .muxsel
= { 2, 3, 1, 1},
1214 .audiomux
= { 0, 0, 0x10, 8, 4 },
1217 .tuner_type
= TUNER_PHILIPS_PAL
,
1218 .tuner_addr
= ADDR_UNSET
,
1219 .radio_addr
= ADDR_UNSET
,
1222 [BTTV_BOARD_LIFETEC_9415
] = {
1223 /* Tim Röstermundt <rosterm@uni-muenster.de>
1224 in de.comp.os.unix.linux.hardware:
1225 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1226 audiomux=0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1227 options tuner type=5 */
1228 .name
= "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1234 .muxsel
= { 2, 3, 1, 1},
1235 .audiomux
= { 0x0000,0x0800,0x1000,0x1000,0x18e0 },
1236 /* For cards with tda9820/tda9821:
1237 0x0000: Tuner normal stereo
1238 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1239 0x0880: Tuner A2 stereo */
1242 .tuner_addr
= ADDR_UNSET
,
1243 .radio_addr
= ADDR_UNSET
,
1245 [BTTV_BOARD_BESTBUY_EASYTV
] = {
1246 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1247 old Easy TV BT848 version (model CPH031) */
1248 .name
= "Askey CPH031/ BESTBUY Easy TV",
1254 .muxsel
= { 2, 3, 1, 0},
1255 .audiomux
= { 2, 0, 0, 0, 10},
1258 .tuner_type
= TUNER_TEMIC_PAL
,
1259 .tuner_addr
= ADDR_UNSET
,
1260 .radio_addr
= ADDR_UNSET
,
1263 /* ---- card 0x38 ---------------------------------- */
1264 [BTTV_BOARD_FLYVIDEO_98FM
] = {
1265 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1266 .name
= "Lifeview FlyVideo 98FM LR50",
1272 .muxsel
= { 2, 3, 1, 1},
1273 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
1276 .tuner_addr
= ADDR_UNSET
,
1277 .radio_addr
= ADDR_UNSET
,
1279 /* This is the ultimate cheapo capture card
1280 * just a BT848A on a small PCB!
1281 * Steve Hosgood <steve@equiinet.com> */
1282 [BTTV_BOARD_GRANDTEC
] = {
1283 .name
= "GrandTec 'Grand Video Capture' (Bt848)",
1295 .tuner_addr
= ADDR_UNSET
,
1296 .radio_addr
= ADDR_UNSET
,
1298 [BTTV_BOARD_ASKEY_CPH060
] = {
1299 /* Daniel Herrington <daniel.herrington@home.com> */
1300 .name
= "Askey CPH060/ Phoebe TV Master Only (No FM)",
1306 .muxsel
= { 2, 3, 1, 1},
1307 .audiomux
= { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 },
1310 .tuner_type
= TUNER_TEMIC_4036FY5_NTSC
,
1311 .tuner_addr
= ADDR_UNSET
,
1312 .radio_addr
= ADDR_UNSET
,
1314 [BTTV_BOARD_ASKEY_CPH03X
] = {
1315 /* Matti Mottus <mottus@physic.ut.ee> */
1316 .name
= "Askey CPH03x TV Capturer",
1321 .gpiomask
= 0x03000F,
1322 .muxsel
= { 2, 3, 1, 0},
1323 .audiomux
= { 2,0,0,0,1 },
1326 .tuner_addr
= ADDR_UNSET
,
1327 .radio_addr
= ADDR_UNSET
,
1330 /* ---- card 0x3c ---------------------------------- */
1331 [BTTV_BOARD_MM100PCTV
] = {
1332 /* Philip Blundell <philb@gnu.org> */
1333 .name
= "Modular Technology MM100PCTV",
1339 .muxsel
= { 2, 3, 1, 1},
1340 .audiomux
= { 2, 0, 0, 1, 8},
1342 .tuner_type
= TUNER_TEMIC_PAL
,
1343 .tuner_addr
= ADDR_UNSET
,
1344 .radio_addr
= ADDR_UNSET
,
1346 [BTTV_BOARD_GMV1
] = {
1347 /* Adrian Cox <adrian@humboldt.co.uk */
1348 .name
= "AG Electronics GMV1",
1360 .tuner_addr
= ADDR_UNSET
,
1361 .radio_addr
= ADDR_UNSET
,
1363 [BTTV_BOARD_BESTBUY_EASYTV2
] = {
1364 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1365 new Easy TV BT878 version (model CPH061)
1366 special thanks to Informatica Mieres for providing the card */
1367 .name
= "Askey CPH061/ BESTBUY Easy TV (bt878)",
1373 .muxsel
= { 2, 3, 1, 0},
1374 .audiomux
= { 1, 0, 4, 4, 9},
1377 .tuner_type
= TUNER_PHILIPS_PAL
,
1378 .tuner_addr
= ADDR_UNSET
,
1379 .radio_addr
= ADDR_UNSET
,
1381 [BTTV_BOARD_ATI_TVWONDER
] = {
1382 /* Lukas Gebauer <geby@volny.cz> */
1383 .name
= "ATI TV-Wonder",
1389 .muxsel
= { 2, 3, 1, 0 },
1390 .audiomux
= { 0xbffe, 0, 0xbfff, 0, 0xbffe},
1392 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1393 .tuner_addr
= ADDR_UNSET
,
1394 .radio_addr
= ADDR_UNSET
,
1397 /* ---- card 0x40 ---------------------------------- */
1398 [BTTV_BOARD_ATI_TVWONDERVE
] = {
1399 /* Lukas Gebauer <geby@volny.cz> */
1400 .name
= "ATI TV-Wonder VE",
1406 .muxsel
= { 2, 3, 0, 1},
1407 .audiomux
= { 0, 0, 1, 0, 0},
1410 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1411 .tuner_addr
= ADDR_UNSET
,
1412 .radio_addr
= ADDR_UNSET
,
1414 [BTTV_BOARD_FLYVIDEO2000
] = {
1415 /* DeeJay <deejay@westel900.net (2000S) */
1416 .name
= "Lifeview FlyVideo 2000S LR90",
1422 .muxsel
= { 2, 3, 0, 1},
1423 /* Radio changed from 1e80 to 0x800 to make
1424 FlyVideo2000S in .hu happy (gm)*/
1425 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1426 .audiomux
= { 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 },
1427 .audio_hook
= fv2000s_audio
,
1433 .tuner_addr
= ADDR_UNSET
,
1434 .radio_addr
= ADDR_UNSET
,
1436 [BTTV_BOARD_TERRATVALUER
] = {
1437 .name
= "Terratec TValueRadio",
1442 .gpiomask
= 0xffff00,
1443 .muxsel
= { 2, 3, 1, 1},
1444 .audiomux
= { 0x500, 0x500, 0x300, 0x900, 0x900},
1447 .tuner_type
= TUNER_PHILIPS_PAL
,
1448 .tuner_addr
= ADDR_UNSET
,
1449 .radio_addr
= ADDR_UNSET
,
1452 [BTTV_BOARD_GVBCTV4PCI
] = {
1453 /* TANAKA Kei <peg00625@nifty.com> */
1454 .name
= "IODATA GV-BCTV4/PCI",
1459 .gpiomask
= 0x010f00,
1460 .muxsel
= {2, 3, 0, 0},
1461 .audiomux
= {0x10000, 0, 0x10000, 0, 0, 0},
1464 .tuner_type
= TUNER_SHARP_2U5JF5540_NTSC
,
1465 .tuner_addr
= ADDR_UNSET
,
1466 .radio_addr
= ADDR_UNSET
,
1467 .audio_hook
= gvbctv3pci_audio
,
1470 /* ---- card 0x44 ---------------------------------- */
1471 [BTTV_BOARD_VOODOOTV_FM
] = {
1472 .name
= "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)",
1473 /* try "insmod msp3400 simple=0" if you have
1474 * sound problems with this card. */
1479 .gpiomask
= 0x4f8a00,
1480 /* 0x100000: 1=MSP enabled (0=disable again)
1481 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1482 .audiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff},
1483 /* tvtuner, radio, external,internal, mute, stereo
1484 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1485 .muxsel
= { 2, 3 ,0 ,1},
1486 .tuner_type
= TUNER_MT2032
,
1487 .tuner_addr
= ADDR_UNSET
,
1488 .radio_addr
= ADDR_UNSET
,
1492 [BTTV_BOARD_AIMMS
] = {
1493 /* Philip Blundell <pb@nexus.co.uk> */
1494 .name
= "Active Imaging AIMMS",
1499 .tuner_addr
= ADDR_UNSET
,
1500 .radio_addr
= ADDR_UNSET
,
1505 [BTTV_BOARD_PV_BT878P_PLUS
] = {
1506 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1507 .name
= "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1513 .muxsel
= { 2, 3, 1, 1},
1514 .audiomux
= { 0, 0, 11, 7, 13, 0}, /* TV and Radio with same GPIO ! */
1518 .tuner_addr
= ADDR_UNSET
,
1519 .radio_addr
= ADDR_UNSET
,
1522 GPIO0: U4.A0 (hef4052bt)
1524 GPIO2: U4.A1 (second hef4052bt)
1525 GPIO3: U4.nEN, U5.A0, A5.nEN
1529 [BTTV_BOARD_FLYVIDEO98EZ
] = {
1530 .name
= "Lifeview FlyVideo 98EZ (capture only) LR51",
1535 .muxsel
= { 2, 3, 1, 1}, /* AV1, AV2, SVHS, CVid adapter on SVHS */
1538 .tuner_type
= UNSET
,
1539 .tuner_addr
= ADDR_UNSET
,
1540 .radio_addr
= ADDR_UNSET
,
1543 /* ---- card 0x48 ---------------------------------- */
1544 [BTTV_BOARD_PV_BT878P_9B
] = {
1545 /* Dariusz Kowalewski <darekk@automex.pl> */
1546 .name
= "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1552 .muxsel
= { 2, 3, 1, 1 },
1553 .audiomux
= { 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 },
1559 .tuner_addr
= ADDR_UNSET
,
1560 .radio_addr
= ADDR_UNSET
,
1561 .audio_hook
= pvbt878p9b_audio
, /* Note: not all cards have stereo */
1562 .has_radio
= 1, /* Note: not all cards have radio */
1569 GPIO20,22,23: R30,R29,R28
1572 [BTTV_BOARD_SENSORAY311
] = {
1573 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1574 /* you must jumper JP5 for the card to work */
1575 .name
= "Sensoray 311",
1581 .muxsel
= { 2, 3, 1, 0, 0},
1585 .tuner_addr
= ADDR_UNSET
,
1586 .radio_addr
= ADDR_UNSET
,
1588 [BTTV_BOARD_RV605
] = {
1589 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1590 .name
= "RemoteVision MX (RV605)",
1596 .gpiomask2
= 0x07ff,
1597 .muxsel
= { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1598 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1602 .tuner_addr
= ADDR_UNSET
,
1603 .radio_addr
= ADDR_UNSET
,
1604 .muxsel_hook
= rv605_muxsel
,
1606 [BTTV_BOARD_POWERCLR_MTV878
] = {
1607 .name
= "Powercolor MTV878/ MTV878R/ MTV878F",
1612 .gpiomask
= 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1613 .muxsel
= { 2, 1, 1, },
1614 .audiomux
= { 0, 1, 2, 2, 4 },
1616 .tuner_type
= TUNER_PHILIPS_PAL
,
1617 .tuner_addr
= ADDR_UNSET
,
1618 .radio_addr
= ADDR_UNSET
,
1623 /* ---- card 0x4c ---------------------------------- */
1624 [BTTV_BOARD_WINDVR
] = {
1625 /* Masaki Suzuki <masaki@btree.org> */
1626 .name
= "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1631 .gpiomask
= 0x140007,
1632 .muxsel
= { 2, 3, 1, 1 },
1633 .audiomux
= { 0, 1, 2, 3, 4, 0 },
1634 .tuner_type
= TUNER_PHILIPS_NTSC
,
1635 .tuner_addr
= ADDR_UNSET
,
1636 .radio_addr
= ADDR_UNSET
,
1637 .audio_hook
= windvr_audio
,
1639 [BTTV_BOARD_GRANDTEC_MULTI
] = {
1640 .name
= "GrandTec Multi Capture Card (Bt878)",
1646 .muxsel
= { 2, 3, 1, 0 },
1652 .tuner_addr
= ADDR_UNSET
,
1653 .radio_addr
= ADDR_UNSET
,
1655 [BTTV_BOARD_KWORLD
] = {
1656 .name
= "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1662 .muxsel
= { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
1663 .audiomux
= { 0 ,0 ,4, 4,4,4},/* Yes, this tuner uses the same audio output for TV and FM radio!
1664 * This card lacks external Audio In, so we mute it on Ext. & Int.
1665 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1666 * This card lacks PCI subsystem ID, sigh.
1667 * audiomux=1: lower volume, 2+3: mute
1668 * btwincap uses 0x80000/0x80003
1674 .tuner_addr
= ADDR_UNSET
,
1675 .radio_addr
= ADDR_UNSET
,
1676 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1677 radio signal strength indicators work fine. */
1680 GPIO0,1: HEF4052 A0,A1
1681 GPIO2: HEF4052 nENABLE
1683 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1687 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1689 [BTTV_BOARD_DSP_TCVIDEO
] = {
1690 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1691 .name
= "DSP Design TCVIDEO",
1694 .muxsel
= { 2, 3, 1, 0},
1697 .tuner_addr
= ADDR_UNSET
,
1698 .radio_addr
= ADDR_UNSET
,
1701 /* ---- card 0x50 ---------------------------------- */
1702 [BTTV_BOARD_HAUPPAUGEPVR
] = {
1703 .name
= "Hauppauge WinTV PVR",
1708 .muxsel
= { 2, 0, 1, 1},
1712 .tuner_addr
= ADDR_UNSET
,
1713 .radio_addr
= ADDR_UNSET
,
1718 [BTTV_BOARD_GVBCTV5PCI
] = {
1719 .name
= "IODATA GV-BCTV5/PCI",
1724 .gpiomask
= 0x0f0f80,
1725 .muxsel
= {2, 3, 1, 0},
1726 .audiomux
= {0x030000, 0x010000, 0, 0, 0x020000, 0},
1729 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
1730 .tuner_addr
= ADDR_UNSET
,
1731 .radio_addr
= ADDR_UNSET
,
1732 .audio_hook
= gvbctv5pci_audio
,
1735 [BTTV_BOARD_OSPREY1x0
] = {
1736 .name
= "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1737 .video_inputs
= 4, /* id-inputs-clock */
1741 .muxsel
= { 3, 2, 0, 1 },
1744 .tuner_addr
= ADDR_UNSET
,
1745 .radio_addr
= ADDR_UNSET
,
1750 [BTTV_BOARD_OSPREY1x0_848
] = {
1751 .name
= "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1756 .muxsel
= { 2, 3, 1 },
1759 .tuner_addr
= ADDR_UNSET
,
1760 .radio_addr
= ADDR_UNSET
,
1766 /* ---- card 0x54 ---------------------------------- */
1767 [BTTV_BOARD_OSPREY101_848
] = {
1768 .name
= "Osprey 101 (848)", /* 0x05-40C0-C1 */
1776 .tuner_addr
= ADDR_UNSET
,
1777 .radio_addr
= ADDR_UNSET
,
1782 [BTTV_BOARD_OSPREY1x1
] = {
1783 .name
= "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1791 .tuner_addr
= ADDR_UNSET
,
1792 .radio_addr
= ADDR_UNSET
,
1797 [BTTV_BOARD_OSPREY1x1_SVID
] = {
1798 .name
= "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1806 .tuner_addr
= ADDR_UNSET
,
1807 .radio_addr
= ADDR_UNSET
,
1812 [BTTV_BOARD_OSPREY2xx
] = {
1813 .name
= "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1820 .tuner_type
= UNSET
,
1821 .tuner_addr
= ADDR_UNSET
,
1822 .radio_addr
= ADDR_UNSET
,
1828 /* ---- card 0x58 ---------------------------------- */
1829 [BTTV_BOARD_OSPREY2x0_SVID
] = {
1830 .name
= "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1837 .tuner_type
= UNSET
,
1838 .tuner_addr
= ADDR_UNSET
,
1839 .radio_addr
= ADDR_UNSET
,
1844 [BTTV_BOARD_OSPREY2x0
] = {
1845 .name
= "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */
1852 .tuner_type
= UNSET
,
1853 .tuner_addr
= ADDR_UNSET
,
1854 .radio_addr
= ADDR_UNSET
,
1859 [BTTV_BOARD_OSPREY500
] = {
1860 .name
= "Osprey 500", /* 500 */
1868 .tuner_addr
= ADDR_UNSET
,
1869 .radio_addr
= ADDR_UNSET
,
1874 [BTTV_BOARD_OSPREY540
] = {
1875 .name
= "Osprey 540", /* 540 */
1879 #if 0 /* TODO ... */
1880 .svhs
= OSPREY540_SVID_ANALOG
,
1881 .muxsel
= { [OSPREY540_COMP_ANALOG
] = 2,
1882 [OSPREY540_SVID_ANALOG
] = 3, },
1886 .tuner_addr
= ADDR_UNSET
,
1887 .radio_addr
= ADDR_UNSET
,
1891 #if 0 /* TODO ... */
1892 .muxsel_hook
= osprey_540_muxsel
,
1893 .picture_hook
= osprey_540_set_picture
,
1897 /* ---- card 0x5C ---------------------------------- */
1898 [BTTV_BOARD_OSPREY2000
] = {
1899 .name
= "Osprey 2000", /* 2000 */
1906 .tuner_type
= UNSET
,
1907 .tuner_addr
= ADDR_UNSET
,
1908 .radio_addr
= ADDR_UNSET
,
1911 .no_tda7432
= 1, /* must avoid, conflicts with the bt860 */
1913 [BTTV_BOARD_IDS_EAGLE
] = {
1914 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1915 .name
= "IDS Eagle",
1920 .tuner_addr
= ADDR_UNSET
,
1921 .radio_addr
= ADDR_UNSET
,
1924 .muxsel
= { 0, 1, 2, 3 },
1925 .muxsel_hook
= eagle_muxsel
,
1930 [BTTV_BOARD_PINNACLESAT
] = {
1931 .name
= "Pinnacle PCTV Sat",
1937 .tuner_addr
= ADDR_UNSET
,
1938 .radio_addr
= ADDR_UNSET
,
1942 .muxsel
= { 3, 0, 1, 2},
1947 [BTTV_BOARD_FORMAC_PROTV
] = {
1948 .name
= "Formac ProTV II (bt878)",
1954 /* TV, Comp1, Composite over SVID con, SVID */
1955 .muxsel
= { 2, 3, 1, 1},
1956 .audiomux
= { 2, 2, 0, 0, 0 },
1959 .tuner_type
= TUNER_PHILIPS_PAL
,
1960 .tuner_addr
= ADDR_UNSET
,
1961 .radio_addr
= ADDR_UNSET
,
1963 GPIO=0x00,0x01,0x03: mute (?)
1964 0x02: both TV and radio (tuner: FM1216/I)
1965 The card has onboard audio connectors labeled "cdrom" and "board",
1966 not soldered here, though unknown wiring.
1967 Card lacks: external audio in, pci subsystem id.
1971 /* ---- card 0x60 ---------------------------------- */
1972 [BTTV_BOARD_MACHTV
] = {
1979 .muxsel
= { 2, 3, 1, 1},
1980 .audiomux
= { 0, 1, 2, 3, 4},
1983 .tuner_addr
= ADDR_UNSET
,
1984 .radio_addr
= ADDR_UNSET
,
1987 [BTTV_BOARD_EURESYS_PICOLO
] = {
1988 .name
= "Euresys Picolo",
1997 .muxsel
= { 2, 0, 1},
1999 .tuner_type
= UNSET
,
2000 .tuner_addr
= ADDR_UNSET
,
2001 .radio_addr
= ADDR_UNSET
,
2003 [BTTV_BOARD_PV150
] = {
2004 /* Luc Van Hoeylandt <luc@e-magic.be> */
2005 .name
= "ProVideo PV150", /* 0x4f */
2016 .tuner_type
= UNSET
,
2017 .tuner_addr
= ADDR_UNSET
,
2018 .radio_addr
= ADDR_UNSET
,
2020 [BTTV_BOARD_AD_TVK503
] = {
2021 /* Hiroshi Takekawa <sian@big.or.jp> */
2022 /* This card lacks subsystem ID */
2023 .name
= "AD-TVK503", /* 0x63 */
2028 .gpiomask
= 0x001e8007,
2029 .muxsel
= { 2, 3, 1, 0 },
2030 /* Tuner, Radio, external, internal, off, on */
2031 .audiomux
= { 0x08, 0x0f, 0x0a, 0x08, 0x0f, 0x08 },
2036 .tuner_addr
= ADDR_UNSET
,
2037 .radio_addr
= ADDR_UNSET
,
2038 .audio_hook
= adtvk503_audio
,
2041 /* ---- card 0x64 ---------------------------------- */
2042 [BTTV_BOARD_HERCULES_SM_TV
] = {
2043 .name
= "Hercules Smart TV Stereo",
2049 .muxsel
= { 2, 3, 1, 1 },
2054 .tuner_addr
= ADDR_UNSET
,
2055 .radio_addr
= ADDR_UNSET
,
2057 - card lacks subsystem ID
2058 - stereo variant w/ daughter board with tda9874a @0xb0
2060 always from tda9874 independent of GPIO (?)
2061 external line in: unknown
2062 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2063 hef4053 (instead 4052) for unknown function
2066 [BTTV_BOARD_PACETV
] = {
2067 .name
= "Pace TV & Radio Card",
2072 .muxsel
= { 2, 3, 1, 1}, /* Tuner, CVid, SVid, CVid over SVid connector */
2077 .tuner_addr
= ADDR_UNSET
,
2078 .radio_addr
= ADDR_UNSET
,
2081 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2082 only internal line out: (4pin header) RGGL
2083 Radio must be decoded by msp3410d (not routed through)*/
2085 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2088 [BTTV_BOARD_IVC200
] = {
2089 /* Chris Willing <chris@vislab.usyd.edu.au> */
2095 .tuner_addr
= ADDR_UNSET
,
2096 .radio_addr
= ADDR_UNSET
,
2102 [BTTV_BOARD_XGUARD
] = {
2103 .name
= "Grand X-Guard / Trust 814PCI",
2109 .tuner_addr
= ADDR_UNSET
,
2110 .radio_addr
= ADDR_UNSET
,
2112 .muxsel
= { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2113 .muxsel_hook
= xguard_muxsel
,
2120 /* ---- card 0x68 ---------------------------------- */
2121 [BTTV_BOARD_NEBULA_DIGITV
] = {
2122 .name
= "Nebula Electronics DigiTV",
2126 .muxsel
= { 2, 3, 1, 0},
2132 .tuner_addr
= ADDR_UNSET
,
2133 .radio_addr
= ADDR_UNSET
,
2137 [BTTV_BOARD_PV143
] = {
2138 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2139 .name
= "ProVideo PV143",
2145 .muxsel
= { 2, 3, 1, 0 },
2151 .tuner_addr
= ADDR_UNSET
,
2152 .radio_addr
= ADDR_UNSET
,
2154 [BTTV_BOARD_VD009X1_MINIDIN
] = {
2155 /* M.Klahr@phytec.de */
2156 .name
= "PHYTEC VD-009-X1 MiniDIN (bt878)",
2159 .tuner
= -1, /* card has no tuner */
2162 .muxsel
= { 2, 3, 1, 0},
2163 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2167 .tuner_addr
= ADDR_UNSET
,
2168 .radio_addr
= ADDR_UNSET
,
2170 [BTTV_BOARD_VD009X1_COMBI
] = {
2171 .name
= "PHYTEC VD-009-X1 Combi (bt878)",
2174 .tuner
= -1, /* card has no tuner */
2177 .muxsel
= { 2, 3, 1, 1},
2178 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2182 .tuner_addr
= ADDR_UNSET
,
2183 .radio_addr
= ADDR_UNSET
,
2186 /* ---- card 0x6c ---------------------------------- */
2187 [BTTV_BOARD_VD009_MINIDIN
] = {
2188 .name
= "PHYTEC VD-009 MiniDIN (bt878)",
2191 .tuner
= -1, /* card has no tuner */
2194 .gpiomask2
= 0x03, /* gpiomask2 defines the bits used to switch audio
2195 via the upper nibble of muxsel. here: used for
2196 xternal video-mux */
2197 .muxsel
= { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
2198 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2202 .tuner_addr
= ADDR_UNSET
,
2203 .radio_addr
= ADDR_UNSET
,
2205 [BTTV_BOARD_VD009_COMBI
] = {
2206 .name
= "PHYTEC VD-009 Combi (bt878)",
2209 .tuner
= -1, /* card has no tuner */
2212 .gpiomask2
= 0x03, /* gpiomask2 defines the bits used to switch audio
2213 via the upper nibble of muxsel. here: used for
2214 xternal video-mux */
2215 .muxsel
= { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
2216 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2220 .tuner_addr
= ADDR_UNSET
,
2221 .radio_addr
= ADDR_UNSET
,
2223 [BTTV_BOARD_IVC100
] = {
2229 .tuner_addr
= ADDR_UNSET
,
2230 .radio_addr
= ADDR_UNSET
,
2233 .muxsel
= { 2, 3, 1, 0 },
2236 [BTTV_BOARD_IVC120
] = {
2237 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2240 .audio_inputs
= 0, /* card has no audio */
2241 .tuner
= -1, /* card has no tuner */
2243 .tuner_addr
= ADDR_UNSET
,
2244 .radio_addr
= ADDR_UNSET
,
2245 .svhs
= -1, /* card has no svhs */
2251 .muxsel
= { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2252 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2253 .muxsel_hook
= ivc120_muxsel
,
2257 /* ---- card 0x70 ---------------------------------- */
2258 [BTTV_BOARD_PC_HDTV
] = {
2259 .name
= "pcHDTV HD-2000 TV",
2264 .muxsel
= { 2, 3, 1, 0},
2265 .tuner_type
= TUNER_PHILIPS_ATSC
,
2266 .tuner_addr
= ADDR_UNSET
,
2267 .radio_addr
= ADDR_UNSET
,
2270 [BTTV_BOARD_TWINHAN_DST
] = {
2271 .name
= "Twinhan DST + clones",
2275 .tuner_type
= TUNER_ABSENT
,
2276 .tuner_addr
= ADDR_UNSET
,
2277 .radio_addr
= ADDR_UNSET
,
2281 [BTTV_BOARD_WINFASTVC100
] = {
2282 .name
= "Winfast VC100",
2287 .muxsel
= { 3, 1, 1, 3}, /* Vid In, SVid In, Vid over SVid in connector */
2291 .tuner_type
= TUNER_ABSENT
,
2292 .tuner_addr
= ADDR_UNSET
,
2293 .radio_addr
= ADDR_UNSET
,
2296 [BTTV_BOARD_TEV560
] = {
2297 .name
= "Teppro TEV-560/InterVision IV-560",
2303 .muxsel
= { 2, 3, 1, 1},
2304 .audiomux
= { 1, 1, 1, 1, 0},
2306 .tuner_type
= TUNER_PHILIPS_PAL
,
2307 .tuner_addr
= ADDR_UNSET
,
2308 .radio_addr
= ADDR_UNSET
,
2312 /* ---- card 0x74 ---------------------------------- */
2313 [BTTV_BOARD_SIMUS_GVC1100
] = {
2314 .name
= "SIMUS GVC1100",
2320 .tuner_addr
= ADDR_UNSET
,
2321 .radio_addr
= ADDR_UNSET
,
2323 .muxsel
= { 2, 2, 2, 2},
2325 .muxsel_hook
= gvc1100_muxsel
,
2327 [BTTV_BOARD_NGSTV_PLUS
] = {
2328 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2329 .name
= "NGS NGSTV+",
2333 .gpiomask
= 0x008007,
2334 .muxsel
= {2, 3, 0, 0},
2335 .audiomux
= {0, 0, 0, 0, 0x000003, 0},
2337 .tuner_type
= TUNER_PHILIPS_PAL
,
2338 .tuner_addr
= ADDR_UNSET
,
2339 .radio_addr
= ADDR_UNSET
,
2342 [BTTV_BOARD_LMLBT4
] = {
2343 /* http://linuxmedialabs.com */
2345 .video_inputs
= 4, /* IN1,IN2,IN3,IN4 */
2349 .muxsel
= { 2, 3, 1, 0 },
2355 .tuner_addr
= ADDR_UNSET
,
2356 .radio_addr
= ADDR_UNSET
,
2358 [BTTV_BOARD_TEKRAM_M205
] = {
2359 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2360 .name
= "Tekram M205 PRO",
2364 .tuner_type
= TUNER_PHILIPS_PAL
,
2365 .tuner_addr
= ADDR_UNSET
,
2366 .radio_addr
= ADDR_UNSET
,
2370 .muxsel
= { 2, 3, 1},
2371 .audiomux
= { 0x68, 0x68, 0x61, 0x61, 0x00 },
2375 /* ---- card 0x78 ---------------------------------- */
2376 [BTTV_BOARD_CONTVFMI
] = {
2377 /* Javier Cendan Ares <jcendan@lycos.es> */
2378 /* bt878 TV + FM without subsystem ID */
2379 .name
= "Conceptronic CONTVFMi",
2384 .gpiomask
= 0x008007,
2385 .muxsel
= { 2, 3, 1, 1 },
2386 .audiomux
= { 0, 1, 2, 2, 3 },
2389 .tuner_type
= TUNER_PHILIPS_PAL
,
2390 .tuner_addr
= ADDR_UNSET
,
2391 .radio_addr
= ADDR_UNSET
,
2395 [BTTV_BOARD_PICOLO_TETRA_CHIP
] = {
2396 /*Eric DEBIEF <debief@telemsa.com>*/
2397 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
2398 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
2400 .name
= "Euresys Picolo Tetra",
2406 .gpiomask2
= 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2410 .muxsel
= {2,2,2,2},/*878A input is always MUX0, see above.*/
2411 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2414 .muxsel_hook
= picolo_tetra_muxsel
,/*Required as it doesn't follow the classic input selection policy*/
2416 .tuner_addr
= ADDR_UNSET
,
2417 .radio_addr
= ADDR_UNSET
,
2419 [BTTV_BOARD_SPIRIT_TV
] = {
2420 /* Spirit TV Tuner from http://spiritmodems.com.au */
2421 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2422 .name
= "Spirit TV Tuner",
2427 .gpiomask
= 0x0000000f,
2428 .muxsel
= { 2, 1, 1 },
2429 .audiomux
= { 0x02, 0x00, 0x00, 0x00, 0x00},
2430 .tuner_type
= TUNER_TEMIC_PAL
,
2431 .tuner_addr
= ADDR_UNSET
,
2432 .radio_addr
= ADDR_UNSET
,
2436 [BTTV_BOARD_AVDVBT_771
] = {
2437 /* Wolfram Joost <wojo@frokaschwei.de> */
2438 .name
= "AVerMedia AVerTV DVB-T 771",
2442 .tuner_type
= TUNER_ABSENT
,
2443 .tuner_addr
= ADDR_UNSET
,
2444 .radio_addr
= ADDR_UNSET
,
2445 .muxsel
= { 3 , 3 },
2454 /* ---- card 0x7c ---------------------------------- */
2455 [BTTV_BOARD_AVDVBT_761
] = {
2456 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
2457 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
2458 .name
= "AverMedia AverTV DVB-T 761",
2462 .muxsel
= { 3, 1, 2, 0}, /* Comp0, S-Video, ?, ? */
2468 .tuner_addr
= ADDR_UNSET
,
2469 .radio_addr
= ADDR_UNSET
,
2474 [BTTV_BOARD_MATRIX_VISIONSQ
] = {
2475 /* andre.schwarz@matrix-vision.de */
2476 .name
= "MATRIX Vision Sigma-SQ",
2482 .muxsel
= { 2, 2, 2, 2, 2, 2, 2, 2,
2483 3, 3, 3, 3, 3, 3, 3, 3 },
2484 .muxsel_hook
= sigmaSQ_muxsel
,
2489 .tuner_addr
= ADDR_UNSET
,
2490 .radio_addr
= ADDR_UNSET
,
2492 [BTTV_BOARD_MATRIX_VISIONSLC
] = {
2493 /* andre.schwarz@matrix-vision.de */
2494 .name
= "MATRIX Vision Sigma-SLC",
2500 .muxsel
= { 2, 2, 2, 2 },
2501 .muxsel_hook
= sigmaSLC_muxsel
,
2506 .tuner_addr
= ADDR_UNSET
,
2507 .radio_addr
= ADDR_UNSET
,
2509 /* BTTV_BOARD_APAC_VIEWCOMP */
2510 [BTTV_BOARD_APAC_VIEWCOMP
] = {
2511 /* Attila Kondoros <attila.kondoros@chello.hu> */
2512 /* bt878 TV + FM 0x00000000 subsystem ID */
2513 .name
= "APAC Viewcomp 878(AMAX)",
2519 .muxsel
= { 2, 3, 1, 1},
2520 .audiomux
= { 2, 0, 0, 0, 10},
2523 .tuner_type
= TUNER_PHILIPS_PAL
,
2524 .tuner_addr
= ADDR_UNSET
,
2525 .radio_addr
= ADDR_UNSET
,
2526 .has_remote
= 1, /* miniremote works, see ir-kbd-gpio.c */
2527 .has_radio
= 1, /* not every card has radio */
2530 /* ---- card 0x80 ---------------------------------- */
2531 [BTTV_BOARD_DVICO_DVBT_LITE
] = {
2532 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2533 .name
= "DViCO FusionHDTV DVB-T Lite",
2542 .tuner_addr
= ADDR_UNSET
,
2543 .radio_addr
= ADDR_UNSET
,
2545 [BTTV_BOARD_VGEAR_MYVCD
] = {
2546 /* Steven <photon38@pchome.com.tw> */
2547 .name
= "V-Gear MyVCD",
2553 .muxsel
= {2, 3, 1, 0},
2554 .audiomux
= {0x31, 0x31, 0x31, 0x31, 0x31, 0x31},
2557 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
2558 .tuner_addr
= ADDR_UNSET
,
2559 .radio_addr
= ADDR_UNSET
,
2565 [BTTV_BOARD_SUPER_TV
] = {
2566 /* Rick C <cryptdragoon@gmail.com> */
2567 .name
= "Super TV Tuner",
2572 .muxsel
= { 2, 3, 1, 0},
2573 .tuner_type
= TUNER_PHILIPS_NTSC
,
2574 .tuner_addr
= ADDR_UNSET
,
2575 .radio_addr
= ADDR_UNSET
,
2576 .gpiomask
= 0x008007,
2577 .audiomux
= { 0, 0x000001,0,0, 0},
2581 [BTTV_BOARD_TIBET_CS16
] = {
2582 /* Chris Fanning <video4linux@haydon.net> */
2583 .name
= "Tibet Systems 'Progress DVR' CS16",
2588 .muxsel
= { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2594 .tuner_addr
= ADDR_UNSET
,
2595 .radio_addr
= ADDR_UNSET
,
2596 .muxsel_hook
= tibetCS16_muxsel
,
2598 [BTTV_BOARD_KODICOM_4400R
] = {
2599 /* Bill Brack <wbrack@mmm.com.hk> */
2601 * Note that, because of the card's wiring, the "master"
2602 * BT878A chip (i.e. the one which controls the analog switch
2603 * and must use this card type) is the 2nd one detected. The
2604 * other 3 chips should use card type 0x85, whose description
2605 * follows this one. There is a EEPROM on the card (which is
2606 * connected to the I2C of one of those other chips), but is
2607 * not currently handled. There is also a facility for a
2608 * "monitor", which is also not currently implemented.
2610 .name
= "Kodicom 4400R (master)",
2615 .tuner_addr
= ADDR_UNSET
,
2616 .radio_addr
= ADDR_UNSET
,
2618 /* GPIO bits 0-9 used for analog switch:
2619 * 00 - 03: camera selector
2620 * 04 - 06: channel (controller) selector
2621 * 07: data (1->on, 0->off)
2624 * bit 16 is input from sync separator for the channel
2626 .gpiomask
= 0x0003ff,
2628 .muxsel
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2633 .muxsel_hook
= kodicom4400r_muxsel
,
2635 [BTTV_BOARD_KODICOM_4400R_SL
] = {
2636 /* Bill Brack <wbrack@mmm.com.hk> */
2637 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2638 * one which controls the analog switch, and must use the card type)
2639 * is the 2nd one detected. The other 3 chips should use this card
2642 .name
= "Kodicom 4400R (slave)",
2647 .tuner_addr
= ADDR_UNSET
,
2648 .radio_addr
= ADDR_UNSET
,
2650 .gpiomask
= 0x010000,
2652 .muxsel
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2657 .muxsel_hook
= kodicom4400r_muxsel
,
2659 /* ---- card 0x86---------------------------------- */
2660 [BTTV_BOARD_ADLINK_RTV24
] = {
2661 /* Michael Henson <mhenson@clarityvi.com> */
2662 /* Adlink RTV24 with special unlock codes */
2663 .name
= "Adlink RTV24",
2668 .muxsel
= { 2, 3, 1, 0},
2670 .tuner_addr
= ADDR_UNSET
,
2671 .radio_addr
= ADDR_UNSET
,
2674 /* ---- card 0x87---------------------------------- */
2675 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
] = {
2676 /* Michael Krufky <mkrufky@m1k.net> */
2677 .name
= "DViCO FusionHDTV 5 Lite",
2679 .tuner_type
= TUNER_LG_TDVS_H062F
,
2680 .tuner_addr
= ADDR_UNSET
,
2681 .radio_addr
= ADDR_UNSET
,
2685 .muxsel
= { 2, 3, 1 },
2686 .gpiomask
= 0x00e00007,
2687 .audiomux
= { 0x00400005, 0, 0x00000001, 0, 0x00c00007, 0 },
2693 /* ---- card 0x88---------------------------------- */
2694 [BTTV_BOARD_ACORP_Y878F
] = {
2695 /* Mauro Carvalho Chehab <mchehab@brturbo.com.br> */
2696 .name
= "Acorp Y878F",
2701 .gpiomask
= 0x01fe00,
2702 .muxsel
= { 2, 3, 1, 1},
2703 .audiomux
= { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
2706 .tuner_type
= TUNER_YMEC_TVF66T5_B_DFF
,
2707 .tuner_addr
= 0xc1 >>1,
2708 .radio_addr
= 0xc1 >>1,
2711 /* ---- card 0x89 ---------------------------------- */
2712 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2
] = {
2713 .name
= "Conceptronic CTVFMi v2",
2718 .gpiomask
= 0x001c0007,
2719 .muxsel
= { 2, 3, 1, 1 },
2720 .audiomux
= { 0, 1, 2, 2, 3 },
2723 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
2724 .tuner_addr
= ADDR_UNSET
,
2725 .radio_addr
= ADDR_UNSET
,
2731 /* ---- card 0x8a ---------------------------------- */
2732 [BTTV_BOARD_PV_BT878P_2E
] = {
2733 .name
= "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2738 .gpiomask
= 0x01fe00,
2739 .muxsel
= { 2,3,1,1,-1 },
2740 .digital_mode
= DIGITAL_MODE_CAMERA
,
2741 .audiomux
= { 0x00400, 0x10400, 0x04400, 0x80000, 0x12400, 0x46000 },
2744 .tuner_type
= TUNER_LG_PAL_FM
,
2745 .tuner_addr
= ADDR_UNSET
,
2746 .radio_addr
= ADDR_UNSET
,
2749 /* ---- card 0x8b ---------------------------------- */
2750 [BTTV_BOARD_PV_M4900
] = {
2751 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2752 .name
= "Prolink PixelView PlayTV MPEG2 PV-M4900",
2758 .muxsel
= { 2, 3, 1, 1 },
2759 .audiomux
= { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
2762 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
2763 .tuner_addr
= ADDR_UNSET
,
2764 .radio_addr
= ADDR_UNSET
,
2768 /* ---- card 0x8c ---------------------------------- */
2769 [BTTV_BOARD_OSPREY440
] = {
2770 .name
= "Osprey 440",
2777 .tuner_type
= UNSET
,
2778 .tuner_addr
= ADDR_UNSET
,
2779 .radio_addr
= ADDR_UNSET
,
2786 static const unsigned int bttv_num_tvcards
= ARRAY_SIZE(bttv_tvcards
);
2788 /* ----------------------------------------------------------------------- */
2790 static unsigned char eeprom_data
[256];
2795 void __devinit
bttv_idcard(struct bttv
*btv
)
2797 unsigned int gpiobits
;
2801 /* read PCI subsystem ID */
2802 pci_read_config_word(btv
->c
.pci
, PCI_SUBSYSTEM_ID
, &tmp
);
2803 btv
->cardid
= tmp
<< 16;
2804 pci_read_config_word(btv
->c
.pci
, PCI_SUBSYSTEM_VENDOR_ID
, &tmp
);
2807 if (0 != btv
->cardid
&& 0xffffffff != btv
->cardid
) {
2808 /* look for the card */
2809 for (type
= -1, i
= 0; cards
[i
].id
!= 0; i
++)
2810 if (cards
[i
].id
== btv
->cardid
)
2815 printk(KERN_INFO
"bttv%d: detected: %s [card=%d], "
2816 "PCI subsystem ID is %04x:%04x\n",
2817 btv
->c
.nr
,cards
[type
].name
,cards
[type
].cardnr
,
2818 btv
->cardid
& 0xffff,
2819 (btv
->cardid
>> 16) & 0xffff);
2820 btv
->c
.type
= cards
[type
].cardnr
;
2823 printk(KERN_INFO
"bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2824 btv
->c
.nr
, btv
->cardid
& 0xffff,
2825 (btv
->cardid
>> 16) & 0xffff);
2826 printk(KERN_DEBUG
"please mail id, board name and "
2827 "the correct card= insmod option to kraxel@bytesex.org\n");
2831 /* let the user override the autodetected type */
2832 if (card
[btv
->c
.nr
] < bttv_num_tvcards
)
2833 btv
->c
.type
=card
[btv
->c
.nr
];
2835 /* print which card config we are using */
2836 printk(KERN_INFO
"bttv%d: using: %s [card=%d,%s]\n",btv
->c
.nr
,
2837 bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
,
2838 card
[btv
->c
.nr
] < bttv_num_tvcards
2839 ? "insmod option" : "autodetected");
2841 /* overwrite gpio stuff ?? */
2842 if (UNSET
== audioall
&& UNSET
== audiomux
[0])
2845 if (UNSET
!= audiomux
[0]) {
2847 for (i
= 0; i
< 5; i
++) {
2848 bttv_tvcards
[btv
->c
.type
].audiomux
[i
] = audiomux
[i
];
2849 gpiobits
|= audiomux
[i
];
2852 gpiobits
= audioall
;
2853 for (i
= 0; i
< 5; i
++) {
2854 bttv_tvcards
[btv
->c
.type
].audiomux
[i
] = audioall
;
2857 bttv_tvcards
[btv
->c
.type
].gpiomask
= (UNSET
!= gpiomask
) ? gpiomask
: gpiobits
;
2858 printk(KERN_INFO
"bttv%d: gpio config override: mask=0x%x, mux=",
2859 btv
->c
.nr
,bttv_tvcards
[btv
->c
.type
].gpiomask
);
2860 for (i
= 0; i
< 5; i
++) {
2861 printk("%s0x%x", i
? "," : "", bttv_tvcards
[btv
->c
.type
].audiomux
[i
]);
2867 * (most) board specific initialisations goes here
2870 /* Some Modular Technology cards have an eeprom, but no subsystem ID */
2871 void identify_by_eeprom(struct bttv
*btv
, unsigned char eeprom_data
[256])
2875 if (0 == strncmp(eeprom_data
,"GET MM20xPCTV",13))
2876 type
= BTTV_BOARD_MODTEC_205
;
2877 else if (0 == strncmp(eeprom_data
+20,"Picolo",7))
2878 type
= BTTV_BOARD_EURESYS_PICOLO
;
2879 else if (eeprom_data
[0] == 0x84 && eeprom_data
[2]== 0)
2880 type
= BTTV_BOARD_HAUPPAUGE
; /* old bt848 */
2884 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2885 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
);
2889 static void flyvideo_gpio(struct bttv
*btv
)
2891 int gpio
,has_remote
,has_radio
,is_capture_only
,is_lr90
,has_tda9820_tda9821
;
2894 gpio_inout(0xffffff, 0);
2895 udelay(8); /* without this we would see the 0x1800 mask */
2897 /* FIXME: must restore OUR_EN ??? */
2899 /* all cards provide GPIO info, some have an additional eeprom
2900 * LR50: GPIO coding can be found lower right CP1 .. CP9
2901 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2903 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
2905 * lowest 3 bytes are remote control codes (no handshake needed)
2906 * xxxFFF: No remote control chip soldered
2907 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
2908 * Note: Some bits are Audio_Mask !
2910 ttype
=(gpio
&0x0f0000)>>16;
2912 case 0x0: tuner
=2; /* NTSC, e.g. TPI8NSR11P */
2914 case 0x2: tuner
=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
2916 case 0x4: tuner
=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
2918 case 0x6: tuner
=37;/* LG PAL (newer TAPC series) TAPC-G702P */
2920 case 0xC: tuner
=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
2923 printk(KERN_INFO
"bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv
->c
.nr
);
2926 has_remote
= gpio
& 0x800000;
2927 has_radio
= gpio
& 0x400000;
2928 /* unknown 0x200000;
2929 * unknown2 0x100000; */
2930 is_capture_only
= !(gpio
& 0x008000); /* GPIO15 */
2931 has_tda9820_tda9821
= !(gpio
& 0x004000);
2932 is_lr90
= !(gpio
& 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
2934 * gpio & 0x001000 output bit for audio routing */
2937 tuner
=4; /* No tuner present */
2939 printk(KERN_INFO
"bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
2940 btv
->c
.nr
, has_radio
? "yes":"no ", has_remote
? "yes":"no ", tuner
, gpio
);
2941 printk(KERN_INFO
"bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
2942 btv
->c
.nr
, is_lr90
?"yes":"no ", has_tda9820_tda9821
?"yes":"no ",
2943 is_capture_only
?"yes":"no ");
2945 if(tuner
!= -1) /* only set if known tuner autodetected, else let insmod option through */
2946 btv
->tuner_type
= tuner
;
2947 btv
->has_radio
= has_radio
;
2949 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
2950 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
2951 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
2952 if(has_tda9820_tda9821
) btv
->audio_hook
= lt9415_audio
;
2953 /* todo: if(has_tda9874) btv->audio_hook = fv2000s_audio; */
2956 static int miro_tunermap
[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
2957 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
2958 static int miro_fmtuner
[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
2959 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
2961 static void miro_pinnacle_gpio(struct bttv
*btv
)
2966 gpio_inout(0xffffff, 0);
2968 id
= ((gpio
>>10) & 63) -1;
2969 msp
= bttv_I2CRead(btv
, I2C_MSP3400
, "MSP34xx");
2971 btv
->tuner_type
= miro_tunermap
[id
];
2972 if (0 == (gpio
& 0x20)) {
2974 if (!miro_fmtuner
[id
]) {
2975 btv
->has_matchbox
= 1;
2976 btv
->mbox_we
= (1<<6);
2977 btv
->mbox_most
= (1<<7);
2978 btv
->mbox_clk
= (1<<8);
2979 btv
->mbox_data
= (1<<9);
2980 btv
->mbox_mask
= (1<<6)|(1<<7)|(1<<8)|(1<<9);
2986 if (btv
->c
.type
== BTTV_BOARD_MIRO
)
2987 btv
->c
.type
= BTTV_BOARD_MIROPRO
;
2988 if (btv
->c
.type
== BTTV_BOARD_PINNACLE
)
2989 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
2992 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
2993 btv
->c
.nr
, id
+1, btv
->tuner_type
,
2994 !btv
->has_radio
? "no" :
2995 (btv
->has_matchbox
? "matchbox" : "fmtuner"),
2996 (-1 == msp
) ? "no" : "yes");
2998 /* new cards with microtune tuner */
3003 info
= "PAL / mono";
3006 info
= "PAL+SECAM / stereo";
3010 info
= "NTSC / stereo";
3014 info
= "PAL+SECAM / mono";
3017 info
= "NTSC / mono";
3020 info
= "NTSC / stereo";
3023 info
= "PAL / stereo";
3026 info
= "oops: unknown card";
3030 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3032 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3033 btv
->c
.nr
, id
, info
, btv
->has_radio
? "yes" : "no");
3034 btv
->tuner_type
= 33;
3035 btv
->pinnacle_id
= id
;
3039 /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3040 #define LM1882_SYNC_DRIVE 0x200000L
3042 static void init_ids_eagle(struct bttv
*btv
)
3044 gpio_inout(0xffffff,0xFFFF37);
3045 gpio_write(0x200020);
3047 /* flash strobe inverter ?! */
3048 gpio_write(0x200024);
3050 /* switch sync drive off */
3051 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3053 /* set BT848 muxel to 2 */
3054 btaor((2)<<5, ~(2<<5), BT848_IFORM
);
3057 /* Muxsel helper for the IDS Eagle.
3058 * the eagles does not use the standard muxsel-bits but
3059 * has its own multiplexer */
3060 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
)
3062 btaor((2)<<5, ~(3<<5), BT848_IFORM
);
3063 gpio_bits(3,bttv_tvcards
[btv
->c
.type
].muxsel
[input
&7]);
3066 /* set chroma ADC to sleep */
3067 btor(BT848_ADC_C_SLEEP
, BT848_ADC
);
3068 /* set to composite video */
3069 btand(~BT848_CONTROL_COMP
, BT848_E_CONTROL
);
3070 btand(~BT848_CONTROL_COMP
, BT848_O_CONTROL
);
3072 /* switch sync drive off */
3073 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3076 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
)
3078 static const int masks
[] = {0x30, 0x01, 0x12, 0x23};
3079 gpio_write(masks
[input
%4]);
3082 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3085 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3086 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3088 IN - sensor inputs, INx - sensor inputs and TI XORed together
3089 O1,O2,O3 - alarm outputs (relays)
3091 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3095 static void init_lmlbt4x(struct bttv
*btv
)
3097 printk(KERN_DEBUG
"LMLBT4x init\n");
3098 btwrite(0x000000, BT848_GPIO_REG_INP
);
3099 gpio_inout(0xffffff, 0x0006C0);
3100 gpio_write(0x000000);
3103 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
)
3105 unsigned int inmux
= input
% 8;
3106 gpio_inout( 0xf, 0xf );
3107 gpio_bits( 0xf, inmux
);
3110 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
)
3112 unsigned int inmux
= input
% 4;
3113 gpio_inout( 3<<9, 3<<9 );
3114 gpio_bits( 3<<9, inmux
<<9 );
3117 /* ----------------------------------------------------------------------- */
3119 static void bttv_reset_audio(struct bttv
*btv
)
3122 * BT878A has a audio-reset register.
3123 * 1. This register is an audio reset function but it is in
3124 * function-0 (video capture) address space.
3125 * 2. It is enough to do this once per power-up of the card.
3126 * 3. There is a typo in the Conexant doc -- it is not at
3127 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3128 * --//Shrikumar 030609
3134 printk("bttv%d: BT878A ARESET\n",btv
->c
.nr
);
3135 btwrite((1<<7), 0x058);
3140 /* initialization part one -- before registering i2c bus */
3141 void __devinit
bttv_init_card1(struct bttv
*btv
)
3143 switch (btv
->c
.type
) {
3144 case BTTV_BOARD_HAUPPAUGE
:
3145 case BTTV_BOARD_HAUPPAUGE878
:
3146 boot_msp34xx(btv
,5);
3148 case BTTV_BOARD_VOODOOTV_FM
:
3149 boot_msp34xx(btv
,20);
3151 case BTTV_BOARD_AVERMEDIA98
:
3152 boot_msp34xx(btv
,11);
3154 case BTTV_BOARD_HAUPPAUGEPVR
:
3157 case BTTV_BOARD_TWINHAN_DST
:
3158 case BTTV_BOARD_AVDVBT_771
:
3159 case BTTV_BOARD_PINNACLESAT
:
3160 btv
->use_i2c_hw
= 1;
3162 case BTTV_BOARD_ADLINK_RTV24
:
3167 if (!bttv_tvcards
[btv
->c
.type
].has_dvb
)
3168 bttv_reset_audio(btv
);
3171 /* initialization part two -- after registering i2c bus */
3172 void __devinit
bttv_init_card2(struct bttv
*btv
)
3175 int addr
=ADDR_UNSET
, radio_addr
=ADDR_UNSET
;
3177 btv
->tuner_type
= -1;
3179 if (BTTV_BOARD_UNKNOWN
== btv
->c
.type
) {
3180 bttv_readee(btv
,eeprom_data
,0xa0);
3181 identify_by_eeprom(btv
,eeprom_data
);
3184 switch (btv
->c
.type
) {
3185 case BTTV_BOARD_MIRO
:
3186 case BTTV_BOARD_MIROPRO
:
3187 case BTTV_BOARD_PINNACLE
:
3188 case BTTV_BOARD_PINNACLEPRO
:
3190 miro_pinnacle_gpio(btv
);
3192 case BTTV_BOARD_FLYVIDEO_98
:
3193 case BTTV_BOARD_MAXI
:
3194 case BTTV_BOARD_LIFE_FLYKIT
:
3195 case BTTV_BOARD_FLYVIDEO
:
3196 case BTTV_BOARD_TYPHOON_TVIEW
:
3197 case BTTV_BOARD_CHRONOS_VS2
:
3198 case BTTV_BOARD_FLYVIDEO_98FM
:
3199 case BTTV_BOARD_FLYVIDEO2000
:
3200 case BTTV_BOARD_FLYVIDEO98EZ
:
3201 case BTTV_BOARD_CONFERENCETV
:
3202 case BTTV_BOARD_LIFETEC_9415
:
3205 case BTTV_BOARD_HAUPPAUGE
:
3206 case BTTV_BOARD_HAUPPAUGE878
:
3207 case BTTV_BOARD_HAUPPAUGEPVR
:
3208 /* pick up some config infos from the eeprom */
3209 bttv_readee(btv
,eeprom_data
,0xa0);
3210 hauppauge_eeprom(btv
);
3212 case BTTV_BOARD_AVERMEDIA98
:
3213 case BTTV_BOARD_AVPHONE98
:
3214 bttv_readee(btv
,eeprom_data
,0xa0);
3215 avermedia_eeprom(btv
);
3217 case BTTV_BOARD_PXC200
:
3220 case BTTV_BOARD_PICOLO_TETRA_CHIP
:
3221 picolo_tetra_init(btv
);
3223 case BTTV_BOARD_VHX
:
3225 btv
->has_matchbox
= 1;
3226 btv
->mbox_we
= 0x20;
3228 btv
->mbox_clk
= 0x08;
3229 btv
->mbox_data
= 0x10;
3230 btv
->mbox_mask
= 0x38;
3232 case BTTV_BOARD_VOBIS_BOOSTAR
:
3233 case BTTV_BOARD_TERRATV
:
3234 terratec_active_radio_upgrade(btv
);
3236 case BTTV_BOARD_MAGICTVIEW061
:
3237 if (btv
->cardid
== 0x3002144f) {
3239 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv
->c
.nr
);
3242 case BTTV_BOARD_STB2
:
3243 if (btv
->cardid
== 0x3060121a) {
3244 /* Fix up entry for 3DFX VoodooTV 100,
3245 which is an OEM STB card variant. */
3247 btv
->tuner_type
=TUNER_TEMIC_NTSC
;
3250 case BTTV_BOARD_OSPREY1x0
:
3251 case BTTV_BOARD_OSPREY1x0_848
:
3252 case BTTV_BOARD_OSPREY101_848
:
3253 case BTTV_BOARD_OSPREY1x1
:
3254 case BTTV_BOARD_OSPREY1x1_SVID
:
3255 case BTTV_BOARD_OSPREY2xx
:
3256 case BTTV_BOARD_OSPREY2x0_SVID
:
3257 case BTTV_BOARD_OSPREY2x0
:
3258 case BTTV_BOARD_OSPREY500
:
3259 case BTTV_BOARD_OSPREY540
:
3260 case BTTV_BOARD_OSPREY2000
:
3261 bttv_readee(btv
,eeprom_data
,0xa0);
3264 case BTTV_BOARD_IDS_EAGLE
:
3265 init_ids_eagle(btv
);
3267 case BTTV_BOARD_MODTEC_205
:
3268 bttv_readee(btv
,eeprom_data
,0xa0);
3271 case BTTV_BOARD_LMLBT4
:
3274 case BTTV_BOARD_TIBET_CS16
:
3275 tibetCS16_init(btv
);
3277 case BTTV_BOARD_KODICOM_4400R
:
3278 kodicom4400r_init(btv
);
3282 /* pll configuration */
3283 if (!(btv
->id
==848 && btv
->revision
==0x11)) {
3284 /* defaults from card list */
3285 if (PLL_28
== bttv_tvcards
[btv
->c
.type
].pll
) {
3286 btv
->pll
.pll_ifreq
=28636363;
3287 btv
->pll
.pll_crystal
=BT848_IFORM_XT0
;
3289 if (PLL_35
== bttv_tvcards
[btv
->c
.type
].pll
) {
3290 btv
->pll
.pll_ifreq
=35468950;
3291 btv
->pll
.pll_crystal
=BT848_IFORM_XT1
;
3293 /* insmod options can override */
3294 switch (pll
[btv
->c
.nr
]) {
3296 btv
->pll
.pll_crystal
= 0;
3297 btv
->pll
.pll_ifreq
= 0;
3298 btv
->pll
.pll_ofreq
= 0;
3300 case 1: /* 28 MHz */
3302 btv
->pll
.pll_ifreq
= 28636363;
3303 btv
->pll
.pll_ofreq
= 0;
3304 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3306 case 2: /* 35 MHz */
3308 btv
->pll
.pll_ifreq
= 35468950;
3309 btv
->pll
.pll_ofreq
= 0;
3310 btv
->pll
.pll_crystal
= BT848_IFORM_XT1
;
3314 btv
->pll
.pll_current
= -1;
3316 /* tuner configuration (from card list / autodetect / insmod option) */
3317 if (ADDR_UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_addr
)
3318 addr
= bttv_tvcards
[btv
->c
.type
].tuner_addr
;
3320 if (ADDR_UNSET
!= bttv_tvcards
[btv
->c
.type
].radio_addr
)
3321 radio_addr
= bttv_tvcards
[btv
->c
.type
].radio_addr
;
3323 if (UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_type
)
3324 if(UNSET
== btv
->tuner_type
)
3325 btv
->tuner_type
= bttv_tvcards
[btv
->c
.type
].tuner_type
;
3326 if (UNSET
!= tuner
[btv
->c
.nr
])
3327 btv
->tuner_type
= tuner
[btv
->c
.nr
];
3328 printk("bttv%d: using tuner=%d\n",btv
->c
.nr
,btv
->tuner_type
);
3329 if (btv
->pinnacle_id
!= UNSET
)
3330 bttv_call_i2c_clients(btv
, AUDC_CONFIG_PINNACLE
,
3332 if (btv
->tuner_type
!= UNSET
) {
3333 struct tuner_setup tun_setup
;
3335 tun_setup
.mode_mask
= T_ANALOG_TV
| T_DIGITAL_TV
;
3336 tun_setup
.type
= btv
->tuner_type
;
3337 tun_setup
.addr
= addr
;
3339 if (addr
== radio_addr
)
3340 tun_setup
.mode_mask
= T_RADIO
;
3342 bttv_call_i2c_clients(btv
, TUNER_SET_TYPE_ADDR
, &tun_setup
);
3345 btv
->svhs
= bttv_tvcards
[btv
->c
.type
].svhs
;
3346 if (svhs
[btv
->c
.nr
] != UNSET
)
3347 btv
->svhs
= svhs
[btv
->c
.nr
];
3348 if (remote
[btv
->c
.nr
] != UNSET
)
3349 btv
->has_remote
= remote
[btv
->c
.nr
];
3351 if (bttv_tvcards
[btv
->c
.type
].has_radio
)
3353 if (bttv_tvcards
[btv
->c
.type
].has_remote
)
3355 if (!bttv_tvcards
[btv
->c
.type
].no_gpioirq
)
3357 if (bttv_tvcards
[btv
->c
.type
].audio_hook
)
3358 btv
->audio_hook
=bttv_tvcards
[btv
->c
.type
].audio_hook
;
3360 if (bttv_tvcards
[btv
->c
.type
].digital_mode
== DIGITAL_MODE_CAMERA
) {
3361 /* detect Bt832 chip for quartzsight digital camera */
3362 if ((bttv_I2CRead(btv
, I2C_BT832_ALT1
, "Bt832") >=0) ||
3363 (bttv_I2CRead(btv
, I2C_BT832_ALT2
, "Bt832") >=0))
3370 /* try to detect audio/fader chips */
3371 if (!bttv_tvcards
[btv
->c
.type
].no_msp34xx
&&
3372 bttv_I2CRead(btv
, I2C_MSP3400
, "MSP34xx") >=0)
3373 request_module("msp3400");
3375 if (bttv_tvcards
[btv
->c
.type
].msp34xx_alt
&&
3376 bttv_I2CRead(btv
, I2C_MSP3400_ALT
, "MSP34xx (alternate address)") >=0)
3377 request_module("msp3400");
3379 if (!bttv_tvcards
[btv
->c
.type
].no_tda9875
&&
3380 bttv_I2CRead(btv
, I2C_TDA9875
, "TDA9875") >=0)
3381 request_module("tda9875");
3383 if (!bttv_tvcards
[btv
->c
.type
].no_tda7432
&&
3384 bttv_I2CRead(btv
, I2C_TDA7432
, "TDA7432") >=0)
3385 request_module("tda7432");
3387 if (bttv_tvcards
[btv
->c
.type
].needs_tvaudio
)
3388 request_module("tvaudio");
3392 if (btv
->pinnacle_id
!= UNSET
)
3394 if (0 == tda9887
&& 0 == bttv_tvcards
[btv
->c
.type
].has_dvb
&&
3395 bttv_I2CRead(btv
, I2C_TDA9887
, "TDA9887") >=0)
3397 if((btv
->tuner_type
== TUNER_PHILIPS_FM1216ME_MK3
) ||
3398 (btv
->tuner_type
== TUNER_PHILIPS_FM1236_MK3
) ||
3399 (btv
->tuner_type
== TUNER_PHILIPS_FM1256_IH3
) ||
3401 request_module("tda9887");
3402 if (btv
->tuner_type
!= UNSET
)
3403 request_module("tuner");
3407 /* ----------------------------------------------------------------------- */
3409 static void modtec_eeprom(struct bttv
*btv
)
3411 if( strncmp(&(eeprom_data
[0x1e]),"Temic 4066 FY5",14) ==0) {
3412 btv
->tuner_type
=TUNER_TEMIC_4066FY5_PAL_I
;
3413 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3414 btv
->c
.nr
,&eeprom_data
[0x1e]);
3415 } else if (strncmp(&(eeprom_data
[0x1e]),"Alps TSBB5",10) ==0) {
3416 btv
->tuner_type
=TUNER_ALPS_TSBB5_PAL_I
;
3417 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3418 btv
->c
.nr
,&eeprom_data
[0x1e]);
3419 } else if (strncmp(&(eeprom_data
[0x1e]),"Philips FM1246",14) ==0) {
3420 btv
->tuner_type
=TUNER_PHILIPS_NTSC
;
3421 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3422 btv
->c
.nr
,&eeprom_data
[0x1e]);
3424 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3425 btv
->c
.nr
,&eeprom_data
[0x1e]);
3429 static void __devinit
hauppauge_eeprom(struct bttv
*btv
)
3433 tveeprom_hauppauge_analog(&btv
->i2c_client
, &tv
, eeprom_data
);
3434 btv
->tuner_type
= tv
.tuner_type
;
3435 btv
->has_radio
= tv
.has_radio
;
3438 static int terratec_active_radio_upgrade(struct bttv
*btv
)
3443 btv
->has_matchbox
= 1;
3444 btv
->mbox_we
= 0x10;
3445 btv
->mbox_most
= 0x20;
3446 btv
->mbox_clk
= 0x08;
3447 btv
->mbox_data
= 0x04;
3448 btv
->mbox_mask
= 0x3c;
3450 btv
->mbox_iow
= 1 << 8;
3451 btv
->mbox_ior
= 1 << 9;
3452 btv
->mbox_csel
= 1 << 10;
3455 tea5757_write(btv
, 5 * freq
+ 0x358); /* write 0x1ed8 */
3456 if (0x1ed8 == tea5757_read(btv
)) {
3457 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3460 btv
->has_matchbox
= 1;
3463 btv
->has_matchbox
= 0;
3469 /* ----------------------------------------------------------------------- */
3472 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3474 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3475 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3476 * unpacked with unzip).
3478 #define PVR_GPIO_DELAY 10
3480 #define BTTV_ALT_DATA 0x000001
3481 #define BTTV_ALT_DCLK 0x100000
3482 #define BTTV_ALT_NCONFIG 0x800000
3484 static int __devinit
pvr_altera_load(struct bttv
*btv
, u8
*micro
, u32 microlen
)
3490 gpio_inout(0xffffff,BTTV_ALT_DATA
|BTTV_ALT_DCLK
|BTTV_ALT_NCONFIG
);
3492 udelay(PVR_GPIO_DELAY
);
3494 gpio_write(BTTV_ALT_NCONFIG
);
3495 udelay(PVR_GPIO_DELAY
);
3497 for (n
= 0; n
< microlen
; n
++) {
3499 for ( i
= 0 ; i
< 8 ; i
++ ) {
3500 gpio_bits(BTTV_ALT_DCLK
,0);
3502 gpio_bits(BTTV_ALT_DATA
,BTTV_ALT_DATA
);
3504 gpio_bits(BTTV_ALT_DATA
,0);
3505 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3509 gpio_bits(BTTV_ALT_DCLK
,0);
3510 udelay(PVR_GPIO_DELAY
);
3512 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3513 for (i
= 0 ; i
< 30 ; i
++) {
3514 gpio_bits(BTTV_ALT_DCLK
,0);
3515 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3517 gpio_bits(BTTV_ALT_DCLK
,0);
3521 static int __devinit
pvr_boot(struct bttv
*btv
)
3523 const struct firmware
*fw_entry
;
3526 rc
= request_firmware(&fw_entry
, "hcwamc.rbf", &btv
->c
.pci
->dev
);
3528 printk(KERN_WARNING
"bttv%d: no altera firmware [via hotplug]\n",
3532 rc
= pvr_altera_load(btv
, fw_entry
->data
, fw_entry
->size
);
3533 printk(KERN_INFO
"bttv%d: altera firmware upload %s\n",
3534 btv
->c
.nr
, (rc
< 0) ? "failed" : "ok");
3535 release_firmware(fw_entry
);
3539 /* ----------------------------------------------------------------------- */
3540 /* some osprey specific stuff */
3542 static void __devinit
osprey_eeprom(struct bttv
*btv
)
3545 unsigned char *ee
= eeprom_data
;
3546 unsigned long serial
= 0;
3548 if (btv
->c
.type
== 0) {
3549 /* this might be an antique... check for MMAC label in eeprom */
3550 if ((ee
[0]=='M') && (ee
[1]=='M') && (ee
[2]=='A') && (ee
[3]=='C')) {
3551 unsigned char checksum
= 0;
3552 for (i
=0; i
<21; i
++)
3554 if (checksum
!= ee
[21])
3556 btv
->c
.type
= BTTV_BOARD_OSPREY1x0_848
;
3557 for (i
= 12; i
< 21; i
++)
3558 serial
*= 10, serial
+= ee
[i
] - '0';
3561 unsigned short type
;
3564 for(; offset
< 8*16; offset
+= 16) {
3565 unsigned short checksum
= 0;
3566 /* verify the checksum */
3567 for(i
= 0; i
<14; i
++) checksum
+= ee
[i
+offset
];
3568 checksum
= ~checksum
; /* no idea why */
3569 if ((((checksum
>>8)&0x0FF) == ee
[offset
+14]) &&
3570 ((checksum
& 0x0FF) == ee
[offset
+15])) {
3578 /* found a valid descriptor */
3579 type
= (ee
[offset
+4]<<8) | (ee
[offset
+5]);
3585 btv
->c
.type
= BTTV_BOARD_OSPREY1x0_848
;
3588 btv
->c
.type
= BTTV_BOARD_OSPREY101_848
;
3594 btv
->c
.type
= BTTV_BOARD_OSPREY1x0
;
3598 btv
->c
.type
= BTTV_BOARD_OSPREY1x1
;
3603 btv
->c
.type
= BTTV_BOARD_OSPREY1x1_SVID
;
3609 btv
->c
.type
= BTTV_BOARD_OSPREY2xx
;
3613 btv
->c
.type
= BTTV_BOARD_OSPREY2x0_SVID
;
3616 btv
->c
.type
= BTTV_BOARD_OSPREY500
;
3620 btv
->c
.type
= BTTV_BOARD_OSPREY540
;
3621 /* bttv_osprey_540_init(btv); */
3625 btv
->c
.type
= BTTV_BOARD_OSPREY2x0
;
3626 /* enable output on select control lines */
3627 gpio_inout(0xffffff,0x000303);
3630 /* unknown...leave generic, but get serial # */
3633 serial
= (ee
[offset
+6] << 24)
3634 | (ee
[offset
+7] << 16)
3635 | (ee
[offset
+8] << 8)
3639 printk(KERN_INFO
"bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n",
3640 btv
->c
.nr
, btv
->c
.type
, bttv_tvcards
[btv
->c
.type
].name
,serial
);
3643 /* ----------------------------------------------------------------------- */
3644 /* AVermedia specific stuff, from bktr_card.c */
3646 static int tuner_0_table
[] = {
3647 TUNER_PHILIPS_NTSC
, TUNER_PHILIPS_PAL
/* PAL-BG*/,
3648 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
/* PAL-I*/,
3649 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
,
3650 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_SECAM
,
3651 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_PAL
,
3652 TUNER_PHILIPS_FM1216ME_MK3
};
3654 static int tuner_1_table
[] = {
3655 TUNER_TEMIC_NTSC
, TUNER_TEMIC_PAL
,
3656 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
3657 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
3658 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_4012FY5
, /* TUNER_TEMIC_SECAM */
3659 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_PAL
};
3661 static void __devinit
avermedia_eeprom(struct bttv
*btv
)
3663 int tuner_make
,tuner_tv_fm
,tuner_format
,tuner
=0;
3665 tuner_make
= (eeprom_data
[0x41] & 0x7);
3666 tuner_tv_fm
= (eeprom_data
[0x41] & 0x18) >> 3;
3667 tuner_format
= (eeprom_data
[0x42] & 0xf0) >> 4;
3668 btv
->has_remote
= (eeprom_data
[0x42] & 0x01);
3670 if (tuner_make
== 0 || tuner_make
== 2)
3671 if(tuner_format
<=0x0a)
3672 tuner
= tuner_0_table
[tuner_format
];
3673 if (tuner_make
== 1)
3674 if(tuner_format
<=9)
3675 tuner
= tuner_1_table
[tuner_format
];
3677 if (tuner_make
== 4)
3678 if(tuner_format
== 0x09)
3679 tuner
= TUNER_LG_NTSC_NEW_TAPC
; /* TAPC-G702P */
3681 printk(KERN_INFO
"bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3682 btv
->c
.nr
,eeprom_data
[0x41],eeprom_data
[0x42]);
3684 btv
->tuner_type
=tuner
;
3687 printk("Unknown type");
3688 printk(" radio:%s remote control:%s\n",
3689 tuner_tv_fm
? "yes" : "no",
3690 btv
->has_remote
? "yes" : "no");
3693 /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3694 void bttv_tda9880_setnorm(struct bttv
*btv
, int norm
)
3696 /* fix up our card entry */
3697 if(norm
==VIDEO_MODE_NTSC
) {
3698 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[0]=0x957fff;
3699 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[4]=0x957fff;
3700 dprintk("bttv_tda9880_setnorm to NTSC\n");
3703 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[0]=0x947fff;
3704 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[4]=0x947fff;
3705 dprintk("bttv_tda9880_setnorm to PAL\n");
3707 /* set GPIO according */
3708 gpio_bits(bttv_tvcards
[btv
->c
.type
].gpiomask
,
3709 bttv_tvcards
[btv
->c
.type
].audiomux
[btv
->audio
]);
3714 * reset/enable the MSP on some Hauppauge cards
3715 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
3720 static void __devinit
boot_msp34xx(struct bttv
*btv
, int pin
)
3722 int mask
= (1 << pin
);
3724 gpio_inout(mask
,mask
);
3727 gpio_bits(mask
,mask
);
3730 bttv_gpio_tracking(btv
,"msp34xx");
3732 printk(KERN_INFO
"bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3733 "init [%d]\n", btv
->c
.nr
, pin
);
3736 static void __devinit
boot_bt832(struct bttv
*btv
)
3740 /* ----------------------------------------------------------------------- */
3741 /* Imagenation L-Model PXC200 Framegrabber */
3742 /* This is basically the same procedure as
3743 * used by Alessandro Rubini in his pxc200
3744 * driver, but using BTTV functions */
3746 static void __devinit
init_PXC200(struct bttv
*btv
)
3748 static int vals
[] __devinitdata
= { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3749 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3755 /* Initialise GPIO-connevted stuff */
3756 gpio_inout(0xffffff, (1<<13));
3760 /* GPIO inputs are pulled up, so no need to drive
3761 * reset pin any longer */
3762 gpio_bits(0xffffff, 0);
3764 bttv_gpio_tracking(btv
,"pxc200");
3766 /* we could/should try and reset/control the AD pots? but
3767 right now we simply turned off the crushing. Without
3768 this the AGC drifts drifts
3769 remember the EN is reverse logic -->
3770 setting BT848_ADC_AGC_EN disable the AGC
3771 tboult@eecs.lehigh.edu
3774 btwrite(BT848_ADC_RESERVED
|BT848_ADC_AGC_EN
, BT848_ADC
);
3776 /* Initialise MAX517 DAC */
3777 printk(KERN_INFO
"Setting DAC reference voltage level ...\n");
3778 bttv_I2CWrite(btv
,0x5E,0,0x80,1);
3780 /* Initialise 12C508 PIC */
3781 /* The I2CWrite and I2CRead commmands are actually to the
3782 * same chips - but the R/W bit is included in the address
3783 * argument so the numbers are different */
3786 printk(KERN_INFO
"Initialising 12C508 PIC chip ...\n");
3788 /* First of all, enable the clock line. This is used in the PXC200-F */
3789 val
= btread(BT848_GPIO_DMA_CTL
);
3790 val
|= BT848_GPIO_DMA_CTL_GPCLKMODE
;
3791 btwrite(val
, BT848_GPIO_DMA_CTL
);
3793 /* Then, push to 0 the reset pin long enough to reset the *
3794 * device same as above for the reset line, but not the same
3795 * value sent to the GPIO-connected stuff
3796 * which one is the good one? */
3797 gpio_inout(0xffffff,(1<<2));
3802 for (i
= 0; i
< ARRAY_SIZE(vals
); i
++) {
3803 tmp
=bttv_I2CWrite(btv
,0x1E,0,vals
[i
],1);
3806 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3807 vals
[i
],tmp
,bttv_I2CRead(btv
,0x1F,NULL
));
3811 printk(KERN_INFO
"PXC200 Initialised.\n");
3816 /* ----------------------------------------------------------------------- */
3818 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3819 * it. This apparently involves the following procedure for each 878 chip:
3821 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3823 * 2) write to GPIO_DATA
3829 * read from GPIO_DATA into buf (uint_32)
3830 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3831 * error. ERROR_CPLD_Check_Failed stop.
3833 * 3) write to GPIO_DATA
3834 * - write 0x4400 + 0x0E
3836 * - write 0x4410 + 0x0E
3839 * read from GPIO_DATA into buf (uint_32)
3840 * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 )
3841 * error. ERROR_CPLD_Check_Failed.
3843 /* ----------------------------------------------------------------------- */
3845 init_RTV24 (struct bttv
*btv
)
3847 uint32_t dataRead
= 0;
3848 long watchdog_value
= 0x0E;
3851 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
3854 btwrite (0x00c3feff, BT848_GPIO_OUT_EN
);
3856 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
3858 btwrite (0x10 + watchdog_value
, BT848_GPIO_DATA
);
3860 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
3862 dataRead
= btread (BT848_GPIO_DATA
);
3864 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 1)) {
3866 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
3867 btv
->c
.nr
, dataRead
);
3870 btwrite (0x4400 + watchdog_value
, BT848_GPIO_DATA
);
3872 btwrite (0x4410 + watchdog_value
, BT848_GPIO_DATA
);
3874 btwrite (watchdog_value
, BT848_GPIO_DATA
);
3876 dataRead
= btread (BT848_GPIO_DATA
);
3878 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 0)) {
3880 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
3881 btv
->c
.nr
, dataRead
);
3887 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv
->c
.nr
);
3892 /* ----------------------------------------------------------------------- */
3893 /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
3895 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
3896 * This code is placed under the terms of the GNU General Public License
3898 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
3901 static void bus_low(struct bttv
*btv
, int bit
)
3903 if (btv
->mbox_ior
) {
3904 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3905 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3912 if (btv
->mbox_ior
) {
3913 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3918 static void bus_high(struct bttv
*btv
, int bit
)
3920 if (btv
->mbox_ior
) {
3921 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3922 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3929 if (btv
->mbox_ior
) {
3930 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3935 static int bus_in(struct bttv
*btv
, int bit
)
3937 if (btv
->mbox_ior
) {
3938 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3939 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3942 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3945 return gpio_read() & (bit
);
3948 /* TEA5757 register bits */
3949 #define TEA_FREQ 0:14
3950 #define TEA_BUFFER 15:15
3952 #define TEA_SIGNAL_STRENGTH 16:17
3954 #define TEA_PORT1 18:18
3955 #define TEA_PORT0 19:19
3957 #define TEA_BAND 20:21
3958 #define TEA_BAND_FM 0
3959 #define TEA_BAND_MW 1
3960 #define TEA_BAND_LW 2
3961 #define TEA_BAND_SW 3
3963 #define TEA_MONO 22:22
3964 #define TEA_ALLOW_STEREO 0
3965 #define TEA_FORCE_MONO 1
3967 #define TEA_SEARCH_DIRECTION 23:23
3968 #define TEA_SEARCH_DOWN 0
3969 #define TEA_SEARCH_UP 1
3971 #define TEA_STATUS 24:24
3972 #define TEA_STATUS_TUNED 0
3973 #define TEA_STATUS_SEARCHING 1
3975 /* Low-level stuff */
3976 static int tea5757_read(struct bttv
*btv
)
3978 unsigned long timeout
;
3982 /* better safe than sorry */
3983 gpio_inout(btv
->mbox_mask
, btv
->mbox_clk
| btv
->mbox_we
);
3985 if (btv
->mbox_ior
) {
3986 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3987 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3992 bttv_gpio_tracking(btv
,"tea5757 read");
3994 bus_low(btv
,btv
->mbox_we
);
3995 bus_low(btv
,btv
->mbox_clk
);
3998 timeout
= jiffies
+ HZ
;
4000 /* wait for DATA line to go low; error if it doesn't */
4001 while (bus_in(btv
,btv
->mbox_data
) && time_before(jiffies
, timeout
))
4003 if (bus_in(btv
,btv
->mbox_data
)) {
4004 printk(KERN_WARNING
"bttv%d: tea5757: read timeout\n",btv
->c
.nr
);
4008 dprintk("bttv%d: tea5757:",btv
->c
.nr
);
4009 for(i
= 0; i
< 24; i
++)
4012 bus_high(btv
,btv
->mbox_clk
);
4014 dprintk("%c",(bus_in(btv
,btv
->mbox_most
) == 0)?'T':'-');
4015 bus_low(btv
,btv
->mbox_clk
);
4017 value
|= (bus_in(btv
,btv
->mbox_data
) == 0)?0:1; /* MSB first */
4018 dprintk("%c", (bus_in(btv
,btv
->mbox_most
) == 0)?'S':'M');
4020 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv
->c
.nr
, value
);
4024 static int tea5757_write(struct bttv
*btv
, int value
)
4029 gpio_inout(btv
->mbox_mask
, btv
->mbox_clk
| btv
->mbox_we
| btv
->mbox_data
);
4031 if (btv
->mbox_ior
) {
4032 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
4033 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
4037 bttv_gpio_tracking(btv
,"tea5757 write");
4039 dprintk("bttv%d: tea5757: write 0x%X\n", btv
->c
.nr
, value
);
4040 bus_low(btv
,btv
->mbox_clk
);
4041 bus_high(btv
,btv
->mbox_we
);
4042 for(i
= 0; i
< 25; i
++)
4044 if (reg
& 0x1000000)
4045 bus_high(btv
,btv
->mbox_data
);
4047 bus_low(btv
,btv
->mbox_data
);
4049 bus_high(btv
,btv
->mbox_clk
);
4051 bus_low(btv
,btv
->mbox_clk
);
4054 bus_low(btv
,btv
->mbox_we
); /* unmute !!! */
4058 void tea5757_set_freq(struct bttv
*btv
, unsigned short freq
)
4060 dprintk("tea5757_set_freq %d\n",freq
);
4061 tea5757_write(btv
, 5 * freq
+ 0x358); /* add 10.7MHz (see docs) */
4065 /* ----------------------------------------------------------------------- */
4068 void winview_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4070 /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */
4071 int bits_out
, loops
, vol
, data
;
4074 /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */
4075 v
->flags
|= VIDEO_AUDIO_VOLUME
;
4079 /* 32 levels logarithmic */
4080 vol
= 32 - ((v
->volume
>>11));
4082 bits_out
= (PT2254_DBS_IN_2
>>(vol
%5));
4084 bits_out
|= (PT2254_DBS_IN_10
>>(vol
/5));
4085 bits_out
|= PT2254_L_CHANNEL
| PT2254_R_CHANNEL
;
4087 data
&= ~(WINVIEW_PT2254_CLK
| WINVIEW_PT2254_DATA
|
4088 WINVIEW_PT2254_STROBE
);
4089 for (loops
= 17; loops
>= 0 ; loops
--) {
4090 if (bits_out
& (1<<loops
))
4091 data
|= WINVIEW_PT2254_DATA
;
4093 data
&= ~WINVIEW_PT2254_DATA
;
4096 data
|= WINVIEW_PT2254_CLK
;
4099 data
&= ~WINVIEW_PT2254_CLK
;
4102 data
|= WINVIEW_PT2254_STROBE
;
4103 data
&= ~WINVIEW_PT2254_DATA
;
4106 data
&= ~WINVIEW_PT2254_STROBE
;
4110 /* ----------------------------------------------------------------------- */
4111 /* mono/stereo control for various cards (which don't use i2c chips but */
4112 /* connect something to the GPIO pins */
4115 gvbctv3pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4117 unsigned int con
= 0;
4120 gpio_inout(0x300, 0x300);
4121 if (v
->mode
& VIDEO_SOUND_LANG1
)
4123 if (v
->mode
& VIDEO_SOUND_LANG2
)
4125 if (v
->mode
& VIDEO_SOUND_STEREO
)
4127 /* if (v->mode & VIDEO_SOUND_MONO)
4129 gpio_bits(0x300, con
);
4131 v
->mode
= VIDEO_SOUND_STEREO
|
4132 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4137 gvbctv5pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4139 unsigned int val
, con
;
4141 if (btv
->radio_user
)
4147 if (v
->mode
& VIDEO_SOUND_LANG2
) {
4148 if (v
->mode
& VIDEO_SOUND_LANG1
) {
4157 if (con
!= (val
& 0x300)) {
4158 gpio_bits(0x300, con
);
4160 bttv_gpio_tracking(btv
,"gvbctv5pci");
4163 switch (val
& 0x70) {
4165 v
->mode
= VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4168 v
->mode
= VIDEO_SOUND_LANG2
;
4171 v
->mode
= VIDEO_SOUND_LANG1
;
4174 v
->mode
= VIDEO_SOUND_STEREO
;
4177 v
->mode
= VIDEO_SOUND_MONO
;
4180 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4181 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4187 * Mario Medina Nussbaum <medisoft@alohabbs.org.mx>
4188 * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo,
4189 * 0xdde enables mono and 0xccd enables sap
4191 * Petr Vandrovec <VANDROVE@vc.cvut.cz>
4192 * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select
4193 * input/output sound connection, so both must be set for output mode.
4195 * Looks like it's needed only for the "tvphone", the "tvphone 98"
4196 * handles this with a tda9840
4200 avermedia_tvphone_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4205 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4207 if (v
->mode
& VIDEO_SOUND_STEREO
)
4210 gpio_bits(0x03,val
);
4212 bttv_gpio_tracking(btv
,"avermedia");
4215 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4222 avermedia_tv_stereo_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4227 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4229 if (v
->mode
& VIDEO_SOUND_STEREO
) /* STEREO */
4231 btaor(val
, ~0x03, BT848_GPIO_DATA
);
4233 bttv_gpio_tracking(btv
,"avermedia");
4235 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4236 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4241 /* Lifetec 9415 handling */
4243 lt9415_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4247 if (gpio_read() & 0x4000) {
4248 v
->mode
= VIDEO_SOUND_MONO
;
4253 if (v
->mode
& VIDEO_SOUND_LANG2
) /* A2 SAP */
4255 if (v
->mode
& VIDEO_SOUND_STEREO
) /* A2 stereo */
4257 if ((v
->mode
& VIDEO_SOUND_LANG1
) ||
4258 (v
->mode
& VIDEO_SOUND_MONO
))
4260 gpio_bits(0x0880, val
);
4262 bttv_gpio_tracking(btv
,"lt9415");
4264 /* autodetect doesn't work with this card :-( */
4265 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4266 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4271 /* TDA9821 on TerraTV+ Bt848, Bt878 */
4273 terratv_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4275 unsigned int con
= 0;
4278 gpio_inout(0x180000,0x180000);
4279 if (v
->mode
& VIDEO_SOUND_LANG2
)
4281 if (v
->mode
& VIDEO_SOUND_STEREO
)
4283 gpio_bits(0x180000, con
);
4285 bttv_gpio_tracking(btv
,"terratv");
4287 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4288 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4293 winfast2000_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4295 unsigned long val
= 0;
4298 /*btor (0xc32000, BT848_GPIO_OUT_EN);*/
4299 if (v
->mode
& VIDEO_SOUND_MONO
) /* Mono */
4301 if (v
->mode
& VIDEO_SOUND_LANG1
) /* Mono */
4303 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4305 if (v
->mode
& VIDEO_SOUND_STEREO
) /* Stereo */
4308 gpio_bits(0x430000, val
);
4310 bttv_gpio_tracking(btv
,"winfast2000");
4313 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4314 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4319 * Dariusz Kowalewski <darekk@automex.pl>
4320 * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM
4321 * revision 9B has on-board TDA9874A sound decoder).
4323 * Note: There are card variants without tda9874a. Forcing the "stereo sound route"
4324 * will mute this cards.
4327 pvbt878p9b_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4329 unsigned int val
= 0;
4331 if (btv
->radio_user
)
4335 if (v
->mode
& VIDEO_SOUND_MONO
) {
4338 if ((v
->mode
& (VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
))
4339 || (v
->mode
& VIDEO_SOUND_STEREO
)) {
4343 gpio_bits(0x03,val
);
4345 bttv_gpio_tracking(btv
,"pvbt878p9b");
4348 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4349 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4354 * Dariusz Kowalewski <darekk@automex.pl>
4355 * sound control for FlyVideo 2000S (with tda9874 decoder)
4356 * based on pvbt878p9b_audio() - this is not tested, please fix!!!
4359 fv2000s_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4361 unsigned int val
= 0xffff;
4363 if (btv
->radio_user
)
4366 if (v
->mode
& VIDEO_SOUND_MONO
) {
4369 if ((v
->mode
& (VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
))
4370 || (v
->mode
& VIDEO_SOUND_STEREO
)) {
4371 val
= 0x1080; /*-dk-???: 0x0880, 0x0080, 0x1800 ... */
4373 if (val
!= 0xffff) {
4374 gpio_bits(0x1800, val
);
4376 bttv_gpio_tracking(btv
,"fv2000s");
4379 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4380 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4385 * sound control for Canopus WinDVR PCI
4386 * Masaki Suzuki <masaki@btree.org>
4389 windvr_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4391 unsigned long val
= 0;
4394 if (v
->mode
& VIDEO_SOUND_MONO
)
4396 if (v
->mode
& VIDEO_SOUND_LANG1
)
4398 if (v
->mode
& VIDEO_SOUND_LANG2
)
4400 if (v
->mode
& VIDEO_SOUND_STEREO
)
4403 gpio_bits(0x140000, val
);
4405 bttv_gpio_tracking(btv
,"windvr");
4408 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4409 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4414 * sound control for AD-TVK503
4415 * Hiroshi Takekawa <sian@big.or.jp>
4418 adtvk503_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4420 unsigned int con
= 0xffffff;
4422 /* btaor(0x1e0000, ~0x1e0000, BT848_GPIO_OUT_EN); */
4425 /* btor(***, BT848_GPIO_OUT_EN); */
4426 if (v
->mode
& VIDEO_SOUND_LANG1
)
4428 if (v
->mode
& VIDEO_SOUND_LANG2
)
4430 if (v
->mode
& VIDEO_SOUND_STEREO
)
4432 if (v
->mode
& VIDEO_SOUND_MONO
)
4434 if (con
!= 0xffffff) {
4435 gpio_bits(0x1e0000,con
);
4437 bttv_gpio_tracking(btv
, "adtvk503");
4440 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4441 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4445 /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4447 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4448 * switch instead (CD22M3494E). This IC can have multiple active connections
4449 * between Xn (input) and Yn (output) pins. We need to clear any existing
4450 * connection prior to establish a new one, pulsing the STROBE pin.
4452 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4453 * GPIO pins are wired as:
4454 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler)
4455 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler)
4456 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler)
4457 * GPIO[8] - - P3[5] (microcontroler)
4458 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler)
4459 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler)
4460 * GPINTR - - P3[4] (microcontroler)
4462 * The microcontroler is a 80C32 like. It should be possible to change xpoint
4463 * configuration either directly (as we are doing) or using the microcontroler
4464 * which is also wired to I2C interface. I have no further info on the
4465 * microcontroler features, one would need to disassembly the firmware.
4466 * note: the vendor refused to give any information on this product, all
4467 * that stuff was found using a multimeter! :)
4469 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
)
4471 /* reset all conections */
4472 gpio_bits(0x200,0x200);
4474 gpio_bits(0x200,0x000);
4477 /* create a new conection */
4478 gpio_bits(0x480,0x080);
4479 gpio_bits(0x480,0x480);
4481 gpio_bits(0x480,0x080);
4485 /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4487 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4488 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4489 * chips, ten eight input analog multiplexors, a not chip and a few
4492 * 16 inputs on a secondary bracket are provided and can be selected
4493 * from each of the four capture chips. Two of the eight input
4494 * multiplexors are used to select from any of the 16 input signals.
4496 * Unsupported hardware capabilities:
4497 * . A video output monitor on the secondary bracket can be selected from
4498 * one of the 878A chips.
4499 * . Another passthrough but I haven't spent any time investigating it.
4500 * . Digital I/O (logic level connected to GPIO) is available from an
4503 * The on chip input mux should always be set to 2.
4504 * GPIO[16:19] - Video input selection
4505 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4506 * GPIO[?:?] - Digital I/O.
4508 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4509 * determined what function (if any) it provides. With the microcontroller
4510 * and sync seperator chips a guess is that it might have to do with video
4511 * switching and maybe some digital I/O.
4513 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
)
4516 gpio_bits(0x0f0000, input
<< 16);
4519 static void tibetCS16_init(struct bttv
*btv
)
4521 /* enable gpio bits, mask obtained via btSpy */
4522 gpio_inout(0xffffff, 0x0f7fff);
4523 gpio_write(0x0f7fff);
4527 * The following routines for the Kodicom-4400r get a little mind-twisting.
4528 * There is a "master" controller and three "slave" controllers, together
4529 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4530 * The analog switch is controlled by the "master", but the detection order
4531 * of the four BT878A chips is in an order which I just don't understand.
4532 * The "master" is actually the second controller to be detected. The
4533 * logic on the board uses logical numbers for the 4 controlers, but
4534 * those numbers are different from the detection sequence. When working
4535 * with the analog switch, we need to "map" from the detection sequence
4536 * over to the board's logical controller number. This mapping sequence
4537 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4538 * unit 3, the second (which is the master) is logical unit 0, etc.
4539 * We need to maintain the status of the analog switch (which of the 16
4540 * cameras is connected to which of the 4 controllers). Rather than
4541 * add to the bttv structure for this, we use the data reserved for
4542 * the mbox (unused for this card type).
4546 * First a routine to set the analog switch, which controls which camera
4547 * is routed to which controller. The switch comprises an X-address
4548 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4549 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4550 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4551 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4552 * specified address. The idea is to set the address and data, then bring
4553 * STROBE high, and finally bring STROBE back to low.
4555 static void kodicom4400r_write(struct bttv
*btv
,
4556 unsigned char xaddr
,
4557 unsigned char yaddr
,
4558 unsigned char data
) {
4561 udata
= (data
<< 7) | ((yaddr
&3) << 4) | (xaddr
&0xf);
4562 gpio_bits(0x1ff, udata
); /* write ADDR and DAT */
4563 gpio_bits(0x1ff, udata
| (1 << 8)); /* strobe high */
4564 gpio_bits(0x1ff, udata
); /* strobe low */
4568 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4569 * use this routine. The routine finds the "master" for the card, maps
4570 * the controller number from the detected position over to the logical
4571 * number, writes the appropriate data to the analog switch, and housekeeps
4572 * the local copy of the switch information. The parameter 'input' is the
4573 * requested camera number (0 - 15).
4575 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
)
4580 static unsigned char map
[4] = {3, 0, 2, 1};
4582 mctlr
= master
[btv
->c
.nr
];
4583 if (mctlr
== NULL
) { /* ignore if master not yet detected */
4586 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
+ 1) & 3; /* the '&' is for safety */
4588 sw_status
= (char *)(&mctlr
->mbox_we
);
4589 xaddr
= input
& 0xf;
4590 /* Check if the controller/camera pair has changed, else ignore */
4591 if (sw_status
[yaddr
] != xaddr
)
4593 /* "open" the old switch, "close" the new one, save the new */
4594 kodicom4400r_write(mctlr
, sw_status
[yaddr
], yaddr
, 0);
4595 sw_status
[yaddr
] = xaddr
;
4596 kodicom4400r_write(mctlr
, xaddr
, yaddr
, 1);
4601 * During initialisation, we need to reset the analog switch. We
4602 * also preset the switch to map the 4 connectors on the card to the
4603 * *user's* (see above description of kodicom4400r_muxsel) channels
4606 static void kodicom4400r_init(struct bttv
*btv
)
4608 char *sw_status
= (char *)(&btv
->mbox_we
);
4611 gpio_inout(0x0003ff, 0x0003ff);
4612 gpio_write(1 << 9); /* reset MUX */
4614 /* Preset camera 0 to the 4 controllers */
4615 for (ix
=0; ix
<4; ix
++) {
4617 kodicom4400r_write(btv
, ix
, ix
, 1);
4620 * Since this is the "master", we need to set up the
4621 * other three controller chips' pointers to this structure
4622 * for later use in the muxsel routine.
4624 if ((btv
->c
.nr
<1) || (btv
->c
.nr
>BTTV_MAX
-3))
4626 master
[btv
->c
.nr
-1] = btv
;
4627 master
[btv
->c
.nr
] = btv
;
4628 master
[btv
->c
.nr
+1] = btv
;
4629 master
[btv
->c
.nr
+2] = btv
;
4632 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4633 * video multiplexers to provide up to 16 video inputs. These
4634 * multiplexers are controlled by the lower 8 GPIO pins of the
4635 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
4637 * xxx0 is pin xxx of multiplexer U5,
4638 * yyy1 is pin yyy of multiplexer U2
4650 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
)
4652 static const int masks
[] = {
4653 ENB0
, ENB0
|IN00
, ENB0
|IN10
, ENB0
|IN00
|IN10
,
4654 ENA0
, ENA0
|IN00
, ENA0
|IN10
, ENA0
|IN00
|IN10
,
4655 ENB1
, ENB1
|IN01
, ENB1
|IN11
, ENB1
|IN01
|IN11
,
4656 ENA1
, ENA1
|IN01
, ENA1
|IN11
, ENA1
|IN01
|IN11
,
4658 gpio_write(masks
[input
%16]);
4660 static void picolo_tetra_init(struct bttv
*btv
)
4662 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4663 btwrite (0x08<<16,BT848_GPIO_DATA
);/*GPIO[19] [==> 4053 B+C] set to 1 */
4664 btwrite (0x04<<16,BT848_GPIO_DATA
);/*GPIO[18] [==> 4053 A] set to 1*/
4666 static void picolo_tetra_muxsel (struct bttv
* btv
, unsigned int input
)
4669 dprintk (KERN_DEBUG
"bttv%d : picolo_tetra_muxsel => input = %d\n",btv
->c
.nr
,input
);
4670 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4671 /*GPIO[20]&GPIO[21] used to choose the right input*/
4672 btwrite (input
<<20,BT848_GPIO_DATA
);
4677 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4679 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4680 * swichers to provide 16 channels to MUX0. The TDA8540's have
4681 * 4 indepedant outputs and as such the IVC120G also has the
4682 * optional "Monitor Out" bus. This allows the card to be looking
4683 * at one input while the monitor is looking at another.
4685 * Since I've couldn't be bothered figuring out how to add an
4686 * independant muxsel for the monitor bus, I've just set it to
4687 * whatever the card is looking at.
4689 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4690 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4692 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4693 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4694 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4695 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4699 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4700 #define I2C_TDA8540 0x90
4701 #define I2C_TDA8540_ALT1 0x92
4702 #define I2C_TDA8540_ALT2 0x94
4703 #define I2C_TDA8540_ALT3 0x96
4704 #define I2C_TDA8540_ALT4 0x98
4705 #define I2C_TDA8540_ALT5 0x9a
4706 #define I2C_TDA8540_ALT6 0x9c
4708 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
)
4711 int key
= input
% 4;
4712 int matrix
= input
/ 4;
4714 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4715 btv
->c
.nr
, input
, matrix
, key
);
4717 /* Handles the input selection on the TDA8540's */
4718 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x00,
4719 ((matrix
== 3) ? (key
| key
<< 2) : 0x00), 1);
4720 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x00,
4721 ((matrix
== 0) ? (key
| key
<< 2) : 0x00), 1);
4722 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x00,
4723 ((matrix
== 1) ? (key
| key
<< 2) : 0x00), 1);
4724 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x00,
4725 ((matrix
== 2) ? (key
| key
<< 2) : 0x00), 1);
4727 /* Handles the output enables on the TDA8540's */
4728 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x02,
4729 ((matrix
== 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
4730 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x02,
4731 ((matrix
== 0) ? 0x03 : 0x00), 1); /* 1-4 */
4732 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x02,
4733 ((matrix
== 1) ? 0x03 : 0x00), 1); /* 5-8 */
4734 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x02,
4735 ((matrix
== 2) ? 0x03 : 0x00), 1); /* 9-12 */
4737 /* Selects MUX0 for input on the 878 */
4738 btaor((0)<<5, ~(3<<5), BT848_IFORM
);
4742 /* PXC200 muxsel helper
4743 * luke@syseng.anu.edu.au
4744 * another transplant
4745 * from Alessandro Rubini (rubini@linux.it)
4747 * There are 4 kinds of cards:
4748 * PXC200L which is bt848
4749 * PXC200F which is bt848 with PIC controlling mux
4750 * PXC200AL which is bt878
4751 * PXC200AF which is bt878 with PIC controlling mux
4753 #define PX_CFG_PXC200F 0x01
4754 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4755 #define PX_I2C_PIC 0x0f
4756 #define PX_PXC200A_CARDID 0x200a1295
4757 #define PX_I2C_CMD_CFG 0x00
4759 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
)
4764 unsigned char buf
[2];
4766 /* Read PIC config to determine if this is a PXC200F */
4770 rc
=bttv_I2CWrite(btv
,(PX_I2C_PIC
<<1),buf
[0],buf
[1],1);
4772 printk(KERN_DEBUG
"bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv
->c
.nr
,rc
);
4773 /* not PXC ? do nothing */
4777 rc
=bttv_I2CRead(btv
,(PX_I2C_PIC
<<1),NULL
);
4778 if (!(rc
& PX_CFG_PXC200F
)) {
4779 printk(KERN_DEBUG
"bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv
->c
.nr
,rc
);
4784 /* The multiplexer in the 200F is handled by the GPIO port */
4785 /* get correct mapping between inputs */
4786 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4787 /* ** not needed!? */
4790 /* make sure output pins are enabled */
4791 /* bitmask=0x30f; */
4793 /* check whether we have a PXC200A */
4794 if (btv
->cardid
== PX_PXC200A_CARDID
) {
4795 bitmask
^= 0x180; /* use 7 and 9, not 8 and 9 */
4796 bitmask
|= 7<<4; /* the DAC */
4798 btwrite(bitmask
, BT848_GPIO_OUT_EN
);
4800 bitmask
= btread(BT848_GPIO_DATA
);
4801 if (btv
->cardid
== PX_PXC200A_CARDID
)
4802 bitmask
= (bitmask
& ~0x280) | ((mux
& 2) << 8) | ((mux
& 1) << 7);
4803 else /* older device */
4804 bitmask
= (bitmask
& ~0x300) | ((mux
& 3) << 8);
4805 btwrite(bitmask
,BT848_GPIO_DATA
);
4808 * Was "to be safe, set the bt848 to input 0"
4809 * Actually, since it's ok at load time, better not messing
4810 * with these bits (on PXC200AF you need to set mux 2 here)
4812 * needed because bttv-driver sets mux before calling this function
4814 if (btv
->cardid
== PX_PXC200A_CARDID
)
4815 btaor(2<<5, ~BT848_IFORM_MUXSEL
, BT848_IFORM
);
4816 else /* older device */
4817 btand(~BT848_IFORM_MUXSEL
,BT848_IFORM
);
4819 printk(KERN_DEBUG
"bttv%d: setting input channel to:%d\n", btv
->c
.nr
,(int)mux
);
4822 /* ----------------------------------------------------------------------- */
4823 /* motherboard chipset specific stuff */
4825 void __devinit
bttv_check_chipset(void)
4827 int pcipci_fail
= 0;
4828 struct pci_dev
*dev
= NULL
;
4830 if (pci_pci_problems
& PCIPCI_FAIL
)
4832 if (pci_pci_problems
& (PCIPCI_TRITON
|PCIPCI_NATOMA
|PCIPCI_VIAETBF
))
4834 if (pci_pci_problems
& PCIPCI_VSFX
)
4836 #ifdef PCIPCI_ALIMAGIK
4837 if (pci_pci_problems
& PCIPCI_ALIMAGIK
)
4842 /* print warnings about any quirks found */
4844 printk(KERN_INFO
"bttv: Host bridge needs ETBF enabled.\n");
4846 printk(KERN_INFO
"bttv: Host bridge needs VSFX enabled.\n");
4848 printk(KERN_WARNING
"bttv: BT848 and your chipset may not work together.\n");
4850 printk(KERN_WARNING
"bttv: overlay will be disabled.\n");
4853 printk(KERN_WARNING
"bttv: overlay forced. Use this option at your own risk.\n");
4856 if (UNSET
!= latency
)
4857 printk(KERN_INFO
"bttv: pci latency fixup [%d]\n",latency
);
4858 while ((dev
= pci_get_device(PCI_VENDOR_ID_INTEL
,
4859 PCI_DEVICE_ID_INTEL_82441
, dev
))) {
4861 pci_read_config_byte(dev
, 0x53, &b
);
4863 printk(KERN_INFO
"bttv: Host bridge: 82441FX Natoma, "
4864 "bufcon=0x%02x\n",b
);
4868 int __devinit
bttv_handle_chipset(struct bttv
*btv
)
4870 unsigned char command
;
4872 if (!triton1
&& !vsfx
&& UNSET
== latency
)
4877 printk(KERN_INFO
"bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv
->c
.nr
);
4878 if (vsfx
&& btv
->id
>= 878)
4879 printk(KERN_INFO
"bttv%d: enabling VSFX\n",btv
->c
.nr
);
4880 if (UNSET
!= latency
)
4881 printk(KERN_INFO
"bttv%d: setting pci timer to %d\n",
4885 if (btv
->id
< 878) {
4886 /* bt848 (mis)uses a bit in the irq mask for etbf */
4888 btv
->triton1
= BT848_INT_ETBF
;
4890 /* bt878 has a bit in the pci config space for it */
4891 pci_read_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, &command
);
4893 command
|= BT878_EN_TBFX
;
4895 command
|= BT878_EN_VSFX
;
4896 pci_write_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, command
);
4898 if (UNSET
!= latency
)
4899 pci_write_config_byte(btv
->c
.pci
, PCI_LATENCY_TIMER
, latency
);