Rev 516 | Rev 655 | 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 | |
428 | giacomo | 265 | // likely broken, vendor id doesn't match the other magic views ... |
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); |
||
2206 | } |
||
2207 | |||
2208 | switch (btv->type) { |
||
2209 | case BTTV_MIRO: |
||
2210 | case BTTV_MIROPRO: |
||
2211 | case BTTV_PINNACLE: |
||
2212 | case BTTV_PINNACLEPRO: |
||
2213 | /* miro/pinnacle */ |
||
2214 | miro_pinnacle_gpio(btv); |
||
2215 | break; |
||
2216 | case BTTV_FLYVIDEO_98: |
||
2217 | case BTTV_MAXI: |
||
2218 | case BTTV_LIFE_FLYKIT: |
||
2219 | case BTTV_FLYVIDEO: |
||
2220 | case BTTV_TYPHOON_TVIEW: |
||
2221 | case BTTV_CHRONOS_VS2: |
||
2222 | case BTTV_FLYVIDEO_98FM: |
||
2223 | case BTTV_FLYVIDEO2000: |
||
2224 | case BTTV_FLYVIDEO98EZ: |
||
2225 | case BTTV_CONFERENCETV: |
||
2226 | case BTTV_LIFETEC_9415: |
||
170 | giacomo | 2227 | flyvideo_gpio(btv); |
428 | giacomo | 2228 | break; |
2229 | case BTTV_HAUPPAUGE: |
||
2230 | case BTTV_HAUPPAUGE878: |
||
2231 | case BTTV_HAUPPAUGEPVR: |
||
170 | giacomo | 2232 | /* pick up some config infos from the eeprom */ |
2233 | bttv_readee(btv,eeprom_data,0xa0); |
||
2234 | hauppauge_eeprom(btv); |
||
428 | giacomo | 2235 | break; |
2236 | case BTTV_AVERMEDIA98: |
||
2237 | case BTTV_AVPHONE98: |
||
170 | giacomo | 2238 | bttv_readee(btv,eeprom_data,0xa0); |
2239 | avermedia_eeprom(btv); |
||
428 | giacomo | 2240 | break; |
2241 | case BTTV_PXC200: |
||
170 | giacomo | 2242 | init_PXC200(btv); |
428 | giacomo | 2243 | break; |
2244 | case BTTV_VHX: |
||
170 | giacomo | 2245 | btv->has_radio = 1; |
2246 | btv->has_matchbox = 1; |
||
2247 | btv->mbox_we = 0x20; |
||
2248 | btv->mbox_most = 0; |
||
2249 | btv->mbox_clk = 0x08; |
||
2250 | btv->mbox_data = 0x10; |
||
2251 | btv->mbox_mask = 0x38; |
||
428 | giacomo | 2252 | break; |
2253 | case BTTV_VOBIS_BOOSTAR: |
||
2254 | case BTTV_TERRATV: |
||
2255 | terratec_active_radio_upgrade(btv); |
||
2256 | break; |
||
2257 | case BTTV_MAGICTVIEW061: |
||
2258 | if (btv->cardid == 0x3002144f) { |
||
170 | giacomo | 2259 | btv->has_radio=1; |
428 | giacomo | 2260 | printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->nr); |
170 | giacomo | 2261 | } |
428 | giacomo | 2262 | break; |
2263 | case BTTV_STB2: |
||
2264 | if (btv->cardid == 0x3060121a) { |
||
2265 | /* Fix up entry for 3DFX VoodooTV 100, |
||
2266 | which is an OEM STB card variant. */ |
||
2267 | btv->has_radio=0; |
||
2268 | btv->tuner_type=TUNER_TEMIC_NTSC; |
||
2269 | } |
||
2270 | break; |
||
2271 | case BTTV_OSPREY1x0: |
||
2272 | case BTTV_OSPREY1x0_848: |
||
2273 | case BTTV_OSPREY101_848: |
||
2274 | case BTTV_OSPREY1x1: |
||
2275 | case BTTV_OSPREY1x1_SVID: |
||
2276 | case BTTV_OSPREY2xx: |
||
2277 | case BTTV_OSPREY2x0_SVID: |
||
2278 | case BTTV_OSPREY2x0: |
||
2279 | case BTTV_OSPREY500: |
||
2280 | case BTTV_OSPREY540: |
||
2281 | case BTTV_OSPREY2000: |
||
2282 | bttv_readee(btv,eeprom_data,0xa0); |
||
2283 | osprey_eeprom(btv); |
||
2284 | break; |
||
2285 | case BTTV_IDS_EAGLE: |
||
2286 | init_ids_eagle(btv); |
||
2287 | break; |
||
2288 | case BTTV_MODTEC_205: |
||
2289 | bttv_readee(btv,eeprom_data,0xa0); |
||
2290 | modtec_eeprom(btv); |
||
2291 | break; |
||
170 | giacomo | 2292 | } |
2293 | |||
2294 | /* pll configuration */ |
||
2295 | if (!(btv->id==848 && btv->revision==0x11)) { |
||
2296 | /* defaults from card list */ |
||
2297 | if (PLL_28 == bttv_tvcards[btv->type].pll) { |
||
2298 | btv->pll.pll_ifreq=28636363; |
||
2299 | btv->pll.pll_crystal=BT848_IFORM_XT0; |
||
2300 | } |
||
2301 | if (PLL_35 == bttv_tvcards[btv->type].pll) { |
||
2302 | btv->pll.pll_ifreq=35468950; |
||
2303 | btv->pll.pll_crystal=BT848_IFORM_XT1; |
||
2304 | } |
||
2305 | /* insmod options can override */ |
||
2306 | switch (pll[btv->nr]) { |
||
2307 | case 0: /* none */ |
||
2308 | btv->pll.pll_crystal = 0; |
||
2309 | btv->pll.pll_ifreq = 0; |
||
2310 | btv->pll.pll_ofreq = 0; |
||
2311 | break; |
||
2312 | case 1: /* 28 MHz */ |
||
2313 | case 28: |
||
2314 | btv->pll.pll_ifreq = 28636363; |
||
2315 | btv->pll.pll_ofreq = 0; |
||
2316 | btv->pll.pll_crystal = BT848_IFORM_XT0; |
||
2317 | break; |
||
2318 | case 2: /* 35 MHz */ |
||
2319 | case 35: |
||
2320 | btv->pll.pll_ifreq = 35468950; |
||
2321 | btv->pll.pll_ofreq = 0; |
||
2322 | btv->pll.pll_crystal = BT848_IFORM_XT1; |
||
2323 | break; |
||
2324 | } |
||
2325 | } |
||
428 | giacomo | 2326 | btv->pll.pll_current = -1; |
170 | giacomo | 2327 | |
428 | giacomo | 2328 | /* tuner configuration (from card list / autodetect / insmod option) */ |
2329 | if (UNSET != bttv_tvcards[btv->type].tuner_type) |
||
2330 | if(UNSET == btv->tuner_type) |
||
2331 | btv->tuner_type = bttv_tvcards[btv->type].tuner_type; |
||
2332 | if (UNSET != tuner[btv->nr]) |
||
170 | giacomo | 2333 | btv->tuner_type = tuner[btv->nr]; |
428 | giacomo | 2334 | printk("bttv%d: using tuner=%d\n",btv->nr,btv->tuner_type); |
2335 | if (btv->pinnacle_id != UNSET) |
||
2336 | bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, |
||
2337 | &btv->pinnacle_id); |
||
2338 | if (btv->tuner_type != UNSET) |
||
2339 | bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); |
||
2340 | btv->svhs = bttv_tvcards[btv->type].svhs; |
||
2341 | if (svhs[btv->nr] != UNSET) |
||
2342 | btv->svhs = svhs[btv->nr]; |
||
170 | giacomo | 2343 | |
2344 | if (bttv_tvcards[btv->type].has_radio) |
||
2345 | btv->has_radio=1; |
||
428 | giacomo | 2346 | if (bttv_tvcards[btv->type].audio_hook) |
2347 | btv->audio_hook=bttv_tvcards[btv->type].audio_hook; |
||
170 | giacomo | 2348 | |
428 | giacomo | 2349 | if (bttv_tvcards[btv->type].digital_mode == DIGITAL_MODE_CAMERA) { |
2350 | /* detect Bt832 chip for quartzsight digital camera */ |
||
2351 | if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) || |
||
2352 | (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0)) |
||
2353 | boot_bt832(btv); |
||
2354 | } |
||
2355 | |||
170 | giacomo | 2356 | /* try to detect audio/fader chips */ |
2357 | if (!bttv_tvcards[btv->type].no_msp34xx && |
||
2358 | bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0) { |
||
428 | giacomo | 2359 | if (autoload) |
2360 | request_module("msp3400"); |
||
170 | giacomo | 2361 | } |
2362 | |||
428 | giacomo | 2363 | if (bttv_tvcards[btv->type].msp34xx_alt && |
2364 | bttv_I2CRead(btv, I2C_MSP3400_ALT, "MSP34xx (alternate address)") >=0) { |
||
2365 | if (autoload) |
||
2366 | request_module("msp3400"); |
||
2367 | } |
||
2368 | |||
170 | giacomo | 2369 | if (!bttv_tvcards[btv->type].no_tda9875 && |
2370 | bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0) { |
||
428 | giacomo | 2371 | if (autoload) |
2372 | request_module("tda9875"); |
||
170 | giacomo | 2373 | } |
2374 | |||
2375 | if (!bttv_tvcards[btv->type].no_tda7432 && |
||
428 | giacomo | 2376 | bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0) { |
2377 | if (autoload) |
||
2378 | request_module("tda7432"); |
||
170 | giacomo | 2379 | } |
2380 | if (bttv_tvcards[btv->type].needs_tvaudio) { |
||
428 | giacomo | 2381 | if (autoload) |
2382 | request_module("tvaudio"); |
||
170 | giacomo | 2383 | } |
428 | giacomo | 2384 | /* tuner modules */ |
2385 | if (btv->pinnacle_id != UNSET) { |
||
2386 | if (autoload) |
||
2387 | request_module("tda9887"); |
||
170 | giacomo | 2388 | } |
428 | giacomo | 2389 | if (btv->tuner_type != UNSET) { |
2390 | if (autoload) |
||
2391 | request_module("tuner"); |
||
2392 | } |
||
170 | giacomo | 2393 | } |
2394 | |||
2395 | |||
2396 | /* ----------------------------------------------------------------------- */ |
||
2397 | /* some hauppauge specific stuff */ |
||
2398 | |||
2399 | static struct HAUPPAUGE_TUNER |
||
2400 | { |
||
2401 | int id; |
||
2402 | char *name; |
||
2403 | } |
||
428 | giacomo | 2404 | hauppauge_tuner[] __devinitdata = |
170 | giacomo | 2405 | { |
2406 | { TUNER_ABSENT, "" }, |
||
2407 | { TUNER_ABSENT, "External" }, |
||
2408 | { TUNER_ABSENT, "Unspecified" }, |
||
2409 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, |
||
2410 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, |
||
2411 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, |
||
2412 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, |
||
2413 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256" }, |
||
2414 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, |
||
2415 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, |
||
2416 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, |
||
2417 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, |
||
2418 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256 MK2" }, |
||
2419 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, |
||
2420 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, |
||
2421 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, |
||
2422 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, |
||
2423 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, |
||
2424 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, |
||
2425 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, |
||
2426 | { TUNER_PHILIPS_PAL_DK,"Philips FR1256 MK2" }, |
||
2427 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, |
||
2428 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, |
||
2429 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, |
||
2430 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, |
||
2431 | { TUNER_PHILIPS_PAL_DK,"Philips FM1256" }, |
||
2432 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, |
||
2433 | { TUNER_ABSENT, "Samsung TCPN9082D" }, |
||
2434 | { TUNER_ABSENT, "Samsung TCPM9092P" }, |
||
2435 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, |
||
2436 | { TUNER_ABSENT, "Samsung TCPN9085D" }, |
||
2437 | { TUNER_ABSENT, "Samsung TCPB9085P" }, |
||
2438 | { TUNER_ABSENT, "Samsung TCPL9091P" }, |
||
2439 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, |
||
2440 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, |
||
2441 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, |
||
428 | giacomo | 2442 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, |
2443 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, |
||
170 | giacomo | 2444 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ |
2445 | { TUNER_ABSENT, "Philips FI1256MP" }, |
||
2446 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, |
||
2447 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, |
||
2448 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, |
||
2449 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, |
||
2450 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, |
||
2451 | { TUNER_ABSENT, "Philips TD1536D_FH_44"}, |
||
428 | giacomo | 2452 | { TUNER_LG_NTSC_FM, "LG TPI8NSR01F"}, |
2453 | { TUNER_LG_PAL_FM, "LG TPI8PSB01D"}, |
||
2454 | { TUNER_LG_PAL, "LG TPI8PSB11D"}, |
||
170 | giacomo | 2455 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, |
2456 | { TUNER_LG_PAL_I, "LG TAPC-I701D"} |
||
2457 | }; |
||
2458 | |||
428 | giacomo | 2459 | static void modtec_eeprom(struct bttv *btv) |
170 | giacomo | 2460 | { |
428 | giacomo | 2461 | if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) { |
2462 | btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; |
||
2463 | printk("bttv Modtec: Tuner autodetected %s\n", |
||
2464 | &eeprom_data[0x1e]); |
||
2465 | } else { |
||
2466 | printk("bttv Modtec: Unknown TunerString:%s\n", |
||
2467 | &eeprom_data[0x1e]); |
||
2468 | } |
||
2469 | } |
||
170 | giacomo | 2470 | |
428 | giacomo | 2471 | static void __devinit hauppauge_eeprom(struct bttv *btv) |
2472 | { |
||
2473 | unsigned int blk2,tuner,radio,model; |
||
2474 | |||
170 | giacomo | 2475 | if (eeprom_data[0] != 0x84 || eeprom_data[2] != 0) |
2476 | printk(KERN_WARNING "bttv%d: Hauppauge eeprom: invalid\n", |
||
2477 | btv->nr); |
||
2478 | |||
2479 | /* Block 2 starts after len+3 bytes header */ |
||
2480 | blk2 = eeprom_data[1] + 3; |
||
2481 | |||
2482 | /* decode + use some config infos */ |
||
2483 | model = eeprom_data[12] << 8 | eeprom_data[11]; |
||
2484 | tuner = eeprom_data[9]; |
||
2485 | radio = eeprom_data[blk2-1] & 0x01; |
||
2486 | |||
428 | giacomo | 2487 | if (tuner < ARRAY_SIZE(hauppauge_tuner)) |
170 | giacomo | 2488 | btv->tuner_type = hauppauge_tuner[tuner].id; |
2489 | if (radio) |
||
2490 | btv->has_radio = 1; |
||
2491 | |||
2492 | if (bttv_verbose) |
||
2493 | printk(KERN_INFO "bttv%d: Hauppauge eeprom: model=%d, " |
||
2494 | "tuner=%s (%d), radio=%s\n", |
||
2495 | btv->nr, model, hauppauge_tuner[tuner].name, |
||
2496 | btv->tuner_type, radio ? "yes" : "no"); |
||
2497 | } |
||
2498 | |||
428 | giacomo | 2499 | static int terratec_active_radio_upgrade(struct bttv *btv) |
170 | giacomo | 2500 | { |
428 | giacomo | 2501 | int freq; |
2502 | |||
2503 | btv->has_radio = 1; |
||
2504 | btv->has_matchbox = 1; |
||
2505 | btv->mbox_we = 0x10; |
||
2506 | btv->mbox_most = 0x20; |
||
2507 | btv->mbox_clk = 0x08; |
||
2508 | btv->mbox_data = 0x04; |
||
2509 | btv->mbox_mask = 0x3c; |
||
2510 | |||
2511 | btv->mbox_iow = 1 << 8; |
||
2512 | btv->mbox_ior = 1 << 9; |
||
2513 | btv->mbox_csel = 1 << 10; |
||
2514 | |||
2515 | freq=88000/62.5; |
||
2516 | tea5757_write(btv, 5 * freq + 0x358); // write 0x1ed8 |
||
2517 | if (0x1ed8 == tea5757_read(btv)) { |
||
2518 | printk("bttv%d: Terratec Active Radio Upgrade found.\n", |
||
2519 | btv->nr); |
||
2520 | btv->has_radio = 1; |
||
2521 | btv->has_matchbox = 1; |
||
2522 | } else { |
||
2523 | btv->has_radio = 0; |
||
2524 | btv->has_matchbox = 0; |
||
2525 | } |
||
2526 | return 0; |
||
2527 | } |
||
2528 | |||
2529 | |||
2530 | /* ----------------------------------------------------------------------- */ |
||
2531 | |||
2532 | /* |
||
2533 | * minimal bootstrap for the WinTV/PVR -- upload altera firmware. |
||
2534 | * |
||
2535 | * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have |
||
2536 | * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be |
||
2537 | * unpacked with unzip). |
||
2538 | */ |
||
2539 | #define PVR_GPIO_DELAY 10 |
||
2540 | |||
2541 | #define BTTV_ALT_DATA 0x000001 |
||
2542 | #define BTTV_ALT_DCLK 0x100000 |
||
2543 | #define BTTV_ALT_NCONFIG 0x800000 |
||
2544 | |||
2545 | static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen) |
||
2546 | { |
||
2547 | u32 n; |
||
2548 | u8 bits; |
||
2549 | int i; |
||
2550 | |||
2551 | btwrite(BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG, |
||
2552 | BT848_GPIO_OUT_EN); |
||
2553 | btwrite(0,BT848_GPIO_DATA); |
||
2554 | udelay(PVR_GPIO_DELAY); |
||
2555 | |||
2556 | btwrite(BTTV_ALT_NCONFIG,BT848_GPIO_DATA); |
||
2557 | udelay(PVR_GPIO_DELAY); |
||
2558 | |||
2559 | for (n = 0; n < microlen; n++) { |
||
2560 | bits = micro[n]; |
||
2561 | for ( i = 0 ; i < 8 ; i++ ) { |
||
2562 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2563 | if (bits & 0x01) |
||
2564 | btor(BTTV_ALT_DATA,BT848_GPIO_DATA); |
||
2565 | else |
||
2566 | btand(~BTTV_ALT_DATA,BT848_GPIO_DATA); |
||
2567 | btor(BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2568 | bits >>= 1; |
||
2569 | } |
||
2570 | } |
||
2571 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2572 | udelay(PVR_GPIO_DELAY); |
||
2573 | |||
2574 | /* begin Altera init loop (Not necessary,but doesn't hurt) */ |
||
2575 | for (i = 0 ; i < 30 ; i++) { |
||
2576 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2577 | btor(BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2578 | } |
||
2579 | btand(~BTTV_ALT_DCLK,BT848_GPIO_DATA); |
||
2580 | return 0; |
||
2581 | } |
||
2582 | |||
2583 | #ifndef CONFIG_FW_LOADER |
||
2584 | /* old 2.4.x way -- via soundcore's mod_firmware_load */ |
||
2585 | |||
2586 | static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf"; |
||
2587 | MODULE_PARM(firm_altera,"s"); |
||
2588 | MODULE_PARM_DESC(firm_altera,"WinTV/PVR firmware " |
||
2589 | "(driver CD => unzip pvr45xxx.exe => hcwamc.rbf)"); |
||
2590 | |||
2591 | extern int mod_firmware_load(const char *fn, char **fp); |
||
2592 | |||
2593 | int __devinit pvr_boot(struct bttv *btv) |
||
2594 | { |
||
2595 | u32 microlen; |
||
2596 | u8 *micro; |
||
2597 | int result; |
||
2598 | |||
516 | giacomo | 2599 | microlen = 0;//mod_firmware_load(firm_altera, (char**) µ); |
428 | giacomo | 2600 | if (!microlen) { |
2601 | printk(KERN_WARNING "bttv%d: altera firmware not found [%s]\n", |
||
2602 | btv->nr, firm_altera); |
||
2603 | return -1; |
||
2604 | } |
||
2605 | |||
2606 | printk(KERN_INFO "bttv%d: uploading altera firmware [%s] ...\n", |
||
2607 | btv->nr, firm_altera); |
||
2608 | result = pvr_altera_load(btv, micro, microlen); |
||
2609 | printk(KERN_INFO "bttv%d: ... upload %s\n", |
||
2610 | btv->nr, (result < 0) ? "failed" : "ok"); |
||
2611 | vfree(micro); |
||
2612 | return result; |
||
2613 | } |
||
2614 | #else |
||
2615 | /* new 2.5.x way -- via hotplug firmware loader */ |
||
2616 | |||
2617 | int __devinit pvr_boot(struct bttv *btv) |
||
2618 | { |
||
2619 | const struct firmware *fw_entry; |
||
2620 | int rc; |
||
2621 | |||
2622 | rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->dev->dev); |
||
2623 | if (rc != 0) { |
||
2624 | printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n", |
||
2625 | btv->nr); |
||
2626 | return rc; |
||
170 | giacomo | 2627 | } |
428 | giacomo | 2628 | rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); |
2629 | printk(KERN_INFO "bttv%d: altera firmware upload %s\n", |
||
2630 | btv->nr, (rc < 0) ? "failed" : "ok"); |
||
2631 | release_firmware(fw_entry); |
||
2632 | return rc; |
||
2633 | } |
||
2634 | #endif |
||
2635 | |||
2636 | /* ----------------------------------------------------------------------- */ |
||
2637 | /* some osprey specific stuff */ |
||
2638 | |||
2639 | static void __devinit osprey_eeprom(struct bttv *btv) |
||
2640 | { |
||
2641 | int i = 0; |
||
2642 | unsigned char *ee = eeprom_data; |
||
2643 | unsigned long serial = 0; |
||
170 | giacomo | 2644 | |
428 | giacomo | 2645 | if (btv->type == 0) { |
2646 | /* this might be an antique... check for MMAC label in eeprom */ |
||
2647 | if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) { |
||
2648 | unsigned char checksum = 0; |
||
2649 | for (i =0; i<21; i++) |
||
2650 | checksum += ee[i]; |
||
2651 | if (checksum != ee[21]) |
||
2652 | return; |
||
2653 | btv->type = BTTV_OSPREY1x0_848; |
||
2654 | for (i = 12; i < 21; i++) |
||
2655 | serial *= 10, serial += ee[i] - '0'; |
||
2656 | } |
||
2657 | } else { |
||
2658 | unsigned short type; |
||
2659 | int offset = 4*16; |
||
170 | giacomo | 2660 | |
428 | giacomo | 2661 | for(; offset < 8*16; offset += 16) { |
2662 | unsigned short checksum = 0; |
||
2663 | /* verify the checksum */ |
||
2664 | for(i = 0; i<14; i++) checksum += ee[i+offset]; |
||
2665 | checksum = ~checksum; /* no idea why */ |
||
2666 | if ((((checksum>>8)&0x0FF) == ee[offset+14]) && |
||
2667 | ((checksum & 0x0FF) == ee[offset+15])) { |
||
2668 | break; |
||
2669 | } |
||
2670 | } |
||
170 | giacomo | 2671 | |
428 | giacomo | 2672 | if (offset >= 8*16) |
2673 | return; |
||
170 | giacomo | 2674 | |
428 | giacomo | 2675 | /* found a valid descriptor */ |
2676 | type = (ee[offset+4]<<8) | (ee[offset+5]); |
||
2677 | |||
2678 | switch(type) { |
||
170 | giacomo | 2679 | |
428 | giacomo | 2680 | /* 848 based */ |
2681 | case 0x0004: |
||
2682 | btv->type = BTTV_OSPREY1x0_848; |
||
2683 | break; |
||
2684 | case 0x0005: |
||
2685 | btv->type = BTTV_OSPREY101_848; |
||
2686 | break; |
||
2687 | |||
2688 | /* 878 based */ |
||
2689 | case 0x0012: |
||
2690 | case 0x0013: |
||
2691 | btv->type = BTTV_OSPREY1x0; |
||
2692 | break; |
||
2693 | case 0x0014: |
||
2694 | case 0x0015: |
||
2695 | btv->type = BTTV_OSPREY1x1; |
||
2696 | break; |
||
2697 | case 0x0016: |
||
2698 | case 0x0017: |
||
2699 | case 0x0020: |
||
2700 | btv->type = BTTV_OSPREY1x1_SVID; |
||
2701 | break; |
||
2702 | case 0x0018: |
||
2703 | case 0x0019: |
||
2704 | case 0x001E: |
||
2705 | case 0x001F: |
||
2706 | btv->type = BTTV_OSPREY2xx; |
||
2707 | break; |
||
2708 | case 0x001A: |
||
2709 | case 0x001B: |
||
2710 | btv->type = BTTV_OSPREY2x0_SVID; |
||
2711 | break; |
||
2712 | case 0x0040: |
||
2713 | btv->type = BTTV_OSPREY500; |
||
2714 | break; |
||
2715 | case 0x0050: |
||
2716 | case 0x0056: |
||
2717 | btv->type = BTTV_OSPREY540; |
||
2718 | /* bttv_osprey_540_init(btv); */ |
||
2719 | break; |
||
2720 | case 0x0060: |
||
2721 | case 0x0070: |
||
2722 | btv->type = BTTV_OSPREY2x0; |
||
2723 | //enable output on select control lines |
||
2724 | btwrite(0x000303, BT848_GPIO_OUT_EN); |
||
2725 | break; |
||
2726 | default: |
||
2727 | /* unknown...leave generic, but get serial # */ |
||
2728 | break; |
||
2729 | } |
||
2730 | serial = (ee[offset+6] << 24) |
||
2731 | | (ee[offset+7] << 16) |
||
2732 | | (ee[offset+8] << 8) |
||
2733 | | (ee[offset+9]); |
||
2734 | } |
||
2735 | |||
2736 | printk(KERN_INFO "bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n", |
||
2737 | btv->nr, btv->type, bttv_tvcards[btv->type].name,serial); |
||
2738 | } |
||
2739 | |||
170 | giacomo | 2740 | /* ----------------------------------------------------------------------- */ |
2741 | /* AVermedia specific stuff, from bktr_card.c */ |
||
2742 | |||
2743 | int tuner_0_table[] = { |
||
428 | giacomo | 2744 | TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/, |
2745 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/, |
||
170 | giacomo | 2746 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL, |
2747 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM, |
||
2748 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL}; |
||
2749 | #if 0 |
||
2750 | int tuner_0_fm_table[] = { |
||
2751 | PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL, |
||
2752 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
2753 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
2754 | PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM, |
||
2755 | PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL}; |
||
2756 | #endif |
||
2757 | |||
2758 | int tuner_1_table[] = { |
||
2759 | TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL, |
||
2760 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
2761 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
2762 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, //TUNER_TEMIC_SECAM |
||
2763 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; |
||
2764 | |||
428 | giacomo | 2765 | static void __devinit avermedia_eeprom(struct bttv *btv) |
170 | giacomo | 2766 | { |
428 | giacomo | 2767 | int tuner_make,tuner_tv_fm,tuner_format,tuner=0; |
170 | giacomo | 2768 | |
428 | giacomo | 2769 | tuner_make = (eeprom_data[0x41] & 0x7); |
2770 | tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3; |
||
2771 | tuner_format = (eeprom_data[0x42] & 0xf0) >> 4; |
||
2772 | btv->has_remote = (eeprom_data[0x42] & 0x01); |
||
170 | giacomo | 2773 | |
2774 | if (tuner_make == 0 || tuner_make == 2) |
||
2775 | if(tuner_format <=9) |
||
2776 | tuner = tuner_0_table[tuner_format]; |
||
2777 | if (tuner_make == 1) |
||
2778 | if(tuner_format <=9) |
||
2779 | tuner = tuner_1_table[tuner_format]; |
||
2780 | |||
428 | giacomo | 2781 | printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=", |
170 | giacomo | 2782 | btv->nr,eeprom_data[0x41],eeprom_data[0x42]); |
2783 | if(tuner) { |
||
2784 | btv->tuner_type=tuner; |
||
428 | giacomo | 2785 | printk("%d",tuner); |
170 | giacomo | 2786 | } else |
428 | giacomo | 2787 | printk("Unknown type"); |
2788 | printk(" radio:%s remote control:%s\n", |
||
2789 | tuner_tv_fm ? "yes" : "no", |
||
2790 | btv->has_remote ? "yes" : "no"); |
||
170 | giacomo | 2791 | } |
2792 | |||
2793 | /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */ |
||
2794 | void bttv_tda9880_setnorm(struct bttv *btv, int norm) |
||
2795 | { |
||
2796 | // fix up our card entry |
||
2797 | if(norm==VIDEO_MODE_NTSC) { |
||
2798 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x957fff; |
||
2799 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x957fff; |
||
2800 | dprintk("bttv_tda9880_setnorm to NTSC\n"); |
||
2801 | } |
||
2802 | else { |
||
2803 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x947fff; |
||
2804 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x947fff; |
||
2805 | dprintk("bttv_tda9880_setnorm to PAL\n"); |
||
2806 | } |
||
2807 | // set GPIO according |
||
428 | giacomo | 2808 | btaor(bttv_tvcards[btv->type].audiomux[btv->audio], |
2809 | ~bttv_tvcards[btv->type].gpiomask, BT848_GPIO_DATA); |
||
170 | giacomo | 2810 | } |
2811 | |||
2812 | |||
2813 | /* |
||
2814 | * reset/enable the MSP on some Hauppauge cards |
||
428 | giacomo | 2815 | * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)! |
170 | giacomo | 2816 | * |
2817 | * Hauppauge: pin 5 |
||
2818 | * Voodoo: pin 20 |
||
2819 | */ |
||
428 | giacomo | 2820 | static void __devinit boot_msp34xx(struct bttv *btv, int pin) |
170 | giacomo | 2821 | { |
2822 | int mask = (1 << pin); |
||
2823 | |||
428 | giacomo | 2824 | btaor(mask, ~mask, BT848_GPIO_OUT_EN); |
2825 | btaor(0, ~mask, BT848_GPIO_DATA); |
||
170 | giacomo | 2826 | udelay(2500); |
428 | giacomo | 2827 | btaor(mask, ~mask, BT848_GPIO_DATA); |
170 | giacomo | 2828 | if (bttv_gpio) |
2829 | bttv_gpio_tracking(btv,"msp34xx"); |
||
2830 | |||
2831 | if (bttv_verbose) |
||
2832 | printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line " |
||
2833 | "init [%d]\n", btv->nr, pin); |
||
2834 | } |
||
2835 | |||
428 | giacomo | 2836 | static void __devinit boot_bt832(struct bttv *btv) |
2837 | { |
||
2838 | int outbits,databits,resetbit=0; |
||
170 | giacomo | 2839 | |
428 | giacomo | 2840 | switch (btv->type) { |
2841 | case BTTV_PXELVWPLTVPAK: |
||
2842 | resetbit = 0x400000; |
||
2843 | break; |
||
2844 | case BTTV_MODTEC_205: |
||
2845 | resetbit = 1<<9; |
||
2846 | break; |
||
2847 | default: |
||
2848 | BUG(); |
||
2849 | } |
||
2850 | |||
2851 | request_module("bt832"); |
||
2852 | bttv_call_i2c_clients(btv, BT832_HEXDUMP, NULL); |
||
2853 | |||
2854 | printk("bttv%d: Reset Bt832 [line=0x%x]\n",btv->nr,resetbit); |
||
2855 | btwrite(0, BT848_GPIO_DATA); |
||
2856 | outbits = btread(BT848_GPIO_OUT_EN); |
||
2857 | databits= btread(BT848_GPIO_DATA); |
||
2858 | btwrite(resetbit, BT848_GPIO_OUT_EN); |
||
2859 | udelay(5); |
||
2860 | btwrite(resetbit, BT848_GPIO_DATA); |
||
2861 | udelay(5); |
||
2862 | btwrite(0, BT848_GPIO_DATA); |
||
2863 | udelay(5); |
||
2864 | btwrite(outbits, BT848_GPIO_OUT_EN); |
||
2865 | btwrite(databits, BT848_GPIO_DATA); |
||
2866 | |||
2867 | // bt832 on pixelview changes from i2c 0x8a to 0x88 after |
||
2868 | // being reset as above. So we must follow by this: |
||
2869 | bttv_call_i2c_clients(btv, BT832_REATTACH, NULL); |
||
2870 | } |
||
2871 | |||
170 | giacomo | 2872 | /* ----------------------------------------------------------------------- */ |
2873 | /* Imagenation L-Model PXC200 Framegrabber */ |
||
2874 | /* This is basically the same procedure as |
||
2875 | * used by Alessandro Rubini in his pxc200 |
||
2876 | * driver, but using BTTV functions */ |
||
2877 | |||
428 | giacomo | 2878 | static void __devinit init_PXC200(struct bttv *btv) |
170 | giacomo | 2879 | { |
428 | giacomo | 2880 | static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, |
2881 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, |
||
2882 | 0x00 }; |
||
2883 | unsigned int i; |
||
2884 | int tmp; |
||
2885 | u32 val; |
||
2886 | |||
170 | giacomo | 2887 | /* Initialise GPIO-connevted stuff */ |
2888 | btwrite(1<<13,BT848_GPIO_OUT_EN); /* Reset pin only */ |
||
428 | giacomo | 2889 | btwrite(0,BT848_GPIO_DATA); |
170 | giacomo | 2890 | udelay(3); |
428 | giacomo | 2891 | btwrite(1<<13,BT848_GPIO_DATA); |
170 | giacomo | 2892 | /* GPIO inputs are pulled up, so no need to drive |
2893 | * reset pin any longer */ |
||
2894 | btwrite(0,BT848_GPIO_OUT_EN); |
||
2895 | if (bttv_gpio) |
||
2896 | bttv_gpio_tracking(btv,"pxc200"); |
||
2897 | |||
2898 | /* we could/should try and reset/control the AD pots? but |
||
2899 | right now we simply turned off the crushing. Without |
||
2900 | this the AGC drifts drifts |
||
2901 | remember the EN is reverse logic --> |
||
2902 | setting BT848_ADC_AGC_EN disable the AGC |
||
2903 | tboult@eecs.lehigh.edu |
||
2904 | */ |
||
428 | giacomo | 2905 | |
170 | giacomo | 2906 | btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC); |
2907 | |||
2908 | /* Initialise MAX517 DAC */ |
||
2909 | printk(KERN_INFO "Setting DAC reference voltage level ...\n"); |
||
2910 | bttv_I2CWrite(btv,0x5E,0,0x80,1); |
||
2911 | |||
2912 | /* Initialise 12C508 PIC */ |
||
2913 | /* The I2CWrite and I2CRead commmands are actually to the |
||
2914 | * same chips - but the R/W bit is included in the address |
||
2915 | * argument so the numbers are different */ |
||
2916 | |||
428 | giacomo | 2917 | |
2918 | printk(KERN_INFO "Initialising 12C508 PIC chip ...\n"); |
||
2919 | |||
2920 | /* First of all, enable the clock line. This is used in the PXC200-F */ |
||
2921 | val = btread(BT848_GPIO_DMA_CTL); |
||
2922 | val |= BT848_GPIO_DMA_CTL_GPCLKMODE; |
||
2923 | btwrite(val, BT848_GPIO_DMA_CTL); |
||
2924 | |||
2925 | /* Then, push to 0 the reset pin long enough to reset the * |
||
2926 | * device same as above for the reset line, but not the same |
||
2927 | * value sent to the GPIO-connected stuff |
||
2928 | * which one is the good one? */ |
||
2929 | btwrite( (1<<2), BT848_GPIO_OUT_EN); /* only the reset pin */ |
||
2930 | btwrite(0, BT848_GPIO_DATA); |
||
2931 | udelay(10); |
||
2932 | btwrite(1<<2, BT848_GPIO_DATA); |
||
2933 | |||
2934 | for (i = 0; i < ARRAY_SIZE(vals); i++) { |
||
2935 | tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1); |
||
2936 | if (tmp != -1) { |
||
2937 | printk(KERN_INFO |
||
2938 | "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n", |
||
2939 | vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL)); |
||
2940 | } |
||
2941 | } |
||
2942 | |||
170 | giacomo | 2943 | printk(KERN_INFO "PXC200 Initialised.\n"); |
2944 | } |
||
2945 | |||
428 | giacomo | 2946 | |
170 | giacomo | 2947 | /* ----------------------------------------------------------------------- */ |
2948 | /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */ |
||
2949 | /* |
||
2950 | * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu> |
||
2951 | * This code is placed under the terms of the GNU General Public License |
||
2952 | * |
||
2953 | * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00 |
||
2954 | */ |
||
2955 | |||
428 | giacomo | 2956 | void bus_low(struct bttv *btv, int bit) |
2957 | { |
||
2958 | if (btv->mbox_ior) { |
||
2959 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2960 | BT848_GPIO_DATA); |
||
2961 | udelay(5); |
||
2962 | } |
||
170 | giacomo | 2963 | |
428 | giacomo | 2964 | btand(~(bit), BT848_GPIO_DATA); |
2965 | udelay(5); |
||
170 | giacomo | 2966 | |
428 | giacomo | 2967 | if (btv->mbox_ior) { |
2968 | btand(~(btv->mbox_iow | btv->mbox_csel), |
||
2969 | BT848_GPIO_DATA); |
||
2970 | udelay(5); |
||
2971 | } |
||
2972 | } |
||
2973 | |||
2974 | void bus_high(struct bttv *btv, int bit) |
||
2975 | { |
||
2976 | if (btv->mbox_ior) { |
||
2977 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2978 | BT848_GPIO_DATA); |
||
2979 | udelay(5); |
||
2980 | } |
||
2981 | |||
2982 | btor((bit), BT848_GPIO_DATA); |
||
2983 | udelay(5); |
||
2984 | |||
2985 | if (btv->mbox_ior) { |
||
2986 | btand(~(btv->mbox_iow | btv->mbox_csel), |
||
2987 | BT848_GPIO_DATA); |
||
2988 | udelay(5); |
||
2989 | } |
||
2990 | } |
||
2991 | |||
2992 | int bus_in(struct bttv *btv, int bit) |
||
2993 | { |
||
2994 | if (btv->mbox_ior) { |
||
2995 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
2996 | BT848_GPIO_DATA); |
||
2997 | udelay(5); |
||
2998 | |||
2999 | btand(~(btv->mbox_ior | btv->mbox_csel), |
||
3000 | BT848_GPIO_DATA); |
||
3001 | udelay(5); |
||
3002 | } |
||
3003 | return btread(BT848_GPIO_DATA) & (bit); |
||
3004 | } |
||
3005 | |||
170 | giacomo | 3006 | /* TEA5757 register bits */ |
3007 | #define TEA_FREQ 0:14 |
||
3008 | #define TEA_BUFFER 15:15 |
||
3009 | |||
3010 | #define TEA_SIGNAL_STRENGTH 16:17 |
||
3011 | |||
3012 | #define TEA_PORT1 18:18 |
||
3013 | #define TEA_PORT0 19:19 |
||
3014 | |||
3015 | #define TEA_BAND 20:21 |
||
3016 | #define TEA_BAND_FM 0 |
||
3017 | #define TEA_BAND_MW 1 |
||
3018 | #define TEA_BAND_LW 2 |
||
3019 | #define TEA_BAND_SW 3 |
||
3020 | |||
3021 | #define TEA_MONO 22:22 |
||
3022 | #define TEA_ALLOW_STEREO 0 |
||
3023 | #define TEA_FORCE_MONO 1 |
||
3024 | |||
3025 | #define TEA_SEARCH_DIRECTION 23:23 |
||
3026 | #define TEA_SEARCH_DOWN 0 |
||
3027 | #define TEA_SEARCH_UP 1 |
||
3028 | |||
3029 | #define TEA_STATUS 24:24 |
||
3030 | #define TEA_STATUS_TUNED 0 |
||
3031 | #define TEA_STATUS_SEARCHING 1 |
||
3032 | |||
464 | giacomo | 3033 | extern unsigned long read_time(void); |
3034 | |||
428 | giacomo | 3035 | /* Low-level stuff */ |
3036 | static int tea5757_read(struct bttv *btv) |
||
3037 | { |
||
3038 | unsigned long timeout; |
||
3039 | int value = 0; |
||
3040 | int i; |
||
3041 | |||
3042 | /* better safe than sorry */ |
||
3043 | btaor((btv->mbox_clk | btv->mbox_we), |
||
3044 | ~btv->mbox_mask, BT848_GPIO_OUT_EN); |
||
3045 | |||
3046 | if (btv->mbox_ior) { |
||
3047 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
3048 | BT848_GPIO_DATA); |
||
3049 | udelay(5); |
||
3050 | } |
||
3051 | |||
3052 | if (bttv_gpio) |
||
3053 | bttv_gpio_tracking(btv,"tea5757 read"); |
||
3054 | |||
3055 | bus_low(btv,btv->mbox_we); |
||
3056 | bus_low(btv,btv->mbox_clk); |
||
3057 | |||
3058 | udelay(10); |
||
464 | giacomo | 3059 | timeout= read_time() + 1000000; |
428 | giacomo | 3060 | |
3061 | // wait for DATA line to go low; error if it doesn't |
||
464 | giacomo | 3062 | while (bus_in(btv,btv->mbox_data) && timeout > read_time()); |
428 | giacomo | 3063 | if (bus_in(btv,btv->mbox_data)) { |
3064 | printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->nr); |
||
3065 | return -1; |
||
3066 | } |
||
3067 | |||
3068 | dprintk("bttv%d: tea5757:",btv->nr); |
||
3069 | for(i = 0; i < 24; i++) |
||
3070 | { |
||
3071 | udelay(5); |
||
3072 | bus_high(btv,btv->mbox_clk); |
||
3073 | udelay(5); |
||
3074 | dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-'); |
||
3075 | bus_low(btv,btv->mbox_clk); |
||
3076 | value <<= 1; |
||
3077 | value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */ |
||
3078 | dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M'); |
||
3079 | } |
||
3080 | dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->nr, value); |
||
3081 | return value; |
||
3082 | } |
||
3083 | |||
3084 | static int tea5757_write(struct bttv *btv, int value) |
||
3085 | { |
||
3086 | int i; |
||
3087 | int reg = value; |
||
3088 | |||
3089 | btaor(btv->mbox_clk | btv->mbox_we | btv->mbox_data, |
||
3090 | ~btv->mbox_mask, BT848_GPIO_OUT_EN); |
||
3091 | |||
3092 | if (btv->mbox_ior) { |
||
3093 | btor(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, |
||
3094 | BT848_GPIO_DATA); |
||
3095 | udelay(5); |
||
3096 | } |
||
3097 | if (bttv_gpio) |
||
3098 | bttv_gpio_tracking(btv,"tea5757 write"); |
||
3099 | |||
3100 | dprintk("bttv%d: tea5757: write 0x%X\n", btv->nr, value); |
||
3101 | bus_low(btv,btv->mbox_clk); |
||
3102 | bus_high(btv,btv->mbox_we); |
||
3103 | for(i = 0; i < 25; i++) |
||
3104 | { |
||
3105 | if (reg & 0x1000000) |
||
3106 | bus_high(btv,btv->mbox_data); |
||
3107 | else |
||
3108 | bus_low(btv,btv->mbox_data); |
||
3109 | reg <<= 1; |
||
3110 | bus_high(btv,btv->mbox_clk); |
||
3111 | udelay(10); |
||
3112 | bus_low(btv,btv->mbox_clk); |
||
3113 | udelay(10); |
||
3114 | } |
||
3115 | bus_low(btv,btv->mbox_we); /* unmute !!! */ |
||
3116 | return 0; |
||
3117 | } |
||
3118 | |||
3119 | void tea5757_set_freq(struct bttv *btv, unsigned short freq) |
||
3120 | { |
||
3121 | dprintk("tea5757_set_freq %d\n",freq); |
||
3122 | tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */ |
||
3123 | #if 0 |
||
3124 | /* breaks Miro PCTV */ |
||
3125 | value = tea5757_read(btv); |
||
3126 | dprintk("bttv%d: tea5757 readback=0x%x\n",btv->nr,value); |
||
3127 | #endif |
||
3128 | } |
||
3129 | |||
3130 | |||
170 | giacomo | 3131 | /* ----------------------------------------------------------------------- */ |
3132 | /* winview */ |
||
3133 | |||
3134 | void winview_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3135 | { |
||
3136 | /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */ |
||
3137 | int bits_out, loops, vol, data; |
||
3138 | |||
3139 | if (!set) { |
||
3140 | /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */ |
||
3141 | v->flags |= VIDEO_AUDIO_VOLUME; |
||
3142 | return; |
||
3143 | } |
||
3144 | |||
3145 | /* 32 levels logarithmic */ |
||
3146 | vol = 32 - ((v->volume>>11)); |
||
3147 | /* units */ |
||
3148 | bits_out = (PT2254_DBS_IN_2>>(vol%5)); |
||
3149 | /* tens */ |
||
3150 | bits_out |= (PT2254_DBS_IN_10>>(vol/5)); |
||
3151 | bits_out |= PT2254_L_CHANNEL | PT2254_R_CHANNEL; |
||
428 | giacomo | 3152 | data = btread(BT848_GPIO_DATA); |
170 | giacomo | 3153 | data &= ~(WINVIEW_PT2254_CLK| WINVIEW_PT2254_DATA| |
3154 | WINVIEW_PT2254_STROBE); |
||
3155 | for (loops = 17; loops >= 0 ; loops--) { |
||
3156 | if (bits_out & (1<<loops)) |
||
3157 | data |= WINVIEW_PT2254_DATA; |
||
3158 | else |
||
3159 | data &= ~WINVIEW_PT2254_DATA; |
||
428 | giacomo | 3160 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3161 | udelay(5); |
3162 | data |= WINVIEW_PT2254_CLK; |
||
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 | } |
3168 | data |= WINVIEW_PT2254_STROBE; |
||
3169 | data &= ~WINVIEW_PT2254_DATA; |
||
428 | giacomo | 3170 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3171 | udelay(10); |
3172 | data &= ~WINVIEW_PT2254_STROBE; |
||
428 | giacomo | 3173 | btwrite(data, BT848_GPIO_DATA); |
170 | giacomo | 3174 | } |
3175 | |||
3176 | /* ----------------------------------------------------------------------- */ |
||
3177 | /* mono/stereo control for various cards (which don't use i2c chips but */ |
||
3178 | /* connect something to the GPIO pins */ |
||
3179 | |||
3180 | static void |
||
3181 | gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3182 | { |
||
3183 | unsigned int con = 0; |
||
3184 | |||
3185 | if (set) { |
||
3186 | btor(0x300, BT848_GPIO_OUT_EN); |
||
3187 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3188 | con = 0x000; |
||
3189 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3190 | con = 0x300; |
||
3191 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3192 | con = 0x200; |
||
3193 | // if (v->mode & VIDEO_SOUND_MONO) |
||
3194 | // con = 0x100; |
||
428 | giacomo | 3195 | btaor(con, ~0x300, BT848_GPIO_DATA); |
170 | giacomo | 3196 | } else { |
3197 | v->mode = VIDEO_SOUND_STEREO | |
||
3198 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3199 | } |
||
3200 | } |
||
3201 | |||
3202 | /* |
||
3203 | * Mario Medina Nussbaum <medisoft@alohabbs.org.mx> |
||
3204 | * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo, |
||
3205 | * 0xdde enables mono and 0xccd enables sap |
||
3206 | * |
||
3207 | * Petr Vandrovec <VANDROVE@vc.cvut.cz> |
||
3208 | * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select |
||
3209 | * input/output sound connection, so both must be set for output mode. |
||
3210 | * |
||
3211 | * Looks like it's needed only for the "tvphone", the "tvphone 98" |
||
3212 | * handles this with a tda9840 |
||
3213 | * |
||
3214 | */ |
||
3215 | static void |
||
3216 | avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3217 | { |
||
3218 | int val = 0; |
||
3219 | |||
3220 | if (set) { |
||
3221 | if (v->mode & VIDEO_SOUND_LANG1) /* SAP */ |
||
3222 | val = 0x02; |
||
3223 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3224 | val = 0x01; |
||
3225 | if (val) { |
||
428 | giacomo | 3226 | btaor(val, ~0x03, BT848_GPIO_DATA); |
170 | giacomo | 3227 | if (bttv_gpio) |
3228 | bttv_gpio_tracking(btv,"avermedia"); |
||
3229 | } |
||
3230 | } else { |
||
3231 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3232 | VIDEO_SOUND_LANG1; |
||
3233 | return; |
||
3234 | } |
||
3235 | } |
||
3236 | |||
3237 | /* Lifetec 9415 handling */ |
||
3238 | static void |
||
3239 | lt9415_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3240 | { |
||
3241 | int val = 0; |
||
3242 | |||
428 | giacomo | 3243 | if (btread(BT848_GPIO_DATA) & 0x4000) { |
170 | giacomo | 3244 | v->mode = VIDEO_SOUND_MONO; |
3245 | return; |
||
3246 | } |
||
3247 | |||
3248 | if (set) { |
||
3249 | if (v->mode & VIDEO_SOUND_LANG2) /* A2 SAP */ |
||
3250 | val = 0x0080; |
||
3251 | if (v->mode & VIDEO_SOUND_STEREO) /* A2 stereo */ |
||
3252 | val = 0x0880; |
||
3253 | if ((v->mode & VIDEO_SOUND_LANG1) || |
||
3254 | (v->mode & VIDEO_SOUND_MONO)) |
||
3255 | val = 0; |
||
428 | giacomo | 3256 | btaor(val, ~0x0880, BT848_GPIO_DATA); |
170 | giacomo | 3257 | if (bttv_gpio) |
3258 | bttv_gpio_tracking(btv,"lt9415"); |
||
3259 | } else { |
||
3260 | /* autodetect doesn't work with this card :-( */ |
||
3261 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3262 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3263 | return; |
||
3264 | } |
||
3265 | } |
||
3266 | |||
428 | giacomo | 3267 | // TDA9821 on TerraTV+ Bt848, Bt878 |
170 | giacomo | 3268 | static void |
3269 | terratv_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3270 | { |
||
3271 | unsigned int con = 0; |
||
3272 | |||
3273 | if (set) { |
||
3274 | btor(0x180000, BT848_GPIO_OUT_EN); |
||
3275 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3276 | con = 0x080000; |
||
3277 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3278 | con = 0x180000; |
||
428 | giacomo | 3279 | btaor(con, ~0x180000, BT848_GPIO_DATA); |
170 | giacomo | 3280 | if (bttv_gpio) |
3281 | bttv_gpio_tracking(btv,"terratv"); |
||
3282 | } else { |
||
3283 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3284 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3285 | } |
||
3286 | } |
||
3287 | |||
3288 | static void |
||
3289 | winfast2000_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3290 | { |
||
3291 | unsigned long val = 0; |
||
3292 | |||
3293 | if (set) { |
||
3294 | /*btor (0xc32000, BT848_GPIO_OUT_EN);*/ |
||
3295 | if (v->mode & VIDEO_SOUND_MONO) /* Mono */ |
||
3296 | val = 0x420000; |
||
3297 | if (v->mode & VIDEO_SOUND_LANG1) /* Mono */ |
||
3298 | val = 0x420000; |
||
3299 | if (v->mode & VIDEO_SOUND_LANG2) /* SAP */ |
||
3300 | val = 0x410000; |
||
3301 | if (v->mode & VIDEO_SOUND_STEREO) /* Stereo */ |
||
3302 | val = 0x020000; |
||
3303 | if (val) { |
||
428 | giacomo | 3304 | btaor(val, ~0x430000, BT848_GPIO_DATA); |
170 | giacomo | 3305 | if (bttv_gpio) |
3306 | bttv_gpio_tracking(btv,"winfast2000"); |
||
3307 | } |
||
3308 | } else { |
||
3309 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3310 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3311 | } |
||
3312 | } |
||
3313 | |||
3314 | /* |
||
3315 | * Dariusz Kowalewski <darekk@automex.pl> |
||
3316 | * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM |
||
3317 | * revision 9B has on-board TDA9874A sound decoder). |
||
428 | giacomo | 3318 | * |
3319 | * Note: There are card variants without tda9874a. Forcing the "stereo sound route" |
||
3320 | * will mute this cards. |
||
170 | giacomo | 3321 | */ |
3322 | static void |
||
3323 | pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3324 | { |
||
3325 | unsigned int val = 0; |
||
3326 | |||
428 | giacomo | 3327 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) |
3328 | if (btv->radio_user) |
||
3329 | return; |
||
3330 | #else |
||
170 | giacomo | 3331 | if (btv->radio) |
3332 | return; |
||
428 | giacomo | 3333 | #endif |
170 | giacomo | 3334 | |
3335 | if (set) { |
||
3336 | if (v->mode & VIDEO_SOUND_MONO) { |
||
3337 | val = 0x01; |
||
3338 | } |
||
3339 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
3340 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
3341 | val = 0x02; |
||
3342 | } |
||
3343 | if (val) { |
||
428 | giacomo | 3344 | btaor(val, ~0x03, BT848_GPIO_DATA); |
170 | giacomo | 3345 | if (bttv_gpio) |
3346 | bttv_gpio_tracking(btv,"pvbt878p9b"); |
||
3347 | } |
||
3348 | } else { |
||
3349 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3350 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3351 | } |
||
3352 | } |
||
3353 | |||
3354 | /* |
||
3355 | * Dariusz Kowalewski <darekk@automex.pl> |
||
3356 | * sound control for FlyVideo 2000S (with tda9874 decoder) |
||
3357 | * based on pvbt878p9b_audio() - this is not tested, please fix!!! |
||
3358 | */ |
||
3359 | static void |
||
3360 | fv2000s_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3361 | { |
||
3362 | unsigned int val = 0xffff; |
||
3363 | |||
428 | giacomo | 3364 | #if BTTV_VERSION_CODE > KERNEL_VERSION(0,8,0) |
3365 | if (btv->radio_user) |
||
3366 | return; |
||
3367 | #else |
||
170 | giacomo | 3368 | if (btv->radio) |
3369 | return; |
||
428 | giacomo | 3370 | #endif |
170 | giacomo | 3371 | if (set) { |
3372 | if (v->mode & VIDEO_SOUND_MONO) { |
||
3373 | val = 0x0000; |
||
3374 | } |
||
3375 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
3376 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
3377 | val = 0x1080; //-dk-???: 0x0880, 0x0080, 0x1800 ... |
||
3378 | } |
||
3379 | if (val != 0xffff) { |
||
428 | giacomo | 3380 | btaor(val, ~0x1800, BT848_GPIO_DATA); |
170 | giacomo | 3381 | if (bttv_gpio) |
3382 | bttv_gpio_tracking(btv,"fv2000s"); |
||
3383 | } |
||
3384 | } else { |
||
3385 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3386 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3387 | } |
||
3388 | } |
||
3389 | |||
3390 | /* |
||
3391 | * sound control for Canopus WinDVR PCI |
||
3392 | * Masaki Suzuki <masaki@btree.org> |
||
3393 | */ |
||
3394 | static void |
||
3395 | windvr_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3396 | { |
||
3397 | unsigned long val = 0; |
||
3398 | |||
3399 | if (set) { |
||
3400 | if (v->mode & VIDEO_SOUND_MONO) |
||
3401 | val = 0x040000; |
||
3402 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3403 | val = 0; |
||
3404 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3405 | val = 0x100000; |
||
3406 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3407 | val = 0; |
||
3408 | if (val) { |
||
428 | giacomo | 3409 | btaor(val, ~0x140000, BT848_GPIO_DATA); |
170 | giacomo | 3410 | if (bttv_gpio) |
3411 | bttv_gpio_tracking(btv,"windvr"); |
||
3412 | } |
||
3413 | } else { |
||
3414 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3415 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3416 | } |
||
3417 | } |
||
3418 | |||
428 | giacomo | 3419 | /* |
3420 | * sound control for AD-TVK503 |
||
3421 | * Hiroshi Takekawa <sian@big.or.jp> |
||
3422 | */ |
||
3423 | static void |
||
3424 | adtvk503_audio(struct bttv *btv, struct video_audio *v, int set) |
||
3425 | { |
||
3426 | unsigned int con = 0xffffff; |
||
3427 | |||
3428 | //btaor(0x1e0000, ~0x1e0000, BT848_GPIO_OUT_EN); |
||
3429 | |||
3430 | if (set) { |
||
3431 | //btor(***, BT848_GPIO_OUT_EN); |
||
3432 | if (v->mode & VIDEO_SOUND_LANG1) |
||
3433 | con = 0x00000000; |
||
3434 | if (v->mode & VIDEO_SOUND_LANG2) |
||
3435 | con = 0x00180000; |
||
3436 | if (v->mode & VIDEO_SOUND_STEREO) |
||
3437 | con = 0x00000000; |
||
3438 | if (v->mode & VIDEO_SOUND_MONO) |
||
3439 | con = 0x00060000; |
||
3440 | if (con != 0xffffff) { |
||
3441 | btaor(con, ~0x1e0000, BT848_GPIO_DATA); |
||
3442 | if (bttv_gpio) |
||
3443 | bttv_gpio_tracking(btv, "adtvk503"); |
||
3444 | } |
||
3445 | } else { |
||
3446 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
3447 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
3448 | } |
||
3449 | } |
||
3450 | |||
170 | giacomo | 3451 | /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas] |
3452 | * |
||
3453 | * This is needed because rv605 don't use a normal multiplex, but a crosspoint |
||
3454 | * switch instead (CD22M3494E). This IC can have multiple active connections |
||
3455 | * between Xn (input) and Yn (output) pins. We need to clear any existing |
||
3456 | * connection prior to establish a new one, pulsing the STROBE pin. |
||
3457 | * |
||
3458 | * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin. |
||
3459 | * GPIO pins are wired as: |
||
3460 | * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler) |
||
3461 | * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler) |
||
3462 | * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler) |
||
3463 | * GPIO[8] - - P3[5] (microcontroler) |
||
3464 | * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler) |
||
3465 | * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler) |
||
3466 | * GPINTR - - P3[4] (microcontroler) |
||
3467 | * |
||
3468 | * The microcontroler is a 80C32 like. It should be possible to change xpoint |
||
3469 | * configuration either directly (as we are doing) or using the microcontroler |
||
3470 | * which is also wired to I2C interface. I have no further info on the |
||
3471 | * microcontroler features, one would need to disassembly the firmware. |
||
3472 | * note: the vendor refused to give any information on this product, all |
||
3473 | * that stuff was found using a multimeter! :) |
||
3474 | */ |
||
3475 | static void rv605_muxsel(struct bttv *btv, unsigned int input) |
||
3476 | { |
||
3477 | /* reset all conections */ |
||
428 | giacomo | 3478 | btaor(0x200,~0x200, BT848_GPIO_DATA); |
3479 | mdelay(1); |
||
3480 | btaor(0x000,~0x200, BT848_GPIO_DATA); |
||
3481 | mdelay(1); |
||
170 | giacomo | 3482 | |
3483 | /* create a new conection */ |
||
428 | giacomo | 3484 | btaor(0x080,~0x480, BT848_GPIO_DATA); |
3485 | btaor(0x480,~0x480, BT848_GPIO_DATA); |
||
3486 | mdelay(1); |
||
3487 | btaor(0x080,~0x480, BT848_GPIO_DATA); |
||
3488 | mdelay(1); |
||
170 | giacomo | 3489 | } |
3490 | |||
428 | giacomo | 3491 | // The Grandtec X-Guard framegrabber card uses two Dual 4-channel |
3492 | // video multiplexers to provide up to 16 video inputs. These |
||
3493 | // multiplexers are controlled by the lower 8 GPIO pins of the |
||
3494 | // bt878. The multiplexers probably Pericom PI5V331Q or similar. |
||
170 | giacomo | 3495 | |
428 | giacomo | 3496 | // xxx0 is pin xxx of multiplexer U5, |
3497 | // yyy1 is pin yyy of multiplexer U2 |
||
3498 | |||
3499 | #define ENA0 0x01 |
||
3500 | #define ENB0 0x02 |
||
3501 | #define ENA1 0x04 |
||
3502 | #define ENB1 0x08 |
||
3503 | |||
3504 | #define IN10 0x10 |
||
3505 | #define IN00 0x20 |
||
3506 | #define IN11 0x40 |
||
3507 | #define IN01 0x80 |
||
3508 | |||
3509 | static void xguard_muxsel(struct bttv *btv, unsigned int input) |
||
3510 | { |
||
3511 | static const int masks[] = { |
||
3512 | ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10, |
||
3513 | ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10, |
||
3514 | ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11, |
||
3515 | ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11, |
||
3516 | }; |
||
3517 | btwrite(masks[input%16], BT848_GPIO_DATA); |
||
3518 | } |
||
3519 | |||
3520 | /* |
||
3521 | * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>] |
||
3522 | * |
||
3523 | * The IVC120G security card has 4 i2c controlled TDA8540 matrix |
||
3524 | * swichers to provide 16 channels to MUX0. The TDA8540's have |
||
3525 | * 4 indepedant outputs and as such the IVC120G also has the |
||
3526 | * optional "Monitor Out" bus. This allows the card to be looking |
||
3527 | * at one input while the monitor is looking at another. |
||
3528 | * |
||
3529 | * Since I've couldn't be bothered figuring out how to add an |
||
3530 | * independant muxsel for the monitor bus, I've just set it to |
||
3531 | * whatever the card is looking at. |
||
3532 | * |
||
3533 | * OUT0 of the TDA8540's is connected to MUX0 (0x03) |
||
3534 | * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C) |
||
3535 | * |
||
3536 | * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03) |
||
3537 | * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03) |
||
3538 | * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03) |
||
3539 | * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03) |
||
3540 | * |
||
3541 | */ |
||
3542 | |||
3543 | /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */ |
||
3544 | #define I2C_TDA8540 0x90 |
||
3545 | #define I2C_TDA8540_ALT1 0x92 |
||
3546 | #define I2C_TDA8540_ALT2 0x94 |
||
3547 | #define I2C_TDA8540_ALT3 0x96 |
||
3548 | #define I2C_TDA8540_ALT4 0x98 |
||
3549 | #define I2C_TDA8540_ALT5 0x9a |
||
3550 | #define I2C_TDA8540_ALT6 0x9c |
||
3551 | |||
3552 | static void ivc120_muxsel(struct bttv *btv, unsigned int input) |
||
3553 | { |
||
3554 | // Simple maths |
||
3555 | int key = input % 4; |
||
3556 | int matrix = input / 4; |
||
3557 | |||
3558 | dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n", |
||
3559 | btv->nr, input, matrix, key); |
||
3560 | |||
3561 | // Handles the input selection on the TDA8540's |
||
3562 | bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00, |
||
3563 | ((matrix == 3) ? (key | key << 2) : 0x00), 1); |
||
3564 | bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00, |
||
3565 | ((matrix == 0) ? (key | key << 2) : 0x00), 1); |
||
3566 | bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00, |
||
3567 | ((matrix == 1) ? (key | key << 2) : 0x00), 1); |
||
3568 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00, |
||
3569 | ((matrix == 2) ? (key | key << 2) : 0x00), 1); |
||
3570 | |||
3571 | // Handles the output enables on the TDA8540's |
||
3572 | bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02, |
||
3573 | ((matrix == 3) ? 0x03 : 0x00), 1); // 13 - 16 |
||
3574 | bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02, |
||
3575 | ((matrix == 0) ? 0x03 : 0x00), 1); // 1-4 |
||
3576 | bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02, |
||
3577 | ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8 |
||
3578 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, |
||
3579 | ((matrix == 2) ? 0x03 : 0x00), 1); // 9-12 |
||
3580 | |||
3581 | // Selects MUX0 for input on the 878 |
||
3582 | btaor((0)<<5, ~(3<<5), BT848_IFORM); |
||
3583 | } |
||
3584 | |||
3585 | |||
170 | giacomo | 3586 | /* ----------------------------------------------------------------------- */ |
3587 | /* motherboard chipset specific stuff */ |
||
3588 | |||
428 | giacomo | 3589 | void __devinit bttv_check_chipset(void) |
170 | giacomo | 3590 | { |
3591 | int pcipci_fail = 0; |
||
428 | giacomo | 3592 | struct pci_dev *dev = NULL; |
170 | giacomo | 3593 | |
428 | giacomo | 3594 | if (pci_pci_problems & PCIPCI_FAIL) |
3595 | pcipci_fail = 1; |
||
3596 | if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF)) |
||
3597 | triton1 = 1; |
||
3598 | if (pci_pci_problems & PCIPCI_VSFX) |
||
3599 | vsfx = 1; |
||
3600 | #ifdef PCIPCI_ALIMAGIK |
||
3601 | if (pci_pci_problems & PCIPCI_ALIMAGIK) |
||
3602 | latency = 0x0A; |
||
3603 | #endif |
||
3604 | |||
3605 | #if 0 |
||
3606 | /* print which chipset we have */ |
||
3607 | while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) |
||
3608 | printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev)); |
||
3609 | #endif |
||
3610 | |||
170 | giacomo | 3611 | /* print warnings about any quirks found */ |
3612 | if (triton1) |
||
3613 | printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n"); |
||
3614 | if (vsfx) |
||
3615 | printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); |
||
3616 | if (pcipci_fail) { |
||
3617 | printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); |
||
428 | giacomo | 3618 | if (UNSET == no_overlay) { |
170 | giacomo | 3619 | printk(KERN_WARNING "bttv: going to disable overlay.\n"); |
3620 | no_overlay = 1; |
||
3621 | } |
||
3622 | } |
||
428 | giacomo | 3623 | if (UNSET != latency) |
3624 | printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency); |
||
170 | giacomo | 3625 | |
428 | giacomo | 3626 | while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, |
3627 | PCI_DEVICE_ID_INTEL_82441, dev))) { |
||
170 | giacomo | 3628 | unsigned char b; |
428 | giacomo | 3629 | pci_read_config_byte(dev, 0x53, &b); |
170 | giacomo | 3630 | if (bttv_debug) |
3631 | printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, " |
||
3632 | "bufcon=0x%02x\n",b); |
||
3633 | } |
||
3634 | } |
||
3635 | |||
428 | giacomo | 3636 | int __devinit bttv_handle_chipset(struct bttv *btv) |
170 | giacomo | 3637 | { |
3638 | unsigned char command; |
||
3639 | |||
428 | giacomo | 3640 | if (!triton1 && !vsfx && UNSET == latency) |
170 | giacomo | 3641 | return 0; |
3642 | |||
3643 | if (bttv_verbose) { |
||
3644 | if (triton1) |
||
3645 | printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->nr); |
||
3646 | if (vsfx && btv->id >= 878) |
||
3647 | printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->nr); |
||
428 | giacomo | 3648 | if (UNSET != latency) |
3649 | printk(KERN_INFO "bttv%d: setting pci timer to %d\n", |
||
3650 | btv->nr,latency); |
||
170 | giacomo | 3651 | } |
3652 | |||
3653 | if (btv->id < 878) { |
||
3654 | /* bt848 (mis)uses a bit in the irq mask for etbf */ |
||
3655 | if (triton1) |
||
3656 | btv->triton1 = BT848_INT_ETBF; |
||
3657 | } else { |
||
3658 | /* bt878 has a bit in the pci config space for it */ |
||
3659 | pci_read_config_byte(btv->dev, BT878_DEVCTRL, &command); |
||
3660 | if (triton1) |
||
3661 | command |= BT878_EN_TBFX; |
||
3662 | if (vsfx) |
||
3663 | command |= BT878_EN_VSFX; |
||
3664 | pci_write_config_byte(btv->dev, BT878_DEVCTRL, command); |
||
3665 | } |
||
428 | giacomo | 3666 | if (UNSET != latency) |
3667 | pci_write_config_byte(btv->dev, PCI_LATENCY_TIMER, latency); |
||
170 | giacomo | 3668 | return 0; |
3669 | } |
||
3670 | |||
428 | giacomo | 3671 | |
3672 | /* |
||
3673 | * Local variables: |
||
3674 | * c-basic-offset: 8 |
||
3675 | * End: |
||
3676 | */ |