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 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
296 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
298 /* DVB cards (using pci function .1 for mpeg data xfer) */
299 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV
, "Nebula Electronics DigiTV" },
300 { 0x07611461, BTTV_BOARD_AVDVBT_761
, "AverMedia AverTV DVB-T 761" },
301 { 0x001c11bd, BTTV_BOARD_PINNACLESAT
, "Pinnacle PCTV Sat" },
302 { 0x002611bd, BTTV_BOARD_TWINHAN_DST
, "Pinnacle PCTV SAT CI" },
303 { 0x00011822, BTTV_BOARD_TWINHAN_DST
, "Twinhan VisionPlus DVB" },
304 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST
, "ChainTech digitop DST-1000 DVB-S" },
305 { 0x07711461, BTTV_BOARD_AVDVBT_771
, "AVermedia AverTV DVB-T 771" },
306 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE
, "DViCO FusionHDTV DVB-T Lite" },
307 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
, "DViCO FusionHDTV 5 Lite" },
312 /* ----------------------------------------------------------------------- */
313 /* array with description for bt848 / bt878 tv/grabber cards */
315 struct tvcard bttv_tvcards
[] = {
316 /* ---- card 0x00 ---------------------------------- */
317 [BTTV_BOARD_UNKNOWN
] = {
318 .name
= " *** UNKNOWN/GENERIC *** ",
323 .muxsel
= { 2, 3, 1, 0},
325 .tuner_addr
= ADDR_UNSET
,
326 .radio_addr
= ADDR_UNSET
,
328 [BTTV_BOARD_MIRO
] = {
335 .muxsel
= { 2, 3, 1, 1},
336 .audiomux
= { 2, 0, 0, 0, 10},
339 .tuner_addr
= ADDR_UNSET
,
340 .radio_addr
= ADDR_UNSET
,
342 [BTTV_BOARD_HAUPPAUGE
] = {
343 .name
= "Hauppauge (bt848)",
349 .muxsel
= { 2, 3, 1, 1},
350 .audiomux
= { 0, 1, 2, 3, 4},
353 .tuner_addr
= ADDR_UNSET
,
354 .radio_addr
= ADDR_UNSET
,
357 .name
= "STB, Gateway P/N 6000699 (bt848)",
363 .muxsel
= { 2, 3, 1, 1},
364 .audiomux
= { 4, 0, 2, 3, 1},
367 .tuner_type
= TUNER_PHILIPS_NTSC
,
368 .tuner_addr
= ADDR_UNSET
,
369 .radio_addr
= ADDR_UNSET
,
374 /* ---- card 0x04 ---------------------------------- */
375 [BTTV_BOARD_INTEL
] = {
376 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
382 .muxsel
= { 2, 3, 1, 1},
386 .tuner_addr
= ADDR_UNSET
,
387 .radio_addr
= ADDR_UNSET
,
389 [BTTV_BOARD_DIAMOND
] = {
390 .name
= "Diamond DTV2000",
396 .muxsel
= { 2, 3, 1, 0},
397 .audiomux
= { 0, 1, 0, 1, 3},
400 .tuner_addr
= ADDR_UNSET
,
401 .radio_addr
= ADDR_UNSET
,
403 [BTTV_BOARD_AVERMEDIA
] = {
404 .name
= "AVerMedia TVPhone",
409 .muxsel
= { 2, 3, 1, 1},
411 .audiomux
= { 0x0c, 0x04, 0x08, 0x04, 0},
412 /* 0x04 for some cards ?? */
415 .tuner_addr
= ADDR_UNSET
,
416 .radio_addr
= ADDR_UNSET
,
417 .audio_hook
= avermedia_tvphone_audio
,
420 [BTTV_BOARD_MATRIX_VISION
] = {
421 .name
= "MATRIX-Vision MV-Delta",
427 .muxsel
= { 2, 3, 1, 0, 0},
431 .tuner_addr
= ADDR_UNSET
,
432 .radio_addr
= ADDR_UNSET
,
435 /* ---- card 0x08 ---------------------------------- */
436 [BTTV_BOARD_FLYVIDEO
] = {
437 .name
= "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
443 .muxsel
= { 2, 3, 1, 1},
444 .audiomux
= { 0, 0xc00, 0x800, 0x400, 0xc00, 0},
448 .tuner_addr
= ADDR_UNSET
,
449 .radio_addr
= ADDR_UNSET
,
451 [BTTV_BOARD_TURBOTV
] = {
452 .name
= "IMS/IXmicro TurboTV",
458 .muxsel
= { 2, 3, 1, 1},
459 .audiomux
= { 1, 1, 2, 3, 0},
462 .tuner_type
= TUNER_TEMIC_PAL
,
463 .tuner_addr
= ADDR_UNSET
,
464 .radio_addr
= ADDR_UNSET
,
466 [BTTV_BOARD_HAUPPAUGE878
] = {
467 .name
= "Hauppauge (bt878)",
472 .gpiomask
= 0x0f, /* old: 7 */
473 .muxsel
= { 2, 0, 1, 1},
474 .audiomux
= { 0, 1, 2, 3, 4},
478 .tuner_addr
= ADDR_UNSET
,
479 .radio_addr
= ADDR_UNSET
,
481 [BTTV_BOARD_MIROPRO
] = {
482 .name
= "MIRO PCTV pro",
488 .muxsel
= { 2, 3, 1, 1},
489 .audiomux
= { 0x20001,0x10001, 0, 0,10},
492 .tuner_addr
= ADDR_UNSET
,
493 .radio_addr
= ADDR_UNSET
,
496 /* ---- card 0x0c ---------------------------------- */
497 [BTTV_BOARD_ADSTECH_TV
] = {
498 .name
= "ADS Technologies Channel Surfer TV (bt848)",
504 .muxsel
= { 2, 3, 1, 1},
505 .audiomux
= { 13, 14, 11, 7, 0, 0},
508 .tuner_addr
= ADDR_UNSET
,
509 .radio_addr
= ADDR_UNSET
,
511 [BTTV_BOARD_AVERMEDIA98
] = {
512 .name
= "AVerMedia TVCapture 98",
518 .muxsel
= { 2, 3, 1, 1},
519 .audiomux
= { 13, 14, 11, 7, 0, 0},
523 .tuner_type
= TUNER_PHILIPS_PAL
,
524 .tuner_addr
= ADDR_UNSET
,
525 .radio_addr
= ADDR_UNSET
,
526 .audio_hook
= avermedia_tv_stereo_audio
,
530 .name
= "Aimslab Video Highway Xtreme (VHX)",
536 .muxsel
= { 2, 3, 1, 1},
537 .audiomux
= { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */
541 .tuner_addr
= ADDR_UNSET
,
542 .radio_addr
= ADDR_UNSET
,
544 [BTTV_BOARD_ZOLTRIX
] = {
545 .name
= "Zoltrix TV-Max",
551 .muxsel
= { 2, 3, 1, 1},
552 .audiomux
= {0 , 0, 1 , 0, 10},
555 .tuner_addr
= ADDR_UNSET
,
556 .radio_addr
= ADDR_UNSET
,
559 /* ---- card 0x10 ---------------------------------- */
560 [BTTV_BOARD_PIXVIEWPLAYTV
] = {
561 .name
= "Prolink Pixelview PlayTV (bt878)",
566 .gpiomask
= 0x01fe00,
567 .muxsel
= { 2, 3, 1, 1},
570 .audiomux
= { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 },
572 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
573 .audiomux
= { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
579 [BTTV_BOARD_WINVIEW_601
] = {
580 .name
= "Leadtek WinView 601",
585 .gpiomask
= 0x8300f8,
586 .muxsel
= { 2, 3, 1, 1,0},
587 .audiomux
= { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007},
590 .tuner_addr
= ADDR_UNSET
,
591 .radio_addr
= ADDR_UNSET
,
592 .audio_hook
= winview_audio
,
595 [BTTV_BOARD_AVEC_INTERCAP
] = {
596 .name
= "AVEC Intercapture",
602 .muxsel
= {2, 3, 1, 1},
603 .audiomux
= {1, 0, 0, 0, 0},
606 .tuner_addr
= ADDR_UNSET
,
607 .radio_addr
= ADDR_UNSET
,
609 [BTTV_BOARD_LIFE_FLYKIT
] = {
610 .name
= "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
615 .gpiomask
= 0x8dff00,
616 .muxsel
= { 2, 3, 1, 1},
620 .tuner_addr
= ADDR_UNSET
,
621 .radio_addr
= ADDR_UNSET
,
624 /* ---- card 0x14 ---------------------------------- */
625 [BTTV_BOARD_CEI_RAFFLES
] = {
626 .name
= "CEI Raffles Card",
631 .muxsel
= {2, 3, 1, 1},
633 .tuner_addr
= ADDR_UNSET
,
634 .radio_addr
= ADDR_UNSET
,
636 [BTTV_BOARD_CONFERENCETV
] = {
637 .name
= "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
639 .audio_inputs
= 2, /* tuner, line in */
643 .muxsel
= { 2, 3, 1, 1},
644 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
646 .tuner_type
= TUNER_PHILIPS_PAL_I
,
647 .tuner_addr
= ADDR_UNSET
,
648 .radio_addr
= ADDR_UNSET
,
650 [BTTV_BOARD_PHOEBE_TVMAS
] = {
651 .name
= "Askey CPH050/ Phoebe Tv Master + FM",
657 .muxsel
= { 2, 3, 1, 1},
658 .audiomux
= {0, 1, 0x800, 0x400, 0xc00, 0},
662 .tuner_addr
= ADDR_UNSET
,
663 .radio_addr
= ADDR_UNSET
,
665 [BTTV_BOARD_MODTEC_205
] = {
666 .name
= "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
672 .muxsel
= { 2, 3, -1 },
673 .digital_mode
= DIGITAL_MODE_CAMERA
,
674 .audiomux
= { 0, 0, 0, 0, 0 },
677 .tuner_type
= TUNER_ALPS_TSBB5_PAL_I
,
678 .tuner_addr
= ADDR_UNSET
,
679 .radio_addr
= ADDR_UNSET
,
682 /* ---- card 0x18 ---------------------------------- */
683 [BTTV_BOARD_MAGICTVIEW061
] = {
684 .name
= "Askey CPH05X/06X (bt878) [many vendors]",
690 .muxsel
= { 2, 3, 1, 1},
691 .audiomux
= {0x400, 0x400, 0x400, 0x400, 0xc00},
695 .tuner_addr
= ADDR_UNSET
,
696 .radio_addr
= ADDR_UNSET
,
699 [BTTV_BOARD_VOBIS_BOOSTAR
] = {
700 .name
= "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
705 .gpiomask
= 0x1f0fff,
706 .muxsel
= { 2, 3, 1, 1},
707 .audiomux
= { 0x20000, 0x30000, 0x10000, 0, 0x40000},
709 .tuner_type
= TUNER_PHILIPS_PAL
,
710 .tuner_addr
= ADDR_UNSET
,
711 .radio_addr
= ADDR_UNSET
,
712 .audio_hook
= terratv_audio
,
714 [BTTV_BOARD_HAUPPAUG_WCAM
] = {
715 .name
= "Hauppauge WinCam newer (bt878)",
721 .muxsel
= { 2, 0, 1, 1},
722 .audiomux
= { 0, 1, 2, 3, 4},
725 .tuner_addr
= ADDR_UNSET
,
726 .radio_addr
= ADDR_UNSET
,
728 [BTTV_BOARD_MAXI
] = {
729 .name
= "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
735 .muxsel
= { 2, 3, 1, 1},
736 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
738 .tuner_type
= TUNER_PHILIPS_SECAM
,
739 .tuner_addr
= ADDR_UNSET
,
740 .radio_addr
= ADDR_UNSET
,
743 /* ---- card 0x1c ---------------------------------- */
744 [BTTV_BOARD_TERRATV
] = {
745 .name
= "Terratec TerraTV+ Version 1.1 (bt878)",
750 .gpiomask
= 0x1f0fff,
751 .muxsel
= { 2, 3, 1, 1},
752 .audiomux
= { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000},
754 .tuner_type
= TUNER_PHILIPS_PAL
,
755 .tuner_addr
= ADDR_UNSET
,
756 .radio_addr
= ADDR_UNSET
,
757 .audio_hook
= terratv_audio
,
759 External 20 pin connector (for Active Radio Upgrade board)
765 gpio05: om5610-stereo
769 gpio09+10: nIOR, nSEL ?? (bt878)
773 gpio16: u2-A0 (1st 4052bt)
776 gpio19: u4-A0 (2nd 4052)
780 00000 : Cdrom (internal audio input)
781 10000 : ext. Video audio input
790 [BTTV_BOARD_PXC200
] = {
791 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
792 .name
= "Imagenation PXC200",
796 .svhs
= 1, /* was: 4 */
798 .muxsel
= { 2, 3, 1, 0, 0},
802 .tuner_addr
= ADDR_UNSET
,
803 .radio_addr
= ADDR_UNSET
,
804 .muxsel_hook
= PXC200_muxsel
,
807 [BTTV_BOARD_FLYVIDEO_98
] = {
808 .name
= "Lifeview FlyVideo 98 LR50",
813 .gpiomask
= 0x1800, /* 0x8dfe00 */
814 .muxsel
= { 2, 3, 1, 1},
815 .audiomux
= { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 },
818 .tuner_addr
= ADDR_UNSET
,
819 .radio_addr
= ADDR_UNSET
,
821 [BTTV_BOARD_IPROTV
] = {
822 .name
= "Formac iProTV, Formac ProTV I (bt848)",
828 .muxsel
= { 2, 3, 1, 1},
829 .audiomux
= { 1, 0, 0, 0, 0 },
831 .tuner_type
= TUNER_PHILIPS_PAL
,
832 .tuner_addr
= ADDR_UNSET
,
833 .radio_addr
= ADDR_UNSET
,
836 /* ---- card 0x20 ---------------------------------- */
837 [BTTV_BOARD_INTEL_C_S_PCI
] = {
838 .name
= "Intel Create and Share PCI/ Smart Video Recorder III",
844 .muxsel
= { 2, 3, 1, 1},
848 .tuner_addr
= ADDR_UNSET
,
849 .radio_addr
= ADDR_UNSET
,
851 [BTTV_BOARD_TERRATVALUE
] = {
852 .name
= "Terratec TerraTValue Version Bt878",
857 .gpiomask
= 0xffff00,
858 .muxsel
= { 2, 3, 1, 1},
859 .audiomux
= { 0x500, 0, 0x300, 0x900, 0x900},
862 .tuner_type
= TUNER_PHILIPS_PAL
,
863 .tuner_addr
= ADDR_UNSET
,
864 .radio_addr
= ADDR_UNSET
,
866 [BTTV_BOARD_WINFAST2000
] = {
867 .name
= "Leadtek WinFast 2000/ WinFast 2000 XP",
872 .muxsel
= { 2, 3, 1, 1, 0}, /* TV, CVid, SVid, CVid over SVid connector */
874 .gpiomask
= 0xc33000,
875 .audiomux
= { 0x422000,0x1000,0x0000,0x620000,0x800000 },
877 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
878 .gpiomask
= 0xb33000,
879 .audiomux
= { 0x122000,0x1000,0x0000,0x620000,0x800000 },
881 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
882 gpio23 -- hef4052:nEnable (0x800000)
885 0x0000: external audio
889 Note: There exists another variant "Winfast 2000" with tv stereo !?
890 Note: eeprom only contains FF and pci subsystem id 107d:6606
895 .tuner_type
= 5, /* default for now, gpio reads BFFF06 for Pal bg+dk */
896 .tuner_addr
= ADDR_UNSET
,
897 .radio_addr
= ADDR_UNSET
,
898 .audio_hook
= winfast2000_audio
,
901 [BTTV_BOARD_CHRONOS_VS2
] = {
902 .name
= "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
908 .muxsel
= { 2, 3, 1, 1},
909 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800},
912 .tuner_addr
= ADDR_UNSET
,
913 .radio_addr
= ADDR_UNSET
,
916 /* ---- card 0x24 ---------------------------------- */
917 [BTTV_BOARD_TYPHOON_TVIEW
] = {
918 .name
= "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
924 .muxsel
= { 2, 3, 1, 1},
925 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
928 .tuner_addr
= ADDR_UNSET
,
929 .radio_addr
= ADDR_UNSET
,
932 [BTTV_BOARD_PXELVWPLTVPRO
] = {
933 .name
= "Prolink PixelView PlayTV pro",
939 .muxsel
= { 2, 3, 1, 1 },
940 .audiomux
= { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
944 .tuner_addr
= ADDR_UNSET
,
945 .radio_addr
= ADDR_UNSET
,
947 [BTTV_BOARD_MAGICTVIEW063
] = {
948 .name
= "Askey CPH06X TView99",
953 .gpiomask
= 0x551e00,
954 .muxsel
= { 2, 3, 1, 0},
955 .audiomux
= { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 },
959 .tuner_addr
= ADDR_UNSET
,
960 .radio_addr
= ADDR_UNSET
,
963 [BTTV_BOARD_PINNACLE
] = {
964 .name
= "Pinnacle PCTV Studio/Rave",
969 .gpiomask
= 0x03000F,
970 .muxsel
= { 2, 3, 1, 1},
971 .audiomux
= { 2, 0xd0001, 0, 0, 1},
975 .tuner_addr
= ADDR_UNSET
,
976 .radio_addr
= ADDR_UNSET
,
979 /* ---- card 0x28 ---------------------------------- */
980 [BTTV_BOARD_STB2
] = {
981 .name
= "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
987 .muxsel
= { 2, 3, 1, 1},
988 .audiomux
= { 4, 0, 2, 3, 1},
991 .tuner_type
= TUNER_PHILIPS_NTSC
,
992 .tuner_addr
= ADDR_UNSET
,
993 .radio_addr
= ADDR_UNSET
,
997 [BTTV_BOARD_AVPHONE98
] = {
998 .name
= "AVerMedia TVPhone 98",
1004 .muxsel
= { 2, 3, 1, 1},
1005 .audiomux
= { 13, 4, 11, 7, 0, 0},
1009 .tuner_addr
= ADDR_UNSET
,
1010 .radio_addr
= ADDR_UNSET
,
1012 .audio_hook
= avermedia_tvphone_audio
,
1014 [BTTV_BOARD_PV951
] = {
1015 .name
= "ProVideo PV951", /* pic16c54 */
1021 .muxsel
= { 2, 3, 1, 1},
1022 .audiomux
= { 0, 0, 0, 0, 0},
1027 .tuner_addr
= ADDR_UNSET
,
1028 .radio_addr
= ADDR_UNSET
,
1030 [BTTV_BOARD_ONAIR_TV
] = {
1031 .name
= "Little OnAir TV",
1037 .muxsel
= {2, 3, 1, 1},
1038 .audiomux
= {0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc},
1041 .tuner_addr
= ADDR_UNSET
,
1042 .radio_addr
= ADDR_UNSET
,
1045 /* ---- card 0x2c ---------------------------------- */
1046 [BTTV_BOARD_SIGMA_TVII_FM
] = {
1047 .name
= "Sigma TVII-FM",
1053 .muxsel
= {2, 3, 1, 1},
1054 .audiomux
= {1, 1, 0, 2, 3},
1058 .tuner_addr
= ADDR_UNSET
,
1059 .radio_addr
= ADDR_UNSET
,
1061 [BTTV_BOARD_MATRIX_VISION2
] = {
1062 .name
= "MATRIX-Vision MV-Delta 2",
1068 .muxsel
= { 2, 3, 1, 0, 0},
1073 .tuner_addr
= ADDR_UNSET
,
1074 .radio_addr
= ADDR_UNSET
,
1076 [BTTV_BOARD_ZOLTRIX_GENIE
] = {
1077 .name
= "Zoltrix Genie TV/FM",
1082 .gpiomask
= 0xbcf03f,
1083 .muxsel
= { 2, 3, 1, 1},
1084 .audiomux
= { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f},
1088 .tuner_addr
= ADDR_UNSET
,
1089 .radio_addr
= ADDR_UNSET
,
1091 [BTTV_BOARD_TERRATVRADIO
] = {
1092 .name
= "Terratec TV/Radio+",
1097 .gpiomask
= 0x70000,
1098 .muxsel
= { 2, 3, 1, 1},
1099 .audiomux
= { 0x20000, 0x30000, 0x10000, 0, 0x40000, 0x20000 },
1104 .tuner_addr
= ADDR_UNSET
,
1105 .radio_addr
= ADDR_UNSET
,
1109 /* ---- card 0x30 ---------------------------------- */
1110 [BTTV_BOARD_DYNALINK
] = {
1111 .name
= "Askey CPH03x/ Dynalink Magic TView",
1117 .muxsel
= { 2, 3, 1, 1},
1118 .audiomux
= {2,0,0,0,1},
1122 .tuner_addr
= ADDR_UNSET
,
1123 .radio_addr
= ADDR_UNSET
,
1125 [BTTV_BOARD_GVBCTV3PCI
] = {
1126 .name
= "IODATA GV-BCTV3/PCI",
1131 .gpiomask
= 0x010f00,
1132 .muxsel
= {2, 3, 0, 0},
1133 .audiomux
= {0x10000, 0, 0x10000, 0, 0, 0},
1136 .tuner_type
= TUNER_ALPS_TSHC6_NTSC
,
1137 .tuner_addr
= ADDR_UNSET
,
1138 .radio_addr
= ADDR_UNSET
,
1139 .audio_hook
= gvbctv3pci_audio
,
1141 [BTTV_BOARD_PXELVWPLTVPAK
] = {
1142 .name
= "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1147 .gpiomask
= 0xAA0000,
1148 .muxsel
= { 2,3,1,1,-1 },
1149 .digital_mode
= DIGITAL_MODE_CAMERA
,
1150 .audiomux
= { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 },
1153 .tuner_type
= TUNER_PHILIPS_PAL_I
,
1154 .tuner_addr
= ADDR_UNSET
,
1155 .radio_addr
= ADDR_UNSET
,
1157 /* GPIO wiring: (different from Rev.4C !)
1158 GPIO17: U4.A0 (first hef4052bt)
1160 GPIO20: U5.A1 (second hef4052bt)
1162 GPIO22: BT832 Reset Line
1163 GPIO23: A5,A0, U5,nEN
1164 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1167 [BTTV_BOARD_EAGLE
] = {
1168 .name
= "Eagle Wireless Capricorn2 (bt878A)",
1174 .muxsel
= { 2, 0, 1, 1},
1175 .audiomux
= { 0, 1, 2, 3, 4},
1177 .tuner_type
= -1 /* TUNER_ALPS_TMDH2_NTSC */,
1178 .tuner_addr
= ADDR_UNSET
,
1179 .radio_addr
= ADDR_UNSET
,
1182 /* ---- card 0x34 ---------------------------------- */
1183 [BTTV_BOARD_PINNACLEPRO
] = {
1184 /* David Härdeman <david@2gen.com> */
1185 .name
= "Pinnacle PCTV Studio Pro",
1190 .gpiomask
= 0x03000F,
1191 .muxsel
= { 2, 3, 1, 1},
1192 .audiomux
= { 1, 0xd0001, 0, 0, 10},
1193 /* sound path (5 sources):
1194 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1197 2= Mono TV sound from Tuner
1199 MUX2 (mask 0x30000):
1201 1= FM stereo Radio from Tuner */
1205 .tuner_addr
= ADDR_UNSET
,
1206 .radio_addr
= ADDR_UNSET
,
1208 [BTTV_BOARD_TVIEW_RDS_FM
] = {
1209 /* Claas Langbehn <claas@bigfoot.com>,
1210 Sven Grothklags <sven@upb.de> */
1211 .name
= "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1217 .muxsel
= { 2, 3, 1, 1},
1218 .audiomux
= { 0, 0, 0x10, 8, 4 },
1221 .tuner_type
= TUNER_PHILIPS_PAL
,
1222 .tuner_addr
= ADDR_UNSET
,
1223 .radio_addr
= ADDR_UNSET
,
1226 [BTTV_BOARD_LIFETEC_9415
] = {
1227 /* Tim Röstermundt <rosterm@uni-muenster.de>
1228 in de.comp.os.unix.linux.hardware:
1229 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1230 audiomux=0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1231 options tuner type=5 */
1232 .name
= "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1238 .muxsel
= { 2, 3, 1, 1},
1239 .audiomux
= { 0x0000,0x0800,0x1000,0x1000,0x18e0 },
1240 /* For cards with tda9820/tda9821:
1241 0x0000: Tuner normal stereo
1242 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1243 0x0880: Tuner A2 stereo */
1246 .tuner_addr
= ADDR_UNSET
,
1247 .radio_addr
= ADDR_UNSET
,
1249 [BTTV_BOARD_BESTBUY_EASYTV
] = {
1250 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1251 old Easy TV BT848 version (model CPH031) */
1252 .name
= "Askey CPH031/ BESTBUY Easy TV",
1258 .muxsel
= { 2, 3, 1, 0},
1259 .audiomux
= { 2, 0, 0, 0, 10},
1262 .tuner_type
= TUNER_TEMIC_PAL
,
1263 .tuner_addr
= ADDR_UNSET
,
1264 .radio_addr
= ADDR_UNSET
,
1267 /* ---- card 0x38 ---------------------------------- */
1268 [BTTV_BOARD_FLYVIDEO_98FM
] = {
1269 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1270 .name
= "Lifeview FlyVideo 98FM LR50",
1276 .muxsel
= { 2, 3, 1, 1},
1277 .audiomux
= { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
1280 .tuner_addr
= ADDR_UNSET
,
1281 .radio_addr
= ADDR_UNSET
,
1283 /* This is the ultimate cheapo capture card
1284 * just a BT848A on a small PCB!
1285 * Steve Hosgood <steve@equiinet.com> */
1286 [BTTV_BOARD_GRANDTEC
] = {
1287 .name
= "GrandTec 'Grand Video Capture' (Bt848)",
1299 .tuner_addr
= ADDR_UNSET
,
1300 .radio_addr
= ADDR_UNSET
,
1302 [BTTV_BOARD_ASKEY_CPH060
] = {
1303 /* Daniel Herrington <daniel.herrington@home.com> */
1304 .name
= "Askey CPH060/ Phoebe TV Master Only (No FM)",
1310 .muxsel
= { 2, 3, 1, 1},
1311 .audiomux
= { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 },
1314 .tuner_type
= TUNER_TEMIC_4036FY5_NTSC
,
1315 .tuner_addr
= ADDR_UNSET
,
1316 .radio_addr
= ADDR_UNSET
,
1318 [BTTV_BOARD_ASKEY_CPH03X
] = {
1319 /* Matti Mottus <mottus@physic.ut.ee> */
1320 .name
= "Askey CPH03x TV Capturer",
1325 .gpiomask
= 0x03000F,
1326 .muxsel
= { 2, 3, 1, 0},
1327 .audiomux
= { 2,0,0,0,1 },
1330 .tuner_addr
= ADDR_UNSET
,
1331 .radio_addr
= ADDR_UNSET
,
1334 /* ---- card 0x3c ---------------------------------- */
1335 [BTTV_BOARD_MM100PCTV
] = {
1336 /* Philip Blundell <philb@gnu.org> */
1337 .name
= "Modular Technology MM100PCTV",
1343 .muxsel
= { 2, 3, 1, 1},
1344 .audiomux
= { 2, 0, 0, 1, 8},
1346 .tuner_type
= TUNER_TEMIC_PAL
,
1347 .tuner_addr
= ADDR_UNSET
,
1348 .radio_addr
= ADDR_UNSET
,
1350 [BTTV_BOARD_GMV1
] = {
1351 /* Adrian Cox <adrian@humboldt.co.uk */
1352 .name
= "AG Electronics GMV1",
1364 .tuner_addr
= ADDR_UNSET
,
1365 .radio_addr
= ADDR_UNSET
,
1367 [BTTV_BOARD_BESTBUY_EASYTV2
] = {
1368 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1369 new Easy TV BT878 version (model CPH061)
1370 special thanks to Informatica Mieres for providing the card */
1371 .name
= "Askey CPH061/ BESTBUY Easy TV (bt878)",
1377 .muxsel
= { 2, 3, 1, 0},
1378 .audiomux
= { 1, 0, 4, 4, 9},
1381 .tuner_type
= TUNER_PHILIPS_PAL
,
1382 .tuner_addr
= ADDR_UNSET
,
1383 .radio_addr
= ADDR_UNSET
,
1385 [BTTV_BOARD_ATI_TVWONDER
] = {
1386 /* Lukas Gebauer <geby@volny.cz> */
1387 .name
= "ATI TV-Wonder",
1393 .muxsel
= { 2, 3, 1, 0 },
1394 .audiomux
= { 0xbffe, 0, 0xbfff, 0, 0xbffe},
1396 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1397 .tuner_addr
= ADDR_UNSET
,
1398 .radio_addr
= ADDR_UNSET
,
1401 /* ---- card 0x40 ---------------------------------- */
1402 [BTTV_BOARD_ATI_TVWONDERVE
] = {
1403 /* Lukas Gebauer <geby@volny.cz> */
1404 .name
= "ATI TV-Wonder VE",
1410 .muxsel
= { 2, 3, 0, 1},
1411 .audiomux
= { 0, 0, 1, 0, 0},
1414 .tuner_type
= TUNER_TEMIC_4006FN5_MULTI_PAL
,
1415 .tuner_addr
= ADDR_UNSET
,
1416 .radio_addr
= ADDR_UNSET
,
1418 [BTTV_BOARD_FLYVIDEO2000
] = {
1419 /* DeeJay <deejay@westel900.net (2000S) */
1420 .name
= "Lifeview FlyVideo 2000S LR90",
1426 .muxsel
= { 2, 3, 0, 1},
1427 /* Radio changed from 1e80 to 0x800 to make
1428 FlyVideo2000S in .hu happy (gm)*/
1429 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1430 .audiomux
= { 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 },
1431 .audio_hook
= fv2000s_audio
,
1437 .tuner_addr
= ADDR_UNSET
,
1438 .radio_addr
= ADDR_UNSET
,
1440 [BTTV_BOARD_TERRATVALUER
] = {
1441 .name
= "Terratec TValueRadio",
1446 .gpiomask
= 0xffff00,
1447 .muxsel
= { 2, 3, 1, 1},
1448 .audiomux
= { 0x500, 0x500, 0x300, 0x900, 0x900},
1451 .tuner_type
= TUNER_PHILIPS_PAL
,
1452 .tuner_addr
= ADDR_UNSET
,
1453 .radio_addr
= ADDR_UNSET
,
1456 [BTTV_BOARD_GVBCTV4PCI
] = {
1457 /* TANAKA Kei <peg00625@nifty.com> */
1458 .name
= "IODATA GV-BCTV4/PCI",
1463 .gpiomask
= 0x010f00,
1464 .muxsel
= {2, 3, 0, 0},
1465 .audiomux
= {0x10000, 0, 0x10000, 0, 0, 0},
1468 .tuner_type
= TUNER_SHARP_2U5JF5540_NTSC
,
1469 .tuner_addr
= ADDR_UNSET
,
1470 .radio_addr
= ADDR_UNSET
,
1471 .audio_hook
= gvbctv3pci_audio
,
1474 /* ---- card 0x44 ---------------------------------- */
1475 [BTTV_BOARD_VOODOOTV_FM
] = {
1476 .name
= "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)",
1477 /* try "insmod msp3400 simple=0" if you have
1478 * sound problems with this card. */
1483 .gpiomask
= 0x4f8a00,
1484 /* 0x100000: 1=MSP enabled (0=disable again)
1485 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1486 .audiomux
= {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff},
1487 /* tvtuner, radio, external,internal, mute, stereo
1488 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1489 .muxsel
= { 2, 3 ,0 ,1},
1490 .tuner_type
= TUNER_MT2032
,
1491 .tuner_addr
= ADDR_UNSET
,
1492 .radio_addr
= ADDR_UNSET
,
1496 [BTTV_BOARD_AIMMS
] = {
1497 /* Philip Blundell <pb@nexus.co.uk> */
1498 .name
= "Active Imaging AIMMS",
1503 .tuner_addr
= ADDR_UNSET
,
1504 .radio_addr
= ADDR_UNSET
,
1509 [BTTV_BOARD_PV_BT878P_PLUS
] = {
1510 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1511 .name
= "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1517 .muxsel
= { 2, 3, 1, 1},
1518 .audiomux
= { 0, 0, 11, 7, 13, 0}, /* TV and Radio with same GPIO ! */
1522 .tuner_addr
= ADDR_UNSET
,
1523 .radio_addr
= ADDR_UNSET
,
1526 GPIO0: U4.A0 (hef4052bt)
1528 GPIO2: U4.A1 (second hef4052bt)
1529 GPIO3: U4.nEN, U5.A0, A5.nEN
1533 [BTTV_BOARD_FLYVIDEO98EZ
] = {
1534 .name
= "Lifeview FlyVideo 98EZ (capture only) LR51",
1539 .muxsel
= { 2, 3, 1, 1}, /* AV1, AV2, SVHS, CVid adapter on SVHS */
1542 .tuner_type
= UNSET
,
1543 .tuner_addr
= ADDR_UNSET
,
1544 .radio_addr
= ADDR_UNSET
,
1547 /* ---- card 0x48 ---------------------------------- */
1548 [BTTV_BOARD_PV_BT878P_9B
] = {
1549 /* Dariusz Kowalewski <darekk@automex.pl> */
1550 .name
= "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1556 .muxsel
= { 2, 3, 1, 1 },
1557 .audiomux
= { 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 },
1563 .tuner_addr
= ADDR_UNSET
,
1564 .radio_addr
= ADDR_UNSET
,
1565 .audio_hook
= pvbt878p9b_audio
, /* Note: not all cards have stereo */
1566 .has_radio
= 1, /* Note: not all cards have radio */
1573 GPIO20,22,23: R30,R29,R28
1576 [BTTV_BOARD_SENSORAY311
] = {
1577 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1578 /* you must jumper JP5 for the card to work */
1579 .name
= "Sensoray 311",
1585 .muxsel
= { 2, 3, 1, 0, 0},
1589 .tuner_addr
= ADDR_UNSET
,
1590 .radio_addr
= ADDR_UNSET
,
1592 [BTTV_BOARD_RV605
] = {
1593 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1594 .name
= "RemoteVision MX (RV605)",
1600 .gpiomask2
= 0x07ff,
1601 .muxsel
= { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1602 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1606 .tuner_addr
= ADDR_UNSET
,
1607 .radio_addr
= ADDR_UNSET
,
1608 .muxsel_hook
= rv605_muxsel
,
1610 [BTTV_BOARD_POWERCLR_MTV878
] = {
1611 .name
= "Powercolor MTV878/ MTV878R/ MTV878F",
1616 .gpiomask
= 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1617 .muxsel
= { 2, 1, 1, },
1618 .audiomux
= { 0, 1, 2, 2, 4 },
1620 .tuner_type
= TUNER_PHILIPS_PAL
,
1621 .tuner_addr
= ADDR_UNSET
,
1622 .radio_addr
= ADDR_UNSET
,
1627 /* ---- card 0x4c ---------------------------------- */
1628 [BTTV_BOARD_WINDVR
] = {
1629 /* Masaki Suzuki <masaki@btree.org> */
1630 .name
= "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1635 .gpiomask
= 0x140007,
1636 .muxsel
= { 2, 3, 1, 1 },
1637 .audiomux
= { 0, 1, 2, 3, 4, 0 },
1638 .tuner_type
= TUNER_PHILIPS_NTSC
,
1639 .tuner_addr
= ADDR_UNSET
,
1640 .radio_addr
= ADDR_UNSET
,
1641 .audio_hook
= windvr_audio
,
1643 [BTTV_BOARD_GRANDTEC_MULTI
] = {
1644 .name
= "GrandTec Multi Capture Card (Bt878)",
1650 .muxsel
= { 2, 3, 1, 0 },
1656 .tuner_addr
= ADDR_UNSET
,
1657 .radio_addr
= ADDR_UNSET
,
1659 [BTTV_BOARD_KWORLD
] = {
1660 .name
= "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1666 .muxsel
= { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
1667 .audiomux
= { 0 ,0 ,4, 4,4,4},/* Yes, this tuner uses the same audio output for TV and FM radio!
1668 * This card lacks external Audio In, so we mute it on Ext. & Int.
1669 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1670 * This card lacks PCI subsystem ID, sigh.
1671 * audiomux=1: lower volume, 2+3: mute
1672 * btwincap uses 0x80000/0x80003
1678 .tuner_addr
= ADDR_UNSET
,
1679 .radio_addr
= ADDR_UNSET
,
1680 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1681 radio signal strength indicators work fine. */
1684 GPIO0,1: HEF4052 A0,A1
1685 GPIO2: HEF4052 nENABLE
1687 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1691 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1693 [BTTV_BOARD_DSP_TCVIDEO
] = {
1694 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1695 .name
= "DSP Design TCVIDEO",
1698 .muxsel
= { 2, 3, 1, 0},
1701 .tuner_addr
= ADDR_UNSET
,
1702 .radio_addr
= ADDR_UNSET
,
1705 /* ---- card 0x50 ---------------------------------- */
1706 [BTTV_BOARD_HAUPPAUGEPVR
] = {
1707 .name
= "Hauppauge WinTV PVR",
1712 .muxsel
= { 2, 0, 1, 1},
1716 .tuner_addr
= ADDR_UNSET
,
1717 .radio_addr
= ADDR_UNSET
,
1722 [BTTV_BOARD_GVBCTV5PCI
] = {
1723 .name
= "IODATA GV-BCTV5/PCI",
1728 .gpiomask
= 0x0f0f80,
1729 .muxsel
= {2, 3, 1, 0},
1730 .audiomux
= {0x030000, 0x010000, 0, 0, 0x020000, 0},
1733 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
1734 .tuner_addr
= ADDR_UNSET
,
1735 .radio_addr
= ADDR_UNSET
,
1736 .audio_hook
= gvbctv5pci_audio
,
1739 [BTTV_BOARD_OSPREY1x0
] = {
1740 .name
= "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1741 .video_inputs
= 4, /* id-inputs-clock */
1745 .muxsel
= { 3, 2, 0, 1 },
1748 .tuner_addr
= ADDR_UNSET
,
1749 .radio_addr
= ADDR_UNSET
,
1754 [BTTV_BOARD_OSPREY1x0_848
] = {
1755 .name
= "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1760 .muxsel
= { 2, 3, 1 },
1763 .tuner_addr
= ADDR_UNSET
,
1764 .radio_addr
= ADDR_UNSET
,
1770 /* ---- card 0x54 ---------------------------------- */
1771 [BTTV_BOARD_OSPREY101_848
] = {
1772 .name
= "Osprey 101 (848)", /* 0x05-40C0-C1 */
1780 .tuner_addr
= ADDR_UNSET
,
1781 .radio_addr
= ADDR_UNSET
,
1786 [BTTV_BOARD_OSPREY1x1
] = {
1787 .name
= "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1795 .tuner_addr
= ADDR_UNSET
,
1796 .radio_addr
= ADDR_UNSET
,
1801 [BTTV_BOARD_OSPREY1x1_SVID
] = {
1802 .name
= "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1810 .tuner_addr
= ADDR_UNSET
,
1811 .radio_addr
= ADDR_UNSET
,
1816 [BTTV_BOARD_OSPREY2xx
] = {
1817 .name
= "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1824 .tuner_type
= UNSET
,
1825 .tuner_addr
= ADDR_UNSET
,
1826 .radio_addr
= ADDR_UNSET
,
1832 /* ---- card 0x58 ---------------------------------- */
1833 [BTTV_BOARD_OSPREY2x0_SVID
] = {
1834 .name
= "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1841 .tuner_type
= UNSET
,
1842 .tuner_addr
= ADDR_UNSET
,
1843 .radio_addr
= ADDR_UNSET
,
1848 [BTTV_BOARD_OSPREY2x0
] = {
1849 .name
= "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */
1856 .tuner_type
= UNSET
,
1857 .tuner_addr
= ADDR_UNSET
,
1858 .radio_addr
= ADDR_UNSET
,
1863 [BTTV_BOARD_OSPREY500
] = {
1864 .name
= "Osprey 500", /* 500 */
1872 .tuner_addr
= ADDR_UNSET
,
1873 .radio_addr
= ADDR_UNSET
,
1878 [BTTV_BOARD_OSPREY540
] = {
1879 .name
= "Osprey 540", /* 540 */
1883 #if 0 /* TODO ... */
1884 .svhs
= OSPREY540_SVID_ANALOG
,
1885 .muxsel
= { [OSPREY540_COMP_ANALOG
] = 2,
1886 [OSPREY540_SVID_ANALOG
] = 3, },
1890 .tuner_addr
= ADDR_UNSET
,
1891 .radio_addr
= ADDR_UNSET
,
1895 #if 0 /* TODO ... */
1896 .muxsel_hook
= osprey_540_muxsel
,
1897 .picture_hook
= osprey_540_set_picture
,
1901 /* ---- card 0x5C ---------------------------------- */
1902 [BTTV_BOARD_OSPREY2000
] = {
1903 .name
= "Osprey 2000", /* 2000 */
1910 .tuner_type
= UNSET
,
1911 .tuner_addr
= ADDR_UNSET
,
1912 .radio_addr
= ADDR_UNSET
,
1915 .no_tda7432
= 1, /* must avoid, conflicts with the bt860 */
1917 [BTTV_BOARD_IDS_EAGLE
] = {
1918 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1919 .name
= "IDS Eagle",
1924 .tuner_addr
= ADDR_UNSET
,
1925 .radio_addr
= ADDR_UNSET
,
1928 .muxsel
= { 0, 1, 2, 3 },
1929 .muxsel_hook
= eagle_muxsel
,
1934 [BTTV_BOARD_PINNACLESAT
] = {
1935 .name
= "Pinnacle PCTV Sat",
1941 .tuner_addr
= ADDR_UNSET
,
1942 .radio_addr
= ADDR_UNSET
,
1946 .muxsel
= { 3, 0, 1, 2},
1951 [BTTV_BOARD_FORMAC_PROTV
] = {
1952 .name
= "Formac ProTV II (bt878)",
1958 /* TV, Comp1, Composite over SVID con, SVID */
1959 .muxsel
= { 2, 3, 1, 1},
1960 .audiomux
= { 2, 2, 0, 0, 0 },
1963 .tuner_type
= TUNER_PHILIPS_PAL
,
1964 .tuner_addr
= ADDR_UNSET
,
1965 .radio_addr
= ADDR_UNSET
,
1967 GPIO=0x00,0x01,0x03: mute (?)
1968 0x02: both TV and radio (tuner: FM1216/I)
1969 The card has onboard audio connectors labeled "cdrom" and "board",
1970 not soldered here, though unknown wiring.
1971 Card lacks: external audio in, pci subsystem id.
1975 /* ---- card 0x60 ---------------------------------- */
1976 [BTTV_BOARD_MACHTV
] = {
1983 .muxsel
= { 2, 3, 1, 1},
1984 .audiomux
= { 0, 1, 2, 3, 4},
1987 .tuner_addr
= ADDR_UNSET
,
1988 .radio_addr
= ADDR_UNSET
,
1991 [BTTV_BOARD_EURESYS_PICOLO
] = {
1992 .name
= "Euresys Picolo",
2001 .muxsel
= { 2, 0, 1},
2003 .tuner_type
= UNSET
,
2004 .tuner_addr
= ADDR_UNSET
,
2005 .radio_addr
= ADDR_UNSET
,
2007 [BTTV_BOARD_PV150
] = {
2008 /* Luc Van Hoeylandt <luc@e-magic.be> */
2009 .name
= "ProVideo PV150", /* 0x4f */
2020 .tuner_type
= UNSET
,
2021 .tuner_addr
= ADDR_UNSET
,
2022 .radio_addr
= ADDR_UNSET
,
2024 [BTTV_BOARD_AD_TVK503
] = {
2025 /* Hiroshi Takekawa <sian@big.or.jp> */
2026 /* This card lacks subsystem ID */
2027 .name
= "AD-TVK503", /* 0x63 */
2032 .gpiomask
= 0x001e8007,
2033 .muxsel
= { 2, 3, 1, 0 },
2034 /* Tuner, Radio, external, internal, off, on */
2035 .audiomux
= { 0x08, 0x0f, 0x0a, 0x08, 0x0f, 0x08 },
2040 .tuner_addr
= ADDR_UNSET
,
2041 .radio_addr
= ADDR_UNSET
,
2042 .audio_hook
= adtvk503_audio
,
2045 /* ---- card 0x64 ---------------------------------- */
2046 [BTTV_BOARD_HERCULES_SM_TV
] = {
2047 .name
= "Hercules Smart TV Stereo",
2053 .muxsel
= { 2, 3, 1, 1 },
2058 .tuner_addr
= ADDR_UNSET
,
2059 .radio_addr
= ADDR_UNSET
,
2061 - card lacks subsystem ID
2062 - stereo variant w/ daughter board with tda9874a @0xb0
2064 always from tda9874 independent of GPIO (?)
2065 external line in: unknown
2066 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2067 hef4053 (instead 4052) for unknown function
2070 [BTTV_BOARD_PACETV
] = {
2071 .name
= "Pace TV & Radio Card",
2076 .muxsel
= { 2, 3, 1, 1}, /* Tuner, CVid, SVid, CVid over SVid connector */
2081 .tuner_addr
= ADDR_UNSET
,
2082 .radio_addr
= ADDR_UNSET
,
2085 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2086 only internal line out: (4pin header) RGGL
2087 Radio must be decoded by msp3410d (not routed through)*/
2089 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2092 [BTTV_BOARD_IVC200
] = {
2093 /* Chris Willing <chris@vislab.usyd.edu.au> */
2099 .tuner_addr
= ADDR_UNSET
,
2100 .radio_addr
= ADDR_UNSET
,
2106 [BTTV_BOARD_XGUARD
] = {
2107 .name
= "Grand X-Guard / Trust 814PCI",
2113 .tuner_addr
= ADDR_UNSET
,
2114 .radio_addr
= ADDR_UNSET
,
2116 .muxsel
= { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2117 .muxsel_hook
= xguard_muxsel
,
2124 /* ---- card 0x68 ---------------------------------- */
2125 [BTTV_BOARD_NEBULA_DIGITV
] = {
2126 .name
= "Nebula Electronics DigiTV",
2130 .muxsel
= { 2, 3, 1, 0},
2136 .tuner_addr
= ADDR_UNSET
,
2137 .radio_addr
= ADDR_UNSET
,
2143 [BTTV_BOARD_PV143
] = {
2144 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2145 .name
= "ProVideo PV143",
2151 .muxsel
= { 2, 3, 1, 0 },
2157 .tuner_addr
= ADDR_UNSET
,
2158 .radio_addr
= ADDR_UNSET
,
2160 [BTTV_BOARD_VD009X1_MINIDIN
] = {
2161 /* M.Klahr@phytec.de */
2162 .name
= "PHYTEC VD-009-X1 MiniDIN (bt878)",
2165 .tuner
= -1, /* card has no tuner */
2168 .muxsel
= { 2, 3, 1, 0},
2169 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2173 .tuner_addr
= ADDR_UNSET
,
2174 .radio_addr
= ADDR_UNSET
,
2176 [BTTV_BOARD_VD009X1_COMBI
] = {
2177 .name
= "PHYTEC VD-009-X1 Combi (bt878)",
2180 .tuner
= -1, /* card has no tuner */
2183 .muxsel
= { 2, 3, 1, 1},
2184 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2188 .tuner_addr
= ADDR_UNSET
,
2189 .radio_addr
= ADDR_UNSET
,
2192 /* ---- card 0x6c ---------------------------------- */
2193 [BTTV_BOARD_VD009_MINIDIN
] = {
2194 .name
= "PHYTEC VD-009 MiniDIN (bt878)",
2197 .tuner
= -1, /* card has no tuner */
2200 .gpiomask2
= 0x03, /* gpiomask2 defines the bits used to switch audio
2201 via the upper nibble of muxsel. here: used for
2202 xternal video-mux */
2203 .muxsel
= { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
2204 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2208 .tuner_addr
= ADDR_UNSET
,
2209 .radio_addr
= ADDR_UNSET
,
2211 [BTTV_BOARD_VD009_COMBI
] = {
2212 .name
= "PHYTEC VD-009 Combi (bt878)",
2215 .tuner
= -1, /* card has no tuner */
2218 .gpiomask2
= 0x03, /* gpiomask2 defines the bits used to switch audio
2219 via the upper nibble of muxsel. here: used for
2220 xternal video-mux */
2221 .muxsel
= { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
2222 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2226 .tuner_addr
= ADDR_UNSET
,
2227 .radio_addr
= ADDR_UNSET
,
2229 [BTTV_BOARD_IVC100
] = {
2235 .tuner_addr
= ADDR_UNSET
,
2236 .radio_addr
= ADDR_UNSET
,
2239 .muxsel
= { 2, 3, 1, 0 },
2242 [BTTV_BOARD_IVC120
] = {
2243 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2246 .audio_inputs
= 0, /* card has no audio */
2247 .tuner
= -1, /* card has no tuner */
2249 .tuner_addr
= ADDR_UNSET
,
2250 .radio_addr
= ADDR_UNSET
,
2251 .svhs
= -1, /* card has no svhs */
2257 .muxsel
= { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2258 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2259 .muxsel_hook
= ivc120_muxsel
,
2263 /* ---- card 0x70 ---------------------------------- */
2264 [BTTV_BOARD_PC_HDTV
] = {
2265 .name
= "pcHDTV HD-2000 TV",
2270 .muxsel
= { 2, 3, 1, 0},
2271 .tuner_type
= TUNER_PHILIPS_ATSC
,
2272 .tuner_addr
= ADDR_UNSET
,
2273 .radio_addr
= ADDR_UNSET
,
2276 [BTTV_BOARD_TWINHAN_DST
] = {
2277 .name
= "Twinhan DST + clones",
2281 .tuner_type
= TUNER_ABSENT
,
2282 .tuner_addr
= ADDR_UNSET
,
2283 .radio_addr
= ADDR_UNSET
,
2287 [BTTV_BOARD_WINFASTVC100
] = {
2288 .name
= "Winfast VC100",
2293 .muxsel
= { 3, 1, 1, 3}, /* Vid In, SVid In, Vid over SVid in connector */
2297 .tuner_type
= TUNER_ABSENT
,
2298 .tuner_addr
= ADDR_UNSET
,
2299 .radio_addr
= ADDR_UNSET
,
2302 [BTTV_BOARD_TEV560
] = {
2303 .name
= "Teppro TEV-560/InterVision IV-560",
2309 .muxsel
= { 2, 3, 1, 1},
2310 .audiomux
= { 1, 1, 1, 1, 0},
2312 .tuner_type
= TUNER_PHILIPS_PAL
,
2313 .tuner_addr
= ADDR_UNSET
,
2314 .radio_addr
= ADDR_UNSET
,
2318 /* ---- card 0x74 ---------------------------------- */
2319 [BTTV_BOARD_SIMUS_GVC1100
] = {
2320 .name
= "SIMUS GVC1100",
2326 .tuner_addr
= ADDR_UNSET
,
2327 .radio_addr
= ADDR_UNSET
,
2329 .muxsel
= { 2, 2, 2, 2},
2331 .muxsel_hook
= gvc1100_muxsel
,
2333 [BTTV_BOARD_NGSTV_PLUS
] = {
2334 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2335 .name
= "NGS NGSTV+",
2339 .gpiomask
= 0x008007,
2340 .muxsel
= {2, 3, 0, 0},
2341 .audiomux
= {0, 0, 0, 0, 0x000003, 0},
2343 .tuner_type
= TUNER_PHILIPS_PAL
,
2344 .tuner_addr
= ADDR_UNSET
,
2345 .radio_addr
= ADDR_UNSET
,
2348 [BTTV_BOARD_LMLBT4
] = {
2349 /* http://linuxmedialabs.com */
2351 .video_inputs
= 4, /* IN1,IN2,IN3,IN4 */
2355 .muxsel
= { 2, 3, 1, 0 },
2361 .tuner_addr
= ADDR_UNSET
,
2362 .radio_addr
= ADDR_UNSET
,
2364 [BTTV_BOARD_TEKRAM_M205
] = {
2365 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2366 .name
= "Tekram M205 PRO",
2370 .tuner_type
= TUNER_PHILIPS_PAL
,
2371 .tuner_addr
= ADDR_UNSET
,
2372 .radio_addr
= ADDR_UNSET
,
2376 .muxsel
= { 2, 3, 1},
2377 .audiomux
= { 0x68, 0x68, 0x61, 0x61, 0x00 },
2381 /* ---- card 0x78 ---------------------------------- */
2382 [BTTV_BOARD_CONTVFMI
] = {
2383 /* Javier Cendan Ares <jcendan@lycos.es> */
2384 /* bt878 TV + FM without subsystem ID */
2385 .name
= "Conceptronic CONTVFMi",
2390 .gpiomask
= 0x008007,
2391 .muxsel
= { 2, 3, 1, 1 },
2392 .audiomux
= { 0, 1, 2, 2, 3 },
2395 .tuner_type
= TUNER_PHILIPS_PAL
,
2396 .tuner_addr
= ADDR_UNSET
,
2397 .radio_addr
= ADDR_UNSET
,
2401 [BTTV_BOARD_PICOLO_TETRA_CHIP
] = {
2402 /*Eric DEBIEF <debief@telemsa.com>*/
2403 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
2404 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
2406 .name
= "Euresys Picolo Tetra",
2412 .gpiomask2
= 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2416 .muxsel
= {2,2,2,2},/*878A input is always MUX0, see above.*/
2417 .audiomux
= { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2420 .muxsel_hook
= picolo_tetra_muxsel
,/*Required as it doesn't follow the classic input selection policy*/
2422 .tuner_addr
= ADDR_UNSET
,
2423 .radio_addr
= ADDR_UNSET
,
2425 [BTTV_BOARD_SPIRIT_TV
] = {
2426 /* Spirit TV Tuner from http://spiritmodems.com.au */
2427 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2428 .name
= "Spirit TV Tuner",
2433 .gpiomask
= 0x0000000f,
2434 .muxsel
= { 2, 1, 1 },
2435 .audiomux
= { 0x02, 0x00, 0x00, 0x00, 0x00},
2436 .tuner_type
= TUNER_TEMIC_PAL
,
2437 .tuner_addr
= ADDR_UNSET
,
2438 .radio_addr
= ADDR_UNSET
,
2442 [BTTV_BOARD_AVDVBT_771
] = {
2443 /* Wolfram Joost <wojo@frokaschwei.de> */
2444 .name
= "AVerMedia AVerTV DVB-T 771",
2448 .tuner_type
= TUNER_ABSENT
,
2449 .tuner_addr
= ADDR_UNSET
,
2450 .radio_addr
= ADDR_UNSET
,
2451 .muxsel
= { 3 , 3 },
2460 /* ---- card 0x7c ---------------------------------- */
2461 [BTTV_BOARD_AVDVBT_761
] = {
2462 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
2463 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
2464 .name
= "AverMedia AverTV DVB-T 761",
2468 .muxsel
= { 3, 1, 2, 0}, /* Comp0, S-Video, ?, ? */
2474 .tuner_addr
= ADDR_UNSET
,
2475 .radio_addr
= ADDR_UNSET
,
2480 [BTTV_BOARD_MATRIX_VISIONSQ
] = {
2481 /* andre.schwarz@matrix-vision.de */
2482 .name
= "MATRIX Vision Sigma-SQ",
2488 .muxsel
= { 2, 2, 2, 2, 2, 2, 2, 2,
2489 3, 3, 3, 3, 3, 3, 3, 3 },
2490 .muxsel_hook
= sigmaSQ_muxsel
,
2495 .tuner_addr
= ADDR_UNSET
,
2496 .radio_addr
= ADDR_UNSET
,
2498 [BTTV_BOARD_MATRIX_VISIONSLC
] = {
2499 /* andre.schwarz@matrix-vision.de */
2500 .name
= "MATRIX Vision Sigma-SLC",
2506 .muxsel
= { 2, 2, 2, 2 },
2507 .muxsel_hook
= sigmaSLC_muxsel
,
2512 .tuner_addr
= ADDR_UNSET
,
2513 .radio_addr
= ADDR_UNSET
,
2515 /* BTTV_BOARD_APAC_VIEWCOMP */
2516 [BTTV_BOARD_APAC_VIEWCOMP
] = {
2517 /* Attila Kondoros <attila.kondoros@chello.hu> */
2518 /* bt878 TV + FM 0x00000000 subsystem ID */
2519 .name
= "APAC Viewcomp 878(AMAX)",
2525 .muxsel
= { 2, 3, 1, 1},
2526 .audiomux
= { 2, 0, 0, 0, 10},
2529 .tuner_type
= TUNER_PHILIPS_PAL
,
2530 .tuner_addr
= ADDR_UNSET
,
2531 .radio_addr
= ADDR_UNSET
,
2532 .has_remote
= 1, /* miniremote works, see ir-kbd-gpio.c */
2533 .has_radio
= 1, /* not every card has radio */
2536 /* ---- card 0x80 ---------------------------------- */
2537 [BTTV_BOARD_DVICO_DVBT_LITE
] = {
2538 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2539 .name
= "DViCO FusionHDTV DVB-T Lite",
2548 .tuner_addr
= ADDR_UNSET
,
2549 .radio_addr
= ADDR_UNSET
,
2551 [BTTV_BOARD_VGEAR_MYVCD
] = {
2552 /* Steven <photon38@pchome.com.tw> */
2553 .name
= "V-Gear MyVCD",
2559 .muxsel
= {2, 3, 1, 0},
2560 .audiomux
= {0x31, 0x31, 0x31, 0x31, 0x31, 0x31},
2563 .tuner_type
= TUNER_PHILIPS_NTSC_M
,
2564 .tuner_addr
= ADDR_UNSET
,
2565 .radio_addr
= ADDR_UNSET
,
2571 [BTTV_BOARD_SUPER_TV
] = {
2572 /* Rick C <cryptdragoon@gmail.com> */
2573 .name
= "Super TV Tuner",
2578 .muxsel
= { 2, 3, 1, 0},
2579 .tuner_type
= TUNER_PHILIPS_NTSC
,
2580 .tuner_addr
= ADDR_UNSET
,
2581 .radio_addr
= ADDR_UNSET
,
2582 .gpiomask
= 0x008007,
2583 .audiomux
= { 0, 0x000001,0,0, 0},
2587 [BTTV_BOARD_TIBET_CS16
] = {
2588 /* Chris Fanning <video4linux@haydon.net> */
2589 .name
= "Tibet Systems 'Progress DVR' CS16",
2594 .muxsel
= { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2600 .tuner_addr
= ADDR_UNSET
,
2601 .radio_addr
= ADDR_UNSET
,
2602 .muxsel_hook
= tibetCS16_muxsel
,
2604 [BTTV_BOARD_KODICOM_4400R
] = {
2605 /* Bill Brack <wbrack@mmm.com.hk> */
2607 * Note that, because of the card's wiring, the "master"
2608 * BT878A chip (i.e. the one which controls the analog switch
2609 * and must use this card type) is the 2nd one detected. The
2610 * other 3 chips should use card type 0x85, whose description
2611 * follows this one. There is a EEPROM on the card (which is
2612 * connected to the I2C of one of those other chips), but is
2613 * not currently handled. There is also a facility for a
2614 * "monitor", which is also not currently implemented.
2616 .name
= "Kodicom 4400R (master)",
2621 .tuner_addr
= ADDR_UNSET
,
2622 .radio_addr
= ADDR_UNSET
,
2624 /* GPIO bits 0-9 used for analog switch:
2625 * 00 - 03: camera selector
2626 * 04 - 06: channel (controller) selector
2627 * 07: data (1->on, 0->off)
2630 * bit 16 is input from sync separator for the channel
2632 .gpiomask
= 0x0003ff,
2634 .muxsel
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2639 .muxsel_hook
= kodicom4400r_muxsel
,
2641 [BTTV_BOARD_KODICOM_4400R_SL
] = {
2642 /* Bill Brack <wbrack@mmm.com.hk> */
2643 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2644 * one which controls the analog switch, and must use the card type)
2645 * is the 2nd one detected. The other 3 chips should use this card
2648 .name
= "Kodicom 4400R (slave)",
2653 .tuner_addr
= ADDR_UNSET
,
2654 .radio_addr
= ADDR_UNSET
,
2656 .gpiomask
= 0x010000,
2658 .muxsel
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2663 .muxsel_hook
= kodicom4400r_muxsel
,
2665 /* ---- card 0x86---------------------------------- */
2666 [BTTV_BOARD_ADLINK_RTV24
] = {
2667 /* Michael Henson <mhenson@clarityvi.com> */
2668 /* Adlink RTV24 with special unlock codes */
2669 .name
= "Adlink RTV24",
2674 .muxsel
= { 2, 3, 1, 0},
2676 .tuner_addr
= ADDR_UNSET
,
2677 .radio_addr
= ADDR_UNSET
,
2680 /* ---- card 0x87---------------------------------- */
2681 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
] = {
2682 /* Michael Krufky <mkrufky@m1k.net> */
2683 .name
= "DViCO FusionHDTV 5 Lite",
2685 .tuner_type
= TUNER_LG_TDVS_H062F
,
2686 .tuner_addr
= ADDR_UNSET
,
2687 .radio_addr
= ADDR_UNSET
,
2691 .muxsel
= { 2, 3, 1 },
2692 .gpiomask
= 0x00e00007,
2693 .audiomux
= { 0x00400005, 0, 0x00000001, 0, 0x00c00007, 0 },
2699 /* ---- card 0x88---------------------------------- */
2700 [BTTV_BOARD_ACORP_Y878F
] = {
2701 /* Mauro Carvalho Chehab <mchehab@brturbo.com.br> */
2702 .name
= "Acorp Y878F",
2707 .gpiomask
= 0x01fe00,
2708 .muxsel
= { 2, 3, 1, 1},
2709 .audiomux
= { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
2712 .tuner_type
= TUNER_YMEC_TVF66T5_B_DFF
,
2713 .tuner_addr
= 0xc1 >>1,
2714 .radio_addr
= 0xc1 >>1,
2717 /* ---- card 0x89 ---------------------------------- */
2718 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2
] = {
2719 .name
= "Conceptronic CTVFMi v2",
2724 .gpiomask
= 0x001c0007,
2725 .muxsel
= { 2, 3, 1, 1 },
2726 .audiomux
= { 0, 1, 2, 2, 3 },
2729 .tuner_type
= TUNER_TENA_9533_DI
,
2730 .tuner_addr
= ADDR_UNSET
,
2731 .radio_addr
= ADDR_UNSET
,
2735 /* ---- card 0x8a ---------------------------------- */
2736 [BTTV_BOARD_PV_BT878P_2E
] = {
2737 .name
= "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2742 .gpiomask
= 0x01fe00,
2743 .muxsel
= { 2,3,1,1,-1 },
2744 .digital_mode
= DIGITAL_MODE_CAMERA
,
2745 .audiomux
= { 0x00400, 0x10400, 0x04400, 0x80000, 0x12400, 0x46000 },
2748 .tuner_type
= TUNER_LG_PAL_FM
,
2749 .tuner_addr
= ADDR_UNSET
,
2750 .radio_addr
= ADDR_UNSET
,
2753 /* ---- card 0x8b ---------------------------------- */
2754 [BTTV_BOARD_PV_M4900
] = {
2755 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2756 .name
= "Prolink PixelView PlayTV MPEG2 PV-M4900",
2762 .muxsel
= { 2, 3, 1, 1 },
2763 .audiomux
= { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
2766 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
2767 .tuner_addr
= ADDR_UNSET
,
2768 .radio_addr
= ADDR_UNSET
,
2772 /* ---- card 0x8c ---------------------------------- */
2773 [BTTV_BOARD_OSPREY440
] = {
2774 .name
= "Osprey 440",
2781 .tuner_type
= UNSET
,
2782 .tuner_addr
= ADDR_UNSET
,
2783 .radio_addr
= ADDR_UNSET
,
2788 /* ---- card 0x8d ---------------------------------- */
2789 [BTTV_BOARD_ASOUND_SKYEYE
] = {
2790 .name
= "Asound Skyeye PCTV",
2796 .muxsel
= { 2, 3, 1, 1},
2797 .audiomux
= {2,0,0,0,1},
2801 .tuner_addr
= ADDR_UNSET
,
2802 .radio_addr
= ADDR_UNSET
,
2804 /* ---- card 0x8e ---------------------------------- */
2805 [BTTV_BOARD_SABRENT_TVFM
] = {
2806 .name
= "Sabrent TV-FM (bttv version)",
2811 .gpiomask
= 0x108007,
2812 .muxsel
= { 2, 3, 1, 1},
2813 .audiomux
= { 100000, 100002, 100002, 100000},
2818 .tuner_type
= TUNER_TNF_5335MF
,
2819 .tuner_addr
= ADDR_UNSET
,
2822 /* ---- card 0x8f ---------------------------------- */
2823 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB
] = {
2824 .name
= "Hauppauge ImpactVCB (bt878)",
2829 .gpiomask
= 0x0f, /* old: 7 */
2830 .muxsel
= { 0, 1, 3, 2}, /* Composite 0-3 */
2835 .tuner_addr
= ADDR_UNSET
,
2836 .radio_addr
= ADDR_UNSET
,
2840 static const unsigned int bttv_num_tvcards
= ARRAY_SIZE(bttv_tvcards
);
2842 /* ----------------------------------------------------------------------- */
2844 static unsigned char eeprom_data
[256];
2849 void __devinit
bttv_idcard(struct bttv
*btv
)
2851 unsigned int gpiobits
;
2855 /* read PCI subsystem ID */
2856 pci_read_config_word(btv
->c
.pci
, PCI_SUBSYSTEM_ID
, &tmp
);
2857 btv
->cardid
= tmp
<< 16;
2858 pci_read_config_word(btv
->c
.pci
, PCI_SUBSYSTEM_VENDOR_ID
, &tmp
);
2861 if (0 != btv
->cardid
&& 0xffffffff != btv
->cardid
) {
2862 /* look for the card */
2863 for (type
= -1, i
= 0; cards
[i
].id
!= 0; i
++)
2864 if (cards
[i
].id
== btv
->cardid
)
2869 printk(KERN_INFO
"bttv%d: detected: %s [card=%d], "
2870 "PCI subsystem ID is %04x:%04x\n",
2871 btv
->c
.nr
,cards
[type
].name
,cards
[type
].cardnr
,
2872 btv
->cardid
& 0xffff,
2873 (btv
->cardid
>> 16) & 0xffff);
2874 btv
->c
.type
= cards
[type
].cardnr
;
2877 printk(KERN_INFO
"bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2878 btv
->c
.nr
, btv
->cardid
& 0xffff,
2879 (btv
->cardid
>> 16) & 0xffff);
2880 printk(KERN_DEBUG
"please mail id, board name and "
2881 "the correct card= insmod option to video4linux-list@redhat.com\n");
2885 /* let the user override the autodetected type */
2886 if (card
[btv
->c
.nr
] < bttv_num_tvcards
)
2887 btv
->c
.type
=card
[btv
->c
.nr
];
2889 /* print which card config we are using */
2890 printk(KERN_INFO
"bttv%d: using: %s [card=%d,%s]\n",btv
->c
.nr
,
2891 bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
,
2892 card
[btv
->c
.nr
] < bttv_num_tvcards
2893 ? "insmod option" : "autodetected");
2895 /* overwrite gpio stuff ?? */
2896 if (UNSET
== audioall
&& UNSET
== audiomux
[0])
2899 if (UNSET
!= audiomux
[0]) {
2901 for (i
= 0; i
< 5; i
++) {
2902 bttv_tvcards
[btv
->c
.type
].audiomux
[i
] = audiomux
[i
];
2903 gpiobits
|= audiomux
[i
];
2906 gpiobits
= audioall
;
2907 for (i
= 0; i
< 5; i
++) {
2908 bttv_tvcards
[btv
->c
.type
].audiomux
[i
] = audioall
;
2911 bttv_tvcards
[btv
->c
.type
].gpiomask
= (UNSET
!= gpiomask
) ? gpiomask
: gpiobits
;
2912 printk(KERN_INFO
"bttv%d: gpio config override: mask=0x%x, mux=",
2913 btv
->c
.nr
,bttv_tvcards
[btv
->c
.type
].gpiomask
);
2914 for (i
= 0; i
< 5; i
++) {
2915 printk("%s0x%x", i
? "," : "", bttv_tvcards
[btv
->c
.type
].audiomux
[i
]);
2921 * (most) board specific initialisations goes here
2924 /* Some Modular Technology cards have an eeprom, but no subsystem ID */
2925 static void identify_by_eeprom(struct bttv
*btv
, unsigned char eeprom_data
[256])
2929 if (0 == strncmp(eeprom_data
,"GET MM20xPCTV",13))
2930 type
= BTTV_BOARD_MODTEC_205
;
2931 else if (0 == strncmp(eeprom_data
+20,"Picolo",7))
2932 type
= BTTV_BOARD_EURESYS_PICOLO
;
2933 else if (eeprom_data
[0] == 0x84 && eeprom_data
[2]== 0)
2934 type
= BTTV_BOARD_HAUPPAUGE
; /* old bt848 */
2938 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2939 btv
->c
.nr
, bttv_tvcards
[btv
->c
.type
].name
, btv
->c
.type
);
2943 static void flyvideo_gpio(struct bttv
*btv
)
2945 int gpio
,has_remote
,has_radio
,is_capture_only
,is_lr90
,has_tda9820_tda9821
;
2948 gpio_inout(0xffffff, 0);
2949 udelay(8); /* without this we would see the 0x1800 mask */
2951 /* FIXME: must restore OUR_EN ??? */
2953 /* all cards provide GPIO info, some have an additional eeprom
2954 * LR50: GPIO coding can be found lower right CP1 .. CP9
2955 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2957 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
2959 * lowest 3 bytes are remote control codes (no handshake needed)
2960 * xxxFFF: No remote control chip soldered
2961 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
2962 * Note: Some bits are Audio_Mask !
2964 ttype
=(gpio
&0x0f0000)>>16;
2966 case 0x0: tuner
=2; /* NTSC, e.g. TPI8NSR11P */
2968 case 0x2: tuner
=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
2970 case 0x4: tuner
=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
2972 case 0x6: tuner
=37;/* LG PAL (newer TAPC series) TAPC-G702P */
2974 case 0xC: tuner
=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
2977 printk(KERN_INFO
"bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv
->c
.nr
);
2980 has_remote
= gpio
& 0x800000;
2981 has_radio
= gpio
& 0x400000;
2982 /* unknown 0x200000;
2983 * unknown2 0x100000; */
2984 is_capture_only
= !(gpio
& 0x008000); /* GPIO15 */
2985 has_tda9820_tda9821
= !(gpio
& 0x004000);
2986 is_lr90
= !(gpio
& 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
2988 * gpio & 0x001000 output bit for audio routing */
2991 tuner
=4; /* No tuner present */
2993 printk(KERN_INFO
"bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
2994 btv
->c
.nr
, has_radio
? "yes":"no ", has_remote
? "yes":"no ", tuner
, gpio
);
2995 printk(KERN_INFO
"bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
2996 btv
->c
.nr
, is_lr90
?"yes":"no ", has_tda9820_tda9821
?"yes":"no ",
2997 is_capture_only
?"yes":"no ");
2999 if(tuner
!= -1) /* only set if known tuner autodetected, else let insmod option through */
3000 btv
->tuner_type
= tuner
;
3001 btv
->has_radio
= has_radio
;
3003 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3004 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3005 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
3006 if(has_tda9820_tda9821
) btv
->audio_hook
= lt9415_audio
;
3007 /* todo: if(has_tda9874) btv->audio_hook = fv2000s_audio; */
3010 static int miro_tunermap
[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3011 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3012 static int miro_fmtuner
[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3013 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3015 static void miro_pinnacle_gpio(struct bttv
*btv
)
3020 gpio_inout(0xffffff, 0);
3022 id
= ((gpio
>>10) & 63) -1;
3023 msp
= bttv_I2CRead(btv
, I2C_MSP3400
, "MSP34xx");
3025 btv
->tuner_type
= miro_tunermap
[id
];
3026 if (0 == (gpio
& 0x20)) {
3028 if (!miro_fmtuner
[id
]) {
3029 btv
->has_matchbox
= 1;
3030 btv
->mbox_we
= (1<<6);
3031 btv
->mbox_most
= (1<<7);
3032 btv
->mbox_clk
= (1<<8);
3033 btv
->mbox_data
= (1<<9);
3034 btv
->mbox_mask
= (1<<6)|(1<<7)|(1<<8)|(1<<9);
3040 if (btv
->c
.type
== BTTV_BOARD_MIRO
)
3041 btv
->c
.type
= BTTV_BOARD_MIROPRO
;
3042 if (btv
->c
.type
== BTTV_BOARD_PINNACLE
)
3043 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3046 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3047 btv
->c
.nr
, id
+1, btv
->tuner_type
,
3048 !btv
->has_radio
? "no" :
3049 (btv
->has_matchbox
? "matchbox" : "fmtuner"),
3050 (-1 == msp
) ? "no" : "yes");
3052 /* new cards with microtune tuner */
3057 info
= "PAL / mono";
3058 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3061 info
= "PAL+SECAM / stereo";
3063 btv
->tda9887_conf
= TDA9887_QSS
;
3066 info
= "NTSC / stereo";
3068 btv
->tda9887_conf
= TDA9887_QSS
;
3071 info
= "PAL+SECAM / mono";
3072 btv
->tda9887_conf
= TDA9887_QSS
;
3075 info
= "NTSC / mono";
3076 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3079 info
= "NTSC / stereo";
3080 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3083 info
= "PAL / stereo";
3084 btv
->tda9887_conf
= TDA9887_INTERCARRIER
;
3087 info
= "oops: unknown card";
3091 btv
->c
.type
= BTTV_BOARD_PINNACLEPRO
;
3093 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3094 btv
->c
.nr
, id
, info
, btv
->has_radio
? "yes" : "no");
3095 btv
->tuner_type
= TUNER_MT2032
;
3099 /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3100 #define LM1882_SYNC_DRIVE 0x200000L
3102 static void init_ids_eagle(struct bttv
*btv
)
3104 gpio_inout(0xffffff,0xFFFF37);
3105 gpio_write(0x200020);
3107 /* flash strobe inverter ?! */
3108 gpio_write(0x200024);
3110 /* switch sync drive off */
3111 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3113 /* set BT848 muxel to 2 */
3114 btaor((2)<<5, ~(2<<5), BT848_IFORM
);
3117 /* Muxsel helper for the IDS Eagle.
3118 * the eagles does not use the standard muxsel-bits but
3119 * has its own multiplexer */
3120 static void eagle_muxsel(struct bttv
*btv
, unsigned int input
)
3122 btaor((2)<<5, ~(3<<5), BT848_IFORM
);
3123 gpio_bits(3,bttv_tvcards
[btv
->c
.type
].muxsel
[input
&7]);
3126 /* set chroma ADC to sleep */
3127 btor(BT848_ADC_C_SLEEP
, BT848_ADC
);
3128 /* set to composite video */
3129 btand(~BT848_CONTROL_COMP
, BT848_E_CONTROL
);
3130 btand(~BT848_CONTROL_COMP
, BT848_O_CONTROL
);
3132 /* switch sync drive off */
3133 gpio_bits(LM1882_SYNC_DRIVE
,LM1882_SYNC_DRIVE
);
3136 static void gvc1100_muxsel(struct bttv
*btv
, unsigned int input
)
3138 static const int masks
[] = {0x30, 0x01, 0x12, 0x23};
3139 gpio_write(masks
[input
%4]);
3142 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3145 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3146 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3148 IN - sensor inputs, INx - sensor inputs and TI XORed together
3149 O1,O2,O3 - alarm outputs (relays)
3151 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3155 static void init_lmlbt4x(struct bttv
*btv
)
3157 printk(KERN_DEBUG
"LMLBT4x init\n");
3158 btwrite(0x000000, BT848_GPIO_REG_INP
);
3159 gpio_inout(0xffffff, 0x0006C0);
3160 gpio_write(0x000000);
3163 static void sigmaSQ_muxsel(struct bttv
*btv
, unsigned int input
)
3165 unsigned int inmux
= input
% 8;
3166 gpio_inout( 0xf, 0xf );
3167 gpio_bits( 0xf, inmux
);
3170 static void sigmaSLC_muxsel(struct bttv
*btv
, unsigned int input
)
3172 unsigned int inmux
= input
% 4;
3173 gpio_inout( 3<<9, 3<<9 );
3174 gpio_bits( 3<<9, inmux
<<9 );
3177 /* ----------------------------------------------------------------------- */
3179 static void bttv_reset_audio(struct bttv
*btv
)
3182 * BT878A has a audio-reset register.
3183 * 1. This register is an audio reset function but it is in
3184 * function-0 (video capture) address space.
3185 * 2. It is enough to do this once per power-up of the card.
3186 * 3. There is a typo in the Conexant doc -- it is not at
3187 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3188 * --//Shrikumar 030609
3194 printk("bttv%d: BT878A ARESET\n",btv
->c
.nr
);
3195 btwrite((1<<7), 0x058);
3200 /* initialization part one -- before registering i2c bus */
3201 void __devinit
bttv_init_card1(struct bttv
*btv
)
3203 switch (btv
->c
.type
) {
3204 case BTTV_BOARD_HAUPPAUGE
:
3205 case BTTV_BOARD_HAUPPAUGE878
:
3206 boot_msp34xx(btv
,5);
3208 case BTTV_BOARD_VOODOOTV_FM
:
3209 boot_msp34xx(btv
,20);
3211 case BTTV_BOARD_AVERMEDIA98
:
3212 boot_msp34xx(btv
,11);
3214 case BTTV_BOARD_HAUPPAUGEPVR
:
3217 case BTTV_BOARD_TWINHAN_DST
:
3218 case BTTV_BOARD_AVDVBT_771
:
3219 case BTTV_BOARD_PINNACLESAT
:
3220 btv
->use_i2c_hw
= 1;
3222 case BTTV_BOARD_ADLINK_RTV24
:
3227 if (!bttv_tvcards
[btv
->c
.type
].has_dvb
)
3228 bttv_reset_audio(btv
);
3231 /* initialization part two -- after registering i2c bus */
3232 void __devinit
bttv_init_card2(struct bttv
*btv
)
3235 int addr
=ADDR_UNSET
;
3237 btv
->tuner_type
= -1;
3239 if (BTTV_BOARD_UNKNOWN
== btv
->c
.type
) {
3240 bttv_readee(btv
,eeprom_data
,0xa0);
3241 identify_by_eeprom(btv
,eeprom_data
);
3244 switch (btv
->c
.type
) {
3245 case BTTV_BOARD_MIRO
:
3246 case BTTV_BOARD_MIROPRO
:
3247 case BTTV_BOARD_PINNACLE
:
3248 case BTTV_BOARD_PINNACLEPRO
:
3250 miro_pinnacle_gpio(btv
);
3252 case BTTV_BOARD_FLYVIDEO_98
:
3253 case BTTV_BOARD_MAXI
:
3254 case BTTV_BOARD_LIFE_FLYKIT
:
3255 case BTTV_BOARD_FLYVIDEO
:
3256 case BTTV_BOARD_TYPHOON_TVIEW
:
3257 case BTTV_BOARD_CHRONOS_VS2
:
3258 case BTTV_BOARD_FLYVIDEO_98FM
:
3259 case BTTV_BOARD_FLYVIDEO2000
:
3260 case BTTV_BOARD_FLYVIDEO98EZ
:
3261 case BTTV_BOARD_CONFERENCETV
:
3262 case BTTV_BOARD_LIFETEC_9415
:
3265 case BTTV_BOARD_HAUPPAUGE
:
3266 case BTTV_BOARD_HAUPPAUGE878
:
3267 case BTTV_BOARD_HAUPPAUGEPVR
:
3268 /* pick up some config infos from the eeprom */
3269 bttv_readee(btv
,eeprom_data
,0xa0);
3270 hauppauge_eeprom(btv
);
3272 case BTTV_BOARD_AVERMEDIA98
:
3273 case BTTV_BOARD_AVPHONE98
:
3274 bttv_readee(btv
,eeprom_data
,0xa0);
3275 avermedia_eeprom(btv
);
3277 case BTTV_BOARD_PXC200
:
3280 case BTTV_BOARD_PICOLO_TETRA_CHIP
:
3281 picolo_tetra_init(btv
);
3283 case BTTV_BOARD_VHX
:
3285 btv
->has_matchbox
= 1;
3286 btv
->mbox_we
= 0x20;
3288 btv
->mbox_clk
= 0x08;
3289 btv
->mbox_data
= 0x10;
3290 btv
->mbox_mask
= 0x38;
3292 case BTTV_BOARD_VOBIS_BOOSTAR
:
3293 case BTTV_BOARD_TERRATV
:
3294 terratec_active_radio_upgrade(btv
);
3296 case BTTV_BOARD_MAGICTVIEW061
:
3297 if (btv
->cardid
== 0x3002144f) {
3299 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv
->c
.nr
);
3302 case BTTV_BOARD_STB2
:
3303 if (btv
->cardid
== 0x3060121a) {
3304 /* Fix up entry for 3DFX VoodooTV 100,
3305 which is an OEM STB card variant. */
3307 btv
->tuner_type
=TUNER_TEMIC_NTSC
;
3310 case BTTV_BOARD_OSPREY1x0
:
3311 case BTTV_BOARD_OSPREY1x0_848
:
3312 case BTTV_BOARD_OSPREY101_848
:
3313 case BTTV_BOARD_OSPREY1x1
:
3314 case BTTV_BOARD_OSPREY1x1_SVID
:
3315 case BTTV_BOARD_OSPREY2xx
:
3316 case BTTV_BOARD_OSPREY2x0_SVID
:
3317 case BTTV_BOARD_OSPREY2x0
:
3318 case BTTV_BOARD_OSPREY500
:
3319 case BTTV_BOARD_OSPREY540
:
3320 case BTTV_BOARD_OSPREY2000
:
3321 bttv_readee(btv
,eeprom_data
,0xa0);
3324 case BTTV_BOARD_IDS_EAGLE
:
3325 init_ids_eagle(btv
);
3327 case BTTV_BOARD_MODTEC_205
:
3328 bttv_readee(btv
,eeprom_data
,0xa0);
3331 case BTTV_BOARD_LMLBT4
:
3334 case BTTV_BOARD_TIBET_CS16
:
3335 tibetCS16_init(btv
);
3337 case BTTV_BOARD_KODICOM_4400R
:
3338 kodicom4400r_init(btv
);
3342 /* pll configuration */
3343 if (!(btv
->id
==848 && btv
->revision
==0x11)) {
3344 /* defaults from card list */
3345 if (PLL_28
== bttv_tvcards
[btv
->c
.type
].pll
) {
3346 btv
->pll
.pll_ifreq
=28636363;
3347 btv
->pll
.pll_crystal
=BT848_IFORM_XT0
;
3349 if (PLL_35
== bttv_tvcards
[btv
->c
.type
].pll
) {
3350 btv
->pll
.pll_ifreq
=35468950;
3351 btv
->pll
.pll_crystal
=BT848_IFORM_XT1
;
3353 /* insmod options can override */
3354 switch (pll
[btv
->c
.nr
]) {
3356 btv
->pll
.pll_crystal
= 0;
3357 btv
->pll
.pll_ifreq
= 0;
3358 btv
->pll
.pll_ofreq
= 0;
3360 case 1: /* 28 MHz */
3362 btv
->pll
.pll_ifreq
= 28636363;
3363 btv
->pll
.pll_ofreq
= 0;
3364 btv
->pll
.pll_crystal
= BT848_IFORM_XT0
;
3366 case 2: /* 35 MHz */
3368 btv
->pll
.pll_ifreq
= 35468950;
3369 btv
->pll
.pll_ofreq
= 0;
3370 btv
->pll
.pll_crystal
= BT848_IFORM_XT1
;
3374 btv
->pll
.pll_current
= -1;
3376 /* tuner configuration (from card list / autodetect / insmod option) */
3377 if (ADDR_UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_addr
)
3378 addr
= bttv_tvcards
[btv
->c
.type
].tuner_addr
;
3380 if (UNSET
!= bttv_tvcards
[btv
->c
.type
].tuner_type
)
3381 if(UNSET
== btv
->tuner_type
)
3382 btv
->tuner_type
= bttv_tvcards
[btv
->c
.type
].tuner_type
;
3383 if (UNSET
!= tuner
[btv
->c
.nr
])
3384 btv
->tuner_type
= tuner
[btv
->c
.nr
];
3385 printk("bttv%d: using tuner=%d\n",btv
->c
.nr
,btv
->tuner_type
);
3387 if (btv
->tuner_type
!= UNSET
) {
3388 struct tuner_setup tun_setup
;
3390 tun_setup
.mode_mask
= T_ANALOG_TV
| T_DIGITAL_TV
;
3391 tun_setup
.type
= btv
->tuner_type
;
3392 tun_setup
.addr
= addr
;
3394 bttv_call_i2c_clients(btv
, TUNER_SET_TYPE_ADDR
, &tun_setup
);
3397 if (btv
->tda9887_conf
) {
3398 bttv_call_i2c_clients(btv
, TDA9887_SET_CONFIG
,
3399 &btv
->tda9887_conf
);
3402 btv
->svhs
= bttv_tvcards
[btv
->c
.type
].svhs
;
3403 if (svhs
[btv
->c
.nr
] != UNSET
)
3404 btv
->svhs
= svhs
[btv
->c
.nr
];
3405 if (remote
[btv
->c
.nr
] != UNSET
)
3406 btv
->has_remote
= remote
[btv
->c
.nr
];
3408 if (bttv_tvcards
[btv
->c
.type
].has_radio
)
3410 if (bttv_tvcards
[btv
->c
.type
].has_remote
)
3412 if (!bttv_tvcards
[btv
->c
.type
].no_gpioirq
)
3414 if (bttv_tvcards
[btv
->c
.type
].audio_hook
)
3415 btv
->audio_hook
=bttv_tvcards
[btv
->c
.type
].audio_hook
;
3417 if (bttv_tvcards
[btv
->c
.type
].digital_mode
== DIGITAL_MODE_CAMERA
) {
3418 /* detect Bt832 chip for quartzsight digital camera */
3419 if ((bttv_I2CRead(btv
, I2C_BT832_ALT1
, "Bt832") >=0) ||
3420 (bttv_I2CRead(btv
, I2C_BT832_ALT2
, "Bt832") >=0))
3427 /* try to detect audio/fader chips */
3428 if (!bttv_tvcards
[btv
->c
.type
].no_msp34xx
&&
3429 bttv_I2CRead(btv
, I2C_MSP3400
, "MSP34xx") >=0)
3430 request_module("msp3400");
3432 if (bttv_tvcards
[btv
->c
.type
].msp34xx_alt
&&
3433 bttv_I2CRead(btv
, I2C_MSP3400_ALT
, "MSP34xx (alternate address)") >=0)
3434 request_module("msp3400");
3436 if (!bttv_tvcards
[btv
->c
.type
].no_tda9875
&&
3437 bttv_I2CRead(btv
, I2C_TDA9875
, "TDA9875") >=0)
3438 request_module("tda9875");
3440 if (!bttv_tvcards
[btv
->c
.type
].no_tda7432
&&
3441 bttv_I2CRead(btv
, I2C_TDA7432
, "TDA7432") >=0)
3442 request_module("tda7432");
3444 if (bttv_tvcards
[btv
->c
.type
].needs_tvaudio
)
3445 request_module("tvaudio");
3449 if (btv
->tda9887_conf
)
3451 if (0 == tda9887
&& 0 == bttv_tvcards
[btv
->c
.type
].has_dvb
&&
3452 bttv_I2CRead(btv
, I2C_TDA9887
, "TDA9887") >=0)
3454 /* Hybrid DVB card, DOES have a tda9887 */
3455 if (btv
->c
.type
== BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE
)
3457 if((btv
->tuner_type
== TUNER_PHILIPS_FM1216ME_MK3
) ||
3458 (btv
->tuner_type
== TUNER_PHILIPS_FM1236_MK3
) ||
3459 (btv
->tuner_type
== TUNER_PHILIPS_FM1256_IH3
) ||
3461 request_module("tda9887");
3462 if (btv
->tuner_type
!= UNSET
)
3463 request_module("tuner");
3467 /* ----------------------------------------------------------------------- */
3469 static void modtec_eeprom(struct bttv
*btv
)
3471 if( strncmp(&(eeprom_data
[0x1e]),"Temic 4066 FY5",14) ==0) {
3472 btv
->tuner_type
=TUNER_TEMIC_4066FY5_PAL_I
;
3473 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3474 btv
->c
.nr
,&eeprom_data
[0x1e]);
3475 } else if (strncmp(&(eeprom_data
[0x1e]),"Alps TSBB5",10) ==0) {
3476 btv
->tuner_type
=TUNER_ALPS_TSBB5_PAL_I
;
3477 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3478 btv
->c
.nr
,&eeprom_data
[0x1e]);
3479 } else if (strncmp(&(eeprom_data
[0x1e]),"Philips FM1246",14) ==0) {
3480 btv
->tuner_type
=TUNER_PHILIPS_NTSC
;
3481 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3482 btv
->c
.nr
,&eeprom_data
[0x1e]);
3484 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3485 btv
->c
.nr
,&eeprom_data
[0x1e]);
3489 static void __devinit
hauppauge_eeprom(struct bttv
*btv
)
3493 tveeprom_hauppauge_analog(&btv
->i2c_client
, &tv
, eeprom_data
);
3494 btv
->tuner_type
= tv
.tuner_type
;
3495 btv
->has_radio
= tv
.has_radio
;
3497 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3498 btv
->c
.nr
, tv
.model
);
3501 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3502 * type based on model #.
3504 if(tv
.model
== 64900) {
3505 printk("bttv%d: Switching board type from %s to %s\n",
3507 bttv_tvcards
[btv
->c
.type
].name
,
3508 bttv_tvcards
[BTTV_BOARD_HAUPPAUGE_IMPACTVCB
].name
);
3509 btv
->c
.type
= BTTV_BOARD_HAUPPAUGE_IMPACTVCB
;
3513 static int terratec_active_radio_upgrade(struct bttv
*btv
)
3518 btv
->has_matchbox
= 1;
3519 btv
->mbox_we
= 0x10;
3520 btv
->mbox_most
= 0x20;
3521 btv
->mbox_clk
= 0x08;
3522 btv
->mbox_data
= 0x04;
3523 btv
->mbox_mask
= 0x3c;
3525 btv
->mbox_iow
= 1 << 8;
3526 btv
->mbox_ior
= 1 << 9;
3527 btv
->mbox_csel
= 1 << 10;
3530 tea5757_write(btv
, 5 * freq
+ 0x358); /* write 0x1ed8 */
3531 if (0x1ed8 == tea5757_read(btv
)) {
3532 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3535 btv
->has_matchbox
= 1;
3538 btv
->has_matchbox
= 0;
3544 /* ----------------------------------------------------------------------- */
3547 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3549 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3550 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3551 * unpacked with unzip).
3553 #define PVR_GPIO_DELAY 10
3555 #define BTTV_ALT_DATA 0x000001
3556 #define BTTV_ALT_DCLK 0x100000
3557 #define BTTV_ALT_NCONFIG 0x800000
3559 static int __devinit
pvr_altera_load(struct bttv
*btv
, u8
*micro
, u32 microlen
)
3565 gpio_inout(0xffffff,BTTV_ALT_DATA
|BTTV_ALT_DCLK
|BTTV_ALT_NCONFIG
);
3567 udelay(PVR_GPIO_DELAY
);
3569 gpio_write(BTTV_ALT_NCONFIG
);
3570 udelay(PVR_GPIO_DELAY
);
3572 for (n
= 0; n
< microlen
; n
++) {
3574 for ( i
= 0 ; i
< 8 ; i
++ ) {
3575 gpio_bits(BTTV_ALT_DCLK
,0);
3577 gpio_bits(BTTV_ALT_DATA
,BTTV_ALT_DATA
);
3579 gpio_bits(BTTV_ALT_DATA
,0);
3580 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3584 gpio_bits(BTTV_ALT_DCLK
,0);
3585 udelay(PVR_GPIO_DELAY
);
3587 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3588 for (i
= 0 ; i
< 30 ; i
++) {
3589 gpio_bits(BTTV_ALT_DCLK
,0);
3590 gpio_bits(BTTV_ALT_DCLK
,BTTV_ALT_DCLK
);
3592 gpio_bits(BTTV_ALT_DCLK
,0);
3596 static int __devinit
pvr_boot(struct bttv
*btv
)
3598 const struct firmware
*fw_entry
;
3601 rc
= request_firmware(&fw_entry
, "hcwamc.rbf", &btv
->c
.pci
->dev
);
3603 printk(KERN_WARNING
"bttv%d: no altera firmware [via hotplug]\n",
3607 rc
= pvr_altera_load(btv
, fw_entry
->data
, fw_entry
->size
);
3608 printk(KERN_INFO
"bttv%d: altera firmware upload %s\n",
3609 btv
->c
.nr
, (rc
< 0) ? "failed" : "ok");
3610 release_firmware(fw_entry
);
3614 /* ----------------------------------------------------------------------- */
3615 /* some osprey specific stuff */
3617 static void __devinit
osprey_eeprom(struct bttv
*btv
)
3620 unsigned char *ee
= eeprom_data
;
3621 unsigned long serial
= 0;
3623 if (btv
->c
.type
== 0) {
3624 /* this might be an antique... check for MMAC label in eeprom */
3625 if ((ee
[0]=='M') && (ee
[1]=='M') && (ee
[2]=='A') && (ee
[3]=='C')) {
3626 unsigned char checksum
= 0;
3627 for (i
=0; i
<21; i
++)
3629 if (checksum
!= ee
[21])
3631 btv
->c
.type
= BTTV_BOARD_OSPREY1x0_848
;
3632 for (i
= 12; i
< 21; i
++)
3633 serial
*= 10, serial
+= ee
[i
] - '0';
3636 unsigned short type
;
3639 for(; offset
< 8*16; offset
+= 16) {
3640 unsigned short checksum
= 0;
3641 /* verify the checksum */
3642 for(i
= 0; i
<14; i
++) checksum
+= ee
[i
+offset
];
3643 checksum
= ~checksum
; /* no idea why */
3644 if ((((checksum
>>8)&0x0FF) == ee
[offset
+14]) &&
3645 ((checksum
& 0x0FF) == ee
[offset
+15])) {
3653 /* found a valid descriptor */
3654 type
= (ee
[offset
+4]<<8) | (ee
[offset
+5]);
3660 btv
->c
.type
= BTTV_BOARD_OSPREY1x0_848
;
3663 btv
->c
.type
= BTTV_BOARD_OSPREY101_848
;
3669 btv
->c
.type
= BTTV_BOARD_OSPREY1x0
;
3673 btv
->c
.type
= BTTV_BOARD_OSPREY1x1
;
3678 btv
->c
.type
= BTTV_BOARD_OSPREY1x1_SVID
;
3684 btv
->c
.type
= BTTV_BOARD_OSPREY2xx
;
3688 btv
->c
.type
= BTTV_BOARD_OSPREY2x0_SVID
;
3691 btv
->c
.type
= BTTV_BOARD_OSPREY500
;
3695 btv
->c
.type
= BTTV_BOARD_OSPREY540
;
3696 /* bttv_osprey_540_init(btv); */
3700 btv
->c
.type
= BTTV_BOARD_OSPREY2x0
;
3701 /* enable output on select control lines */
3702 gpio_inout(0xffffff,0x000303);
3705 /* unknown...leave generic, but get serial # */
3708 serial
= (ee
[offset
+6] << 24)
3709 | (ee
[offset
+7] << 16)
3710 | (ee
[offset
+8] << 8)
3714 printk(KERN_INFO
"bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n",
3715 btv
->c
.nr
, btv
->c
.type
, bttv_tvcards
[btv
->c
.type
].name
,serial
);
3718 /* ----------------------------------------------------------------------- */
3719 /* AVermedia specific stuff, from bktr_card.c */
3721 static int tuner_0_table
[] = {
3722 TUNER_PHILIPS_NTSC
, TUNER_PHILIPS_PAL
/* PAL-BG*/,
3723 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
/* PAL-I*/,
3724 TUNER_PHILIPS_PAL
, TUNER_PHILIPS_PAL
,
3725 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_SECAM
,
3726 TUNER_PHILIPS_SECAM
, TUNER_PHILIPS_PAL
,
3727 TUNER_PHILIPS_FM1216ME_MK3
};
3729 static int tuner_1_table
[] = {
3730 TUNER_TEMIC_NTSC
, TUNER_TEMIC_PAL
,
3731 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
3732 TUNER_TEMIC_PAL
, TUNER_TEMIC_PAL
,
3733 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_4012FY5
, /* TUNER_TEMIC_SECAM */
3734 TUNER_TEMIC_4012FY5
, TUNER_TEMIC_PAL
};
3736 static void __devinit
avermedia_eeprom(struct bttv
*btv
)
3738 int tuner_make
,tuner_tv_fm
,tuner_format
,tuner
=0;
3740 tuner_make
= (eeprom_data
[0x41] & 0x7);
3741 tuner_tv_fm
= (eeprom_data
[0x41] & 0x18) >> 3;
3742 tuner_format
= (eeprom_data
[0x42] & 0xf0) >> 4;
3743 btv
->has_remote
= (eeprom_data
[0x42] & 0x01);
3745 if (tuner_make
== 0 || tuner_make
== 2)
3746 if(tuner_format
<=0x0a)
3747 tuner
= tuner_0_table
[tuner_format
];
3748 if (tuner_make
== 1)
3749 if(tuner_format
<=9)
3750 tuner
= tuner_1_table
[tuner_format
];
3752 if (tuner_make
== 4)
3753 if(tuner_format
== 0x09)
3754 tuner
= TUNER_LG_NTSC_NEW_TAPC
; /* TAPC-G702P */
3756 printk(KERN_INFO
"bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3757 btv
->c
.nr
,eeprom_data
[0x41],eeprom_data
[0x42]);
3759 btv
->tuner_type
=tuner
;
3762 printk("Unknown type");
3763 printk(" radio:%s remote control:%s\n",
3764 tuner_tv_fm
? "yes" : "no",
3765 btv
->has_remote
? "yes" : "no");
3768 /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3769 void bttv_tda9880_setnorm(struct bttv
*btv
, int norm
)
3771 /* fix up our card entry */
3772 if(norm
==VIDEO_MODE_NTSC
) {
3773 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[0]=0x957fff;
3774 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[4]=0x957fff;
3775 dprintk("bttv_tda9880_setnorm to NTSC\n");
3778 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[0]=0x947fff;
3779 bttv_tvcards
[BTTV_BOARD_VOODOOTV_FM
].audiomux
[4]=0x947fff;
3780 dprintk("bttv_tda9880_setnorm to PAL\n");
3782 /* set GPIO according */
3783 gpio_bits(bttv_tvcards
[btv
->c
.type
].gpiomask
,
3784 bttv_tvcards
[btv
->c
.type
].audiomux
[btv
->audio
]);
3789 * reset/enable the MSP on some Hauppauge cards
3790 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
3795 static void __devinit
boot_msp34xx(struct bttv
*btv
, int pin
)
3797 int mask
= (1 << pin
);
3799 gpio_inout(mask
,mask
);
3802 gpio_bits(mask
,mask
);
3805 bttv_gpio_tracking(btv
,"msp34xx");
3807 printk(KERN_INFO
"bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3808 "init [%d]\n", btv
->c
.nr
, pin
);
3811 static void __devinit
boot_bt832(struct bttv
*btv
)
3815 /* ----------------------------------------------------------------------- */
3816 /* Imagenation L-Model PXC200 Framegrabber */
3817 /* This is basically the same procedure as
3818 * used by Alessandro Rubini in his pxc200
3819 * driver, but using BTTV functions */
3821 static void __devinit
init_PXC200(struct bttv
*btv
)
3823 static int vals
[] __devinitdata
= { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3824 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3830 /* Initialise GPIO-connevted stuff */
3831 gpio_inout(0xffffff, (1<<13));
3835 /* GPIO inputs are pulled up, so no need to drive
3836 * reset pin any longer */
3837 gpio_bits(0xffffff, 0);
3839 bttv_gpio_tracking(btv
,"pxc200");
3841 /* we could/should try and reset/control the AD pots? but
3842 right now we simply turned off the crushing. Without
3843 this the AGC drifts drifts
3844 remember the EN is reverse logic -->
3845 setting BT848_ADC_AGC_EN disable the AGC
3846 tboult@eecs.lehigh.edu
3849 btwrite(BT848_ADC_RESERVED
|BT848_ADC_AGC_EN
, BT848_ADC
);
3851 /* Initialise MAX517 DAC */
3852 printk(KERN_INFO
"Setting DAC reference voltage level ...\n");
3853 bttv_I2CWrite(btv
,0x5E,0,0x80,1);
3855 /* Initialise 12C508 PIC */
3856 /* The I2CWrite and I2CRead commmands are actually to the
3857 * same chips - but the R/W bit is included in the address
3858 * argument so the numbers are different */
3861 printk(KERN_INFO
"Initialising 12C508 PIC chip ...\n");
3863 /* First of all, enable the clock line. This is used in the PXC200-F */
3864 val
= btread(BT848_GPIO_DMA_CTL
);
3865 val
|= BT848_GPIO_DMA_CTL_GPCLKMODE
;
3866 btwrite(val
, BT848_GPIO_DMA_CTL
);
3868 /* Then, push to 0 the reset pin long enough to reset the *
3869 * device same as above for the reset line, but not the same
3870 * value sent to the GPIO-connected stuff
3871 * which one is the good one? */
3872 gpio_inout(0xffffff,(1<<2));
3877 for (i
= 0; i
< ARRAY_SIZE(vals
); i
++) {
3878 tmp
=bttv_I2CWrite(btv
,0x1E,0,vals
[i
],1);
3881 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3882 vals
[i
],tmp
,bttv_I2CRead(btv
,0x1F,NULL
));
3886 printk(KERN_INFO
"PXC200 Initialised.\n");
3891 /* ----------------------------------------------------------------------- */
3893 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3894 * it. This apparently involves the following procedure for each 878 chip:
3896 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3898 * 2) write to GPIO_DATA
3904 * read from GPIO_DATA into buf (uint_32)
3905 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3906 * error. ERROR_CPLD_Check_Failed stop.
3908 * 3) write to GPIO_DATA
3909 * - write 0x4400 + 0x0E
3911 * - write 0x4410 + 0x0E
3914 * read from GPIO_DATA into buf (uint_32)
3915 * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 )
3916 * error. ERROR_CPLD_Check_Failed.
3918 /* ----------------------------------------------------------------------- */
3920 init_RTV24 (struct bttv
*btv
)
3922 uint32_t dataRead
= 0;
3923 long watchdog_value
= 0x0E;
3926 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
3929 btwrite (0x00c3feff, BT848_GPIO_OUT_EN
);
3931 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
3933 btwrite (0x10 + watchdog_value
, BT848_GPIO_DATA
);
3935 btwrite (0 + watchdog_value
, BT848_GPIO_DATA
);
3937 dataRead
= btread (BT848_GPIO_DATA
);
3939 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 1)) {
3941 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
3942 btv
->c
.nr
, dataRead
);
3945 btwrite (0x4400 + watchdog_value
, BT848_GPIO_DATA
);
3947 btwrite (0x4410 + watchdog_value
, BT848_GPIO_DATA
);
3949 btwrite (watchdog_value
, BT848_GPIO_DATA
);
3951 dataRead
= btread (BT848_GPIO_DATA
);
3953 if ((((dataRead
>> 18) & 0x01) != 0) || (((dataRead
>> 19) & 0x01) != 0)) {
3955 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
3956 btv
->c
.nr
, dataRead
);
3962 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv
->c
.nr
);
3967 /* ----------------------------------------------------------------------- */
3968 /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
3970 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
3971 * This code is placed under the terms of the GNU General Public License
3973 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
3976 static void bus_low(struct bttv
*btv
, int bit
)
3978 if (btv
->mbox_ior
) {
3979 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3980 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
3987 if (btv
->mbox_ior
) {
3988 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
3993 static void bus_high(struct bttv
*btv
, int bit
)
3995 if (btv
->mbox_ior
) {
3996 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
3997 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
4004 if (btv
->mbox_ior
) {
4005 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
4010 static int bus_in(struct bttv
*btv
, int bit
)
4012 if (btv
->mbox_ior
) {
4013 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
4014 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
4017 gpio_bits(btv
->mbox_iow
| btv
->mbox_csel
, 0);
4020 return gpio_read() & (bit
);
4023 /* TEA5757 register bits */
4024 #define TEA_FREQ 0:14
4025 #define TEA_BUFFER 15:15
4027 #define TEA_SIGNAL_STRENGTH 16:17
4029 #define TEA_PORT1 18:18
4030 #define TEA_PORT0 19:19
4032 #define TEA_BAND 20:21
4033 #define TEA_BAND_FM 0
4034 #define TEA_BAND_MW 1
4035 #define TEA_BAND_LW 2
4036 #define TEA_BAND_SW 3
4038 #define TEA_MONO 22:22
4039 #define TEA_ALLOW_STEREO 0
4040 #define TEA_FORCE_MONO 1
4042 #define TEA_SEARCH_DIRECTION 23:23
4043 #define TEA_SEARCH_DOWN 0
4044 #define TEA_SEARCH_UP 1
4046 #define TEA_STATUS 24:24
4047 #define TEA_STATUS_TUNED 0
4048 #define TEA_STATUS_SEARCHING 1
4050 /* Low-level stuff */
4051 static int tea5757_read(struct bttv
*btv
)
4053 unsigned long timeout
;
4057 /* better safe than sorry */
4058 gpio_inout(btv
->mbox_mask
, btv
->mbox_clk
| btv
->mbox_we
);
4060 if (btv
->mbox_ior
) {
4061 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
4062 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
4067 bttv_gpio_tracking(btv
,"tea5757 read");
4069 bus_low(btv
,btv
->mbox_we
);
4070 bus_low(btv
,btv
->mbox_clk
);
4073 timeout
= jiffies
+ HZ
;
4075 /* wait for DATA line to go low; error if it doesn't */
4076 while (bus_in(btv
,btv
->mbox_data
) && time_before(jiffies
, timeout
))
4078 if (bus_in(btv
,btv
->mbox_data
)) {
4079 printk(KERN_WARNING
"bttv%d: tea5757: read timeout\n",btv
->c
.nr
);
4083 dprintk("bttv%d: tea5757:",btv
->c
.nr
);
4084 for(i
= 0; i
< 24; i
++)
4087 bus_high(btv
,btv
->mbox_clk
);
4089 dprintk("%c",(bus_in(btv
,btv
->mbox_most
) == 0)?'T':'-');
4090 bus_low(btv
,btv
->mbox_clk
);
4092 value
|= (bus_in(btv
,btv
->mbox_data
) == 0)?0:1; /* MSB first */
4093 dprintk("%c", (bus_in(btv
,btv
->mbox_most
) == 0)?'S':'M');
4095 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv
->c
.nr
, value
);
4099 static int tea5757_write(struct bttv
*btv
, int value
)
4104 gpio_inout(btv
->mbox_mask
, btv
->mbox_clk
| btv
->mbox_we
| btv
->mbox_data
);
4106 if (btv
->mbox_ior
) {
4107 gpio_bits(btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
,
4108 btv
->mbox_ior
| btv
->mbox_iow
| btv
->mbox_csel
);
4112 bttv_gpio_tracking(btv
,"tea5757 write");
4114 dprintk("bttv%d: tea5757: write 0x%X\n", btv
->c
.nr
, value
);
4115 bus_low(btv
,btv
->mbox_clk
);
4116 bus_high(btv
,btv
->mbox_we
);
4117 for(i
= 0; i
< 25; i
++)
4119 if (reg
& 0x1000000)
4120 bus_high(btv
,btv
->mbox_data
);
4122 bus_low(btv
,btv
->mbox_data
);
4124 bus_high(btv
,btv
->mbox_clk
);
4126 bus_low(btv
,btv
->mbox_clk
);
4129 bus_low(btv
,btv
->mbox_we
); /* unmute !!! */
4133 void tea5757_set_freq(struct bttv
*btv
, unsigned short freq
)
4135 dprintk("tea5757_set_freq %d\n",freq
);
4136 tea5757_write(btv
, 5 * freq
+ 0x358); /* add 10.7MHz (see docs) */
4140 /* ----------------------------------------------------------------------- */
4143 static void winview_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4145 /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */
4146 int bits_out
, loops
, vol
, data
;
4149 /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */
4150 v
->flags
|= VIDEO_AUDIO_VOLUME
;
4154 /* 32 levels logarithmic */
4155 vol
= 32 - ((v
->volume
>>11));
4157 bits_out
= (PT2254_DBS_IN_2
>>(vol
%5));
4159 bits_out
|= (PT2254_DBS_IN_10
>>(vol
/5));
4160 bits_out
|= PT2254_L_CHANNEL
| PT2254_R_CHANNEL
;
4162 data
&= ~(WINVIEW_PT2254_CLK
| WINVIEW_PT2254_DATA
|
4163 WINVIEW_PT2254_STROBE
);
4164 for (loops
= 17; loops
>= 0 ; loops
--) {
4165 if (bits_out
& (1<<loops
))
4166 data
|= WINVIEW_PT2254_DATA
;
4168 data
&= ~WINVIEW_PT2254_DATA
;
4171 data
|= WINVIEW_PT2254_CLK
;
4174 data
&= ~WINVIEW_PT2254_CLK
;
4177 data
|= WINVIEW_PT2254_STROBE
;
4178 data
&= ~WINVIEW_PT2254_DATA
;
4181 data
&= ~WINVIEW_PT2254_STROBE
;
4185 /* ----------------------------------------------------------------------- */
4186 /* mono/stereo control for various cards (which don't use i2c chips but */
4187 /* connect something to the GPIO pins */
4190 gvbctv3pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4192 unsigned int con
= 0;
4195 gpio_inout(0x300, 0x300);
4196 if (v
->mode
& VIDEO_SOUND_LANG1
)
4198 if (v
->mode
& VIDEO_SOUND_LANG2
)
4200 if (v
->mode
& VIDEO_SOUND_STEREO
)
4202 /* if (v->mode & VIDEO_SOUND_MONO)
4204 gpio_bits(0x300, con
);
4206 v
->mode
= VIDEO_SOUND_STEREO
|
4207 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4212 gvbctv5pci_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4214 unsigned int val
, con
;
4216 if (btv
->radio_user
)
4222 if (v
->mode
& VIDEO_SOUND_LANG2
) {
4223 if (v
->mode
& VIDEO_SOUND_LANG1
) {
4232 if (con
!= (val
& 0x300)) {
4233 gpio_bits(0x300, con
);
4235 bttv_gpio_tracking(btv
,"gvbctv5pci");
4238 switch (val
& 0x70) {
4240 v
->mode
= VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4243 v
->mode
= VIDEO_SOUND_LANG2
;
4246 v
->mode
= VIDEO_SOUND_LANG1
;
4249 v
->mode
= VIDEO_SOUND_STEREO
;
4252 v
->mode
= VIDEO_SOUND_MONO
;
4255 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4256 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4262 * Mario Medina Nussbaum <medisoft@alohabbs.org.mx>
4263 * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo,
4264 * 0xdde enables mono and 0xccd enables sap
4266 * Petr Vandrovec <VANDROVE@vc.cvut.cz>
4267 * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select
4268 * input/output sound connection, so both must be set for output mode.
4270 * Looks like it's needed only for the "tvphone", the "tvphone 98"
4271 * handles this with a tda9840
4275 avermedia_tvphone_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4280 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4282 if (v
->mode
& VIDEO_SOUND_STEREO
)
4285 gpio_bits(0x03,val
);
4287 bttv_gpio_tracking(btv
,"avermedia");
4290 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4297 avermedia_tv_stereo_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4302 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4304 if (v
->mode
& VIDEO_SOUND_STEREO
) /* STEREO */
4306 btaor(val
, ~0x03, BT848_GPIO_DATA
);
4308 bttv_gpio_tracking(btv
,"avermedia");
4310 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4311 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4316 /* Lifetec 9415 handling */
4318 lt9415_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4322 if (gpio_read() & 0x4000) {
4323 v
->mode
= VIDEO_SOUND_MONO
;
4328 if (v
->mode
& VIDEO_SOUND_LANG2
) /* A2 SAP */
4330 if (v
->mode
& VIDEO_SOUND_STEREO
) /* A2 stereo */
4332 if ((v
->mode
& VIDEO_SOUND_LANG1
) ||
4333 (v
->mode
& VIDEO_SOUND_MONO
))
4335 gpio_bits(0x0880, val
);
4337 bttv_gpio_tracking(btv
,"lt9415");
4339 /* autodetect doesn't work with this card :-( */
4340 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4341 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4346 /* TDA9821 on TerraTV+ Bt848, Bt878 */
4348 terratv_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4350 unsigned int con
= 0;
4353 gpio_inout(0x180000,0x180000);
4354 if (v
->mode
& VIDEO_SOUND_LANG2
)
4356 if (v
->mode
& VIDEO_SOUND_STEREO
)
4358 gpio_bits(0x180000, con
);
4360 bttv_gpio_tracking(btv
,"terratv");
4362 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4363 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4368 winfast2000_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4370 unsigned long val
= 0;
4373 /*btor (0xc32000, BT848_GPIO_OUT_EN);*/
4374 if (v
->mode
& VIDEO_SOUND_MONO
) /* Mono */
4376 if (v
->mode
& VIDEO_SOUND_LANG1
) /* Mono */
4378 if (v
->mode
& VIDEO_SOUND_LANG2
) /* SAP */
4380 if (v
->mode
& VIDEO_SOUND_STEREO
) /* Stereo */
4383 gpio_bits(0x430000, val
);
4385 bttv_gpio_tracking(btv
,"winfast2000");
4388 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4389 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4394 * Dariusz Kowalewski <darekk@automex.pl>
4395 * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM
4396 * revision 9B has on-board TDA9874A sound decoder).
4398 * Note: There are card variants without tda9874a. Forcing the "stereo sound route"
4399 * will mute this cards.
4402 pvbt878p9b_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4404 unsigned int val
= 0;
4406 if (btv
->radio_user
)
4410 if (v
->mode
& VIDEO_SOUND_MONO
) {
4413 if ((v
->mode
& (VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
))
4414 || (v
->mode
& VIDEO_SOUND_STEREO
)) {
4418 gpio_bits(0x03,val
);
4420 bttv_gpio_tracking(btv
,"pvbt878p9b");
4423 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4424 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4429 * Dariusz Kowalewski <darekk@automex.pl>
4430 * sound control for FlyVideo 2000S (with tda9874 decoder)
4431 * based on pvbt878p9b_audio() - this is not tested, please fix!!!
4434 fv2000s_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4436 unsigned int val
= 0xffff;
4438 if (btv
->radio_user
)
4441 if (v
->mode
& VIDEO_SOUND_MONO
) {
4444 if ((v
->mode
& (VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
))
4445 || (v
->mode
& VIDEO_SOUND_STEREO
)) {
4446 val
= 0x1080; /*-dk-???: 0x0880, 0x0080, 0x1800 ... */
4448 if (val
!= 0xffff) {
4449 gpio_bits(0x1800, val
);
4451 bttv_gpio_tracking(btv
,"fv2000s");
4454 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4455 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4460 * sound control for Canopus WinDVR PCI
4461 * Masaki Suzuki <masaki@btree.org>
4464 windvr_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4466 unsigned long val
= 0;
4469 if (v
->mode
& VIDEO_SOUND_MONO
)
4471 if (v
->mode
& VIDEO_SOUND_LANG1
)
4473 if (v
->mode
& VIDEO_SOUND_LANG2
)
4475 if (v
->mode
& VIDEO_SOUND_STEREO
)
4478 gpio_bits(0x140000, val
);
4480 bttv_gpio_tracking(btv
,"windvr");
4483 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4484 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4489 * sound control for AD-TVK503
4490 * Hiroshi Takekawa <sian@big.or.jp>
4493 adtvk503_audio(struct bttv
*btv
, struct video_audio
*v
, int set
)
4495 unsigned int con
= 0xffffff;
4497 /* btaor(0x1e0000, ~0x1e0000, BT848_GPIO_OUT_EN); */
4500 /* btor(***, BT848_GPIO_OUT_EN); */
4501 if (v
->mode
& VIDEO_SOUND_LANG1
)
4503 if (v
->mode
& VIDEO_SOUND_LANG2
)
4505 if (v
->mode
& VIDEO_SOUND_STEREO
)
4507 if (v
->mode
& VIDEO_SOUND_MONO
)
4509 if (con
!= 0xffffff) {
4510 gpio_bits(0x1e0000,con
);
4512 bttv_gpio_tracking(btv
, "adtvk503");
4515 v
->mode
= VIDEO_SOUND_MONO
| VIDEO_SOUND_STEREO
|
4516 VIDEO_SOUND_LANG1
| VIDEO_SOUND_LANG2
;
4520 /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4522 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4523 * switch instead (CD22M3494E). This IC can have multiple active connections
4524 * between Xn (input) and Yn (output) pins. We need to clear any existing
4525 * connection prior to establish a new one, pulsing the STROBE pin.
4527 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4528 * GPIO pins are wired as:
4529 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler)
4530 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler)
4531 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler)
4532 * GPIO[8] - - P3[5] (microcontroler)
4533 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler)
4534 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler)
4535 * GPINTR - - P3[4] (microcontroler)
4537 * The microcontroler is a 80C32 like. It should be possible to change xpoint
4538 * configuration either directly (as we are doing) or using the microcontroler
4539 * which is also wired to I2C interface. I have no further info on the
4540 * microcontroler features, one would need to disassembly the firmware.
4541 * note: the vendor refused to give any information on this product, all
4542 * that stuff was found using a multimeter! :)
4544 static void rv605_muxsel(struct bttv
*btv
, unsigned int input
)
4546 /* reset all conections */
4547 gpio_bits(0x200,0x200);
4549 gpio_bits(0x200,0x000);
4552 /* create a new conection */
4553 gpio_bits(0x480,0x080);
4554 gpio_bits(0x480,0x480);
4556 gpio_bits(0x480,0x080);
4560 /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4562 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4563 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4564 * chips, ten eight input analog multiplexors, a not chip and a few
4567 * 16 inputs on a secondary bracket are provided and can be selected
4568 * from each of the four capture chips. Two of the eight input
4569 * multiplexors are used to select from any of the 16 input signals.
4571 * Unsupported hardware capabilities:
4572 * . A video output monitor on the secondary bracket can be selected from
4573 * one of the 878A chips.
4574 * . Another passthrough but I haven't spent any time investigating it.
4575 * . Digital I/O (logic level connected to GPIO) is available from an
4578 * The on chip input mux should always be set to 2.
4579 * GPIO[16:19] - Video input selection
4580 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4581 * GPIO[?:?] - Digital I/O.
4583 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4584 * determined what function (if any) it provides. With the microcontroller
4585 * and sync seperator chips a guess is that it might have to do with video
4586 * switching and maybe some digital I/O.
4588 static void tibetCS16_muxsel(struct bttv
*btv
, unsigned int input
)
4591 gpio_bits(0x0f0000, input
<< 16);
4594 static void tibetCS16_init(struct bttv
*btv
)
4596 /* enable gpio bits, mask obtained via btSpy */
4597 gpio_inout(0xffffff, 0x0f7fff);
4598 gpio_write(0x0f7fff);
4602 * The following routines for the Kodicom-4400r get a little mind-twisting.
4603 * There is a "master" controller and three "slave" controllers, together
4604 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4605 * The analog switch is controlled by the "master", but the detection order
4606 * of the four BT878A chips is in an order which I just don't understand.
4607 * The "master" is actually the second controller to be detected. The
4608 * logic on the board uses logical numbers for the 4 controlers, but
4609 * those numbers are different from the detection sequence. When working
4610 * with the analog switch, we need to "map" from the detection sequence
4611 * over to the board's logical controller number. This mapping sequence
4612 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4613 * unit 3, the second (which is the master) is logical unit 0, etc.
4614 * We need to maintain the status of the analog switch (which of the 16
4615 * cameras is connected to which of the 4 controllers). Rather than
4616 * add to the bttv structure for this, we use the data reserved for
4617 * the mbox (unused for this card type).
4621 * First a routine to set the analog switch, which controls which camera
4622 * is routed to which controller. The switch comprises an X-address
4623 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4624 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4625 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4626 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4627 * specified address. The idea is to set the address and data, then bring
4628 * STROBE high, and finally bring STROBE back to low.
4630 static void kodicom4400r_write(struct bttv
*btv
,
4631 unsigned char xaddr
,
4632 unsigned char yaddr
,
4633 unsigned char data
) {
4636 udata
= (data
<< 7) | ((yaddr
&3) << 4) | (xaddr
&0xf);
4637 gpio_bits(0x1ff, udata
); /* write ADDR and DAT */
4638 gpio_bits(0x1ff, udata
| (1 << 8)); /* strobe high */
4639 gpio_bits(0x1ff, udata
); /* strobe low */
4643 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4644 * use this routine. The routine finds the "master" for the card, maps
4645 * the controller number from the detected position over to the logical
4646 * number, writes the appropriate data to the analog switch, and housekeeps
4647 * the local copy of the switch information. The parameter 'input' is the
4648 * requested camera number (0 - 15).
4650 static void kodicom4400r_muxsel(struct bttv
*btv
, unsigned int input
)
4655 static unsigned char map
[4] = {3, 0, 2, 1};
4657 mctlr
= master
[btv
->c
.nr
];
4658 if (mctlr
== NULL
) { /* ignore if master not yet detected */
4661 yaddr
= (btv
->c
.nr
- mctlr
->c
.nr
+ 1) & 3; /* the '&' is for safety */
4663 sw_status
= (char *)(&mctlr
->mbox_we
);
4664 xaddr
= input
& 0xf;
4665 /* Check if the controller/camera pair has changed, else ignore */
4666 if (sw_status
[yaddr
] != xaddr
)
4668 /* "open" the old switch, "close" the new one, save the new */
4669 kodicom4400r_write(mctlr
, sw_status
[yaddr
], yaddr
, 0);
4670 sw_status
[yaddr
] = xaddr
;
4671 kodicom4400r_write(mctlr
, xaddr
, yaddr
, 1);
4676 * During initialisation, we need to reset the analog switch. We
4677 * also preset the switch to map the 4 connectors on the card to the
4678 * *user's* (see above description of kodicom4400r_muxsel) channels
4681 static void kodicom4400r_init(struct bttv
*btv
)
4683 char *sw_status
= (char *)(&btv
->mbox_we
);
4686 gpio_inout(0x0003ff, 0x0003ff);
4687 gpio_write(1 << 9); /* reset MUX */
4689 /* Preset camera 0 to the 4 controllers */
4690 for (ix
=0; ix
<4; ix
++) {
4692 kodicom4400r_write(btv
, ix
, ix
, 1);
4695 * Since this is the "master", we need to set up the
4696 * other three controller chips' pointers to this structure
4697 * for later use in the muxsel routine.
4699 if ((btv
->c
.nr
<1) || (btv
->c
.nr
>BTTV_MAX
-3))
4701 master
[btv
->c
.nr
-1] = btv
;
4702 master
[btv
->c
.nr
] = btv
;
4703 master
[btv
->c
.nr
+1] = btv
;
4704 master
[btv
->c
.nr
+2] = btv
;
4707 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4708 * video multiplexers to provide up to 16 video inputs. These
4709 * multiplexers are controlled by the lower 8 GPIO pins of the
4710 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
4712 * xxx0 is pin xxx of multiplexer U5,
4713 * yyy1 is pin yyy of multiplexer U2
4725 static void xguard_muxsel(struct bttv
*btv
, unsigned int input
)
4727 static const int masks
[] = {
4728 ENB0
, ENB0
|IN00
, ENB0
|IN10
, ENB0
|IN00
|IN10
,
4729 ENA0
, ENA0
|IN00
, ENA0
|IN10
, ENA0
|IN00
|IN10
,
4730 ENB1
, ENB1
|IN01
, ENB1
|IN11
, ENB1
|IN01
|IN11
,
4731 ENA1
, ENA1
|IN01
, ENA1
|IN11
, ENA1
|IN01
|IN11
,
4733 gpio_write(masks
[input
%16]);
4735 static void picolo_tetra_init(struct bttv
*btv
)
4737 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4738 btwrite (0x08<<16,BT848_GPIO_DATA
);/*GPIO[19] [==> 4053 B+C] set to 1 */
4739 btwrite (0x04<<16,BT848_GPIO_DATA
);/*GPIO[18] [==> 4053 A] set to 1*/
4741 static void picolo_tetra_muxsel (struct bttv
* btv
, unsigned int input
)
4744 dprintk (KERN_DEBUG
"bttv%d : picolo_tetra_muxsel => input = %d\n",btv
->c
.nr
,input
);
4745 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4746 /*GPIO[20]&GPIO[21] used to choose the right input*/
4747 btwrite (input
<<20,BT848_GPIO_DATA
);
4752 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4754 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4755 * swichers to provide 16 channels to MUX0. The TDA8540's have
4756 * 4 indepedant outputs and as such the IVC120G also has the
4757 * optional "Monitor Out" bus. This allows the card to be looking
4758 * at one input while the monitor is looking at another.
4760 * Since I've couldn't be bothered figuring out how to add an
4761 * independant muxsel for the monitor bus, I've just set it to
4762 * whatever the card is looking at.
4764 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4765 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4767 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4768 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4769 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4770 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4774 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4775 #define I2C_TDA8540 0x90
4776 #define I2C_TDA8540_ALT1 0x92
4777 #define I2C_TDA8540_ALT2 0x94
4778 #define I2C_TDA8540_ALT3 0x96
4779 #define I2C_TDA8540_ALT4 0x98
4780 #define I2C_TDA8540_ALT5 0x9a
4781 #define I2C_TDA8540_ALT6 0x9c
4783 static void ivc120_muxsel(struct bttv
*btv
, unsigned int input
)
4786 int key
= input
% 4;
4787 int matrix
= input
/ 4;
4789 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4790 btv
->c
.nr
, input
, matrix
, key
);
4792 /* Handles the input selection on the TDA8540's */
4793 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x00,
4794 ((matrix
== 3) ? (key
| key
<< 2) : 0x00), 1);
4795 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x00,
4796 ((matrix
== 0) ? (key
| key
<< 2) : 0x00), 1);
4797 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x00,
4798 ((matrix
== 1) ? (key
| key
<< 2) : 0x00), 1);
4799 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x00,
4800 ((matrix
== 2) ? (key
| key
<< 2) : 0x00), 1);
4802 /* Handles the output enables on the TDA8540's */
4803 bttv_I2CWrite(btv
, I2C_TDA8540_ALT3
, 0x02,
4804 ((matrix
== 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
4805 bttv_I2CWrite(btv
, I2C_TDA8540_ALT4
, 0x02,
4806 ((matrix
== 0) ? 0x03 : 0x00), 1); /* 1-4 */
4807 bttv_I2CWrite(btv
, I2C_TDA8540_ALT5
, 0x02,
4808 ((matrix
== 1) ? 0x03 : 0x00), 1); /* 5-8 */
4809 bttv_I2CWrite(btv
, I2C_TDA8540_ALT6
, 0x02,
4810 ((matrix
== 2) ? 0x03 : 0x00), 1); /* 9-12 */
4812 /* Selects MUX0 for input on the 878 */
4813 btaor((0)<<5, ~(3<<5), BT848_IFORM
);
4817 /* PXC200 muxsel helper
4818 * luke@syseng.anu.edu.au
4819 * another transplant
4820 * from Alessandro Rubini (rubini@linux.it)
4822 * There are 4 kinds of cards:
4823 * PXC200L which is bt848
4824 * PXC200F which is bt848 with PIC controlling mux
4825 * PXC200AL which is bt878
4826 * PXC200AF which is bt878 with PIC controlling mux
4828 #define PX_CFG_PXC200F 0x01
4829 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4830 #define PX_I2C_PIC 0x0f
4831 #define PX_PXC200A_CARDID 0x200a1295
4832 #define PX_I2C_CMD_CFG 0x00
4834 static void PXC200_muxsel(struct bttv
*btv
, unsigned int input
)
4839 unsigned char buf
[2];
4841 /* Read PIC config to determine if this is a PXC200F */
4845 rc
=bttv_I2CWrite(btv
,(PX_I2C_PIC
<<1),buf
[0],buf
[1],1);
4847 printk(KERN_DEBUG
"bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv
->c
.nr
,rc
);
4848 /* not PXC ? do nothing */
4852 rc
=bttv_I2CRead(btv
,(PX_I2C_PIC
<<1),NULL
);
4853 if (!(rc
& PX_CFG_PXC200F
)) {
4854 printk(KERN_DEBUG
"bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv
->c
.nr
,rc
);
4859 /* The multiplexer in the 200F is handled by the GPIO port */
4860 /* get correct mapping between inputs */
4861 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4862 /* ** not needed!? */
4865 /* make sure output pins are enabled */
4866 /* bitmask=0x30f; */
4868 /* check whether we have a PXC200A */
4869 if (btv
->cardid
== PX_PXC200A_CARDID
) {
4870 bitmask
^= 0x180; /* use 7 and 9, not 8 and 9 */
4871 bitmask
|= 7<<4; /* the DAC */
4873 btwrite(bitmask
, BT848_GPIO_OUT_EN
);
4875 bitmask
= btread(BT848_GPIO_DATA
);
4876 if (btv
->cardid
== PX_PXC200A_CARDID
)
4877 bitmask
= (bitmask
& ~0x280) | ((mux
& 2) << 8) | ((mux
& 1) << 7);
4878 else /* older device */
4879 bitmask
= (bitmask
& ~0x300) | ((mux
& 3) << 8);
4880 btwrite(bitmask
,BT848_GPIO_DATA
);
4883 * Was "to be safe, set the bt848 to input 0"
4884 * Actually, since it's ok at load time, better not messing
4885 * with these bits (on PXC200AF you need to set mux 2 here)
4887 * needed because bttv-driver sets mux before calling this function
4889 if (btv
->cardid
== PX_PXC200A_CARDID
)
4890 btaor(2<<5, ~BT848_IFORM_MUXSEL
, BT848_IFORM
);
4891 else /* older device */
4892 btand(~BT848_IFORM_MUXSEL
,BT848_IFORM
);
4894 printk(KERN_DEBUG
"bttv%d: setting input channel to:%d\n", btv
->c
.nr
,(int)mux
);
4897 /* ----------------------------------------------------------------------- */
4898 /* motherboard chipset specific stuff */
4900 void __devinit
bttv_check_chipset(void)
4902 int pcipci_fail
= 0;
4903 struct pci_dev
*dev
= NULL
;
4905 if (pci_pci_problems
& PCIPCI_FAIL
)
4907 if (pci_pci_problems
& (PCIPCI_TRITON
|PCIPCI_NATOMA
|PCIPCI_VIAETBF
))
4909 if (pci_pci_problems
& PCIPCI_VSFX
)
4911 #ifdef PCIPCI_ALIMAGIK
4912 if (pci_pci_problems
& PCIPCI_ALIMAGIK
)
4917 /* print warnings about any quirks found */
4919 printk(KERN_INFO
"bttv: Host bridge needs ETBF enabled.\n");
4921 printk(KERN_INFO
"bttv: Host bridge needs VSFX enabled.\n");
4923 printk(KERN_WARNING
"bttv: BT848 and your chipset may not work together.\n");
4925 printk(KERN_WARNING
"bttv: overlay will be disabled.\n");
4928 printk(KERN_WARNING
"bttv: overlay forced. Use this option at your own risk.\n");
4931 if (UNSET
!= latency
)
4932 printk(KERN_INFO
"bttv: pci latency fixup [%d]\n",latency
);
4933 while ((dev
= pci_get_device(PCI_VENDOR_ID_INTEL
,
4934 PCI_DEVICE_ID_INTEL_82441
, dev
))) {
4936 pci_read_config_byte(dev
, 0x53, &b
);
4938 printk(KERN_INFO
"bttv: Host bridge: 82441FX Natoma, "
4939 "bufcon=0x%02x\n",b
);
4943 int __devinit
bttv_handle_chipset(struct bttv
*btv
)
4945 unsigned char command
;
4947 if (!triton1
&& !vsfx
&& UNSET
== latency
)
4952 printk(KERN_INFO
"bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv
->c
.nr
);
4953 if (vsfx
&& btv
->id
>= 878)
4954 printk(KERN_INFO
"bttv%d: enabling VSFX\n",btv
->c
.nr
);
4955 if (UNSET
!= latency
)
4956 printk(KERN_INFO
"bttv%d: setting pci timer to %d\n",
4960 if (btv
->id
< 878) {
4961 /* bt848 (mis)uses a bit in the irq mask for etbf */
4963 btv
->triton1
= BT848_INT_ETBF
;
4965 /* bt878 has a bit in the pci config space for it */
4966 pci_read_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, &command
);
4968 command
|= BT878_EN_TBFX
;
4970 command
|= BT878_EN_VSFX
;
4971 pci_write_config_byte(btv
->c
.pci
, BT878_DEVCTRL
, command
);
4973 if (UNSET
!= latency
)
4974 pci_write_config_byte(btv
->c
.pci
, PCI_LATENCY_TIMER
, latency
);