Rev 623 | Rev 667 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
170 | giacomo | 1 | /* |
2 | bttv-cards.c |
||
3 | |||
4 | this file has configuration informations - card-specific stuff |
||
5 | like the big tvcards array for the most part |
||
6 | |||
7 | Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) |
||
8 | & Marcus Metzler (mocm@thp.uni-koeln.de) |
||
9 | (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de> |
||
10 | |||
11 | This program is free software; you can redistribute it and/or modify |
||
12 | it under the terms of the GNU General Public License as published by |
||
13 | the Free Software Foundation; either version 2 of the License, or |
||
14 | (at your option) any later version. |
||
15 | |||
16 | This program is distributed in the hope that it will be useful, |
||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
19 | GNU General Public License for more details. |
||
20 | |||
21 | You should have received a copy of the GNU General Public License |
||
22 | along with this program; if not, write to the Free Software |
||
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||
428 | giacomo | 24 | |
170 | giacomo | 25 | */ |
26 | |||
428 | giacomo | 27 | #include <linuxcomp.h> |
170 | giacomo | 28 | |
428 | giacomo | 29 | #include <linux/config.h> |
30 | #include <linux/delay.h> |
||
31 | #include <linux/module.h> |
||
32 | #include <linux/kmod.h> |
||
33 | #include <linux/init.h> |
||
170 | giacomo | 34 | #include <linux/pci.h> |
428 | giacomo | 35 | #include <linux/vmalloc.h> |
36 | #ifdef CONFIG_FW_LOADER |
||
37 | # include <linux/firmware.h> |
||
38 | #endif |
||
170 | giacomo | 39 | |
428 | giacomo | 40 | #include <asm/io.h> |
170 | giacomo | 41 | |
428 | giacomo | 42 | #include "drivers/bttvp.h" |
43 | #include "drivers/bt832.h" |
||
44 | |||
170 | giacomo | 45 | /* fwd decl */ |
46 | static void boot_msp34xx(struct bttv *btv, int pin); |
||
428 | giacomo | 47 | static void boot_bt832(struct bttv *btv); |
170 | giacomo | 48 | static void hauppauge_eeprom(struct bttv *btv); |
428 | giacomo | 49 | static void avermedia_eeprom(struct bttv *btv); |
170 | giacomo | 50 | static void osprey_eeprom(struct bttv *btv); |
428 | giacomo | 51 | static void modtec_eeprom(struct bttv *btv); |
170 | giacomo | 52 | static void init_PXC200(struct bttv *btv); |
53 | |||
54 | static void winview_audio(struct bttv *btv, struct video_audio *v, int set); |
||
55 | static void lt9415_audio(struct bttv *btv, struct video_audio *v, int set); |
||
56 | static void avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, |
||
57 | int set); |
||
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 winfast2000_audio(struct bttv *btv, struct video_audio *v, int set); |
||
61 | static void pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set); |
||
62 | static void fv2000s_audio(struct bttv *btv, struct video_audio *v, int set); |
||
63 | static void windvr_audio(struct bttv *btv, struct video_audio *v, int set); |
||
428 | giacomo | 64 | static void adtvk503_audio(struct bttv *btv, struct video_audio *v, int set); |
170 | giacomo | 65 | static void rv605_muxsel(struct bttv *btv, unsigned int input); |
428 | giacomo | 66 | static void eagle_muxsel(struct bttv *btv, unsigned int input); |
67 | static void xguard_muxsel(struct bttv *btv, unsigned int input); |
||
68 | static void ivc120_muxsel(struct bttv *btv, unsigned int input); |
||
170 | giacomo | 69 | |
428 | giacomo | 70 | static int terratec_active_radio_upgrade(struct bttv *btv); |
71 | static int tea5757_read(struct bttv *btv); |
||
72 | static int tea5757_write(struct bttv *btv, int value); |
||
73 | static void identify_by_eeprom(struct bttv *btv, |
||
74 | unsigned char eeprom_data[256]); |
||
75 | |||
170 | giacomo | 76 | /* config variables */ |
428 | giacomo | 77 | static unsigned int triton1=0; |
78 | static unsigned int vsfx=0; |
||
79 | static unsigned int latency = UNSET; |
||
80 | unsigned int no_overlay=-1; |
||
170 | giacomo | 81 | |
428 | giacomo | 82 | static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET}; |
83 | static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET}; |
||
84 | static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET}; |
||
85 | static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET}; |
||
86 | #ifdef MODULE |
||
87 | static unsigned int autoload = 1; |
||
88 | #else |
||
89 | static unsigned int autoload = 0; |
||
90 | #endif |
||
91 | static unsigned int gpiomask = UNSET; |
||
92 | static unsigned int audioall = UNSET; |
||
93 | static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET }; |
||
94 | |||
95 | /* insmod options */ |
||
96 | MODULE_PARM(triton1,"i"); |
||
97 | MODULE_PARM_DESC(triton1,"set ETBF pci config bit " |
||
98 | "[enable bug compatibility for triton1 + others]"); |
||
99 | MODULE_PARM(vsfx,"i"); |
||
100 | MODULE_PARM_DESC(vsfx,"set VSFX pci config bit " |
||
101 | "[yet another chipset flaw workaround]"); |
||
102 | MODULE_PARM(no_overlay,"i"); |
||
103 | MODULE_PARM(latency,"i"); |
||
104 | MODULE_PARM_DESC(latency,"pci latency timer"); |
||
105 | MODULE_PARM(card,"1-" __stringify(BTTV_MAX) "i"); |
||
106 | MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list"); |
||
107 | MODULE_PARM(pll,"1-" __stringify(BTTV_MAX) "i"); |
||
108 | MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)"); |
||
109 | MODULE_PARM(tuner,"1-" __stringify(BTTV_MAX) "i"); |
||
110 | MODULE_PARM_DESC(tuner,"specify installed tuner type"); |
||
111 | MODULE_PARM(autoload,"i"); |
||
112 | MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)"); |
||
113 | MODULE_PARM(gpiomask,"i"); |
||
114 | MODULE_PARM(audioall,"i"); |
||
115 | MODULE_PARM(audiomux,"1-5i"); |
||
116 | |||
117 | /* kernel args */ |
||
118 | #ifndef MODULE |
||
119 | static int __init p_card(char *str) { return bttv_parse(str,BTTV_MAX,card); } |
||
120 | static int __init p_pll(char *str) { return bttv_parse(str,BTTV_MAX,pll); } |
||
121 | static int __init p_tuner(char *str) { return bttv_parse(str,BTTV_MAX,tuner); } |
||
122 | __setup("bttv.card=", p_card); |
||
123 | __setup("bttv.pll=", p_pll); |
||
124 | __setup("bttv.tuner=", p_tuner); |
||
125 | |||
126 | int __init bttv_parse(char *str, int max, int *vals) |
||
127 | { |
||
128 | int i,number,res = 2; |
||
129 | |||
130 | for (i = 0; res == 2 && i < max; i++) { |
||
131 | res = get_option(&str,&number); |
||
132 | if (res) |
||
133 | vals[i] = number; |
||
134 | } |
||
135 | return 1; |
||
136 | } |
||
137 | #endif |
||
138 | |||
170 | giacomo | 139 | /* ----------------------------------------------------------------------- */ |
140 | /* list of card IDs for bt878+ cards */ |
||
141 | |||
142 | static struct CARD { |
||
143 | unsigned id; |
||
144 | int cardnr; |
||
145 | char *name; |
||
428 | giacomo | 146 | } cards[] __devinitdata = { |
170 | giacomo | 147 | { 0x13eb0070, BTTV_HAUPPAUGE878, "Hauppauge WinTV" }, |
148 | { 0x39000070, BTTV_HAUPPAUGE878, "Hauppauge WinTV-D" }, |
||
428 | giacomo | 149 | { 0x45000070, BTTV_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" }, |
170 | giacomo | 150 | { 0xff000070, BTTV_OSPREY1x0, "Osprey-100" }, |
151 | { 0xff010070, BTTV_OSPREY2x0_SVID,"Osprey-200" }, |
||
428 | giacomo | 152 | { 0xff020070, BTTV_OSPREY500, "Osprey-500" }, |
170 | giacomo | 153 | { 0xff030070, BTTV_OSPREY2000, "Osprey-2000" }, |
428 | giacomo | 154 | { 0xff040070, BTTV_OSPREY540, "Osprey-540" }, |
170 | giacomo | 155 | |
156 | { 0x00011002, BTTV_ATI_TVWONDER, "ATI TV Wonder" }, |
||
157 | { 0x00031002, BTTV_ATI_TVWONDERVE,"ATI TV Wonder/VE" }, |
||
158 | |||
159 | { 0x6606107d, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, |
||
428 | giacomo | 160 | { 0x6607107d, BTTV_WINFAST2000, "Leadtek WinFast VC 100" }, |
161 | { 0x263610b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" }, |
||
162 | { 0x264510b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" }, |
||
170 | giacomo | 163 | { 0x402010fc, BTTV_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" }, |
164 | { 0x405010fc, BTTV_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" }, |
||
428 | giacomo | 165 | { 0x407010fc, BTTV_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" }, |
170 | giacomo | 166 | |
167 | { 0x001211bd, BTTV_PINNACLE, "Pinnacle PCTV" }, |
||
428 | giacomo | 168 | { 0x001c11bd, BTTV_PINNACLESAT, "Pinnacle PCTV Sat" }, |
169 | // some cards ship with byteswapped IDs ... |
||
170 | { 0x1200bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" }, |
||
171 | { 0xff00bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" }, |
||
170 | giacomo | 172 | |
173 | { 0x3000121a, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" }, |
||
428 | giacomo | 174 | { 0x3060121a, BTTV_STB2, "3Dfx VoodooTV 100/ STB OEM" }, |
170 | giacomo | 175 | |
176 | { 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" }, |
||
177 | { 0x3002144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" }, |
||
178 | { 0x3005144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" }, |
||
428 | giacomo | 179 | { 0x5000144f, BTTV_MAGICTVIEW061, "Askey CPH050" }, |
170 | giacomo | 180 | |
181 | { 0x00011461, BTTV_AVPHONE98, "AVerMedia TVPhone98" }, |
||
182 | { 0x00021461, BTTV_AVERMEDIA98, "AVermedia TVCapture 98" }, |
||
183 | { 0x00031461, BTTV_AVPHONE98, "AVerMedia TVPhone98" }, |
||
184 | { 0x00041461, BTTV_AVERMEDIA98, "AVerMedia TVCapture 98" }, |
||
428 | giacomo | 185 | { 0x03001461, BTTV_AVERMEDIA98, "VDOMATE TV TUNER CARD" }, |
170 | giacomo | 186 | |
187 | { 0x300014ff, BTTV_MAGICTVIEW061, "TView 99 (CPH061)" }, |
||
188 | { 0x300214ff, BTTV_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" }, |
||
189 | |||
428 | giacomo | 190 | { 0x1117153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" }, |
191 | { 0x1118153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" }, |
||
192 | { 0x1119153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL I)" }, |
||
193 | { 0x111a153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL I)" }, |
||
194 | |||
170 | giacomo | 195 | { 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV Radio+" }, |
428 | giacomo | 196 | { 0x1127153b, BTTV_TERRATV, "Terratec TV+ (V1.05)" }, |
197 | // clashes with FlyVideo |
||
198 | //{ 0x18521852, BTTV_TERRATV, "Terratec TV+ (V1.10)" }, |
||
199 | { 0x1134153b, BTTV_TERRATVALUE, "Terratec TValue (LR102)" }, |
||
200 | { 0x1135153b, BTTV_TERRATVALUER, "Terratec TValue Radio" }, // LR102 |
||
201 | { 0x5018153b, BTTV_TERRATVALUE, "Terratec TValue" }, // ?? |
||
170 | giacomo | 202 | |
428 | giacomo | 203 | { 0x400015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" }, |
170 | giacomo | 204 | { 0x400a15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" }, |
205 | { 0x400d15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
206 | { 0x401015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
207 | { 0x401615b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
208 | |||
428 | giacomo | 209 | { 0x1430aa00, BTTV_PV143, "Provideo PV143A" }, |
210 | { 0x1431aa00, BTTV_PV143, "Provideo PV143B" }, |
||
211 | { 0x1432aa00, BTTV_PV143, "Provideo PV143C" }, |
||
212 | { 0x1433aa00, BTTV_PV143, "Provideo PV143D" }, |
||
213 | |||
214 | { 0x1460aa00, BTTV_PV150, "Provideo PV150A-1" }, |
||
215 | { 0x1461aa01, BTTV_PV150, "Provideo PV150A-2" }, |
||
216 | { 0x1462aa02, BTTV_PV150, "Provideo PV150A-3" }, |
||
217 | { 0x1463aa03, BTTV_PV150, "Provideo PV150A-4" }, |
||
218 | |||
219 | { 0x1464aa04, BTTV_PV150, "Provideo PV150B-1" }, |
||
220 | { 0x1465aa05, BTTV_PV150, "Provideo PV150B-2" }, |
||
221 | { 0x1466aa06, BTTV_PV150, "Provideo PV150B-3" }, |
||
222 | { 0x1467aa07, BTTV_PV150, "Provideo PV150B-4" }, |
||
223 | |||
224 | { 0xa132ff00, BTTV_IVC100, "IVC-100" }, |
||
225 | { 0xa1550000, BTTV_IVC200, "IVC-200" }, |
||
226 | { 0xa1550001, BTTV_IVC200, "IVC-200" }, |
||
227 | { 0xa1550002, BTTV_IVC200, "IVC-200" }, |
||
228 | { 0xa1550003, BTTV_IVC200, "IVC-200" }, |
||
229 | { 0xa1550100, BTTV_IVC200, "IVC-200G" }, |
||
230 | { 0xa1550101, BTTV_IVC200, "IVC-200G" }, |
||
231 | { 0xa1550102, BTTV_IVC200, "IVC-200G" }, |
||
232 | { 0xa1550103, BTTV_IVC200, "IVC-200G" }, |
||
233 | { 0xa182ff00, BTTV_IVC120, "IVC-120G" }, |
||
234 | { 0xa182ff01, BTTV_IVC120, "IVC-120G" }, |
||
235 | { 0xa182ff02, BTTV_IVC120, "IVC-120G" }, |
||
236 | { 0xa182ff03, BTTV_IVC120, "IVC-120G" }, |
||
237 | { 0xa182ff04, BTTV_IVC120, "IVC-120G" }, |
||
238 | { 0xa182ff05, BTTV_IVC120, "IVC-120G" }, |
||
239 | { 0xa182ff06, BTTV_IVC120, "IVC-120G" }, |
||
240 | { 0xa182ff07, BTTV_IVC120, "IVC-120G" }, |
||
241 | { 0xa182ff08, BTTV_IVC120, "IVC-120G" }, |
||
242 | { 0xa182ff09, BTTV_IVC120, "IVC-120G" }, |
||
243 | { 0xa182ff0a, BTTV_IVC120, "IVC-120G" }, |
||
244 | { 0xa182ff0b, BTTV_IVC120, "IVC-120G" }, |
||
245 | { 0xa182ff0c, BTTV_IVC120, "IVC-120G" }, |
||
246 | { 0xa182ff0d, BTTV_IVC120, "IVC-120G" }, |
||
247 | { 0xa182ff0e, BTTV_IVC120, "IVC-120G" }, |
||
248 | { 0xa182ff0f, BTTV_IVC120, "IVC-120G" }, |
||
249 | |||
250 | { 0x41424344, BTTV_GRANDTEC, "GrandTec Multi Capture" }, |
||
251 | { 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" }, |
||
252 | |||
170 | giacomo | 253 | { 0x010115cb, BTTV_GMV1, "AG GMV1" }, |
428 | giacomo | 254 | { 0x010114c7, BTTV_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" }, |
255 | { 0x18501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" }, |
||
256 | { 0x18511851, BTTV_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" }, |
||
257 | { 0x18521852, BTTV_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" }, |
||
170 | giacomo | 258 | { 0x10b42636, BTTV_HAUPPAUGE878, "STB ???" }, |
259 | { 0x217d6606, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, |
||
260 | { 0x03116000, BTTV_SENSORAY311, "Sensoray 311" }, |
||
261 | { 0x00790e11, BTTV_WINDVR, "Canopus WinDVR PCI" }, |
||
262 | { 0xa0fca1a0, BTTV_ZOLTRIX, "Face to Face Tvmax" }, |
||
428 | giacomo | 263 | { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, |
170 | giacomo | 264 | |
623 | giacomo | 265 | { 0x200A1295, BTTV_PXC200, "Imagenation PXC200"}, |
428 | giacomo | 266 | //{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, |
267 | |||
170 | giacomo | 268 | { 0, -1, NULL } |
269 | }; |
||
270 | |||
271 | /* ----------------------------------------------------------------------- */ |
||
272 | /* array with description for bt848 / bt878 tv/grabber cards */ |
||
273 | |||
274 | struct tvcard bttv_tvcards[] = { |
||
275 | { |
||
276 | /* ---- card 0x00 ---------------------------------- */ |
||
428 | giacomo | 277 | .name = " *** UNKNOWN/GENERIC *** ", |
278 | .video_inputs = 4, |
||
279 | .audio_inputs = 1, |
||
280 | .tuner = 0, |
||
281 | .svhs = 2, |
||
282 | .muxsel = { 2, 3, 1, 0}, |
||
283 | .tuner_type = -1, |
||
170 | giacomo | 284 | },{ |
428 | giacomo | 285 | .name = "MIRO PCTV", |
286 | .video_inputs = 4, |
||
287 | .audio_inputs = 1, |
||
288 | .tuner = 0, |
||
289 | .svhs = 2, |
||
290 | .gpiomask = 15, |
||
291 | .muxsel = { 2, 3, 1, 1}, |
||
292 | .audiomux = { 2, 0, 0, 0, 10}, |
||
293 | .needs_tvaudio = 1, |
||
294 | .tuner_type = -1, |
||
170 | giacomo | 295 | },{ |
428 | giacomo | 296 | .name = "Hauppauge (bt848)", |
297 | .video_inputs = 4, |
||
298 | .audio_inputs = 1, |
||
299 | .tuner = 0, |
||
300 | .svhs = 2, |
||
301 | .gpiomask = 7, |
||
302 | .muxsel = { 2, 3, 1, 1}, |
||
303 | .audiomux = { 0, 1, 2, 3, 4}, |
||
304 | .needs_tvaudio = 1, |
||
305 | .tuner_type = -1, |
||
170 | giacomo | 306 | },{ |
428 | giacomo | 307 | .name = "STB, Gateway P/N 6000699 (bt848)", |
308 | .video_inputs = 3, |
||
309 | .audio_inputs = 1, |
||
310 | .tuner = 0, |
||
311 | .svhs = 2, |
||
312 | .gpiomask = 7, |
||
313 | .muxsel = { 2, 3, 1, 1}, |
||
314 | .audiomux = { 4, 0, 2, 3, 1}, |
||
315 | .no_msp34xx = 1, |
||
316 | .needs_tvaudio = 1, |
||
317 | .tuner_type = TUNER_PHILIPS_NTSC, |
||
318 | .pll = PLL_28, |
||
319 | .has_radio = 1, |
||
170 | giacomo | 320 | },{ |
321 | |||
322 | /* ---- card 0x04 ---------------------------------- */ |
||
428 | giacomo | 323 | .name = "Intel Create and Share PCI/ Smart Video Recorder III", |
324 | .video_inputs = 4, |
||
325 | .audio_inputs = 0, |
||
326 | .tuner = -1, |
||
327 | .svhs = 2, |
||
328 | .gpiomask = 0, |
||
329 | .muxsel = { 2, 3, 1, 1}, |
||
330 | .audiomux = { 0 }, |
||
331 | .needs_tvaudio = 0, |
||
332 | .tuner_type = 4, |
||
170 | giacomo | 333 | },{ |
428 | giacomo | 334 | .name = "Diamond DTV2000", |
335 | .video_inputs = 4, |
||
336 | .audio_inputs = 1, |
||
337 | .tuner = 0, |
||
338 | .svhs = 2, |
||
339 | .gpiomask = 3, |
||
340 | .muxsel = { 2, 3, 1, 0}, |
||
341 | .audiomux = { 0, 1, 0, 1, 3}, |
||
342 | .needs_tvaudio = 1, |
||
343 | .tuner_type = -1, |
||
170 | giacomo | 344 | },{ |
428 | giacomo | 345 | .name = "AVerMedia TVPhone", |
346 | .video_inputs = 3, |
||
347 | .audio_inputs = 1, |
||
348 | .tuner = 0, |
||
349 | .svhs = 3, |
||
350 | .muxsel = { 2, 3, 1, 1}, |
||
351 | .gpiomask = 0x0f, |
||
352 | .audiomux = { 0x0c, 0x04, 0x08, 0x04, 0}, |
||
170 | giacomo | 353 | /* 0x04 for some cards ?? */ |
428 | giacomo | 354 | .needs_tvaudio = 1, |
355 | .tuner_type = -1, |
||
356 | .audio_hook = avermedia_tvphone_audio, |
||
170 | giacomo | 357 | },{ |
428 | giacomo | 358 | .name = "MATRIX-Vision MV-Delta", |
359 | .video_inputs = 5, |
||
360 | .audio_inputs = 1, |
||
361 | .tuner = -1, |
||
362 | .svhs = 3, |
||
363 | .gpiomask = 0, |
||
364 | .muxsel = { 2, 3, 1, 0, 0}, |
||
365 | .audiomux = {0 }, |
||
366 | .needs_tvaudio = 1, |
||
367 | .tuner_type = -1, |
||
170 | giacomo | 368 | },{ |
369 | |||
370 | /* ---- card 0x08 ---------------------------------- */ |
||
428 | giacomo | 371 | .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26", |
372 | .video_inputs = 4, |
||
373 | .audio_inputs = 1, |
||
374 | .tuner = 0, |
||
375 | .svhs = 2, |
||
376 | .gpiomask = 0xc00, |
||
377 | .muxsel = { 2, 3, 1, 1}, |
||
378 | .audiomux = { 0, 0xc00, 0x800, 0x400, 0xc00, 0}, |
||
379 | .needs_tvaudio = 1, |
||
380 | .pll = PLL_28, |
||
381 | .tuner_type = -1, |
||
170 | giacomo | 382 | },{ |
428 | giacomo | 383 | .name = "IMS/IXmicro TurboTV", |
384 | .video_inputs = 3, |
||
385 | .audio_inputs = 1, |
||
386 | .tuner = 0, |
||
387 | .svhs = 2, |
||
388 | .gpiomask = 3, |
||
389 | .muxsel = { 2, 3, 1, 1}, |
||
390 | .audiomux = { 1, 1, 2, 3, 0}, |
||
391 | .needs_tvaudio = 0, |
||
392 | .pll = PLL_28, |
||
393 | .tuner_type = TUNER_TEMIC_PAL, |
||
170 | giacomo | 394 | },{ |
428 | giacomo | 395 | .name = "Hauppauge (bt878)", |
396 | .video_inputs = 4, |
||
397 | .audio_inputs = 1, |
||
398 | .tuner = 0, |
||
399 | .svhs = 2, |
||
400 | .gpiomask = 0x0f, /* old: 7 */ |
||
401 | .muxsel = { 2, 0, 1, 1}, |
||
402 | .audiomux = { 0, 1, 2, 3, 4}, |
||
403 | .needs_tvaudio = 1, |
||
404 | .pll = PLL_28, |
||
405 | .tuner_type = -1, |
||
170 | giacomo | 406 | },{ |
428 | giacomo | 407 | .name = "MIRO PCTV pro", |
408 | .video_inputs = 3, |
||
409 | .audio_inputs = 1, |
||
410 | .tuner = 0, |
||
411 | .svhs = 2, |
||
412 | .gpiomask = 0x3014f, |
||
413 | .muxsel = { 2, 3, 1, 1}, |
||
414 | .audiomux = { 0x20001,0x10001, 0, 0,10}, |
||
415 | .needs_tvaudio = 1, |
||
416 | .tuner_type = -1, |
||
170 | giacomo | 417 | },{ |
418 | |||
419 | /* ---- card 0x0c ---------------------------------- */ |
||
428 | giacomo | 420 | .name = "ADS Technologies Channel Surfer TV (bt848)", |
421 | .video_inputs = 3, |
||
422 | .audio_inputs = 1, |
||
423 | .tuner = 0, |
||
424 | .svhs = 2, |
||
425 | .gpiomask = 15, |
||
426 | .muxsel = { 2, 3, 1, 1}, |
||
427 | .audiomux = { 13, 14, 11, 7, 0, 0}, |
||
428 | .needs_tvaudio = 1, |
||
429 | .tuner_type = -1, |
||
170 | giacomo | 430 | },{ |
428 | giacomo | 431 | .name = "AVerMedia TVCapture 98", |
432 | .video_inputs = 3, |
||
433 | .audio_inputs = 4, |
||
434 | .tuner = 0, |
||
435 | .svhs = 2, |
||
436 | .gpiomask = 15, |
||
437 | .muxsel = { 2, 3, 1, 1}, |
||
438 | .audiomux = { 13, 14, 11, 7, 0, 0}, |
||
439 | .needs_tvaudio = 1, |
||
440 | .msp34xx_alt = 1, |
||
441 | .pll = PLL_28, |
||
442 | .tuner_type = TUNER_PHILIPS_PAL, |
||
170 | giacomo | 443 | },{ |
428 | giacomo | 444 | .name = "Aimslab Video Highway Xtreme (VHX)", |
445 | .video_inputs = 3, |
||
446 | .audio_inputs = 1, |
||
447 | .tuner = 0, |
||
448 | .svhs = 2, |
||
449 | .gpiomask = 7, |
||
450 | .muxsel = { 2, 3, 1, 1}, |
||
451 | .audiomux = { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */ |
||
452 | .needs_tvaudio = 1, |
||
453 | .pll = PLL_28, |
||
454 | .tuner_type = -1, |
||
170 | giacomo | 455 | },{ |
428 | giacomo | 456 | .name = "Zoltrix TV-Max", |
457 | .video_inputs = 3, |
||
458 | .audio_inputs = 1, |
||
459 | .tuner = 0, |
||
460 | .svhs = 2, |
||
461 | .gpiomask = 15, |
||
462 | .muxsel = { 2, 3, 1, 1}, |
||
463 | .audiomux = {0 , 0, 1 , 0, 10}, |
||
464 | .needs_tvaudio = 1, |
||
465 | .tuner_type = -1, |
||
170 | giacomo | 466 | },{ |
467 | |||
468 | /* ---- card 0x10 ---------------------------------- */ |
||
428 | giacomo | 469 | .name = "Prolink Pixelview PlayTV (bt878)", |
470 | .video_inputs = 3, |
||
471 | .audio_inputs = 1, |
||
472 | .tuner = 0, |
||
473 | .svhs = 2, |
||
474 | .gpiomask = 0x01fe00, |
||
475 | .muxsel = { 2, 3, 1, 1}, |
||
476 | .audiomux = { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 }, |
||
477 | .needs_tvaudio = 1, |
||
478 | .pll = PLL_28, |
||
479 | .tuner_type = -1, |
||
170 | giacomo | 480 | },{ |
428 | giacomo | 481 | .name = "Leadtek WinView 601", |
482 | .video_inputs = 3, |
||
483 | .audio_inputs = 1, |
||
484 | .tuner = 0, |
||
485 | .svhs = 2, |
||
486 | .gpiomask = 0x8300f8, |
||
487 | .muxsel = { 2, 3, 1, 1,0}, |
||
488 | .audiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007}, |
||
489 | .needs_tvaudio = 1, |
||
490 | .tuner_type = -1, |
||
491 | .audio_hook = winview_audio, |
||
492 | .has_radio = 1, |
||
170 | giacomo | 493 | },{ |
428 | giacomo | 494 | .name = "AVEC Intercapture", |
495 | .video_inputs = 3, |
||
496 | .audio_inputs = 2, |
||
497 | .tuner = 0, |
||
498 | .svhs = 2, |
||
499 | .gpiomask = 0, |
||
500 | .muxsel = {2, 3, 1, 1}, |
||
501 | .audiomux = {1, 0, 0, 0, 0}, |
||
502 | .needs_tvaudio = 1, |
||
503 | .tuner_type = -1, |
||
170 | giacomo | 504 | },{ |
428 | giacomo | 505 | .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)", |
506 | .video_inputs = 4, |
||
507 | .audio_inputs = 1, |
||
508 | .tuner = -1, |
||
509 | .svhs = -1, |
||
510 | .gpiomask = 0x8dff00, |
||
511 | .muxsel = { 2, 3, 1, 1}, |
||
512 | .audiomux = { 0 }, |
||
513 | .no_msp34xx = 1, |
||
514 | .tuner_type = -1, |
||
170 | giacomo | 515 | },{ |
516 | |||
517 | /* ---- card 0x14 ---------------------------------- */ |
||
428 | giacomo | 518 | .name = "CEI Raffles Card", |
519 | .video_inputs = 3, |
||
520 | .audio_inputs = 3, |
||
521 | .tuner = 0, |
||
522 | .svhs = 2, |
||
523 | .muxsel = {2, 3, 1, 1}, |
||
524 | .tuner_type = -1, |
||
170 | giacomo | 525 | },{ |
428 | giacomo | 526 | .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50", |
527 | .video_inputs = 4, |
||
528 | .audio_inputs = 2, // tuner, line in |
||
529 | .tuner = 0, |
||
530 | .svhs = 2, |
||
531 | .gpiomask = 0x1800, |
||
532 | .muxsel = { 2, 3, 1, 1}, |
||
533 | .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800}, |
||
534 | .pll = PLL_28, |
||
535 | .tuner_type = TUNER_PHILIPS_PAL_I, |
||
170 | giacomo | 536 | },{ |
428 | giacomo | 537 | .name = "Askey CPH050/ Phoebe Tv Master + FM", |
538 | .video_inputs = 3, |
||
539 | .audio_inputs = 1, |
||
540 | .tuner = 0, |
||
541 | .svhs = 2, |
||
542 | .gpiomask = 0xc00, |
||
543 | .muxsel = { 2, 3, 1, 1}, |
||
544 | .audiomux = {0, 1, 0x800, 0x400, 0xc00, 0}, |
||
545 | .needs_tvaudio = 1, |
||
546 | .pll = PLL_28, |
||
547 | .tuner_type = -1, |
||
170 | giacomo | 548 | },{ |
428 | giacomo | 549 | .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878", |
550 | .video_inputs = 3, |
||
551 | .audio_inputs = 1, |
||
552 | .tuner = 0, |
||
553 | .svhs = -1, |
||
554 | .gpiomask = 7, |
||
555 | .muxsel = { 2, 3, -1 }, |
||
556 | .digital_mode = DIGITAL_MODE_CAMERA, |
||
557 | .audiomux = { 0, 0, 0, 0, 0 }, |
||
558 | .no_msp34xx = 1, |
||
559 | .pll = PLL_28, |
||
560 | .tuner_type = TUNER_ALPS_TSBB5_PAL_I, |
||
170 | giacomo | 561 | },{ |
562 | |||
563 | /* ---- card 0x18 ---------------------------------- */ |
||
428 | giacomo | 564 | .name = "Askey CPH05X/06X (bt878) [many vendors]", |
565 | .video_inputs = 3, |
||
566 | .audio_inputs = 1, |
||
567 | .tuner = 0, |
||
568 | .svhs = 2, |
||
569 | .gpiomask = 0xe00, |
||
570 | .muxsel = { 2, 3, 1, 1}, |
||
571 | .audiomux = {0x400, 0x400, 0x400, 0x400, 0xc00}, |
||
572 | .needs_tvaudio = 1, |
||
573 | .pll = PLL_28, |
||
574 | .tuner_type = -1, |
||
170 | giacomo | 575 | },{ |
428 | giacomo | 576 | .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar", |
577 | .video_inputs = 3, |
||
578 | .audio_inputs = 1, |
||
579 | .tuner = 0, |
||
580 | .svhs = 2, |
||
581 | .gpiomask = 0x1f0fff, |
||
582 | .muxsel = { 2, 3, 1, 1}, |
||
583 | .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000}, |
||
584 | .needs_tvaudio = 0, |
||
585 | .tuner_type = TUNER_PHILIPS_PAL, |
||
586 | .audio_hook = terratv_audio, |
||
170 | giacomo | 587 | },{ |
428 | giacomo | 588 | .name = "Hauppauge WinCam newer (bt878)", |
589 | .video_inputs = 4, |
||
590 | .audio_inputs = 1, |
||
591 | .tuner = 0, |
||
592 | .svhs = 3, |
||
593 | .gpiomask = 7, |
||
594 | .muxsel = { 2, 0, 1, 1}, |
||
595 | .audiomux = { 0, 1, 2, 3, 4}, |
||
596 | .needs_tvaudio = 1, |
||
597 | .tuner_type = -1, |
||
170 | giacomo | 598 | },{ |
428 | giacomo | 599 | .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50", |
600 | .video_inputs = 4, |
||
601 | .audio_inputs = 2, |
||
602 | .tuner = 0, |
||
603 | .svhs = 2, |
||
604 | .gpiomask = 0x1800, |
||
605 | .muxsel = { 2, 3, 1, 1}, |
||
606 | .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800}, |
||
607 | .pll = PLL_28, |
||
608 | .tuner_type = TUNER_PHILIPS_SECAM, |
||
170 | giacomo | 609 | },{ |
610 | |||
611 | /* ---- card 0x1c ---------------------------------- */ |
||
428 | giacomo | 612 | .name = "Terratec TerraTV+ Version 1.1 (bt878)", |
613 | .video_inputs = 3, |
||
614 | .audio_inputs = 1, |
||
615 | .tuner = 0, |
||
616 | .svhs = 2, |
||
617 | .gpiomask = 0x1f0fff, |
||
618 | .muxsel = { 2, 3, 1, 1}, |
||
619 | .audiomux = { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000}, |
||
620 | .needs_tvaudio = 0, |
||
621 | .tuner_type = TUNER_PHILIPS_PAL, |
||
622 | .audio_hook = terratv_audio, |
||
623 | /* GPIO wiring: |
||
624 | External 20 pin connector (for Active Radio Upgrade board) |
||
625 | gpio00: i2c-sda |
||
626 | gpio01: i2c-scl |
||
627 | gpio02: om5610-data |
||
628 | gpio03: om5610-clk |
||
629 | gpio04: om5610-wre |
||
630 | gpio05: om5610-stereo |
||
631 | gpio06: rds6588-davn |
||
632 | gpio07: Pin 7 n.c. |
||
633 | gpio08: nIOW |
||
634 | gpio09+10: nIOR, nSEL ?? (bt878) |
||
635 | gpio09: nIOR (bt848) |
||
636 | gpio10: nSEL (bt848) |
||
637 | Sound Routing: |
||
638 | gpio16: u2-A0 (1st 4052bt) |
||
639 | gpio17: u2-A1 |
||
640 | gpio18: u2-nEN |
||
641 | gpio19: u4-A0 (2nd 4052) |
||
642 | gpio20: u4-A1 |
||
643 | u4-nEN - GND |
||
644 | Btspy: |
||
645 | 00000 : Cdrom (internal audio input) |
||
646 | 10000 : ext. Video audio input |
||
647 | 20000 : TV Mono |
||
648 | a0000 : TV Mono/2 |
||
649 | 1a0000 : TV Stereo |
||
650 | 30000 : Radio |
||
651 | 40000 : Mute |
||
652 | */ |
||
653 | |||
170 | giacomo | 654 | },{ |
655 | /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */ |
||
428 | giacomo | 656 | .name = "Imagenation PXC200", |
657 | .video_inputs = 5, |
||
658 | .audio_inputs = 1, |
||
659 | .tuner = -1, |
||
660 | .svhs = 1, /* was: 4 */ |
||
661 | .gpiomask = 0, |
||
662 | .muxsel = { 2, 3, 1, 0, 0}, |
||
663 | .audiomux = { 0 }, |
||
664 | .needs_tvaudio = 1, |
||
665 | .tuner_type = -1, |
||
170 | giacomo | 666 | },{ |
428 | giacomo | 667 | .name = "Lifeview FlyVideo 98 LR50", |
668 | .video_inputs = 4, |
||
669 | .audio_inputs = 1, |
||
670 | .tuner = 0, |
||
671 | .svhs = 2, |
||
672 | .gpiomask = 0x1800, //0x8dfe00 |
||
673 | .muxsel = { 2, 3, 1, 1}, |
||
674 | .audiomux = { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 }, |
||
675 | .pll = PLL_28, |
||
676 | .tuner_type = -1, |
||
170 | giacomo | 677 | },{ |
428 | giacomo | 678 | .name = "Formac iProTV, Formac ProTV I (bt848)", |
679 | .video_inputs = 4, |
||
680 | .audio_inputs = 1, |
||
681 | .tuner = 0, |
||
682 | .svhs = 3, |
||
683 | .gpiomask = 1, |
||
684 | .muxsel = { 2, 3, 1, 1}, |
||
685 | .audiomux = { 1, 0, 0, 0, 0 }, |
||
686 | .pll = PLL_28, |
||
687 | .tuner_type = TUNER_PHILIPS_PAL, |
||
170 | giacomo | 688 | },{ |
689 | |||
690 | /* ---- card 0x20 ---------------------------------- */ |
||
428 | giacomo | 691 | .name = "Intel Create and Share PCI/ Smart Video Recorder III", |
692 | .video_inputs = 4, |
||
693 | .audio_inputs = 0, |
||
694 | .tuner = -1, |
||
695 | .svhs = 2, |
||
696 | .gpiomask = 0, |
||
697 | .muxsel = { 2, 3, 1, 1}, |
||
698 | .audiomux = { 0 }, |
||
699 | .needs_tvaudio = 0, |
||
700 | .tuner_type = 4, |
||
170 | giacomo | 701 | },{ |
428 | giacomo | 702 | .name = "Terratec TerraTValue Version Bt878", |
703 | .video_inputs = 3, |
||
704 | .audio_inputs = 1, |
||
705 | .tuner = 0, |
||
706 | .svhs = 2, |
||
707 | .gpiomask = 0xffff00, |
||
708 | .muxsel = { 2, 3, 1, 1}, |
||
709 | .audiomux = { 0x500, 0, 0x300, 0x900, 0x900}, |
||
710 | .needs_tvaudio = 1, |
||
711 | .pll = PLL_28, |
||
712 | .tuner_type = TUNER_PHILIPS_PAL, |
||
170 | giacomo | 713 | },{ |
428 | giacomo | 714 | .name = "Leadtek WinFast 2000/ WinFast 2000 XP", |
715 | .video_inputs = 4, |
||
716 | .audio_inputs = 1, |
||
717 | .tuner = 0, |
||
718 | .svhs = 2, |
||
719 | .gpiomask = 0xc33000, |
||
720 | .muxsel = { 2, 3, 1, 1, 0}, // TV, CVid, SVid, CVid over SVid connector |
||
721 | .audiomux = { 0x422000,0x1000,0x0000,0x620000,0x800000}, |
||
722 | /* Audio Routing for "WinFast 2000 XP" (no tv stereo !) |
||
723 | gpio23 -- hef4052:nEnable (0x800000) |
||
724 | gpio12 -- hef4052:A1 |
||
725 | gpio13 -- hef4052:A0 |
||
726 | 0x0000: external audio |
||
727 | 0x1000: FM |
||
728 | 0x2000: TV |
||
729 | 0x3000: n.c. |
||
730 | Note: There exists another variant "Winfast 2000" with tv stereo !? |
||
731 | Note: eeprom only contains FF and pci subsystem id 107d:6606 |
||
732 | */ |
||
733 | .needs_tvaudio = 0, |
||
734 | .pll = PLL_28, |
||
735 | .has_radio = 1, |
||
736 | .tuner_type = 5, // default for now, gpio reads BFFF06 for Pal bg+dk |
||
737 | .audio_hook = winfast2000_audio, |
||
170 | giacomo | 738 | },{ |
428 | giacomo | 739 | .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II", |
740 | .video_inputs = 4, |
||
741 | .audio_inputs = 3, |
||
742 | .tuner = 0, |
||
743 | .svhs = 2, |
||
744 | .gpiomask = 0x1800, |
||
745 | .muxsel = { 2, 3, 1, 1}, |
||
746 | .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800}, |
||
747 | .pll = PLL_28, |
||
748 | .tuner_type = -1, |
||
170 | giacomo | 749 | },{ |
750 | |||
751 | /* ---- card 0x24 ---------------------------------- */ |
||
428 | giacomo | 752 | .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner", |
753 | .video_inputs = 4, |
||
754 | .audio_inputs = 3, |
||
755 | .tuner = 0, |
||
756 | .svhs = 2, |
||
757 | .gpiomask = 0x1800, |
||
758 | .muxsel = { 2, 3, 1, 1}, |
||
759 | .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 }, |
||
760 | .pll = PLL_28, |
||
761 | .tuner_type = -1, |
||
762 | .has_radio = 1, |
||
170 | giacomo | 763 | },{ |
428 | giacomo | 764 | .name = "Prolink PixelView PlayTV pro", |
765 | .video_inputs = 3, |
||
766 | .audio_inputs = 1, |
||
767 | .tuner = 0, |
||
768 | .svhs = 2, |
||
769 | .gpiomask = 0xff, |
||
770 | .muxsel = { 2, 3, 1, 1 }, |
||
771 | .audiomux = { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 }, |
||
772 | .no_msp34xx = 1, |
||
773 | .pll = PLL_28, |
||
774 | .tuner_type = -1, |
||
170 | giacomo | 775 | },{ |
428 | giacomo | 776 | .name = "Askey CPH06X TView99", |
777 | .video_inputs = 4, |
||
778 | .audio_inputs = 1, |
||
779 | .tuner = 0, |
||
780 | .svhs = 2, |
||
781 | .gpiomask = 0x551e00, |
||
782 | .muxsel = { 2, 3, 1, 0}, |
||
783 | .audiomux = { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 }, |
||
784 | .needs_tvaudio = 1, |
||
785 | .pll = PLL_28, |
||
786 | .tuner_type = 1, |
||
170 | giacomo | 787 | },{ |
428 | giacomo | 788 | .name = "Pinnacle PCTV Studio/Rave", |
789 | .video_inputs = 3, |
||
790 | .audio_inputs = 1, |
||
791 | .tuner = 0, |
||
792 | .svhs = 2, |
||
793 | .gpiomask = 0x03000F, |
||
794 | .muxsel = { 2, 3, 1, 1}, |
||
795 | .audiomux = { 2, 0, 0, 0, 1}, |
||
796 | .needs_tvaudio = 1, |
||
797 | .pll = PLL_28, |
||
798 | .tuner_type = -1, |
||
170 | giacomo | 799 | },{ |
800 | |||
801 | /* ---- card 0x28 ---------------------------------- */ |
||
428 | giacomo | 802 | .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100", |
803 | .video_inputs = 3, |
||
804 | .audio_inputs = 1, |
||
805 | .tuner = 0, |
||
806 | .svhs = 2, |
||
807 | .gpiomask = 7, |
||
808 | .muxsel = { 2, 3, 1, 1}, |
||
809 | .audiomux = { 4, 0, 2, 3, 1}, |
||
810 | .no_msp34xx = 1, |
||
811 | .needs_tvaudio = 1, |
||
812 | .tuner_type = TUNER_PHILIPS_NTSC, |
||
813 | .pll = PLL_28, |
||
814 | .has_radio = 1, |
||
170 | giacomo | 815 | },{ |
428 | giacomo | 816 | .name = "AVerMedia TVPhone 98", |
817 | .video_inputs = 3, |
||
818 | .audio_inputs = 4, |
||
819 | .tuner = 0, |
||
820 | .svhs = 2, |
||
821 | .gpiomask = 15, |
||
822 | .muxsel = { 2, 3, 1, 1}, |
||
823 | .audiomux = { 13, 4, 11, 7, 0, 0}, |
||
824 | .needs_tvaudio = 1, |
||
825 | .pll = PLL_28, |
||
826 | .tuner_type = -1, |
||
827 | .has_radio = 1, |
||
828 | .audio_hook = avermedia_tvphone_audio, |
||
170 | giacomo | 829 | },{ |
428 | giacomo | 830 | .name = "ProVideo PV951", /* pic16c54 */ |
831 | .video_inputs = 3, |
||
832 | .audio_inputs = 1, |
||
833 | .tuner = 0, |
||
834 | .svhs = 2, |
||
835 | .gpiomask = 0, |
||
836 | .muxsel = { 2, 3, 1, 1}, |
||
837 | .audiomux = { 0, 0, 0, 0, 0}, |
||
838 | .needs_tvaudio = 1, |
||
839 | .no_msp34xx = 1, |
||
840 | .pll = PLL_28, |
||
841 | .tuner_type = 1, |
||
170 | giacomo | 842 | },{ |
428 | giacomo | 843 | .name = "Little OnAir TV", |
844 | .video_inputs = 3, |
||
845 | .audio_inputs = 1, |
||
846 | .tuner = 0, |
||
847 | .svhs = 2, |
||
848 | .gpiomask = 0xe00b, |
||
849 | .muxsel = {2, 3, 1, 1}, |
||
850 | .audiomux = {0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc}, |
||
851 | .no_msp34xx = 1, |
||
852 | .tuner_type = -1, |
||
170 | giacomo | 853 | },{ |
854 | |||
855 | /* ---- card 0x2c ---------------------------------- */ |
||
428 | giacomo | 856 | .name = "Sigma TVII-FM", |
857 | .video_inputs = 2, |
||
858 | .audio_inputs = 1, |
||
859 | .tuner = 0, |
||
860 | .svhs = -1, |
||
861 | .gpiomask = 3, |
||
862 | .muxsel = {2, 3, 1, 1}, |
||
863 | .audiomux = {1, 1, 0, 2, 3}, |
||
864 | .no_msp34xx = 1, |
||
865 | .pll = PLL_NONE, |
||
866 | .tuner_type = -1, |
||
170 | giacomo | 867 | },{ |
428 | giacomo | 868 | .name = "MATRIX-Vision MV-Delta 2", |
869 | .video_inputs = 5, |
||
870 | .audio_inputs = 1, |
||
871 | .tuner = -1, |
||
872 | .svhs = 3, |
||
873 | .gpiomask = 0, |
||
874 | .muxsel = { 2, 3, 1, 0, 0}, |
||
875 | .audiomux = {0 }, |
||
876 | .no_msp34xx = 1, |
||
877 | .pll = PLL_28, |
||
878 | .tuner_type = -1, |
||
170 | giacomo | 879 | },{ |
428 | giacomo | 880 | .name = "Zoltrix Genie TV/FM", |
881 | .video_inputs = 3, |
||
882 | .audio_inputs = 1, |
||
883 | .tuner = 0, |
||
884 | .svhs = 2, |
||
885 | .gpiomask = 0xbcf03f, |
||
886 | .muxsel = { 2, 3, 1, 1}, |
||
887 | .audiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f}, |
||
888 | .no_msp34xx = 1, |
||
889 | .pll = PLL_28, |
||
890 | .tuner_type = 21, |
||
170 | giacomo | 891 | },{ |
428 | giacomo | 892 | .name = "Terratec TV/Radio+", |
893 | .video_inputs = 3, |
||
894 | .audio_inputs = 1, |
||
895 | .tuner = 0, |
||
896 | .svhs = 2, |
||
897 | .gpiomask = 0x70000, |
||
898 | .muxsel = { 2, 3, 1, 1}, |
||
899 | .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000, 0x20000 }, |
||
900 | .needs_tvaudio = 1, |
||
901 | .no_msp34xx = 1, |
||
902 | .pll = PLL_35, |
||
903 | .tuner_type = 1, |
||
904 | .has_radio = 1, |
||
170 | giacomo | 905 | },{ |
906 | |||
907 | /* ---- card 0x30 ---------------------------------- */ |
||
428 | giacomo | 908 | .name = "Askey CPH03x/ Dynalink Magic TView", |
909 | .video_inputs = 3, |
||
910 | .audio_inputs = 1, |
||
911 | .tuner = 0, |
||
912 | .svhs = 2, |
||
913 | .gpiomask = 15, |
||
914 | .muxsel = { 2, 3, 1, 1}, |
||
915 | .audiomux = {2,0,0,0,1}, |
||
916 | .needs_tvaudio = 1, |
||
917 | .pll = PLL_28, |
||
918 | .tuner_type = -1, |
||
170 | giacomo | 919 | },{ |
428 | giacomo | 920 | .name = "IODATA GV-BCTV3/PCI", |
921 | .video_inputs = 3, |
||
922 | .audio_inputs = 1, |
||
923 | .tuner = 0, |
||
924 | .svhs = 2, |
||
925 | .gpiomask = 0x010f00, |
||
926 | .muxsel = {2, 3, 0, 0}, |
||
927 | .audiomux = {0x10000, 0, 0x10000, 0, 0, 0}, |
||
928 | .no_msp34xx = 1, |
||
929 | .pll = PLL_28, |
||
930 | .tuner_type = TUNER_ALPS_TSHC6_NTSC, |
||
931 | .audio_hook = gvbctv3pci_audio, |
||
170 | giacomo | 932 | },{ |
428 | giacomo | 933 | .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP", |
934 | .video_inputs = 5, |
||
935 | .audio_inputs = 1, |
||
936 | .tuner = 0, |
||
937 | .svhs = 3, |
||
938 | .gpiomask = 0xAA0000, |
||
939 | .muxsel = { 2,3,1,1,-1 }, |
||
940 | .digital_mode = DIGITAL_MODE_CAMERA, |
||
941 | .audiomux = { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 }, |
||
942 | .no_msp34xx = 1, |
||
943 | .pll = PLL_28, |
||
944 | .tuner_type = TUNER_PHILIPS_PAL_I, |
||
945 | /* GPIO wiring: (different from Rev.4C !) |
||
946 | GPIO17: U4.A0 (first hef4052bt) |
||
947 | GPIO19: U4.A1 |
||
948 | GPIO20: U5.A1 (second hef4052bt) |
||
949 | GPIO21: U4.nEN |
||
950 | GPIO22: BT832 Reset Line |
||
951 | GPIO23: A5,A0, U5,nEN |
||
952 | Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22 |
||
953 | */ |
||
170 | giacomo | 954 | },{ |
428 | giacomo | 955 | .name = "Eagle Wireless Capricorn2 (bt878A)", |
956 | .video_inputs = 4, |
||
957 | .audio_inputs = 1, |
||
958 | .tuner = 0, |
||
959 | .svhs = 2, |
||
960 | .gpiomask = 7, |
||
961 | .muxsel = { 2, 0, 1, 1}, |
||
962 | .audiomux = { 0, 1, 2, 3, 4}, |
||
963 | .pll = PLL_28, |
||
964 | .tuner_type = -1 /* TUNER_ALPS_TMDH2_NTSC */, |
||
170 | giacomo | 965 | },{ |
966 | |||
967 | /* ---- card 0x34 ---------------------------------- */ |
||
428 | giacomo | 968 | /* David Härdeman <david@2gen.com> */ |
969 | .name = "Pinnacle PCTV Studio Pro", |
||
970 | .video_inputs = 4, |
||
971 | .audio_inputs = 1, |
||
972 | .tuner = 0, |
||
973 | .svhs = 3, |
||
974 | .gpiomask = 0x03000F, |
||
975 | .muxsel = { 2, 3, 1, 1}, |
||
976 | .audiomux = { 1, 0xd0001, 0, 0, 10}, |
||
977 | /* sound path (5 sources): |
||
978 | MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable) |
||
979 | 0= ext. Audio IN |
||
980 | 1= from MUX2 |
||
981 | 2= Mono TV sound from Tuner |
||
982 | 3= not connected |
||
983 | MUX2 (mask 0x30000): |
||
984 | 0,2,3= from MSP34xx |
||
985 | 1= FM stereo Radio from Tuner */ |
||
986 | .needs_tvaudio = 1, |
||
987 | .pll = PLL_28, |
||
988 | .tuner_type = -1, |
||
170 | giacomo | 989 | },{ |
990 | /* Claas Langbehn <claas@bigfoot.com>, |
||
991 | Sven Grothklags <sven@upb.de> */ |
||
428 | giacomo | 992 | .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS", |
993 | .video_inputs = 3, |
||
994 | .audio_inputs = 3, |
||
995 | .tuner = 0, |
||
996 | .svhs = 2, |
||
997 | .gpiomask = 0x1c, |
||
998 | .muxsel = { 2, 3, 1, 1}, |
||
999 | .audiomux = { 0, 0, 0x10, 8, 4 }, |
||
1000 | .needs_tvaudio = 1, |
||
1001 | .pll = PLL_28, |
||
1002 | .tuner_type = TUNER_PHILIPS_PAL_I, |
||
1003 | .has_radio = 1, |
||
170 | giacomo | 1004 | },{ |
428 | giacomo | 1005 | /* Tim Röstermundt <rosterm@uni-muenster.de> |
170 | giacomo | 1006 | in de.comp.os.unix.linux.hardware: |
1007 | options bttv card=0 pll=1 radio=1 gpiomask=0x18e0 |
||
1008 | audiomux=0x44c71f,0x44d71f,0,0x44d71f,0x44dfff |
||
1009 | options tuner type=5 */ |
||
428 | giacomo | 1010 | .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]", |
1011 | .video_inputs = 4, |
||
1012 | .audio_inputs = 1, |
||
1013 | .tuner = 0, |
||
1014 | .svhs = 2, |
||
1015 | .gpiomask = 0x18e0, |
||
1016 | .muxsel = { 2, 3, 1, 1}, |
||
1017 | .audiomux = { 0x0000,0x0800,0x1000,0x1000,0x18e0 }, |
||
1018 | /* For cards with tda9820/tda9821: |
||
1019 | 0x0000: Tuner normal stereo |
||
170 | giacomo | 1020 | 0x0080: Tuner A2 SAP (second audio program = Zweikanalton) |
1021 | 0x0880: Tuner A2 stereo */ |
||
428 | giacomo | 1022 | .pll = PLL_28, |
1023 | .tuner_type = -1, |
||
170 | giacomo | 1024 | },{ |
1025 | /* Miguel Angel Alvarez <maacruz@navegalia.com> |
||
1026 | old Easy TV BT848 version (model CPH031) */ |
||
428 | giacomo | 1027 | .name = "Askey CPH031/ BESTBUY Easy TV", |
1028 | .video_inputs = 4, |
||
1029 | .audio_inputs = 1, |
||
1030 | .tuner = 0, |
||
1031 | .svhs = 2, |
||
1032 | .gpiomask = 0xF, |
||
1033 | .muxsel = { 2, 3, 1, 0}, |
||
1034 | .audiomux = { 2, 0, 0, 0, 10}, |
||
1035 | .needs_tvaudio = 0, |
||
1036 | .pll = PLL_28, |
||
1037 | .tuner_type = TUNER_TEMIC_PAL, |
||
170 | giacomo | 1038 | },{ |
1039 | |||
1040 | /* ---- card 0x38 ---------------------------------- */ |
||
1041 | /* Gordon Heydon <gjheydon@bigfoot.com ('98) */ |
||
428 | giacomo | 1042 | .name = "Lifeview FlyVideo 98FM LR50", |
1043 | .video_inputs = 4, |
||
1044 | .audio_inputs = 3, |
||
1045 | .tuner = 0, |
||
1046 | .svhs = 2, |
||
1047 | .gpiomask = 0x1800, |
||
1048 | .muxsel = { 2, 3, 1, 1}, |
||
1049 | .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 }, |
||
1050 | .pll = PLL_28, |
||
1051 | .tuner_type = 5, |
||
170 | giacomo | 1052 | },{ |
1053 | /* This is the ultimate cheapo capture card |
||
1054 | * just a BT848A on a small PCB! |
||
1055 | * Steve Hosgood <steve@equiinet.com> */ |
||
428 | giacomo | 1056 | .name = "GrandTec 'Grand Video Capture' (Bt848)", |
1057 | .video_inputs = 2, |
||
1058 | .audio_inputs = 0, |
||
1059 | .tuner = -1, |
||
1060 | .svhs = 1, |
||
1061 | .gpiomask = 0, |
||
1062 | .muxsel = { 3, 1 }, |
||
1063 | .audiomux = { 0 }, |
||
1064 | .needs_tvaudio = 0, |
||
1065 | .no_msp34xx = 1, |
||
1066 | .pll = PLL_35, |
||
1067 | .tuner_type = -1, |
||
170 | giacomo | 1068 | },{ |
1069 | /* Daniel Herrington <daniel.herrington@home.com> */ |
||
428 | giacomo | 1070 | .name = "Askey CPH060/ Phoebe TV Master Only (No FM)", |
1071 | .video_inputs = 3, |
||
1072 | .audio_inputs = 1, |
||
1073 | .tuner = 0, |
||
1074 | .svhs = 2, |
||
1075 | .gpiomask = 0xe00, |
||
1076 | .muxsel = { 2, 3, 1, 1}, |
||
1077 | .audiomux = { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 }, |
||
1078 | .needs_tvaudio = 1, |
||
1079 | .pll = PLL_28, |
||
1080 | .tuner_type = TUNER_TEMIC_4036FY5_NTSC, |
||
170 | giacomo | 1081 | },{ |
1082 | /* Matti Mottus <mottus@physic.ut.ee> */ |
||
428 | giacomo | 1083 | .name = "Askey CPH03x TV Capturer", |
1084 | .video_inputs = 4, |
||
1085 | .audio_inputs = 1, |
||
1086 | .tuner = 0, |
||
1087 | .svhs = 2, |
||
1088 | .gpiomask = 0x03000F, |
||
1089 | .muxsel = { 2, 3, 1, 0}, |
||
1090 | .audiomux = { 2,0,0,0,1 }, |
||
1091 | .pll = PLL_28, |
||
1092 | .tuner_type = 0, |
||
170 | giacomo | 1093 | },{ |
1094 | |||
1095 | /* ---- card 0x3c ---------------------------------- */ |
||
1096 | /* Philip Blundell <philb@gnu.org> */ |
||
428 | giacomo | 1097 | .name = "Modular Technology MM100PCTV", |
1098 | .video_inputs = 2, |
||
1099 | .audio_inputs = 2, |
||
1100 | .tuner = 0, |
||
1101 | .svhs = -1, |
||
1102 | .gpiomask = 11, |
||
1103 | .muxsel = { 2, 3, 1, 1}, |
||
1104 | .audiomux = { 2, 0, 0, 1, 8}, |
||
1105 | .pll = PLL_35, |
||
1106 | .tuner_type = TUNER_TEMIC_PAL, |
||
170 | giacomo | 1107 | |
1108 | },{ |
||
1109 | /* Adrian Cox <adrian@humboldt.co.uk */ |
||
428 | giacomo | 1110 | .name = "AG Electronics GMV1", |
1111 | .video_inputs = 2, |
||
1112 | .audio_inputs = 0, |
||
1113 | .tuner = -1, |
||
1114 | .svhs = 1, |
||
1115 | .gpiomask = 0xF, |
||
1116 | .muxsel = { 2, 2}, |
||
1117 | .audiomux = { }, |
||
1118 | .no_msp34xx = 1, |
||
1119 | .needs_tvaudio = 0, |
||
1120 | .pll = PLL_28, |
||
1121 | .tuner_type = -1, |
||
170 | giacomo | 1122 | },{ |
1123 | /* Miguel Angel Alvarez <maacruz@navegalia.com> |
||
1124 | new Easy TV BT878 version (model CPH061) |
||
1125 | special thanks to Informatica Mieres for providing the card */ |
||
428 | giacomo | 1126 | .name = "Askey CPH061/ BESTBUY Easy TV (bt878)", |
1127 | .video_inputs = 3, |
||
1128 | .audio_inputs = 2, |
||
1129 | .tuner = 0, |
||
1130 | .svhs = 2, |
||
1131 | .gpiomask = 0xFF, |
||
1132 | .muxsel = { 2, 3, 1, 0}, |
||
1133 | .audiomux = { 1, 0, 4, 4, 9}, |
||
1134 | .needs_tvaudio = 0, |
||
1135 | .pll = PLL_28, |
||
1136 | .tuner_type = TUNER_PHILIPS_PAL, |
||
170 | giacomo | 1137 | },{ |
1138 | /* Lukas Gebauer <geby@volny.cz> */ |
||
428 | giacomo | 1139 | .name = "ATI TV-Wonder", |
1140 | .video_inputs = 3, |
||
1141 | .audio_inputs = 1, |
||
1142 | .tuner = 0, |
||
1143 | .svhs = 2, |
||
1144 | .gpiomask = 0xf03f, |
||
1145 | .muxsel = { 2, 3, 1, 0 }, |
||
1146 | .audiomux = { 0xbffe, 0, 0xbfff, 0, 0xbffe}, |
||
1147 | .pll = PLL_28, |
||
1148 | .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL, |
||
170 | giacomo | 1149 | },{ |
1150 | |||
1151 | /* ---- card 0x40 ---------------------------------- */ |
||
1152 | /* Lukas Gebauer <geby@volny.cz> */ |
||
428 | giacomo | 1153 | .name = "ATI TV-Wonder VE", |
1154 | .video_inputs = 2, |
||
1155 | .audio_inputs = 1, |
||
1156 | .tuner = 0, |
||
1157 | .svhs = -1, |
||
1158 | .gpiomask = 1, |
||
1159 | .muxsel = { 2, 3, 0, 1}, |
||
1160 | .audiomux = { 0, 0, 1, 0, 0}, |
||
1161 | .no_msp34xx = 1, |
||
1162 | .pll = PLL_28, |
||
1163 | .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL, |
||
170 | giacomo | 1164 | },{ |
1165 | /* DeeJay <deejay@westel900.net (2000S) */ |
||
428 | giacomo | 1166 | .name = "Lifeview FlyVideo 2000S LR90", |
1167 | .video_inputs = 3, |
||
1168 | .audio_inputs = 3, |
||
1169 | .tuner = 0, |
||
1170 | .svhs = 2, |
||
1171 | .gpiomask = 0x18e0, |
||
1172 | .muxsel = { 2, 3, 0, 1}, |
||
170 | giacomo | 1173 | /* Radio changed from 1e80 to 0x800 to make |
428 | giacomo | 1174 | FlyVideo2000S in .hu happy (gm)*/ |
170 | giacomo | 1175 | /* -dk-???: set mute=0x1800 for tda9874h daughterboard */ |
428 | giacomo | 1176 | .audiomux = { 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 }, |
1177 | .audio_hook = fv2000s_audio, |
||
1178 | .no_msp34xx = 1, |
||
1179 | .no_tda9875 = 1, |
||
1180 | .needs_tvaudio = 1, |
||
1181 | .pll = PLL_28, |
||
1182 | .tuner_type = 5, |
||
170 | giacomo | 1183 | },{ |
428 | giacomo | 1184 | .name = "Terratec TValueRadio", |
1185 | .video_inputs = 3, |
||
1186 | .audio_inputs = 1, |
||
1187 | .tuner = 0, |
||
1188 | .svhs = 2, |
||
1189 | .gpiomask = 0xffff00, |
||
1190 | .muxsel = { 2, 3, 1, 1}, |
||
1191 | .audiomux = { 0x500, 0x500, 0x300, 0x900, 0x900}, |
||
1192 | .needs_tvaudio = 1, |
||
1193 | .pll = PLL_28, |
||
1194 | .tuner_type = TUNER_PHILIPS_PAL, |
||
1195 | .has_radio = 1, |
||
170 | giacomo | 1196 | },{ |
1197 | /* TANAKA Kei <peg00625@nifty.com> */ |
||
428 | giacomo | 1198 | .name = "IODATA GV-BCTV4/PCI", |
1199 | .video_inputs = 3, |
||
1200 | .audio_inputs = 1, |
||
1201 | .tuner = 0, |
||
1202 | .svhs = 2, |
||
1203 | .gpiomask = 0x010f00, |
||
1204 | .muxsel = {2, 3, 0, 0}, |
||
1205 | .audiomux = {0x10000, 0, 0x10000, 0, 0, 0}, |
||
1206 | .no_msp34xx = 1, |
||
1207 | .pll = PLL_28, |
||
1208 | .tuner_type = TUNER_SHARP_2U5JF5540_NTSC, |
||
1209 | .audio_hook = gvbctv3pci_audio, |
||
170 | giacomo | 1210 | },{ |
1211 | |||
1212 | /* ---- card 0x44 ---------------------------------- */ |
||
428 | giacomo | 1213 | .name = "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)", |
170 | giacomo | 1214 | // try "insmod msp3400 simple=0" if you have |
1215 | // sound problems with this card. |
||
428 | giacomo | 1216 | .video_inputs = 4, |
1217 | .audio_inputs = 1, |
||
1218 | .tuner = 0, |
||
1219 | .svhs = -1, |
||
1220 | .gpiomask = 0x4f8a00, |
||
170 | giacomo | 1221 | // 0x100000: 1=MSP enabled (0=disable again) |
1222 | // 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) |
||
428 | giacomo | 1223 | .audiomux = {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff}, |
170 | giacomo | 1224 | // tvtuner, radio, external,internal, mute, stereo |
1225 | /* tuner, Composit, SVid, Composit-on-Svid-adapter*/ |
||
428 | giacomo | 1226 | .muxsel = { 2, 3 ,0 ,1}, |
1227 | .tuner_type = TUNER_MT2032, |
||
1228 | .pll = PLL_28, |
||
1229 | .has_radio = 1, |
||
170 | giacomo | 1230 | },{ |
1231 | /* Philip Blundell <pb@nexus.co.uk> */ |
||
428 | giacomo | 1232 | .name = "Active Imaging AIMMS", |
1233 | .video_inputs = 1, |
||
1234 | .audio_inputs = 0, |
||
1235 | .tuner = -1, |
||
1236 | .tuner_type = -1, |
||
1237 | .pll = PLL_28, |
||
1238 | .muxsel = { 2 }, |
||
1239 | .gpiomask = 0 |
||
170 | giacomo | 1240 | },{ |
1241 | /* Tomasz Pyra <hellfire@sedez.iq.pl> */ |
||
428 | giacomo | 1242 | .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)", |
1243 | .video_inputs = 3, |
||
1244 | .audio_inputs = 4, |
||
1245 | .tuner = 0, |
||
1246 | .svhs = 2, |
||
1247 | .gpiomask = 15, |
||
1248 | .muxsel = { 2, 3, 1, 1}, |
||
1249 | .audiomux = { 0, 0, 11, 7, 13, 0}, // TV and Radio with same GPIO ! |
||
1250 | .needs_tvaudio = 1, |
||
1251 | .pll = PLL_28, |
||
1252 | .tuner_type = 25, |
||
1253 | /* GPIO wiring: |
||
1254 | GPIO0: U4.A0 (hef4052bt) |
||
1255 | GPIO1: U4.A1 |
||
1256 | GPIO2: U4.A1 (second hef4052bt) |
||
1257 | GPIO3: U4.nEN, U5.A0, A5.nEN |
||
1258 | GPIO8-15: vrd866b ? |
||
1259 | */ |
||
170 | giacomo | 1260 | },{ |
428 | giacomo | 1261 | .name = "Lifeview FlyVideo 98EZ (capture only) LR51", |
1262 | .video_inputs = 4, |
||
1263 | .audio_inputs = 0, |
||
1264 | .tuner = -1, |
||
1265 | .svhs = 2, |
||
1266 | .muxsel = { 2, 3, 1, 1}, // AV1, AV2, SVHS, CVid adapter on SVHS |
||
1267 | .pll = PLL_28, |
||
1268 | .no_msp34xx = 1, |
||
170 | giacomo | 1269 | },{ |
1270 | |||
1271 | /* ---- card 0x48 ---------------------------------- */ |
||
1272 | /* Dariusz Kowalewski <darekk@automex.pl> */ |
||
428 | giacomo | 1273 | .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)", |
1274 | .video_inputs = 4, |
||
1275 | .audio_inputs = 1, |
||
1276 | .tuner = 0, |
||
1277 | .svhs = 2, |
||
1278 | .gpiomask = 0x3f, |
||
1279 | .muxsel = { 2, 3, 1, 1 }, |
||
1280 | .audiomux = { 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 }, |
||
1281 | .needs_tvaudio = 1, |
||
1282 | .no_msp34xx = 1, |
||
1283 | .no_tda9875 = 1, |
||
1284 | .pll = PLL_28, |
||
1285 | .tuner_type = 5, |
||
1286 | .audio_hook = pvbt878p9b_audio, // Note: not all cards have stereo |
||
1287 | .has_radio = 1, // Note: not all cards have radio |
||
1288 | /* GPIO wiring: |
||
1289 | GPIO0: A0 hef4052 |
||
1290 | GPIO1: A1 hef4052 |
||
1291 | GPIO3: nEN hef4052 |
||
1292 | GPIO8-15: vrd866b |
||
1293 | GPIO20,22,23: R30,R29,R28 |
||
1294 | */ |
||
170 | giacomo | 1295 | },{ |
1296 | /* Clay Kunz <ckunz@mail.arc.nasa.gov> */ |
||
1297 | /* you must jumper JP5 for the card to work */ |
||
428 | giacomo | 1298 | .name = "Sensoray 311", |
1299 | .video_inputs = 5, |
||
1300 | .audio_inputs = 0, |
||
1301 | .tuner = -1, |
||
1302 | .svhs = 4, |
||
1303 | .gpiomask = 0, |
||
1304 | .muxsel = { 2, 3, 1, 0, 0}, |
||
1305 | .audiomux = { 0 }, |
||
1306 | .needs_tvaudio = 0, |
||
1307 | .tuner_type = -1, |
||
170 | giacomo | 1308 | },{ |
1309 | /* Miguel Freitas <miguel@cetuc.puc-rio.br> */ |
||
428 | giacomo | 1310 | .name = "RemoteVision MX (RV605)", |
1311 | .video_inputs = 16, |
||
1312 | .audio_inputs = 0, |
||
1313 | .tuner = -1, |
||
1314 | .svhs = -1, |
||
1315 | .gpiomask = 0x00, |
||
1316 | .gpiomask2 = 0x07ff, |
||
1317 | .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03, |
||
170 | giacomo | 1318 | 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 }, |
428 | giacomo | 1319 | .no_msp34xx = 1, |
1320 | .no_tda9875 = 1, |
||
1321 | .tuner_type = -1, |
||
1322 | .muxsel_hook = rv605_muxsel, |
||
170 | giacomo | 1323 | },{ |
428 | giacomo | 1324 | .name = "Powercolor MTV878/ MTV878R/ MTV878F", |
1325 | .video_inputs = 3, |
||
1326 | .audio_inputs = 2, |
||
1327 | .tuner = 0, |
||
1328 | .svhs = 2, |
||
1329 | .gpiomask = 0x1C800F, // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset |
||
1330 | .muxsel = { 2, 1, 1, }, |
||
1331 | .audiomux = { 0, 1, 2, 2, 4 }, |
||
1332 | .needs_tvaudio = 0, |
||
1333 | .tuner_type = TUNER_PHILIPS_PAL, |
||
1334 | .pll = PLL_28, |
||
1335 | .has_radio = 1, |
||
170 | giacomo | 1336 | },{ |
1337 | |||
1338 | /* ---- card 0x4c ---------------------------------- */ |
||
1339 | /* Masaki Suzuki <masaki@btree.org> */ |
||
428 | giacomo | 1340 | .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)", |
1341 | .video_inputs = 3, |
||
1342 | .audio_inputs = 1, |
||
1343 | .tuner = 0, |
||
1344 | .svhs = 2, |
||
1345 | .gpiomask = 0x140007, |
||
1346 | .muxsel = { 2, 3, 1, 1 }, |
||
1347 | .audiomux = { 0, 1, 2, 3, 4, 0 }, |
||
1348 | .tuner_type = TUNER_PHILIPS_NTSC, |
||
1349 | .audio_hook = windvr_audio, |
||
170 | giacomo | 1350 | },{ |
428 | giacomo | 1351 | .name = "GrandTec Multi Capture Card (Bt878)", |
1352 | .video_inputs = 4, |
||
1353 | .audio_inputs = 0, |
||
1354 | .tuner = -1, |
||
1355 | .svhs = -1, |
||
1356 | .gpiomask = 0, |
||
1357 | .muxsel = { 2, 3, 1, 0 }, |
||
1358 | .audiomux = { 0 }, |
||
1359 | .needs_tvaudio = 0, |
||
1360 | .no_msp34xx = 1, |
||
1361 | .pll = PLL_28, |
||
1362 | .tuner_type = -1, |
||
170 | giacomo | 1363 | },{ |
428 | giacomo | 1364 | .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF", |
1365 | .video_inputs = 4, |
||
1366 | .audio_inputs = 3, |
||
1367 | .tuner = 0, |
||
1368 | .svhs = 2, |
||
1369 | .gpiomask = 7, |
||
1370 | .muxsel = { 2, 3, 1, 1 }, // Tuner, SVid, SVHS, SVid to SVHS connector |
||
1371 | .audiomux = { 0 ,0 ,4, 4,4,4},// Yes, this tuner uses the same audio output for TV and FM radio! |
||
1372 | // This card lacks external Audio In, so we mute it on Ext. & Int. |
||
1373 | // The PCB can take a sbx1637/sbx1673, wiring unknown. |
||
1374 | // This card lacks PCI subsystem ID, sigh. |
||
1375 | // audiomux=1: lower volume, 2+3: mute |
||
1376 | // btwincap uses 0x80000/0x80003 |
||
1377 | .needs_tvaudio = 0, |
||
1378 | .no_msp34xx = 1, |
||
1379 | .pll = PLL_28, |
||
1380 | .tuner_type = 5, // Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and |
||
1381 | // radio signal strength indicators work fine. |
||
1382 | .has_radio = 1, |
||
1383 | /* GPIO Info: |
||
1384 | GPIO0,1: HEF4052 A0,A1 |
||
1385 | GPIO2: HEF4052 nENABLE |
||
1386 | GPIO3-7: n.c. |
||
1387 | GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card] |
||
1388 | GPIO14,15: ?? |
||
1389 | GPIO16-21: n.c. |
||
1390 | GPIO22,23: ?? |
||
1391 | ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/ |
||
170 | giacomo | 1392 | },{ |
428 | giacomo | 1393 | /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */ |
1394 | .name = "DSP Design TCVIDEO", |
||
1395 | .video_inputs = 4, |
||
1396 | .svhs = -1, |
||
1397 | .muxsel = { 2, 3, 1, 0}, |
||
1398 | .pll = PLL_28, |
||
1399 | .tuner_type = -1, |
||
170 | giacomo | 1400 | },{ |
428 | giacomo | 1401 | |
1402 | /* ---- card 0x50 ---------------------------------- */ |
||
1403 | .name = "Hauppauge WinTV PVR", |
||
1404 | .video_inputs = 4, |
||
1405 | .audio_inputs = 1, |
||
1406 | .tuner = 0, |
||
1407 | .svhs = 2, |
||
1408 | .muxsel = { 2, 0, 1, 1}, |
||
1409 | .needs_tvaudio = 1, |
||
1410 | .pll = PLL_28, |
||
1411 | .tuner_type = -1, |
||
1412 | |||
1413 | .gpiomask = 7, |
||
1414 | .audiomux = {7}, |
||
170 | giacomo | 1415 | },{ |
428 | giacomo | 1416 | .name = "IODATA GV-BCTV5/PCI", |
1417 | .video_inputs = 3, |
||
1418 | .audio_inputs = 1, |
||
1419 | .tuner = 0, |
||
1420 | .svhs = 2, |
||
1421 | .gpiomask = 0x0f0f80, |
||
1422 | .muxsel = {2, 3, 1, 0}, |
||
1423 | .audiomux = {0x030000, 0x010000, 0x030000, 0, 0x020000, 0}, |
||
1424 | .no_msp34xx = 1, |
||
1425 | .pll = PLL_28, |
||
1426 | .tuner_type = TUNER_PHILIPS_NTSC_M, |
||
1427 | .audio_hook = gvbctv3pci_audio, |
||
1428 | .has_radio = 1, |
||
170 | giacomo | 1429 | },{ |
428 | giacomo | 1430 | .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */ |
1431 | .video_inputs = 4, /* id-inputs-clock */ |
||
1432 | .audio_inputs = 0, |
||
1433 | .tuner = -1, |
||
1434 | .svhs = 3, |
||
1435 | .muxsel = { 3, 2, 0, 1 }, |
||
1436 | .pll = PLL_28, |
||
1437 | .tuner_type = -1, |
||
1438 | .no_msp34xx = 1, |
||
1439 | .no_tda9875 = 1, |
||
1440 | .no_tda7432 = 1, |
||
170 | giacomo | 1441 | },{ |
428 | giacomo | 1442 | .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */ |
1443 | .video_inputs = 3, |
||
1444 | .audio_inputs = 0, |
||
1445 | .tuner = -1, |
||
1446 | .svhs = 2, |
||
1447 | .muxsel = { 2, 3, 1 }, |
||
1448 | .pll = PLL_28, |
||
1449 | .tuner_type = -1, |
||
1450 | .no_msp34xx = 1, |
||
1451 | .no_tda9875 = 1, |
||
1452 | .no_tda7432 = 1, |
||
170 | giacomo | 1453 | },{ |
428 | giacomo | 1454 | |
1455 | /* ---- card 0x54 ---------------------------------- */ |
||
1456 | .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */ |
||
1457 | .video_inputs = 2, |
||
1458 | .audio_inputs = 0, |
||
1459 | .tuner = -1, |
||
1460 | .svhs = 1, |
||
1461 | .muxsel = { 3, 1 }, |
||
1462 | .pll = PLL_28, |
||
1463 | .tuner_type = -1, |
||
1464 | .no_msp34xx = 1, |
||
1465 | .no_tda9875 = 1, |
||
1466 | .no_tda7432 = 1, |
||
170 | giacomo | 1467 | },{ |
428 | giacomo | 1468 | .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */ |
1469 | .video_inputs = 1, |
||
1470 | .audio_inputs = 0, |
||
1471 | .tuner = -1, |
||
1472 | .svhs = -1, |
||
1473 | .muxsel = { 0 }, |
||
1474 | .pll = PLL_28, |
||
1475 | .tuner_type = -1, |
||
1476 | .no_msp34xx = 1, |
||
1477 | .no_tda9875 = 1, |
||
1478 | .no_tda7432 = 1, |
||
170 | giacomo | 1479 | },{ |
428 | giacomo | 1480 | .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */ |
1481 | .video_inputs = 2, |
||
1482 | .audio_inputs = 0, |
||
1483 | .tuner = -1, |
||
1484 | .svhs = 1, |
||
1485 | .muxsel = { 0, 1 }, |
||
1486 | .pll = PLL_28, |
||
1487 | .tuner_type = -1, |
||
1488 | .no_msp34xx = 1, |
||
1489 | .no_tda9875 = 1, |
||
1490 | .no_tda7432 = 1, |
||
170 | giacomo | 1491 | },{ |
428 | giacomo | 1492 | .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */ |
1493 | .video_inputs = 1, |
||
1494 | .audio_inputs = 1, |
||
1495 | .tuner = -1, |
||
1496 | .svhs = -1, |
||
1497 | .muxsel = { 0 }, |
||
1498 | .pll = PLL_28, |
||
1499 | .tuner_type = -1, |
||
1500 | .no_msp34xx = 1, |
||
1501 | .no_tda9875 = 1, |
||
1502 | .no_tda7432 = 1, |
||
170 | giacomo | 1503 | },{ |
428 | giacomo | 1504 | |
1505 | /* ---- card 0x58 ---------------------------------- */ |
||
1506 | .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */ |
||
1507 | .video_inputs = 2, |
||
1508 | .audio_inputs = 1, |
||
1509 | .tuner = -1, |
||
1510 | .svhs = 1, |
||
1511 | .muxsel = { 0, 1 }, |
||
1512 | .pll = PLL_28, |
||
1513 | .tuner_type = -1, |
||
1514 | .no_msp34xx = 1, |
||
1515 | .no_tda9875 = 1, |
||
1516 | .no_tda7432 = 1, |
||
1517 | },{ |
||
1518 | .name = "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */ |
||
1519 | .video_inputs = 2, |
||
1520 | .audio_inputs = 1, |
||
1521 | .tuner = -1, |
||
1522 | .svhs = 1, |
||
1523 | .muxsel = { 2, 3 }, |
||
1524 | .pll = PLL_28, |
||
1525 | .tuner_type = -1, |
||
1526 | .no_msp34xx = 1, |
||
1527 | .no_tda9875 = 1, |
||
1528 | .no_tda7432 = 1, |
||
1529 | },{ |
||
1530 | .name = "Osprey 500", /* 500 */ |
||
1531 | .video_inputs = 2, |
||
1532 | .audio_inputs = 1, |
||
1533 | .tuner = -1, |
||
1534 | .svhs = 1, |
||
1535 | .muxsel = { 2, 3 }, |
||
1536 | .pll = PLL_28, |
||
1537 | .tuner_type = -1, |
||
1538 | .no_msp34xx = 1, |
||
1539 | .no_tda9875 = 1, |
||
1540 | .no_tda7432 = 1, |
||
1541 | },{ |
||
1542 | .name = "Osprey 540", /* 540 */ |
||
1543 | .video_inputs = 4, |
||
1544 | .audio_inputs = 1, |
||
1545 | .tuner = -1, |
||
1546 | #if 0 /* TODO ... */ |
||
1547 | .svhs = OSPREY540_SVID_ANALOG, |
||
1548 | .muxsel = { [OSPREY540_COMP_ANALOG] = 2, |
||
1549 | [OSPREY540_SVID_ANALOG] = 3, }, |
||
1550 | #endif |
||
1551 | .pll = PLL_28, |
||
1552 | .tuner_type = -1, |
||
1553 | .no_msp34xx = 1, |
||
1554 | .no_tda9875 = 1, |
||
1555 | .no_tda7432 = 1, |
||
1556 | #if 0 /* TODO ... */ |
||
1557 | .muxsel_hook = osprey_540_muxsel, |
||
1558 | .picture_hook = osprey_540_set_picture, |
||
1559 | #endif |
||
1560 | },{ |
||
1561 | |||
1562 | /* ---- card 0x5C ---------------------------------- */ |
||
1563 | .name = "Osprey 2000", /* 2000 */ |
||
1564 | .video_inputs = 2, |
||
1565 | .audio_inputs = 1, |
||
1566 | .tuner = -1, |
||
1567 | .svhs = 1, |
||
1568 | .muxsel = { 2, 3 }, |
||
1569 | .pll = PLL_28, |
||
1570 | .tuner_type = -1, |
||
1571 | .no_msp34xx = 1, |
||
1572 | .no_tda9875 = 1, |
||
1573 | .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */ |
||
1574 | },{ |
||
1575 | /* M G Berberich <berberic@forwiss.uni-passau.de> */ |
||
1576 | .name = "IDS Eagle", |
||
1577 | .video_inputs = 4, |
||
1578 | .audio_inputs = 0, |
||
1579 | .tuner = -1, |
||
1580 | .tuner_type = -1, |
||
1581 | .svhs = -1, |
||
1582 | .gpiomask = 0, |
||
1583 | .muxsel = { 0, 1, 2, 3 }, |
||
1584 | .muxsel_hook = eagle_muxsel, |
||
1585 | .no_msp34xx = 1, |
||
1586 | .no_tda9875 = 1, |
||
1587 | .pll = PLL_28, |
||
1588 | },{ |
||
1589 | .name = "Pinnacle PCTV Sat", |
||
1590 | .video_inputs = 2, |
||
1591 | .audio_inputs = 0, |
||
1592 | .svhs = 1, |
||
1593 | .tuner = -1, |
||
1594 | .tuner_type = -1, |
||
1595 | .no_msp34xx = 1, |
||
1596 | .no_tda9875 = 1, |
||
1597 | .no_tda7432 = 1, |
||
1598 | .gpiomask = 0x01, |
||
1599 | .audiomux = { 0, 0, 0, 0, 1 }, |
||
1600 | .muxsel = { 3, 0, 1, 2}, |
||
1601 | .needs_tvaudio = 0, |
||
1602 | .pll = PLL_28, |
||
1603 | },{ |
||
1604 | .name = "Formac ProTV II (bt878)", |
||
1605 | .video_inputs = 4, |
||
1606 | .audio_inputs = 1, |
||
1607 | .tuner = 0, |
||
1608 | .svhs = 3, |
||
1609 | .gpiomask = 2, |
||
1610 | // TV, Comp1, Composite over SVID con, SVID |
||
1611 | .muxsel = { 2, 3, 1, 1}, |
||
1612 | .audiomux = { 2, 2, 0, 0, 0 }, |
||
1613 | .pll = PLL_28, |
||
1614 | .has_radio = 1, |
||
1615 | .tuner_type = TUNER_PHILIPS_PAL, |
||
1616 | /* sound routing: |
||
1617 | GPIO=0x00,0x01,0x03: mute (?) |
||
1618 | 0x02: both TV and radio (tuner: FM1216/I) |
||
1619 | The card has onboard audio connectors labeled "cdrom" and "board", |
||
1620 | not soldered here, though unknown wiring. |
||
1621 | Card lacks: external audio in, pci subsystem id. |
||
1622 | */ |
||
1623 | },{ |
||
1624 | |||
1625 | /* ---- card 0x60 ---------------------------------- */ |
||
1626 | .name = "MachTV", |
||
1627 | .video_inputs = 3, |
||
1628 | .audio_inputs = 1, |
||
1629 | .tuner = 0, |
||
1630 | .svhs = -1, |
||
1631 | .gpiomask = 7, |
||
1632 | .muxsel = { 2, 3, 1, 1}, |
||
1633 | .audiomux = { 0, 1, 2, 3, 4}, |
||
1634 | .needs_tvaudio = 1, |
||
1635 | .tuner_type = 5, |
||
1636 | .pll = 1, |
||
1637 | },{ |
||
1638 | .name = "Euresys Picolo", |
||
1639 | .video_inputs = 3, |
||
1640 | .audio_inputs = 0, |
||
1641 | .tuner = -1, |
||
1642 | .svhs = 2, |
||
1643 | .gpiomask = 0, |
||
1644 | .no_msp34xx = 1, |
||
1645 | .no_tda9875 = 1, |
||
1646 | .no_tda7432 = 1, |
||
1647 | .muxsel = { 2, 0, 1}, |
||
1648 | .pll = PLL_28, |
||
1649 | },{ |
||
1650 | /* Luc Van Hoeylandt <luc@e-magic.be> */ |
||
1651 | .name = "ProVideo PV150", /* 0x4f */ |
||
1652 | .video_inputs = 2, |
||
1653 | .audio_inputs = 0, |
||
1654 | .tuner = -1, |
||
1655 | .svhs = -1, |
||
1656 | .gpiomask = 0, |
||
1657 | .muxsel = { 2, 3 }, |
||
1658 | .audiomux = { 0 }, |
||
1659 | .needs_tvaudio = 0, |
||
1660 | .no_msp34xx = 1, |
||
1661 | .pll = PLL_28, |
||
1662 | .tuner_type = -1, |
||
1663 | },{ |
||
1664 | /* Hiroshi Takekawa <sian@big.or.jp> */ |
||
1665 | /* This card lacks subsystem ID */ |
||
1666 | .name = "AD-TVK503", /* 0x63 */ |
||
1667 | .video_inputs = 4, |
||
1668 | .audio_inputs = 1, |
||
1669 | .tuner = 0, |
||
1670 | .svhs = 2, |
||
1671 | .gpiomask = 0x001e8007, |
||
1672 | .muxsel = { 2, 3, 1, 0 }, |
||
1673 | /* Tuner, Radio, external, internal, off, on */ |
||
1674 | .audiomux = { 0x08, 0x0f, 0x0a, 0x08, 0x0f, 0x08 }, |
||
1675 | .needs_tvaudio = 0, |
||
1676 | .no_msp34xx = 1, |
||
1677 | .pll = PLL_28, |
||
1678 | .tuner_type = 2, |
||
1679 | .audio_hook = adtvk503_audio, |
||
1680 | },{ |
||
1681 | |||
1682 | /* ---- card 0x64 ---------------------------------- */ |
||
1683 | .name = "Hercules Smart TV Stereo", |
||
1684 | .video_inputs = 4, |
||
1685 | .audio_inputs = 1, |
||
1686 | .tuner = 0, |
||
1687 | .svhs = 2, |
||
1688 | .gpiomask = 0x00, |
||
1689 | .muxsel = { 2, 3, 1, 1 }, |
||
1690 | .needs_tvaudio = 1, |
||
1691 | .no_msp34xx = 1, |
||
1692 | .pll = PLL_28, |
||
1693 | .tuner_type = 5, |
||
1694 | /* Notes: |
||
1695 | - card lacks subsystem ID |
||
1696 | - stereo variant w/ daughter board with tda9874a @0xb0 |
||
1697 | - Audio Routing: |
||
1698 | always from tda9874 independent of GPIO (?) |
||
1699 | external line in: unknown |
||
1700 | - Other chips: em78p156elp @ 0x96 (probably IR remote control) |
||
1701 | hef4053 (instead 4052) for unknown function |
||
1702 | */ |
||
1703 | },{ |
||
1704 | .name = "Pace TV & Radio Card", |
||
1705 | .video_inputs = 4, |
||
1706 | .audio_inputs = 1, |
||
1707 | .tuner = 0, |
||
1708 | .svhs = 2, |
||
1709 | .muxsel = { 2, 3, 1, 1}, // Tuner, CVid, SVid, CVid over SVid connector |
||
1710 | .gpiomask = 0, |
||
1711 | .no_tda9875 = 1, |
||
1712 | .no_tda7432 = 1, |
||
1713 | .tuner_type = 1, |
||
1714 | .has_radio = 1, |
||
1715 | .pll = PLL_28, |
||
1716 | /* Bt878, Bt832, FI1246 tuner; no pci subsystem id |
||
1717 | only internal line out: (4pin header) RGGL |
||
1718 | Radio must be decoded by msp3410d (not routed through)*/ |
||
1719 | // .digital_mode = DIGITAL_MODE_CAMERA, // todo! |
||
1720 | },{ |
||
1721 | /* Chris Willing <chris@vislab.usyd.edu.au> */ |
||
1722 | .name = "IVC-200", |
||
1723 | .video_inputs = 1, |
||
1724 | .audio_inputs = 0, |
||
1725 | .tuner = -1, |
||
1726 | .tuner_type = -1, |
||
1727 | .svhs = -1, |
||
1728 | .gpiomask = 0xdf, |
||
1729 | .muxsel = { 2 }, |
||
1730 | .pll = PLL_28, |
||
1731 | },{ |
||
1732 | .name = "Grand X-Guard / Trust 814PCI", |
||
1733 | .video_inputs = 16, |
||
1734 | .audio_inputs = 0, |
||
1735 | .tuner = -1, |
||
1736 | .svhs = -1, |
||
1737 | .tuner_type = 4, |
||
1738 | .gpiomask2 = 0xff, |
||
1739 | .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 }, |
||
1740 | .muxsel_hook = xguard_muxsel, |
||
1741 | .no_msp34xx = 1, |
||
1742 | .no_tda9875 = 1, |
||
1743 | .no_tda7432 = 1, |
||
1744 | .pll = PLL_28, |
||
1745 | },{ |
||
1746 | |||
1747 | /* ---- card 0x68 ---------------------------------- */ |
||
1748 | .name = "Nebula Electronics DigiTV", |
||
1749 | .svhs = -1, |
||
1750 | .muxsel = { 2, 3, 1, 0}, |
||
1751 | .no_msp34xx = 1, |
||
1752 | .no_tda9875 = 1, |
||
1753 | .no_tda7432 = 1, |
||
1754 | .pll = PLL_28, |
||
1755 | .tuner_type = -1, |
||
1756 | .no_video = 1, |
||
1757 | },{ |
||
1758 | /* Jorge Boncompte - DTI2 <jorge@dti2.net> */ |
||
1759 | .name = "ProVideo PV143", |
||
1760 | .video_inputs = 4, |
||
1761 | .audio_inputs = 0, |
||
1762 | .tuner = -1, |
||
1763 | .svhs = -1, |
||
1764 | .gpiomask = 0, |
||
1765 | .muxsel = { 2, 3, 1, 0 }, |
||
1766 | .audiomux = { 0 }, |
||
1767 | .needs_tvaudio = 0, |
||
1768 | .no_msp34xx = 1, |
||
1769 | .pll = PLL_28, |
||
1770 | .tuner_type = -1, |
||
1771 | },{ |
||
1772 | /* M.Klahr@phytec.de */ |
||
1773 | .name = "PHYTEC VD-009-X1 MiniDIN (bt878)", |
||
1774 | .video_inputs = 4, |
||
1775 | .audio_inputs = 0, |
||
1776 | .tuner = -1, /* card has no tuner */ |
||
1777 | .svhs = 3, |
||
1778 | .gpiomask = 0x00, |
||
1779 | .muxsel = { 2, 3, 1, 0}, |
||
1780 | .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */ |
||
1781 | .needs_tvaudio = 1, |
||
1782 | .pll = PLL_28, |
||
1783 | .tuner_type = -1, |
||
1784 | },{ |
||
1785 | .name = "PHYTEC VD-009-X1 Combi (bt878)", |
||
1786 | .video_inputs = 4, |
||
1787 | .audio_inputs = 0, |
||
1788 | .tuner = -1, /* card has no tuner */ |
||
1789 | .svhs = 3, |
||
1790 | .gpiomask = 0x00, |
||
1791 | .muxsel = { 2, 3, 1, 1}, |
||
1792 | .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */ |
||
1793 | .needs_tvaudio = 1, |
||
1794 | .pll = PLL_28, |
||
1795 | .tuner_type = -1, |
||
1796 | },{ |
||
1797 | |||
1798 | /* ---- card 0x6c ---------------------------------- */ |
||
1799 | .name = "PHYTEC VD-009 MiniDIN (bt878)", |
||
1800 | .video_inputs = 10, |
||
1801 | .audio_inputs = 0, |
||
1802 | .tuner = -1, /* card has no tuner */ |
||
1803 | .svhs = 9, |
||
1804 | .gpiomask = 0x00, |
||
1805 | .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio |
||
1806 | via the upper nibble of muxsel. here: used for |
||
1807 | xternal video-mux */ |
||
1808 | .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 }, |
||
1809 | .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */ |
||
1810 | .needs_tvaudio = 1, |
||
1811 | .pll = PLL_28, |
||
1812 | .tuner_type = -1, |
||
1813 | },{ |
||
1814 | .name = "PHYTEC VD-009 Combi (bt878)", |
||
1815 | .video_inputs = 10, |
||
1816 | .audio_inputs = 0, |
||
1817 | .tuner = -1, /* card has no tuner */ |
||
1818 | .svhs = 9, |
||
1819 | .gpiomask = 0x00, |
||
1820 | .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio |
||
1821 | via the upper nibble of muxsel. here: used for |
||
1822 | xternal video-mux */ |
||
1823 | .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 }, |
||
1824 | .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */ |
||
1825 | .needs_tvaudio = 1, |
||
1826 | .pll = PLL_28, |
||
1827 | .tuner_type = -1, |
||
1828 | },{ |
||
1829 | .name = "IVC-100", |
||
1830 | .video_inputs = 4, |
||
1831 | .audio_inputs = 0, |
||
1832 | .tuner = -1, |
||
1833 | .tuner_type = -1, |
||
1834 | .svhs = -1, |
||
1835 | .gpiomask = 0xdf, |
||
1836 | .muxsel = { 2, 3, 1, 0 }, |
||
1837 | .pll = PLL_28, |
||
1838 | },{ |
||
1839 | /* IVC-120G - Alan Garfield <alan@fromorbit.com> */ |
||
1840 | .name = "IVC-120G", |
||
1841 | .video_inputs = 16, |
||
1842 | .audio_inputs = 0, /* card has no audio */ |
||
1843 | .tuner = -1, /* card has no tuner */ |
||
1844 | .tuner_type = -1, |
||
1845 | .svhs = -1, /* card has no svhs */ |
||
1846 | .needs_tvaudio = 0, |
||
1847 | .no_msp34xx = 1, |
||
1848 | .no_tda9875 = 1, |
||
1849 | .no_tda7432 = 1, |
||
1850 | .gpiomask = 0x00, |
||
1851 | .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, |
||
1852 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }, |
||
1853 | .muxsel_hook = ivc120_muxsel, |
||
1854 | .pll = PLL_28, |
||
170 | giacomo | 1855 | }}; |
1856 | |||
428 | giacomo | 1857 | const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); |
170 | giacomo | 1858 | |
1859 | /* ----------------------------------------------------------------------- */ |
||
1860 | |||
1861 | static unsigned char eeprom_data[256]; |
||
1862 | |||
1863 | /* |
||
1864 | * identify card |
||
1865 | */ |
||
428 | giacomo | 1866 | void __devinit bttv_idcard(struct bttv *btv) |
170 | giacomo | 1867 | { |
1868 | unsigned int gpiobits; |
||
1869 | int i,type; |
||
1870 | unsigned short tmp; |
||
1871 | |||
1872 | /* read PCI subsystem ID */ |
||
428 | giacomo | 1873 | pci_read_config_word(btv->dev, PCI_SUBSYSTEM_ID, &tmp); |
170 | giacomo | 1874 | btv->cardid = tmp << 16; |
428 | giacomo | 1875 | pci_read_config_word(btv->dev, PCI_SUBSYSTEM_VENDOR_ID, &tmp); |
170 | giacomo | 1876 | btv->cardid |= tmp; |
1877 | |||
1878 | if (0 != btv->cardid && 0xffffffff != btv->cardid) { |
||
1879 | /* look for the card */ |
||
1880 | for (type = -1, i = 0; cards[i].id != 0; i++) |
||
1881 | if (cards[i].id == btv->cardid) |
||
1882 | type = i; |
||
1883 | |||
1884 | if (type != -1) { |
||
1885 | /* found it */ |
||
428 | giacomo | 1886 | printk(KERN_INFO "bttv%d: detected: %s [card=%d], " |
1887 | "PCI subsystem ID is %04x:%04x\n", |
||
170 | giacomo | 1888 | btv->nr,cards[type].name,cards[type].cardnr, |
428 | giacomo | 1889 | btv->cardid & 0xffff, |
1890 | (btv->cardid >> 16) & 0xffff); |
||
170 | giacomo | 1891 | btv->type = cards[type].cardnr; |
1892 | } else { |
||
1893 | /* 404 */ |
||
1894 | printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n", |
||
428 | giacomo | 1895 | btv->nr, btv->cardid & 0xffff, |
1896 | (btv->cardid >> 16) & 0xffff); |
||
1897 | printk(KERN_DEBUG "please mail id, board name and " |
||
1898 | "the correct card= insmod option to kraxel@bytesex.org\n"); |
||
170 | giacomo | 1899 | } |
428 | giacomo | 1900 | } |
170 | giacomo | 1901 | |
1902 | /* let the user override the autodetected type */ |
||
428 | giacomo | 1903 | if (card[btv->nr] < bttv_num_tvcards) |
170 | giacomo | 1904 | btv->type=card[btv->nr]; |
1905 | |||
1906 | /* print which card config we are using */ |
||
1907 | printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->nr, |
||
428 | giacomo | 1908 | bttv_tvcards[btv->type].name, btv->type, |
1909 | card[btv->nr] < bttv_num_tvcards |
||
1910 | ? "insmod option" : "autodetected"); |
||
170 | giacomo | 1911 | |
1912 | /* overwrite gpio stuff ?? */ |
||
428 | giacomo | 1913 | if (UNSET == audioall && UNSET == audiomux[0]) |
170 | giacomo | 1914 | return; |
1915 | |||
428 | giacomo | 1916 | if (UNSET != audiomux[0]) { |
170 | giacomo | 1917 | gpiobits = 0; |
1918 | for (i = 0; i < 5; i++) { |
||
1919 | bttv_tvcards[btv->type].audiomux[i] = audiomux[i]; |
||
1920 | gpiobits |= audiomux[i]; |
||
1921 | } |
||
1922 | } else { |
||
1923 | gpiobits = audioall; |
||
1924 | for (i = 0; i < 5; i++) { |
||
1925 | bttv_tvcards[btv->type].audiomux[i] = audioall; |
||
1926 | } |
||
1927 | } |
||
428 | giacomo | 1928 | bttv_tvcards[btv->type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits; |
1929 | printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=", |
||
170 | giacomo | 1930 | btv->nr,bttv_tvcards[btv->type].gpiomask); |
1931 | for (i = 0; i < 5; i++) { |
||
428 | giacomo | 1932 | printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->type].audiomux[i]); |
170 | giacomo | 1933 | } |
428 | giacomo | 1934 | printk("\n"); |
170 | giacomo | 1935 | } |
1936 | |||
1937 | /* |
||
1938 | * (most) board specific initialisations goes here |
||
1939 | */ |
||
1940 | |||
428 | giacomo | 1941 | /* Some Modular Technology cards have an eeprom, but no subsystem ID */ |
1942 | void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256]) |
||
1943 | { |
||
1944 | int type = -1; |
||
1945 | |||
1946 | if (0 == strncmp(eeprom_data,"GET.MM20xPCTV",13)) |
||
1947 | type = BTTV_MODTEC_205; |
||
1948 | else if (0 == strncmp(eeprom_data+20,"Picolo",7)) |
||
1949 | type = BTTV_EURESYS_PICOLO; |
||
1950 | else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0) |
||
1951 | type = BTTV_HAUPPAUGE; /* old bt848 */ |
||
1952 | |||
1953 | if (-1 != type) { |
||
1954 | btv->type = type; |
||
1955 | printk("bttv%d: detected by eeprom: %s [card=%d]\n", |
||
1956 | btv->nr, bttv_tvcards[btv->type].name, btv->type); |
||
1957 | } |
||
1958 | } |
||
1959 | |||
170 | giacomo | 1960 | static void flyvideo_gpio(struct bttv *btv) |
428 | giacomo | 1961 | { |
1962 | int gpio,outbits,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821; |
||
170 | giacomo | 1963 | int tuner=-1,ttype; |
1964 | |||
1965 | outbits = btread(BT848_GPIO_OUT_EN); |
||
1966 | btwrite(0x00, BT848_GPIO_OUT_EN); |
||
1967 | udelay(8); // without this we would see the 0x1800 mask |
||
428 | giacomo | 1968 | gpio=btread(BT848_GPIO_DATA); |
170 | giacomo | 1969 | btwrite(outbits, BT848_GPIO_OUT_EN); |
1970 | // all cards provide GPIO info, some have an additional eeprom |
||
428 | giacomo | 1971 | // LR50: GPIO coding can be found lower right CP1 .. CP9 |
1972 | // CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1. |
||
1973 | // GPIO14-12: n.c. |
||
1974 | // LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878) |
||
170 | giacomo | 1975 | |
1976 | // lowest 3 bytes are remote control codes (no handshake needed) |
||
428 | giacomo | 1977 | // xxxFFF: No remote control chip soldered |
1978 | // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered |
||
1979 | // Note: Some bits are Audio_Mask ! |
||
1980 | |||
170 | giacomo | 1981 | ttype=(gpio&0x0f0000)>>16; |
1982 | switch(ttype) { |
||
428 | giacomo | 1983 | case 0x0: tuner=2; // NTSC, e.g. TPI8NSR11P |
170 | giacomo | 1984 | break; |
428 | giacomo | 1985 | case 0x2: tuner=39;// LG NTSC (newer TAPC series) TAPC-H701P |
170 | giacomo | 1986 | break; |
428 | giacomo | 1987 | case 0x4: tuner=5; // Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 |
170 | giacomo | 1988 | break; |
428 | giacomo | 1989 | case 0x6: tuner=37; // LG PAL (newer TAPC series) TAPC-G702P |
170 | giacomo | 1990 | break; |
428 | giacomo | 1991 | case 0xC: tuner=3; // Philips SECAM(+PAL) FQ1216ME or FI1216MF |
1992 | break; |
||
170 | giacomo | 1993 | default: |
428 | giacomo | 1994 | printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->nr); |
170 | giacomo | 1995 | } |
428 | giacomo | 1996 | |
1997 | has_remote = gpio & 0x800000; |
||
1998 | has_radio = gpio & 0x400000; |
||
1999 | // unknown 0x200000; |
||
2000 | // unknown2 0x100000; |
||
2001 | is_capture_only = !(gpio & 0x008000); //GPIO15 |
||
2002 | has_tda9820_tda9821 = !(gpio & 0x004000); |
||
2003 | is_lr90 = !(gpio & 0x002000); // else LR26/LR50 (LR38/LR51 f. capture only) |
||
2004 | // gpio & 0x001000 // output bit for audio routing |
||
2005 | |||
2006 | if(is_capture_only) |
||
2007 | tuner=4; // No tuner present |
||
2008 | |||
2009 | printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n", |
||
2010 | btv->nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio); |
||
2011 | printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n", |
||
2012 | btv->nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ", |
||
2013 | is_capture_only?"yes":"no "); |
||
2014 | |||
2015 | if(tuner!= -1) // only set if known tuner autodetected, else let insmod option through |
||
2016 | btv->tuner_type = tuner; |
||
2017 | btv->has_radio = has_radio; |
||
2018 | |||
2019 | // LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80 |
||
2020 | // LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00 |
||
2021 | // Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute |
||
2022 | if(has_tda9820_tda9821) btv->audio_hook = lt9415_audio; |
||
2023 | //todo: if(has_tda9874) btv->audio_hook = fv2000s_audio; |
||
170 | giacomo | 2024 | } |
2025 | |||
2026 | int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1, |
||
2027 | 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 }; |
||
2028 | int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, |
||
428 | giacomo | 2029 | 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 }; |
170 | giacomo | 2030 | |
428 | giacomo | 2031 | static void miro_pinnacle_gpio(struct bttv *btv) |
170 | giacomo | 2032 | { |
428 | giacomo | 2033 | int id,msp,gpio; |
2034 | char *info; |
||
170 | giacomo | 2035 | |
428 | giacomo | 2036 | btwrite(0,BT848_GPIO_OUT_EN); |
2037 | gpio = btread(BT848_GPIO_DATA); |
||
2038 | id = ((gpio>>10) & 63) -1; |
||
2039 | msp = bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx"); |
||
2040 | if (id < 32) { |
||
170 | giacomo | 2041 | btv->tuner_type = miro_tunermap[id]; |
428 | giacomo | 2042 | if (0 == (gpio & 0x20)) { |
170 | giacomo | 2043 | btv->has_radio = 1; |
2044 | if (!miro_fmtuner[id]) { |
||
2045 | btv->has_matchbox = 1; |
||
2046 | btv->mbox_we = (1<<6); |
||
2047 | btv->mbox_most = (1<<7); |
||
2048 | btv->mbox_clk = (1<<8); |
||
2049 | btv->mbox_data = (1<<9); |
||
2050 | btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9); |
||
2051 | } |
||
2052 | } else { |
||
2053 | btv->has_radio = 0; |
||
2054 | } |
||
2055 | if (-1 != msp) { |
||
2056 | if (btv->type == BTTV_MIRO) |
||
2057 | btv->type = BTTV_MIROPRO; |
||
2058 | if (btv->type == BTTV_PINNACLE) |
||
2059 | btv->type = BTTV_PINNACLEPRO; |
||
2060 | } |
||
428 | giacomo | 2061 | printk(KERN_INFO |
2062 | "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n", |
||
2063 | btv->nr, id+1, btv->tuner_type, |
||
2064 | !btv->has_radio ? "no" : |
||
2065 | (btv->has_matchbox ? "matchbox" : "fmtuner"), |
||
2066 | (-1 == msp) ? "no" : "yes"); |
||
2067 | } else { |
||
2068 | /* new cards with microtune tuner */ |
||
2069 | id = 63 - id; |
||
2070 | btv->has_radio = 0; |
||
2071 | switch (id) { |
||
2072 | case 1: |
||
2073 | info = "PAL / mono"; |
||
2074 | break; |
||
2075 | case 2: |
||
2076 | info = "PAL+SECAM / stereo"; |
||
2077 | btv->has_radio = 1; |
||
2078 | break; |
||
2079 | case 3: |
||
2080 | info = "NTSC / stereo"; |
||
2081 | btv->has_radio = 1; |
||
2082 | break; |
||
2083 | case 4: |
||
2084 | info = "PAL+SECAM / mono"; |
||
2085 | break; |
||
2086 | case 5: |
||
2087 | info = "NTSC / mono"; |
||
2088 | break; |
||
2089 | case 6: |
||
2090 | info = "NTSC / stereo"; |
||
2091 | break; |
||
2092 | default: |
||
2093 | info = "oops: unknown card"; |
||
2094 | break; |
||
2095 | } |
||
2096 | if (-1 != msp) |
||
2097 | btv->type = BTTV_PINNACLEPRO; |
||
2098 | printk(KERN_INFO |
||
2099 | "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n", |
||
2100 | btv->nr, id, info, btv->has_radio ? "yes" : "no"); |
||
2101 | btv->tuner_type = 33; |
||
2102 | btv->pinnacle_id = id; |
||
2103 | } |
||
2104 | } |
||
2105 | |||
2106 | /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */ |
||
2107 | #define LM1882_SYNC_DRIVE 0x200000L |
||
2108 | |||
2109 | static void init_ids_eagle(struct bttv *btv) |
||
2110 | { |
||
2111 | btwrite(0xFFFF37, BT848_GPIO_OUT_EN); |
||
2112 | btwrite(0x000000, BT848_GPIO_REG_INP); |
||
2113 | |||
2114 | btwrite(0x200020, BT848_GPIO_DATA); |
||
2115 | |||
2116 | /* flash strobe inverter ?! */ |
||
2117 | btwrite(0x200024, BT848_GPIO_DATA); |
||
2118 | |||
2119 | /* switch sync drive off */ |
||
2120 | btor(LM1882_SYNC_DRIVE, BT848_GPIO_DATA); |
||
2121 | |||
2122 | /* set BT848 muxel to 2 */ |
||
2123 | btaor((2)<<5, ~(2<<5), BT848_IFORM); |
||
2124 | } |
||
2125 | |||
2126 | /* Muxsel helper for the IDS Eagle. |
||
2127 | * the eagles does not use the standard muxsel-bits but |
||
2128 | * has its own multiplexer */ |
||
2129 | static void eagle_muxsel(struct bttv *btv, unsigned int input) |
||
2130 | { |
||
2131 | btaor((2)<<5, ~(3<<5), BT848_IFORM); |
||
2132 | btaor((bttv_tvcards[btv->type].muxsel[input&7]&3), |
||
2133 | ~3, BT848_GPIO_DATA); |
||
2134 | |||
170 | giacomo | 2135 | #if 0 |
428 | giacomo | 2136 | /* svhs */ |
2137 | /* wake chroma ADC */ |
||
2138 | btand(~BT848_ADC_C_SLEEP, BT848_ADC); |
||
2139 | /* set to YC video */ |
||
2140 | btor(BT848_CONTROL_COMP, BT848_E_CONTROL); |
||
2141 | btor(BT848_CONTROL_COMP, BT848_O_CONTROL); |
||
2142 | #else |
||
2143 | /* composite */ |
||
2144 | /* set chroma ADC to sleep */ |
||
2145 | btor(BT848_ADC_C_SLEEP, BT848_ADC); |
||
2146 | /* set to composite video */ |
||
2147 | btand(~BT848_CONTROL_COMP, BT848_E_CONTROL); |
||
2148 | btand(~BT848_CONTROL_COMP, BT848_O_CONTROL); |
||
170 | giacomo | 2149 | #endif |
428 | giacomo | 2150 | |
2151 | /* switch sync drive off */ |
||
2152 | btor(LM1882_SYNC_DRIVE, BT848_GPIO_DATA); |
||
2153 | } |
||
2154 | |||
2155 | /* ----------------------------------------------------------------------- */ |
||
2156 | |||
2157 | void bttv_reset_audio(struct bttv *btv) |
||
2158 | { |
||
2159 | /* |
||
2160 | * BT878A has a audio-reset register. |
||
2161 | * 1. This register is an audio reset function but it is in |
||
2162 | * function-0 (video capture) address space. |
||
2163 | * 2. It is enough to do this once per power-up of the card. |
||
2164 | * 3. There is a typo in the Conexant doc -- it is not at |
||
2165 | * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!). |
||
2166 | * --//Shrikumar 030609 |
||
2167 | */ |
||
2168 | if (btv->id != 878) |
||
2169 | return; |
||
2170 | |||
2171 | if (bttv_debug) |
||
2172 | printk("bttv%d: BT878A ARESET\n",btv->nr); |
||
2173 | btwrite((1<<7), 0x058); |
||
2174 | udelay(10); |
||
2175 | btwrite( 0, 0x058); |
||
2176 | } |
||
2177 | |||
2178 | /* initialization part one -- before registering i2c bus */ |
||
2179 | void __devinit bttv_init_card1(struct bttv *btv) |
||
2180 | { |
||
2181 | switch (btv->type) { |
||
2182 | case BTTV_HAUPPAUGE: |
||
2183 | case BTTV_HAUPPAUGE878: |
||
2184 | boot_msp34xx(btv,5); |
||
2185 | break; |
||
2186 | case BTTV_VOODOOTV_FM: |
||
2187 | boot_msp34xx(btv,20); |
||
2188 | break; |
||
2189 | case BTTV_AVERMEDIA98: |
||
2190 | boot_msp34xx(btv,11); |
||
2191 | break; |
||
2192 | case BTTV_HAUPPAUGEPVR: |
||
2193 | pvr_boot(btv); |
||
2194 | break; |
||
170 | giacomo | 2195 | } |
428 | giacomo | 2196 | } |
170 | giacomo | 2197 | |
428 | giacomo | 2198 | /* initialization part two -- after registering i2c bus */ |
2199 | void __devinit bttv_init_card2(struct bttv *btv) |
||
2200 | { |
||
2201 | btv->tuner_type = -1; |
||
2202 | |||
2203 | if (BTTV_UNKNOWN == btv->type) { |
||
2204 | bttv_readee(btv,eeprom_data,0xa0); |
||
2205 | identify_by_eeprom(btv,eeprom_data); |
||
623 | giacomo | 2206 | #ifdef __FORCE_PXC__ |
2207 | init_PXC200(btv); |
||
2208 | #endif |
||
428 | giacomo | 2209 | } |
2210 | |||
2211 | switch (btv->type) { |
||
2212 | case BTTV_MIRO: |
||
2213 | case BTTV_MIROPRO: |
||
2214 | case BTTV_PINNACLE: |
||
2215 | case BTTV_PINNACLEPRO: |
||
2216 | /* miro/pinnacle */ |
||
2217 | miro_pinnacle_gpio(btv); |
||
2218 | break; |
||
2219 | case BTTV_FLYVIDEO_98: |
||
2220 | case BTTV_MAXI: |
||
2221 | case BTTV_LIFE_FLYKIT: |
||
2222 | case BTTV_FLYVIDEO: |
||
2223 | case BTTV_TYPHOON_TVIEW: |
||
2224 | case BTTV_CHRONOS_VS2: |
||
2225 | case BTTV_FLYVIDEO_98FM: |
||
2226 | case BTTV_FLYVIDEO2000: |
||
2227 | case BTTV_FLYVIDEO98EZ: |
||
2228 | case BTTV_CONFERENCETV: |
||
2229 | case BTTV_LIFETEC_9415: |
||
170 | giacomo | 2230 | flyvideo_gpio(btv); |
428 | giacomo | 2231 | break; |
2232 | case BTTV_HAUPPAUGE: |
||
2233 | case BTTV_HAUPPAUGE878: |
||
2234 | case BTTV_HAUPPAUGEPVR: |
||
170 | giacomo | 2235 | /* pick up some config infos from the eeprom */ |
2236 | bttv_readee(btv,eeprom_data,0xa0); |
||
2237 | hauppauge_eeprom(btv); |
||
428 | giacomo | 2238 | break; |
2239 | case BTTV_AVERMEDIA98: |
||
2240 | case BTTV_AVPHONE98: |
||
170 | giacomo | 2241 | bttv_readee(btv,eeprom_data,0xa0); |
2242 | avermedia_eeprom(btv); |
||
428 | giacomo | 2243 | break; |
2244 | case BTTV_PXC200: |
||
170 | giacomo | 2245 | init_PXC200(btv); |
428 | giacomo | 2246 | break; |
2247 | case BTTV_VHX: |
||
170 | giacomo | 2248 | btv->has_radio = 1; |
2249 | btv->has_matchbox = 1; |
||
2250 | btv->mbox_we = 0x20; |
||
2251 | btv->mbox_most = 0; |
||
2252 | btv->mbox_clk = 0x08; |
||
2253 | btv->mbox_data = 0x10; |
||
2254 | btv->mbox_mask = 0x38; |
||
428 | giacomo | 2255 | break; |
2256 | case BTTV_VOBIS_BOOSTAR: |
||
2257 | case BTTV_TERRATV: |
||
2258 | terratec_active_radio_upgrade(btv); |
||
2259 | break; |
||
2260 | case BTTV_MAGICTVIEW061: |
||
2261 | if (btv->cardid == 0x3002144f) { |
||
170 | giacomo | 2262 | btv->has_radio=1; |
428 | giacomo | 2263 | printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->nr); |
170 | giacomo | 2264 | } |
428 | giacomo | 2265 | break; |
2266 | case BTTV_STB2: |
||
2267 | if (btv->cardid == 0x3060121a) { |
||
2268 | /* Fix up entry for 3DFX VoodooTV 100, |
||
2269 | which is an OEM STB card variant. */ |
||
2270 | btv->has_radio=0; |
||
2271 | btv->tuner_type=TUNER_TEMIC_NTSC; |
||
2272 | } |
||
2273 | break; |
||
2274 | case BTTV_OSPREY1x0: |
||
2275 | case BTTV_OSPREY1x0_848: |
||
2276 | case BTTV_OSPREY101_848: |
||
2277 | case BTTV_OSPREY1x1: |
||
2278 | case BTTV_OSPREY1x1_SVID: |
||
2279 | case BTTV_OSPREY2xx: |
||
2280 | case BTTV_OSPREY2x0_SVID: |
||
2281 | case BTTV_OSPREY2x0: |
||
2282 | case BTTV_OSPREY500: |
||
2283 | case BTTV_OSPREY540: |
||
2284 | case BTTV_OSPREY2000: |
||
2285 | bttv_readee(btv,eeprom_data,0xa0); |
||
2286 | osprey_eeprom(btv); |
||
2287 | break; |
||
2288 | case BTTV_IDS_EAGLE: |
||
2289 | init_ids_eagle(btv); |
||
2290 | break; |
||
2291 | case BTTV_MODTEC_205: |
||
2292 | bttv_readee(btv,eeprom_data,0xa0); |
||
2293 | modtec_eeprom(btv); |
||
2294 | break; |
||
170 | giacomo | 2295 | } |
2296 | |||
2297 | /* pll configuration */ |
||
2298 | if (!(btv->id==848 && btv->revision==0x11)) { |
||
2299 | /* defaults from card list */ |
||
2300 | if (PLL_28 == bttv_tvcards[btv->type].pll) { |
||
2301 | btv->pll.pll_ifreq=28636363; |
||
2302 | btv->pll.pll_crystal=BT848_IFORM_XT0; |
||
2303 | } |
||
2304 | if (PLL_35 == bttv_tvcards[btv->type].pll) { |
||
2305 | btv->pll.pll_ifreq=35468950; |
||
2306 | btv->pll.pll_crystal=BT848_IFORM_XT1; |
||
2307 | } |
||
2308 | /* insmod options can override */ |
||
2309 | switch (pll[btv->nr]) { |
||
2310 | case 0: /* none */ |
||
2311 | btv->pll.pll_crystal = 0; |
||
2312 | btv->pll.pll_ifreq = 0; |
||
2313 | btv->pll.pll_ofreq = 0; |
||
2314 | break; |
||
2315 | case 1: /* 28 MHz */ |
||
2316 | case 28: |
||
2317 | btv->pll.pll_ifreq = 28636363; |
||
2318 | btv->pll.pll_ofreq = 0; |
||
2319 | btv->pll.pll_crystal = BT848_IFORM_XT0; |
||
2320 | break; |
||
2321 | case 2: /* 35 MHz */ |
||
2322 | case 35: |
||
2323 | btv->pll.pll_ifreq = 35468950; |
||
2324 | btv->pll.pll_ofreq = 0; |
||
2325 | btv->pll.pll_crystal = BT848_IFORM_XT1; |
||
2326 | break; |
||
2327 | } |
||
2328 | } |
||
428 | giacomo | 2329 | btv->pll.pll_current = -1; |
170 | giacomo | 2330 | |
428 | giacomo | 2331 | /* tuner configuration (from card list / autodetect / insmod option) */ |
2332 | if (UNSET != bttv_tvcards[btv->type].tuner_type) |
||
2333 | if(UNSET == btv->tuner_type) |
||
2334 | btv->tuner_type = bttv_tvcards[btv->type].tuner_type; |
||
2335 | if (UNSET != tuner[btv->nr]) |
||
170 | giacomo | 2336 | btv->tuner_type = tuner[btv->nr]; |
428 | giacomo | 2337 | printk("bttv%d: using tuner=%d\n",btv->nr,btv->tuner_type); |
2338 | if (btv->pinnacle_id != UNSET) |
||
2339 | bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, |
||
2340 | &btv->pinnacle_id); |
||
2341 | if (btv->tuner_type != UNSET) |
||
2342 | bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); |
||
2343 | btv->svhs = bttv_tvcards[btv->type].svhs; |
||
2344 | if (svhs[btv->nr] != UNSET) |
||
2345 | btv->svhs = svhs[btv->nr]; |
||
170 | giacomo | 2346 | |
2347 | if (bttv_tvcards[btv->type].has_radio) |
||
2348 | btv->has_radio=1; |
||
428 | giacomo | 2349 | if (bttv_tvcards[btv->type].audio_hook) |
2350 | btv->audio_hook=bttv_tvcards[btv->type].audio_hook; |
||
170 | giacomo | 2351 | |
428 | giacomo | 2352 | if (bttv_tvcards[btv->type].digital_mode == DIGITAL_MODE_CAMERA) { |
2353 | /* detect Bt832 chip for quartzsight digital camera */ |
||
2354 | if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) || |
||
2355 | (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0)) |
||
2356 | boot_bt832(btv); |
||
2357 | } |
||
2358 | |||
170 | giacomo | 2359 | /* try to detect audio/fader chips */ |
2360 | if (!bttv_tvcards[btv->type].no_msp34xx && |
||
2361 | bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0) { |
||
428 | giacomo | 2362 | if (autoload) |
2363 | request_module("msp3400"); |
||
170 | giacomo | 2364 | } |
2365 | |||
428 | giacomo | 2366 | if (bttv_tvcards[btv->type].msp34xx_alt && |
2367 | bttv_I2CRead(btv, I2C_MSP3400_ALT, "MSP34xx (alternate address)") >=0) { |
||
2368 | if (autoload) |
||
2369 | request_module("msp3400"); |
||
2370 | } |
||
2371 | |||
170 | giacomo | 2372 | if (!bttv_tvcards[btv->type].no_tda9875 && |
2373 | bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0) { |
||
428 | giacomo | 2374 | if (autoload) |
2375 | request_module("tda9875"); |
||
170 | giacomo | 2376 | } |
2377 | |||
2378 | if (!bttv_tvcards[btv->type].no_tda7432 && |
||
428 | giacomo | 2379 | bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0) { |
2380 | if (autoload) |
||
2381 | request_module("tda7432"); |
||
170 | giacomo | 2382 | } |
2383 | if (bttv_tvcards[btv->type].needs_tvaudio) { |
||
428 | giacomo | 2384 | if (autoload) |
2385 | request_module("tvaudio"); |
||
170 | giacomo | 2386 | } |
428 | giacomo | 2387 | /* tuner modules */ |
2388 | if (btv->pinnacle_id != UNSET) { |
||
2389 | if (autoload) |
||
2390 | request_module("tda9887"); |
||
170 | giacomo | 2391 | } |
428 | giacomo | 2392 | if (btv->tuner_type != UNSET) { |
2393 | if (autoload) |
||
2394 | request_module("tuner"); |
||
2395 | } |
||
170 | giacomo | 2396 | } |
2397 | |||
2398 | |||
2399 | /* ----------------------------------------------------------------------- */ |
||
2400 | /* some hauppauge specific stuff */ |
||
2401 | |||
2402 | static struct HAUPPAUGE_TUNER |
||
2403 | { |
||
2404 | int id; |
||
2405 | char *name; |
||
2406 | } |
||
428 | giacomo | 2407 | hauppauge_tuner[] __devinitdata = |
170 | giacomo | 2408 | { |
2409 | { TUNER_ABSENT, "" }, |
||
2410 | { TUNER_ABSENT, "External" }, |
||
2411 | { TUNER_ABSENT, "Unspecified" }, |
||
2412 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, |
||
2413 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, |
||
2414 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, |
||
2415 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, |
||
2416 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256" }, |
||
2417 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, |
||
2418 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, |
||
2419 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, |
||
2420 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, |
||
2421 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256 MK2" }, |
||
2422 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, |
||
2423 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, |
||
2424 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, |
||
2425 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, |
||
2426 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, |
||
2427 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, |
||
2428 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, |
||
2429 | { TUNER_PHILIPS_PAL_DK,"Philips FR1256 MK2" }, |
||
2430 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, |
||
2431 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, |
||
2432 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, |
||
2433 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, |
||
2434 | { TUNER_PHILIPS_PAL_DK,"Philips FM1256" }, |
||
2435 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, |
||
2436 | { TUNER_ABSENT, "Samsung TCPN9082D" }, |
||
2437 | { TUNER_ABSENT, "Samsung TCPM9092P" }, |
||
2438 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, |
||
2439 | { TUNER_ABSENT, "Samsung TCPN9085D" }, |
||
2440 | { TUNER_ABSENT, "Samsung TCPB9085P" }, |
||
2441 | { TUNER_ABSENT, "Samsung TCPL9091P" }, |
||
2442 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, |
||
2443 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, |
||
2444 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, |
||
428 | giacomo | 2445 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, |
2446 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, |
||
170 | giacomo | 2447 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ |
2448 | { TUNER_ABSENT, "Philips FI1256MP" }, |
||
2449 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, |
||
2450 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, |
||
2451 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, |
||
2452 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, |
||
2453 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, |
||
2454 | { TUNER_ABSENT, "Philips TD1536D_FH_44"}, |
||
428 | giacomo | 2455 | { TUNER_LG_NTSC_FM, "LG TPI8NSR01F"}, |
2456 | { TUNER_LG_PAL_FM, "LG TPI8PSB01D"}, |
||
2457 | { TUNER_LG_PAL, "LG TPI8PSB11D"}, |
||
170 | giacomo | 2458 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, |
2459 | { TUNER_LG_PAL_I, "LG TAPC-I701D"} |
||
2460 | }; |
||
2461 | |||
428 | giacomo | 2462 | static void modtec_eeprom(struct bttv *btv) |
170 | giacomo | 2463 | { |
428 | giacomo | 2464 | if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) { |
2465 | btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; |
||
2466 | printk("bttv Modtec: Tuner autodetected %s\n", |
||
2467 | &eeprom_data[0x1e]); |
||
2468 | } else { |
||
2469 | printk("bttv Modtec: Unknown TunerString:%s\n", |
||
2470 | &eeprom_data[0x1e]); |
||
2471 | } |
||
2472 | } |
||
170 | giacomo | 2473 | |
428 | giacomo | 2474 | static void __devinit hauppauge_eeprom(struct bttv *btv) |
2475 | { |
||
2476 | unsigned int blk2,tuner,radio,model; |
||
2477 | |||
170 | giacomo | 2478 | if (eeprom_data[0] != 0x84 || eeprom_data[2] != 0) |
2479 | printk(KERN_WARNING "bttv%d: Hauppauge eeprom: invalid\n", |
||
2480 | btv->nr); |
||
2481 | |||
2482 | /* Block 2 starts after len+3 bytes header */ |
||
2483 | blk2 = eeprom_data[1] + 3; |
||
2484 | |||
2485 | /* decode + use some config infos */ |
||
2486 | model = eeprom_data[12] << 8 | eeprom_data[11]; |
||
2487 | tuner = eeprom_data[9]; |
||
2488 | radio = eeprom_data[blk2-1] & 0x01; |
||
2489 | |||
428 | giacomo | 2490 | if (tuner < ARRAY_SIZE(hauppauge_tuner)) |
170 | giacomo | 2491 | btv->tuner_type = hauppauge_tuner[tuner].id; |
2492 | if (radio) |
||
2493 | btv->has_radio = 1; |
||
2494 | |||
2495 | if (bttv_verbose) |
||
2496 | printk(KERN_INFO "bttv%d: Hauppauge eeprom: model=%d, " |
||
2497 | "tuner=%s (%d), radio=%s\n", |
||
2498 | btv->nr, model, hauppauge_tuner[tuner].name, |
||
2499 | btv->tuner_type, radio ? "yes" : "no"); |
||
2500 | } |
||
2501 | |||
428 | giacomo | 2502 | static int terratec_active_radio_upgrade(struct bttv *btv) |
170 | giacomo | 2503 | { |
428 | giacomo | 2504 | int freq; |
2505 | |||
2506 | btv->has_radio = 1; |
||
2507 | btv->has_matchbox = 1; |
||
2508 | btv->mbox_we = 0x10; |
||
2509 | btv->mbox_most = 0x20; |
||
2510 | btv->mbox_clk = 0x08; |
||
2511 | btv->mbox_data = 0x04; |
||
2512 | btv->mbox_mask = 0x3c; |
||
2513 | |||
2514 | btv->mbox_iow = 1 << 8; |
||
2515 | btv->mbox_ior = 1 << 9; |
||
2516 | btv->mbox_csel = 1 << 10; |
||
2517 | |||
2518 | freq=88000/62.5; |
||
2519 | tea5757_write(btv, 5 * freq + 0x358); // write 0x1ed8 |
||
2520 | if (0x1ed8 == tea5757_read(btv)) { |
||
2521 | printk("bttv%d: Terratec Active Radio Upgrade found.\n", |
||
2522 | btv->nr); |
||
2523 | btv->has_radio = 1; |
||
2524 | btv->has_matchbox = 1; |
||
2525 | } else { |
||
2526 | btv->has_radio = 0; |
||
2527 | btv->has_matchbox = 0; |
||
2528 | } |
||
2529 | return 0; |
||
2530 | } |
||
2531 | |||
2532 | |||
2533 | /* ----------------------------------------------------------------------- */ |
||
2534 | |||
2535 | /* |
||
2536 | * minimal bootstrap for the WinTV/PVR -- upload altera firmware. |
||
2537 | * |
||
2538 | * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have |
||
2539 | * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be |
||
2540 | * unpacked with unzip). |
||
2541 | */ |
||
2542 | #define PVR_GPIO_DELAY 10 |
||
2543 | |||
2544 | #define BTTV_ALT_DATA 0x000001 |
||
2545 | #define BTTV_ALT_DCLK 0x100000 |
||
2546 | #define BTTV_ALT_NCONFIG 0x800000 |
||
2547 | |||
2548 | static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen) |
||
2549 | { |
||
2550 | u32 n; |
||
2551 | u8 bits; |
||
2552 | int i; |
||
2553 | |||
2554 | btwrite(BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG, |
||
2555 | BT848_GPIO_OUT_EN); |
||
2556 | btwrite(0,BT848_GPIO_DATA); |
||
2557 | udelay(PVR_GPIO_DELAY); |
||
2558 | |||
2559 | btwrite(BTTV_ALT_NCONFIG,BT848_GPIO_DATA); |
||
2560 | udelay(PVR_GPIO_DELAY); |
||
2561 | |||
2562 | for (n = 0; n < microlen; n++) { |
||
2563 | bits = micro[n]; |
||
2564 | for ( i = 0 ; i < 8 ; i++ ) { |
||
2565 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2566 | if (bits & 0x01) |
||
2567 | btor(BTTV_ALT_DATA,BT848_GPIO_DATA); |
||
2568 | else |
||
2569 | btand(~BTTV_ALT_DATA,BT848_GPIO_DATA); |
||
2570 | btor(BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2571 | bits >>= 1; |
||
2572 | } |
||
2573 | } |
||
2574 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2575 | udelay(PVR_GPIO_DELAY); |
||
2576 | |||
2577 | /* begin Altera init loop (Not necessary,but doesn't hurt) */ |
||
2578 | for (i = 0 ; i < 30 ; i++) { |
||
2579 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2580 | btor(BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2581 | } |
||
2582 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2583 | return 0; |
||
2584 | } |
||
2585 | |||
2586 | #ifndef CONFIG_FW_LOADER |
||
2587 | /* old 2.4.x way -- via soundcore's mod_firmware_load */ |
||
2588 | |||
2589 | static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf"; |
||
2590 | MODULE_PARM(firm_altera,"s"); |
||
2591 | MODULE_PARM_DESC(firm_altera,"WinTV/PVR firmware " |
||
2592 | "(driver CD => unzip pvr45xxx.exe => hcwamc.rbf)"); |
||
2593 | |||
2594 | extern int mod_firmware_load(const char *fn, char **fp); |
||
2595 | |||
2596 | int __devinit pvr_boot(struct bttv *btv) |
||
2597 | { |
||
2598 | u32 microlen; |
||
2599 | u8 *micro; |
||
2600 | int result; |
||
2601 | |||
516 | giacomo | 2602 | microlen = 0;//mod_firmware_load(firm_altera, (char**) µ); |
428 | giacomo | 2603 | if (!microlen) { |
2604 | printk(KERN_WARNING "bttv%d: altera firmware not found [%s]\n", |
||
2605 | btv->nr, firm_altera); |
||
2606 | return -1; |
||
2607 | } |
||
2608 | |||
2609 | printk(KERN_INFO "bttv%d: uploading altera firmware [%s] ...\n", |
||
2610 | btv->nr, firm_altera); |
||
2611 | result = pvr_altera_load(btv, micro, microlen); |
||
2612 | printk(KERN_INFO "bttv%d: ... upload %s\n", |
||
2613 | btv->nr, (result < 0) ? "failed" : "ok"); |
||
2614 | vfree(micro); |
||
2615 | return result; |
||
2616 | } |
||
2617 | #else |
||
2618 | /* new 2.5.x way -- via hotplug firmware loader */ |
||
2619 | |||
2620 | int __devinit pvr_boot(struct bttv *btv) |
||
2621 | { |
||
2622 | const struct firmware *fw_entry; |
||
2623 | int rc; |
||
2624 | |||
2625 | rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->dev->dev); |
||
2626 | if (rc != 0) { |
||
2627 | printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n", |
||
2628 | btv->nr); |
||
2629 | return rc; |
||
170 | giacomo | 2630 | } |
428 | giacomo | 2631 | rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); |
2632 | printk(KERN_INFO "bttv%d: altera firmware upload %s\n", |
||
2633 | btv->nr, (rc < 0) ? "failed" : "ok"); |
||
2634 | release_firmware(fw_entry); |
||
2635 | return rc; |
||
2636 | } |
||
2637 | #endif |
||
2638 | |||
2639 | /* ----------------------------------------------------------------------- */ |
||
2640 | /* some osprey specific stuff */ |
||
2641 | |||
2642 | static void __devinit osprey_eeprom(struct bttv *btv) |
||
2643 | { |
||
2644 | int i = 0; |
||
2645 | unsigned char *ee = eeprom_data; |
||
2646 | unsigned long serial = 0; |
||
170 | giacomo | 2647 | |
428 | giacomo | 2648 | if (btv->type == 0) { |
2649 | /* this might be an antique... check for MMAC label in eeprom */ |
||
2650 | if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) { |
||
2651 | unsigned char checksum = 0; |
||
2652 | for (i =0; i<21; i++) |
||
2653 | checksum += ee[i]; |
||
2654 | if (checksum != ee[21]) |
||
2655 | return; |
||
2656 | btv->type = BTTV_OSPREY1x0_848; |
||
2657 | for (i = 12; i < 21; i++) |
||
2658 | serial *= 10, serial += ee[i] - '0'; |
||
2659 | } |
||
2660 | } else { |
||
2661 | unsigned short type; |
||
2662 | int offset = 4*16; |
||
170 | giacomo | 2663 | |
428 | giacomo | 2664 | for(; offset < 8*16; offset += 16) { |
2665 | unsigned short checksum = 0; |
||
2666 | /* verify the checksum */ |
||
2667 | for(i = 0; i<14; i++) checksum += ee[i+offset]; |
||
2668 | checksum = ~checksum; /* no idea why */ |
||
2669 | if ((((checksum>>8)&0x0FF) == ee[offset+14]) && |
||
2670 | ((checksum & 0x0FF) == ee[offset+15])) { |
||
2671 | break; |
||
2672 | } |
||
2673 | } |
||
170 | giacomo | 2674 | |
428 | giacomo | 2675 | if (offset >= 8*16) |
2676 | return; |
||
170 | giacomo | 2677 | |
428 | giacomo | 2678 | /* found a valid descriptor */ |
2679 | type = (ee[offset+4]<<8) | (ee[offset+5]); |
||
2680 | |||
2681 | switch(type) { |
||
170 | giacomo | 2682 | |
428 | giacomo | 2683 | /* 848 based */ |
2684 | case 0x0004: |
||
2685 | btv->type = BTTV_OSPREY1x0_848; |
||
2686 | break; |
||
2687 | case 0x0005: |
||
2688 | btv->type = BTTV_OSPREY101_848; |
||
2689 | break; |
||
2690 | |||
2691 | /* 878 based */ |
||
2692 | case 0x0012: |
||
2693 | case 0x0013: |
||
2694 | btv->type = BTTV_OSPREY1x0; |
||
2695 | break; |
||
2696 | case 0x0014: |
||
2697 | case 0x0015: |
||
2698 | btv->type = BTTV_OSPREY1x1; |
||
2699 | break; |
||
2700 | case 0x0016: |
||
2701 | case 0x0017: |
||
2702 | case 0x0020: |
||
2703 | btv->type = BTTV_OSPREY1x1_SVID; |
||
2704 | break; |
||
2705 | case 0x0018: |
||
2706 | case 0x0019: |
||
2707 | case 0x001E: |
||
2708 | case 0x001F: |
||
2709 | btv->type = BTTV_OSPREY2xx; |
||
2710 | break; |
||
2711 | case 0x001A: |
||
2712 | case 0x001B: |
||
2713 | btv->type = BTTV_OSPREY2x0_SVID; |
||
2714 | break; |
||
2715 | case 0x0040: |
||
2716 | btv->type = BTTV_OSPREY500; |
||
2717 | break; |
||
2718 | case 0x0050: |
||
2719 | case 0x0056: |
||
2720 | btv->type = BTTV_OSPREY540; |
||
2721 | /* bttv_osprey_540_init(btv); */ |
||
2722 | break; |
||
2723 | case 0x0060: |
||
2724 | case 0x0070: |
||
2725 | btv->type = BTTV_OSPREY2x0; |
||
2726 | //enable output on select control lines |
||
2727 | btwrite(0x000303, BT848_GPIO_OUT_EN); |
||
2728 | break; |
||
2729 | default: |
||
2730 | /* unknown...leave generic, but get serial # */ |
||
2731 | break; |
||
2732 | } |
||
2733 | serial = (ee[offset+6] << 24) |
||
2734 | | (ee[offset+7] << 16) |
||
2735 | | (ee[offset+8] << 8) |
||
2736 | | (ee[offset+9]); |
||
2737 | } |
||
2738 | |||
2739 | printk(KERN_INFO "bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n", |
||
2740 | btv->nr, btv->type, bttv_tvcards[btv->type].name,serial); |
||
2741 | } |
||
2742 | |||
170 | giacomo | 2743 | /* ----------------------------------------------------------------------- */ |
2744 | /* AVermedia specific stuff, from bktr_card.c */ |
||
2745 | |||
2746 | int tuner_0_table[] = { |
||
428 | giacomo | 2747 | TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/, |
2748 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/, |
||
170 | giacomo | 2749 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL, |
2750 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM, |
||
2751 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL}; |
||
2752 | #if 0 |
||
2753 | int tuner_0_fm_table[] = { |
||
2754 | PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL, |
||
2755 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
2756 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
2757 | PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM, |
||
2758 | PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL}; |
||
2759 | #endif |
||
2760 | |||
2761 | int tuner_1_table[] = { |
||
2762 | TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL, |
||
2763 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
2764 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
2765 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, //TUNER_TEMIC_SECAM |
||
2766 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; |
||
2767 | |||
428 | giacomo | 2768 | static void __devinit avermedia_eeprom(struct bttv *btv) |
170 | giacomo | 2769 | { |
428 | giacomo | 2770 | int tuner_make,tuner_tv_fm,tuner_format,tuner=0; |
170 | giacomo | 2771 | |
428 | giacomo | 2772 | tuner_make = (eeprom_data[0x41] & 0x7); |
2773 | tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3; |
||
2774 | tuner_format = (eeprom_data[0x42] & 0xf0) >> 4; |
||
2775 | btv->has_remote = (eeprom_data[0x42] & 0x01); |
||
170 | giacomo | 2776 | |
2777 | if (tuner_make == 0 || tuner_make == 2) |
||
2778 | if(tuner_format <=9) |
||
2779 | tuner = tuner_0_table[tuner_format]; |
||
2780 | if (tuner_make == 1) |
||
2781 | if(tuner_format <=9) |
||
2782 | tuner = tuner_1_table[tuner_format]; |
||
2783 | |||
428 | giacomo | 2784 | printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=", |
170 | giacomo | 2785 | btv->nr,eeprom_data[0x41],eeprom_data[0x42]); |
2786 | if(tuner) { |
||
2787 | btv->tuner_type=tuner; |
||
428 | giacomo | 2788 | printk("%d",tuner); |
170 | giacomo | 2789 | } else |
428 | giacomo | 2790 | printk("Unknown type"); |
2791 | printk(" radio:%s remote control:%s\n", |
||
2792 | tuner_tv_fm ? "yes" : "no", |
||
2793 | btv->has_remote ? "yes" : "no"); |
||
170 | giacomo | 2794 | } |
2795 | |||
2796 | /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */ |
||
2797 | void bttv_tda9880_setnorm(struct bttv *btv, int norm) |
||
2798 | { |
||
2799 | // fix up our card entry |
||
2800 | if(norm==VIDEO_MODE_NTSC) { |
||
2801 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x957fff; |
||
2802 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x957fff; |
||
2803 | dprintk("bttv_tda9880_setnorm to NTSC\n"); |
||
2804 | } |
||
2805 | else { |
||
2806 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x947fff; |
||
2807 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x947fff; |
||
2808 | dprintk("bttv_tda9880_setnorm to PAL\n"); |
||
2809 | } |
||
2810 | // set GPIO according |
||
428 | giacomo | 2811 | btaor(bttv_tvcards[btv->type].audiomux[btv->audio], |
2812 | ~bttv_tvcards[btv->type].gpiomask, BT848_GPIO_DATA); |
||
170 | giacomo | 2813 | } |
2814 | |||
2815 | |||
2816 | /* |
||
2817 | * reset/enable the MSP on some Hauppauge cards |
||
428 | giacomo | 2818 | * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)! |
170 | giacomo | 2819 | * |
2820 | * Hauppauge: pin 5 |
||
2821 | * Voodoo: pin 20 |
||
2822 | */ |
||
428 | giacomo | 2823 | static void __devinit boot_msp34xx(struct bttv *btv, int pin) |
170 | giacomo | 2824 | { |
2825 | int mask = (1 << pin); |
||
2826 | |||
428 | giacomo | 2827 | btaor(mask, ~mask, BT848_GPIO_OUT_EN); |
2828 | btaor(0, ~mask, BT848_GPIO_DATA); |
||
170 | giacomo | 2829 | udelay(2500); |
428 | giacomo | 2830 | btaor(mask, ~mask, BT848_GPIO_DATA); |
170 | giacomo | 2831 | if (bttv_gpio) |
2832 | bttv_gpio_tracking(btv,"msp34xx"); |
||
2833 | |||
2834 | if (bttv_verbose) |
||
2835 | printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line " |
||
2836 | "init [%d]\n", btv->nr, pin); |
||
2837 | } |
||
2838 | |||
428 | giacomo | 2839 | static void __devinit boot_bt832(struct bttv *btv) |
2840 | { |
||
2841 | int outbits,databits,resetbit=0; |
||
170 | giacomo | 2842 | |
428 | giacomo | 2843 | switch (btv->type) { |
2844 | case BTTV_PXELVWPLTVPAK: |
||
2845 | resetbit = 0x400000; |
||
2846 | break; |
||
2847 | case BTTV_MODTEC_205: |
||
2848 | resetbit = 1<<9; |
||
2849 | break; |
||
2850 | default: |
||
2851 | BUG(); |
||
2852 | } |
||
2853 | |||
2854 | request_module("bt832"); |
||
2855 | bttv_call_i2c_clients(btv, BT832_HEXDUMP, NULL); |
||
2856 | |||
2857 | printk("bttv%d: Reset Bt832 [line=0x%x]\n",btv->nr,resetbit); |
||
2858 | btwrite(0, BT848_GPIO_DATA); |
||
2859 | outbits = btread(BT848_GPIO_OUT_EN); |
||
2860 | databits= btread(BT848_GPIO_DATA); |
||
2861 | btwrite(resetbit, BT848_GPIO_OUT_EN); |
||
2862 | udelay(5); |
||
2863 | btwrite(resetbit, BT848_GPIO_DATA); |
||
2864 | udelay(5); |
||
2865 | btwrite(0, BT848_GPIO_DATA); |
||
2866 | udelay(5); |
||
2867 | btwrite(outbits, BT848_GPIO_OUT_EN); |
||
2868 | btwrite(databits, BT848_GPIO_DATA); |
||
2869 | |||
2870 | // bt832 on pixelview changes from i2c 0x8a to 0x88 after |
||
2871 | // being reset as above. So we must follow by this: |
||
2872 | bttv_call_i2c_clients(btv, BT832_REATTACH, NULL); |
||
2873 | } |
||
2874 | |||
170 | giacomo | 2875 | /* ----------------------------------------------------------------------- */ |
2876 | /* Imagenation L-Model PXC200 Framegrabber */ |
||
2877 | /* This is basically the same procedure as |
||
2878 | * used by Alessandro Rubini in his pxc200 |
||
2879 | * driver, but using BTTV functions */ |
||
2880 | |||
428 | giacomo | 2881 | static void __devinit init_PXC200(struct bttv *btv) |
170 | giacomo | 2882 | { |
428 | giacomo | 2883 | static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, |
2884 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, |
||
2885 | 0x00 }; |
||
2886 | unsigned int i; |
||
2887 | int tmp; |
||
2888 | u32 val; |
||
2889 | |||
170 | giacomo | 2890 | /* Initialise GPIO-connevted stuff */ |
2891 | btwrite(1<<13,BT848_GPIO_OUT_EN); /* Reset pin only */ |
||
428 | giacomo | 2892 | btwrite(0,BT848_GPIO_DATA); |
170 | giacomo | 2893 | udelay(3); |
428 | giacomo | 2894 | btwrite(1<<13,BT848_GPIO_DATA); |
170 | giacomo | 2895 | /* GPIO inputs are pulled up, so no need to drive |
2896 | * reset pin any longer */ |
||
2897 | btwrite(0,BT848_GPIO_OUT_EN); |
||
2898 | if (bttv_gpio) |
||
2899 | bttv_gpio_tracking(btv,"pxc200"); |
||
2900 | |||
2901 | /* we could/should try and reset/control the AD pots? but |
||
2902 | right now we simply turned off the crushing. Without |
||
2903 | this the AGC drifts drifts |
||
2904 | remember the EN is reverse logic --> |
||
2905 | setting BT848_ADC_AGC_EN disable the AGC |
||
2906 | tboult@eecs.lehigh.edu |
||
2907 | */ |
||
428 | giacomo | 2908 | |
170 | giacomo | 2909 | btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC); |
2910 | |||
2911 | /* Initialise MAX517 DAC */ |
||
2912 | printk(KERN_INFO "Setting DAC reference voltage level ...\n"); |
||
2913 | bttv_I2CWrite(btv,0x5E,0,0x80,1); |
||
2914 | |||
2915 | /* Initialise 12C508 PIC */ |
||
2916 | /* The I2CWrite and I2CRead commmands are actually to the |
||
2917 | * same chips - but the R/W bit is included in the address |
||
2918 | * argument so the numbers are different */ |
||
2919 | |||
428 | giacomo | 2920 | |
2921 | printk(KERN_INFO "Initialising 12C508 PIC chip ...\n"); |
||
2922 | |||
2923 | /* First of all, enable the clock line. This is used in the PXC200-F */ |
||
2924 | val = btread(BT848_GPIO_DMA_CTL); |
||
2925 | val |= BT848_GPIO_DMA_CTL_GPCLKMODE; |
||
2926 | btwrite(val, BT848_GPIO_DMA_CTL); |
||
2927 | |||
2928 | /* Then, push to 0 the reset pin long enough to reset the * |
||
2929 | * device same as above for the reset line, but not the same |
||
2930 | * value sent to the GPIO-connected stuff |
||
2931 | * which one is the good one? */ |
||
2932 | btwrite( (1<<2), BT848_GPIO_OUT_EN); /* only the reset pin */ |
||
2933 | btwrite(0, BT848_GPIO_DATA); |
||
2934 | udelay(10); |
||
2935 | btwrite(1<<2, BT848_GPIO_DATA); |
||
655 | giacomo | 2936 | /* |
428 | giacomo | 2937 | for (i = 0; i < ARRAY_SIZE(vals); i++) { |
2938 | tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1); |
||
2939 | if (tmp != -1) { |
||
2940 | printk(KERN_INFO |
||
2941 | "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n", |
||
2942 | vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL)); |
||
2943 | } |
||
2944 | } |
||
655 | giacomo | 2945 | */ |
170 | giacomo | 2946 | printk(KERN_INFO "PXC200 Initialised.\n"); |
2947 | } |
||
2948 | |||
428 | giacomo | 2949 | |
170 | giacomo | 2950 | /* ----------------------------------------------------------------------- */ |
2951 | /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */ |
||
2952 | /* |
||
2953 | * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu> |
||
2954 | * This code is placed under the terms of the GNU General Public License |
||
2955 | * |
||
2956 | * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00 |
||
2957 | */ |
||
2958 | |||
428 | giacomo | 2959 | void bus_low(struct bttv *btv, int bit) |
2960 | { |
||
2961 | if (btv->mbox_ior) { |
||
2962 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2963 | BT848_GPIO_DATA); |
||
2964 | udelay(5); |
||
2965 | } |
||
170 | giacomo | 2966 | |
428 | giacomo | 2967 | btand(~(bit), BT848_GPIO_DATA); |
2968 | udelay(5); |
||
170 | giacomo | 2969 | |
428 | giacomo | 2970 | if (btv->mbox_ior) { |
2971 | btand(~(btv->mbox_iow | btv->mbox_csel), |
||
2972 | BT848_GPIO_DATA); |
||
2973 | udelay(5); |
||
2974 | } |
||
2975 | } |
||
2976 | |||
2977 | void bus_high(struct bttv *btv, int bit) |
||
2978 | { |
||
2979 | if (btv->mbox_ior) { |
||
2980 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2981 | BT848_GPIO_DATA); |
||
2982 | udelay(5); |
||
2983 | } |
||
2984 | |||
2985 | btor((bit), BT848_GPIO_DATA); |
||
2986 | udelay(5); |
||
2987 | |||
2988 | if (btv->mbox_ior) { |
||
2989 | btand(~(btv->mbox_iow | btv->mbox_csel), |
||
2990 | BT848_GPIO_DATA); |
||
2991 | udelay(5); |
||
2992 | } |
||
2993 | } |
||
2994 | |||
2995 | int bus_in(struct bttv *btv, int bit) |
||
2996 | { |
||
2997 | if (btv->mbox_ior) { |
||
2998 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2999 | BT848_GPIO_DATA); |
||
3000 | udelay(5); |
||
3001 | |||
3002 | btand(~(btv->mbox_ior | btv->mbox_csel), |
||
3003 | BT848_GPIO_DATA); |
||
3004 | udelay(5); |
||
3005 | } |
||
3006 | return btread(BT848_GPIO_DATA) & (bit); |
||
3007 | } |
||
3008 | |||
170 | giacomo | 3009 | /* TEA5757 register bits */ |
3010 | #define TEA_FREQ 0:14 |
||
3011 | #define TEA_BUFFER 15:15 |
||
3012 | |||
3013 | #define TEA_SIGNAL_STRENGTH 16:17 |
||
3014 | |||
3015 | #define TEA_PORT1 18:18 |
||
3016 | #define TEA_PORT0 19:19 |
||
3017 | |||
3018 | #define TEA_BAND 20:21 |
||
3019 | #define TEA_BAND_FM 0 |
||
3020 | #define TEA_BAND_MW 1 |
||
3021 | #define TEA_BAND_LW 2 |
||
3022 | #define TEA_BAND_SW 3 |
||
3023 | |||
3024 | #define TEA_MONO 22:22 |
||
3025 | #define TEA_ALLOW_STEREO 0 |
||
3026 | #define TEA_FORCE_MONO 1 |
||
3027 | |||
3028 | #define TEA_SEARCH_DIRECTION 23:23 |
||
3029 | #define TEA_SEARCH_DOWN 0 |
||
3030 | #define TEA_SEARCH_UP 1 |
||
3031 | |||
3032 | #define TEA_STATUS 24:24 |
||
3033 | #define TEA_STATUS_TUNED 0 |
||
3034 | #define TEA_STATUS_SEARCHING 1 |
||
3035 | |||
464 | giacomo | 3036 | extern unsigned long read_time(void); |
3037 | |||
428 | giacomo | 3038 | /* Low-level stuff */ |
3039 | static int tea5757_read(struct bttv *btv) |
||
3040 | { |
||
3041 | unsigned long timeout; |
||
3042 | int value = 0; |
||
3043 | int i; |
||
3044 | |||
3045 | /* better safe than sorry */ |
||
3046 | btaor((btv->mbox_clk | btv->mbox_we), |
||
3047 | ~btv->mbox_mask, BT848_GPIO_OUT_EN); |
||
3048 | |||
3049 | if (btv->mbox_ior) { |
||
3050 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
3051 | BT848_GPIO_DATA); |
||
3052 | udelay(5); |
||
3053 | } |
||
3054 | |||
3055 | if (bttv_gpio) |
||
3056 | bttv_gpio_tracking(btv,"tea5757 read"); |
||
3057 | |||
3058 | bus_low(btv,btv->mbox_we); |
||
3059 | bus_low(btv,btv->mbox_clk); |
||
3060 | |||
3061 | udelay(10); |
||
464 | giacomo | 3062 | timeout= read_time() + 1000000; |
428 | giacomo | 3063 | |
3064 | // wait for DATA line to go low; error if it doesn't |
||
464 | giacomo | 3065 | while (bus_in(btv,btv->mbox_data) && timeout > read_time()); |
428 | giacomo | 3066 | if (bus_in(btv,btv->mbox_data)) { |
3067 | printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->nr); |
||
3068 | return -1; |
||
3069 | } |
||
3070 | |||
3071 | dprintk("bttv%d: tea5757:",btv->nr); |
||
3072 | for(i = 0; i < 24; i++) |
||
3073 | { |
||
3074 | udelay(5); |
||
3075 | bus_high(btv,btv->mbox_clk); |
||
3076 | udelay(5); |
||
3077 | dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-'); |
||
3078 | bus_low(btv,btv->mbox_clk); |
||
3079 | value <<= 1; |
||
3080 | value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */ |
||
3081 | dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M'); |
||
3082 | } |
||
3083 | dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->nr, value); |
||
3084 | return value; |
||
3085 | } |
||
3086 | |||
3087 | static int tea5757_write(struct bttv *btv, int value) |
||
3088 | { |
||
3089 | int i; |
||
3090 | int reg = value; |
||
3091 | |||
3092 | btaor(btv->mbox_clk | btv->mbox_we | btv->mbox_data, |
||
3093 | ~btv->mbox_mask, BT848_GPIO_OUT_EN); |
||
3094 | |||
3095 | if (btv->mbox_ior) { |
||
3096 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
3097 | BT848_GPIO_DATA); |
||
3098 | udelay(5); |
||
3099 | } |
||
3100 | if (bttv_gpio) |
||
3101 | bttv_gpio_tracking(btv,"tea5757 write"); |
||
3102 | |||
3103 | dprintk("bttv%d: tea5757: write 0x%X\n", btv->nr, value); |
||
3104 | bus_low(btv,btv->mbox_clk); |
||
3105 | bus_high(btv,btv->mbox_we); |
||
3106 | for(i = 0; i < 25; i++) |
||
3107 | { |
||
3108 | if (reg & 0x1000000) |
||
3109 | bus_high(btv,btv->mbox_data); |
||
3110 | else |
||
3111 | bus_low(btv,btv->mbox_data); |
||
3112 | reg <<= 1; |
||
3113 | bus_high(btv,btv->mbox_clk); |
||
3114 | udelay(10); |
||
3115 | bus_low(btv,btv->mbox_clk); |
||
3116 | udelay(10); |
||
3117 | } |
||
3118 | bus_low(btv,btv->mbox_we); /* unmute !!! */ |
||
3119 | return 0; |
||
3120 | } |
||
3121 | |||
3122 | void tea5757_set_freq(struct bttv *btv, unsigned short freq) |
||
3123 | { |
||
3124 | dprintk("tea5757_set_freq %d\n",freq); |
||
3125 | tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */ |
||
3126 | #if 0 |
||
3127 | /* breaks Miro PCTV */ |
||
3128 | value = tea5757_read(btv); |
||
3129 | dprintk("bttv%d: tea5757 readback=0x%x\n",btv->nr,value); |
||
3130 | #endif |
||
3131 | } |
||
3132 | |||
3133 | |||
170 | giacomo | 3134 | /* ----------------------------------------------------------------------- */ |
3135 | /* winview */ |
||
3136 | |||
3137 | void winview_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3138 | { |
||
3139 | /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */ |
||
3140 | int bits_out, loops, vol, data; |
||
3141 | |||
3142 | if (!set) { |
||
3143 | /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */ |
||
3144 | v->flags |= VIDEO_AUDIO_VOLUME; |
||
3145 | return; |
||
3146 | } |
||
3147 | |||
3148 | /* 32 levels logarithmic */ |
||
3149 | vol = 32 - ((v->volume>>11)); |
||
3150 | /* units */ |
||
3151 | bits_out = (PT2254_DBS_IN_2>>(vol%5)); |
||
3152 | /* tens */ |
||
3153 | bits_out |= (PT2254_DBS_IN_10>>(vol/5)); |
||
3154 | bits_out |= PT2254_L_CHANNEL | PT2254_R_CHANNEL; |
||
428 | giacomo | 3155 | data = btread(BT848_GPIO_DATA); |
170 | giacomo | 3156 | data &= ~(WINVIEW_PT2254_CLK| WINVIEW_PT2254_DATA| |
3157 | WINVIEW_PT2254_STROBE); |
||
3158 | for (loops = 17; loops >= 0 ; loops--) { |
||
3159 | if (bits_out & (1<<loops)) |
||
3160 | data |= WINVIEW_PT2254_DATA; |
||
3161 | else |
||
3162 | data &= ~WINVIEW_PT2254_DATA; |
||
428 | giacomo | 3163 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3164 | udelay(5); |
3165 | data |= WINVIEW_PT2254_CLK; |
||
428 | giacomo | 3166 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3167 | udelay(5); |
3168 | data &= ~WINVIEW_PT2254_CLK; |
||
428 | giacomo | 3169 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3170 | } |
3171 | data |= WINVIEW_PT2254_STROBE; |
||
3172 | data &= ~WINVIEW_PT2254_DATA; |
||
428 | giacomo | 3173 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3174 | udelay(10); |
3175 | data &= ~WINVIEW_PT2254_STROBE; |
||
428 | giacomo | 3176 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3177 | } |
3178 | |||
3179 | /* ----------------------------------------------------------------------- */ |
||
3180 | /* mono/stereo control for various cards (which don't use i2c chips but */ |
||
3181 | /* connect something to the GPIO pins */ |
||
3182 | |||
3183 | static void |
||
3184 | gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3185 | { |
||
3186 | unsigned int con = 0; |
||
3187 | |||
3188 | if (set) { |
||
3189 | btor(0x300, BT848_GPIO_OUT_EN); |
||
3190 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3191 | con = 0x000; |
||
3192 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3193 | con = 0x300; |
||
3194 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3195 | con = 0x200; |
||
3196 | // if (v->mode & VIDEO_SOUND_MONO) |
||
3197 | // con = 0x100; |
||
428 | giacomo | 3198 | btaor(con, ~0x300, BT848_GPIO_DATA); |
170 | giacomo | 3199 | } else { |
3200 | v->mode = VIDEO_SOUND_STEREO | |
||
3201 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3202 | } |
||
3203 | } |
||
3204 | |||
3205 | /* |
||
3206 | * Mario Medina Nussbaum <medisoft@alohabbs.org.mx> |
||
3207 | * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo, |
||
3208 | * 0xdde enables mono and 0xccd enables sap |
||
3209 | * |
||
3210 | * Petr Vandrovec <VANDROVE@vc.cvut.cz> |
||
3211 | * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select |
||
3212 | * input/output sound connection, so both must be set for output mode. |
||
3213 | * |
||
3214 | * Looks like it's needed only for the "tvphone", the "tvphone 98" |
||
3215 | * handles this with a tda9840 |
||
3216 | * |
||
3217 | */ |
||
3218 | static void |
||
3219 | avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3220 | { |
||
3221 | int val = 0; |
||
3222 | |||
3223 | if (set) { |
||
3224 | if (v->mode & VIDEO_SOUND_LANG1) /* SAP */ |
||
3225 | val = 0x02; |
||
3226 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3227 | val = 0x01; |
||
3228 | if (val) { |
||
428 | giacomo | 3229 | btaor(val, ~0x03, BT848_GPIO_DATA); |
170 | giacomo | 3230 | if (bttv_gpio) |
3231 | bttv_gpio_tracking(btv,"avermedia"); |
||
3232 | } |
||
3233 | } else { |
||
3234 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3235 | VIDEO_SOUND_LANG1; |
||
3236 | return; |
||
3237 | } |
||
3238 | } |
||
3239 | |||
3240 | /* Lifetec 9415 handling */ |
||
3241 | static void |
||
3242 | lt9415_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3243 | { |
||
3244 | int val = 0; |
||
3245 | |||
428 | giacomo | 3246 | if (btread(BT848_GPIO_DATA) & 0x4000) { |
170 | giacomo | 3247 | v->mode = VIDEO_SOUND_MONO; |
3248 | return; |
||
3249 | } |
||
3250 | |||
3251 | if (set) { |
||
3252 | if (v->mode & VIDEO_SOUND_LANG2) /* A2 SAP */ |
||
3253 | val = 0x0080; |
||
3254 | if (v->mode & VIDEO_SOUND_STEREO) /* A2 stereo */ |
||
3255 | val = 0x0880; |
||
3256 | if ((v->mode & VIDEO_SOUND_LANG1) || |
||
3257 | (v->mode & VIDEO_SOUND_MONO)) |
||
3258 | val = 0; |
||
428 | giacomo | 3259 | btaor(val, ~0x0880, BT848_GPIO_DATA); |
170 | giacomo | 3260 | if (bttv_gpio) |
3261 | bttv_gpio_tracking(btv,"lt9415"); |
||
3262 | } else { |
||
3263 | /* autodetect doesn't work with this card :-( */ |
||
3264 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3265 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3266 | return; |
||
3267 | } |
||
3268 | } |
||
3269 | |||
428 | giacomo | 3270 | // TDA9821 on TerraTV+ Bt848, Bt878 |
170 | giacomo | 3271 | static void |
3272 | terratv_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3273 | { |
||
3274 | unsigned int con = 0; |
||
3275 | |||
3276 | if (set) { |
||
3277 | btor(0x180000, BT848_GPIO_OUT_EN); |
||
3278 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3279 | con = 0x080000; |
||
3280 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3281 | con = 0x180000; |
||
428 | giacomo | 3282 | btaor(con, ~0x180000, BT848_GPIO_DATA); |
170 | giacomo | 3283 | if (bttv_gpio) |
3284 | bttv_gpio_tracking(btv,"terratv"); |
||
3285 | } else { |
||
3286 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3287 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3288 | } |
||
3289 | } |
||
3290 | |||
3291 | static void |
||
3292 | winfast2000_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3293 | { |
||
3294 | unsigned long val = 0; |
||
3295 | |||
3296 | if (set) { |
||
3297 | /*btor (0xc32000, BT848_GPIO_OUT_EN);*/ |
||
3298 | if (v->mode & VIDEO_SOUND_MONO) /* Mono */ |
||
3299 | val = 0x420000; |
||
3300 | if (v->mode & VIDEO_SOUND_LANG1) /* Mono */ |
||
3301 | val = 0x420000; |
||
3302 | if (v->mode & VIDEO_SOUND_LANG2) /* SAP */ |
||
3303 | val = 0x410000; |
||
3304 | if (v->mode & VIDEO_SOUND_STEREO) /* Stereo */ |
||
3305 | val = 0x020000; |
||
3306 | if (val) { |
||
428 | giacomo | 3307 | btaor(val, ~0x430000, BT848_GPIO_DATA); |
170 | giacomo | 3308 | if (bttv_gpio) |
3309 | bttv_gpio_tracking(btv,"winfast2000"); |
||
3310 | } |
||
3311 | } else { |
||
3312 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3313 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3314 | } |
||
3315 | } |
||
3316 | |||
3317 | /* |
||
3318 | * Dariusz Kowalewski <darekk@automex.pl> |
||
3319 | * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM |
||
3320 | * revision 9B has on-board TDA9874A sound decoder). |
||
428 | giacomo | 3321 | * |
3322 | * Note: There are card variants without tda9874a. Forcing the "stereo sound route" |
||
3323 | * will mute this cards. |
||
170 | giacomo | 3324 | */ |
3325 | static void |
||
3326 | pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3327 | { |
||
3328 | unsigned int val = 0; |
||
3329 | |||
428 | giacomo | 3330 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) |
3331 | if (btv->radio_user) |
||
3332 | return; |
||
3333 | #else |
||
170 | giacomo | 3334 | if (btv->radio) |
3335 | return; |
||
428 | giacomo | 3336 | #endif |
170 | giacomo | 3337 | |
3338 | if (set) { |
||
3339 | if (v->mode & VIDEO_SOUND_MONO) { |
||
3340 | val = 0x01; |
||
3341 | } |
||
3342 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
3343 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
3344 | val = 0x02; |
||
3345 | } |
||
3346 | if (val) { |
||
428 | giacomo | 3347 | btaor(val, ~0x03, BT848_GPIO_DATA); |
170 | giacomo | 3348 | if (bttv_gpio) |
3349 | bttv_gpio_tracking(btv,"pvbt878p9b"); |
||
3350 | } |
||
3351 | } else { |
||
3352 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3353 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3354 | } |
||
3355 | } |
||
3356 | |||
3357 | /* |
||
3358 | * Dariusz Kowalewski <darekk@automex.pl> |
||
3359 | * sound control for FlyVideo 2000S (with tda9874 decoder) |
||
3360 | * based on pvbt878p9b_audio() - this is not tested, please fix!!! |
||
3361 | */ |
||
3362 | static void |
||
3363 | fv2000s_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3364 | { |
||
3365 | unsigned int val = 0xffff; |
||
3366 | |||
428 | giacomo | 3367 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) |
3368 | if (btv->radio_user) |
||
3369 | return; |
||
3370 | #else |
||
170 | giacomo | 3371 | if (btv->radio) |
3372 | return; |
||
428 | giacomo | 3373 | #endif |
170 | giacomo | 3374 | if (set) { |
3375 | if (v->mode & VIDEO_SOUND_MONO) { |
||
3376 | val = 0x0000; |
||
3377 | } |
||
3378 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
3379 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
3380 | val = 0x1080; //-dk-???: 0x0880, 0x0080, 0x1800 ... |
||
3381 | } |
||
3382 | if (val != 0xffff) { |
||
428 | giacomo | 3383 | btaor(val, ~0x1800, BT848_GPIO_DATA); |
170 | giacomo | 3384 | if (bttv_gpio) |
3385 | bttv_gpio_tracking(btv,"fv2000s"); |
||
3386 | } |
||
3387 | } else { |
||
3388 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3389 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3390 | } |
||
3391 | } |
||
3392 | |||
3393 | /* |
||
3394 | * sound control for Canopus WinDVR PCI |
||
3395 | * Masaki Suzuki <masaki@btree.org> |
||
3396 | */ |
||
3397 | static void |
||
3398 | windvr_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3399 | { |
||
3400 | unsigned long val = 0; |
||
3401 | |||
3402 | if (set) { |
||
3403 | if (v->mode & VIDEO_SOUND_MONO) |
||
3404 | val = 0x040000; |
||
3405 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3406 | val = 0; |
||
3407 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3408 | val = 0x100000; |
||
3409 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3410 | val = 0; |
||
3411 | if (val) { |
||
428 | giacomo | 3412 | btaor(val, ~0x140000, BT848_GPIO_DATA); |
170 | giacomo | 3413 | if (bttv_gpio) |
3414 | bttv_gpio_tracking(btv,"windvr"); |
||
3415 | } |
||
3416 | } else { |
||
3417 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3418 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3419 | } |
||
3420 | } |
||
3421 | |||
428 | giacomo | 3422 | /* |
3423 | * sound control for AD-TVK503 |
||
3424 | * Hiroshi Takekawa <sian@big.or.jp> |
||
3425 | */ |
||
3426 | static void |
||
3427 | adtvk503_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3428 | { |
||
3429 | unsigned int con = 0xffffff; |
||
3430 | |||
3431 | //btaor(0x1e0000, ~0x1e0000, BT848_GPIO_OUT_EN); |
||
3432 | |||
3433 | if (set) { |
||
3434 | //btor(***, BT848_GPIO_OUT_EN); |
||
3435 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3436 | con = 0x00000000; |
||
3437 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3438 | con = 0x00180000; |
||
3439 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3440 | con = 0x00000000; |
||
3441 | if (v->mode & VIDEO_SOUND_MONO) |
||
3442 | con = 0x00060000; |
||
3443 | if (con != 0xffffff) { |
||
3444 | btaor(con, ~0x1e0000, BT848_GPIO_DATA); |
||
3445 | if (bttv_gpio) |
||
3446 | bttv_gpio_tracking(btv, "adtvk503"); |
||
3447 | } |
||
3448 | } else { |
||
3449 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3450 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3451 | } |
||
3452 | } |
||
3453 | |||
170 | giacomo | 3454 | /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas] |
3455 | * |
||
3456 | * This is needed because rv605 don't use a normal multiplex, but a crosspoint |
||
3457 | * switch instead (CD22M3494E). This IC can have multiple active connections |
||
3458 | * between Xn (input) and Yn (output) pins. We need to clear any existing |
||
3459 | * connection prior to establish a new one, pulsing the STROBE pin. |
||
3460 | * |
||
3461 | * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin. |
||
3462 | * GPIO pins are wired as: |
||
3463 | * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler) |
||
3464 | * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler) |
||
3465 | * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler) |
||
3466 | * GPIO[8] - - P3[5] (microcontroler) |
||
3467 | * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler) |
||
3468 | * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler) |
||
3469 | * GPINTR - - P3[4] (microcontroler) |
||
3470 | * |
||
3471 | * The microcontroler is a 80C32 like. It should be possible to change xpoint |
||
3472 | * configuration either directly (as we are doing) or using the microcontroler |
||
3473 | * which is also wired to I2C interface. I have no further info on the |
||
3474 | * microcontroler features, one would need to disassembly the firmware. |
||
3475 | * note: the vendor refused to give any information on this product, all |
||
3476 | * that stuff was found using a multimeter! :) |
||
3477 | */ |
||
3478 | static void rv605_muxsel(struct bttv *btv, unsigned int input) |
||
3479 | { |
||
3480 | /* reset all conections */ |
||
428 | giacomo | 3481 | btaor(0x200,~0x200, BT848_GPIO_DATA); |
3482 | mdelay(1); |
||
3483 | btaor(0x000,~0x200, BT848_GPIO_DATA); |
||
3484 | mdelay(1); |
||
170 | giacomo | 3485 | |
3486 | /* create a new conection */ |
||
428 | giacomo | 3487 | btaor(0x080,~0x480, BT848_GPIO_DATA); |
3488 | btaor(0x480,~0x480, BT848_GPIO_DATA); |
||
3489 | mdelay(1); |
||
3490 | btaor(0x080,~0x480, BT848_GPIO_DATA); |
||
3491 | mdelay(1); |
||
170 | giacomo | 3492 | } |
3493 | |||
428 | giacomo | 3494 | // The Grandtec X-Guard framegrabber card uses two Dual 4-channel |
3495 | // video multiplexers to provide up to 16 video inputs. These |
||
3496 | // multiplexers are controlled by the lower 8 GPIO pins of the |
||
3497 | // bt878. The multiplexers probably Pericom PI5V331Q or similar. |
||
170 | giacomo | 3498 | |
428 | giacomo | 3499 | // xxx0 is pin xxx of multiplexer U5, |
3500 | // yyy1 is pin yyy of multiplexer U2 |
||
3501 | |||
3502 | #define ENA0 0x01 |
||
3503 | #define ENB0 0x02 |
||
3504 | #define ENA1 0x04 |
||
3505 | #define ENB1 0x08 |
||
3506 | |||
3507 | #define IN10 0x10 |
||
3508 | #define IN00 0x20 |
||
3509 | #define IN11 0x40 |
||
3510 | #define IN01 0x80 |
||
3511 | |||
3512 | static void xguard_muxsel(struct bttv *btv, unsigned int input) |
||
3513 | { |
||
3514 | static const int masks[] = { |
||
3515 | ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10, |
||
3516 | ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10, |
||
3517 | ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11, |
||
3518 | ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11, |
||
3519 | }; |
||
3520 | btwrite(masks[input%16], BT848_GPIO_DATA); |
||
3521 | } |
||
3522 | |||
3523 | /* |
||
3524 | * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>] |
||
3525 | * |
||
3526 | * The IVC120G security card has 4 i2c controlled TDA8540 matrix |
||
3527 | * swichers to provide 16 channels to MUX0. The TDA8540's have |
||
3528 | * 4 indepedant outputs and as such the IVC120G also has the |
||
3529 | * optional "Monitor Out" bus. This allows the card to be looking |
||
3530 | * at one input while the monitor is looking at another. |
||
3531 | * |
||
3532 | * Since I've couldn't be bothered figuring out how to add an |
||
3533 | * independant muxsel for the monitor bus, I've just set it to |
||
3534 | * whatever the card is looking at. |
||
3535 | * |
||
3536 | * OUT0 of the TDA8540's is connected to MUX0 (0x03) |
||
3537 | * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C) |
||
3538 | * |
||
3539 | * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03) |
||
3540 | * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03) |
||
3541 | * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03) |
||
3542 | * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03) |
||
3543 | * |
||
3544 | */ |
||
3545 | |||
3546 | /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */ |
||
3547 | #define I2C_TDA8540 0x90 |
||
3548 | #define I2C_TDA8540_ALT1 0x92 |
||
3549 | #define I2C_TDA8540_ALT2 0x94 |
||
3550 | #define I2C_TDA8540_ALT3 0x96 |
||
3551 | #define I2C_TDA8540_ALT4 0x98 |
||
3552 | #define I2C_TDA8540_ALT5 0x9a |
||
3553 | #define I2C_TDA8540_ALT6 0x9c |
||
3554 | |||
3555 | static void ivc120_muxsel(struct bttv *btv, unsigned int input) |
||
3556 | { |
||
3557 | // Simple maths |
||
3558 | int key = input % 4; |
||
3559 | int matrix = input / 4; |
||
3560 | |||
3561 | dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n", |
||
3562 | btv->nr, input, matrix, key); |
||
3563 | |||
3564 | // Handles the input selection on the TDA8540's |
||
3565 | bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00, |
||
3566 | ((matrix == 3) ? (key | key << 2) : 0x00), 1); |
||
3567 | bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00, |
||
3568 | ((matrix == 0) ? (key | key << 2) : 0x00), 1); |
||
3569 | bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00, |
||
3570 | ((matrix == 1) ? (key | key << 2) : 0x00), 1); |
||
3571 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00, |
||
3572 | ((matrix == 2) ? (key | key << 2) : 0x00), 1); |
||
3573 | |||
3574 | // Handles the output enables on the TDA8540's |
||
3575 | bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02, |
||
3576 | ((matrix == 3) ? 0x03 : 0x00), 1); // 13 - 16 |
||
3577 | bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02, |
||
3578 | ((matrix == 0) ? 0x03 : 0x00), 1); // 1-4 |
||
3579 | bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02, |
||
3580 | ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8 |
||
3581 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, |
||
3582 | ((matrix == 2) ? 0x03 : 0x00), 1); // 9-12 |
||
3583 | |||
3584 | // Selects MUX0 for input on the 878 |
||
3585 | btaor((0)<<5, ~(3<<5), BT848_IFORM); |
||
3586 | } |
||
3587 | |||
3588 | |||
170 | giacomo | 3589 | /* ----------------------------------------------------------------------- */ |
3590 | /* motherboard chipset specific stuff */ |
||
3591 | |||
428 | giacomo | 3592 | void __devinit bttv_check_chipset(void) |
170 | giacomo | 3593 | { |
3594 | int pcipci_fail = 0; |
||
428 | giacomo | 3595 | struct pci_dev *dev = NULL; |
170 | giacomo | 3596 | |
428 | giacomo | 3597 | if (pci_pci_problems & PCIPCI_FAIL) |
3598 | pcipci_fail = 1; |
||
3599 | if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF)) |
||
3600 | triton1 = 1; |
||
3601 | if (pci_pci_problems & PCIPCI_VSFX) |
||
3602 | vsfx = 1; |
||
3603 | #ifdef PCIPCI_ALIMAGIK |
||
3604 | if (pci_pci_problems & PCIPCI_ALIMAGIK) |
||
3605 | latency = 0x0A; |
||
3606 | #endif |
||
3607 | |||
3608 | #if 0 |
||
3609 | /* print which chipset we have */ |
||
3610 | while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) |
||
3611 | printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev)); |
||
3612 | #endif |
||
3613 | |||
170 | giacomo | 3614 | /* print warnings about any quirks found */ |
3615 | if (triton1) |
||
3616 | printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n"); |
||
3617 | if (vsfx) |
||
3618 | printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); |
||
3619 | if (pcipci_fail) { |
||
3620 | printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); |
||
428 | giacomo | 3621 | if (UNSET == no_overlay) { |
170 | giacomo | 3622 | printk(KERN_WARNING "bttv: going to disable overlay.\n"); |
3623 | no_overlay = 1; |
||
3624 | } |
||
3625 | } |
||
428 | giacomo | 3626 | if (UNSET != latency) |
3627 | printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency); |
||
170 | giacomo | 3628 | |
428 | giacomo | 3629 | while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, |
3630 | PCI_DEVICE_ID_INTEL_82441, dev))) { |
||
170 | giacomo | 3631 | unsigned char b; |
428 | giacomo | 3632 | pci_read_config_byte(dev, 0x53, &b); |
170 | giacomo | 3633 | if (bttv_debug) |
3634 | printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, " |
||
3635 | "bufcon=0x%02x\n",b); |
||
3636 | } |
||
3637 | } |
||
3638 | |||
428 | giacomo | 3639 | int __devinit bttv_handle_chipset(struct bttv *btv) |
170 | giacomo | 3640 | { |
3641 | unsigned char command; |
||
3642 | |||
428 | giacomo | 3643 | if (!triton1 && !vsfx && UNSET == latency) |
170 | giacomo | 3644 | return 0; |
3645 | |||
3646 | if (bttv_verbose) { |
||
3647 | if (triton1) |
||
3648 | printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->nr); |
||
3649 | if (vsfx && btv->id >= 878) |
||
3650 | printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->nr); |
||
428 | giacomo | 3651 | if (UNSET != latency) |
3652 | printk(KERN_INFO "bttv%d: setting pci timer to %d\n", |
||
3653 | btv->nr,latency); |
||
170 | giacomo | 3654 | } |
3655 | |||
3656 | if (btv->id < 878) { |
||
3657 | /* bt848 (mis)uses a bit in the irq mask for etbf */ |
||
3658 | if (triton1) |
||
3659 | btv->triton1 = BT848_INT_ETBF; |
||
3660 | } else { |
||
3661 | /* bt878 has a bit in the pci config space for it */ |
||
3662 | pci_read_config_byte(btv->dev, BT878_DEVCTRL, &command); |
||
3663 | if (triton1) |
||
3664 | command |= BT878_EN_TBFX; |
||
3665 | if (vsfx) |
||
3666 | command |= BT878_EN_VSFX; |
||
3667 | pci_write_config_byte(btv->dev, BT878_DEVCTRL, command); |
||
3668 | } |
||
428 | giacomo | 3669 | if (UNSET != latency) |
3670 | pci_write_config_byte(btv->dev, PCI_LATENCY_TIMER, latency); |
||
170 | giacomo | 3671 | return 0; |
3672 | } |
||
3673 | |||
428 | giacomo | 3674 | |
3675 | /* |
||
3676 | * Local variables: |
||
3677 | * c-basic-offset: 8 |
||
3678 | * End: |
||
3679 | */ |