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