Rev 267 | Rev 428 | 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. |
||
24 | |||
25 | */ |
||
26 | |||
27 | /* SHARK version by Giacomo Guidi <giacomo@gandalf.sssup.it> */ |
||
28 | |||
29 | #define __NO_VERSION__ 1 |
||
30 | |||
31 | #include <unistd.h> |
||
32 | #include <linux/pci.h> |
||
33 | |||
34 | #include "drivers/bttv.h" |
||
35 | #include "drivers/tuner.h" |
||
36 | |||
37 | /* fwd decl */ |
||
38 | static void boot_msp34xx(struct bttv *btv, int pin); |
||
39 | static void hauppauge_eeprom(struct bttv *btv); |
||
40 | static void osprey_eeprom(struct bttv *btv); |
||
41 | static void avermedia_eeprom(struct bttv *btv); |
||
42 | static void init_PXC200(struct bttv *btv); |
||
43 | #if 0 |
||
44 | static void init_tea5757(struct bttv *btv); |
||
45 | #endif |
||
46 | |||
47 | static void winview_audio(struct bttv *btv, struct video_audio *v, int set); |
||
48 | static void lt9415_audio(struct bttv *btv, struct video_audio *v, int set); |
||
49 | static void avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, |
||
50 | int set); |
||
51 | static void terratv_audio(struct bttv *btv, struct video_audio *v, int set); |
||
52 | static void gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set); |
||
53 | static void winfast2000_audio(struct bttv *btv, struct video_audio *v, int set); |
||
54 | static void pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set); |
||
55 | static void fv2000s_audio(struct bttv *btv, struct video_audio *v, int set); |
||
56 | static void windvr_audio(struct bttv *btv, struct video_audio *v, int set); |
||
57 | static void rv605_muxsel(struct bttv *btv, unsigned int input); |
||
58 | |||
59 | /* config variables */ |
||
60 | static int triton1=0; |
||
61 | static int vsfx=0; |
||
62 | int no_overlay=-1; |
||
63 | static unsigned int card[4] = { -1, -1, -1, -1 }; |
||
64 | static unsigned int pll[4] = { -1, -1, -1, -1 }; |
||
65 | static unsigned int tuner[4] = { -1, -1, -1, -1 }; |
||
66 | static unsigned int gpiomask = -1; |
||
67 | static unsigned int audioall = -1; |
||
68 | static unsigned int audiomux[5] = { -1, -1, -1, -1, -1 }; |
||
69 | |||
70 | /* ----------------------------------------------------------------------- */ |
||
71 | /* list of card IDs for bt878+ cards */ |
||
72 | |||
73 | static struct CARD { |
||
74 | unsigned id; |
||
75 | int cardnr; |
||
76 | char *name; |
||
77 | } cards[] = { |
||
78 | { 0x13eb0070, BTTV_HAUPPAUGE878, "Hauppauge WinTV" }, |
||
79 | { 0x39000070, BTTV_HAUPPAUGE878, "Hauppauge WinTV-D" }, |
||
80 | { 0x45000070, BTTV_HAUPPAUGE878, "Hauppauge WinTV/PVR" }, |
||
81 | { 0xff000070, BTTV_OSPREY1x0, "Osprey-100" }, |
||
82 | { 0xff010070, BTTV_OSPREY2x0_SVID,"Osprey-200" }, |
||
267 | giacomo | 83 | { 0x036e109e, BTTV_OSPREY2x0_SVID,"Osprey-210" }, |
170 | giacomo | 84 | { 0xff020070, BTTV_OSPREY5x0, "Osprey-500" }, |
85 | { 0xff030070, BTTV_OSPREY2000, "Osprey-2000" }, |
||
86 | |||
87 | { 0x00011002, BTTV_ATI_TVWONDER, "ATI TV Wonder" }, |
||
88 | { 0x00031002, BTTV_ATI_TVWONDERVE,"ATI TV Wonder/VE" }, |
||
89 | |||
90 | { 0x6606107d, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, |
||
91 | { 0x263610b4, BTTV_STB2, "STB TV PCI FM, P/N 6000704" }, |
||
92 | { 0x402010fc, BTTV_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" }, |
||
93 | { 0x405010fc, BTTV_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" }, |
||
94 | |||
95 | { 0x1200bd11, BTTV_PINNACLE, "Pinnacle PCTV" }, |
||
96 | { 0x001211bd, BTTV_PINNACLE, "Pinnacle PCTV" }, |
||
97 | { 0x001c11bd, BTTV_PINNACLE, "Pinnacle PCTV Sat" }, |
||
98 | |||
99 | { 0x3000121a, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" }, |
||
100 | |||
101 | { 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" }, |
||
102 | { 0x3002144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" }, |
||
103 | { 0x3005144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" }, |
||
104 | |||
105 | { 0x00011461, BTTV_AVPHONE98, "AVerMedia TVPhone98" }, |
||
106 | { 0x00021461, BTTV_AVERMEDIA98, "AVermedia TVCapture 98" }, |
||
107 | { 0x00031461, BTTV_AVPHONE98, "AVerMedia TVPhone98" }, |
||
108 | { 0x00041461, BTTV_AVERMEDIA98, "AVerMedia TVCapture 98" }, |
||
109 | |||
110 | { 0x300014ff, BTTV_MAGICTVIEW061, "TView 99 (CPH061)" }, |
||
111 | { 0x300214ff, BTTV_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" }, |
||
112 | |||
113 | { 0x1117153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
114 | { 0x1118153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
115 | { 0x1119153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
116 | { 0x111a153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
117 | { 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV Radio+" }, |
||
118 | { 0x1127153b, BTTV_TERRATV, "Terratec TV+" }, |
||
119 | // clashes with flyvideo |
||
120 | //{ 0x18521852, BTTV_TERRATV, "Terratec TV+" }, |
||
121 | { 0x1134153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
122 | { 0x1135153b, BTTV_TERRATVALUER, "Terratec TValue Radio" }, |
||
123 | { 0x5018153b, BTTV_TERRATVALUE, "Terratec TValue" }, |
||
124 | |||
125 | { 0x400a15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" }, |
||
126 | { 0x400d15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
127 | { 0x401015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
128 | { 0x401615b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" }, |
||
129 | |||
130 | { 0x010115cb, BTTV_GMV1, "AG GMV1" }, |
||
131 | { 0x010114c7, BTTV_MODTEC_205, "Modular Technology MM205 PCTV" }, |
||
132 | { 0x18501851, BTTV_CHRONOS_VS2, "Flyvideo 98 (LR50)/ Chronos Video Shuttle II" }, |
||
133 | { 0x18511851, BTTV_FLYVIDEO98EZ, "Flyvideo 98EZ (LR51)/ CyberMail AV" }, |
||
134 | { 0x18521852, BTTV_TYPHOON_TVIEW, "Flyvideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" }, |
||
135 | { 0x10b42636, BTTV_HAUPPAUGE878, "STB ???" }, |
||
136 | { 0x217d6606, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" }, |
||
137 | { 0x03116000, BTTV_SENSORAY311, "Sensoray 311" }, |
||
138 | { 0x00790e11, BTTV_WINDVR, "Canopus WinDVR PCI" }, |
||
139 | { 0xa0fca1a0, BTTV_ZOLTRIX, "Face to Face Tvmax" }, |
||
181 | giacomo | 140 | { 0x0350109e, BTTV_PXC200, "Imagenation PXC200" }, |
170 | giacomo | 141 | |
142 | { 0, -1, NULL } |
||
143 | }; |
||
144 | |||
145 | /* ----------------------------------------------------------------------- */ |
||
146 | /* array with description for bt848 / bt878 tv/grabber cards */ |
||
147 | |||
148 | struct tvcard bttv_tvcards[] = { |
||
149 | { |
||
150 | /* ---- card 0x00 ---------------------------------- */ |
||
151 | name: " *** UNKNOWN/GENERIC *** ", |
||
152 | video_inputs: 4, |
||
153 | audio_inputs: 1, |
||
154 | tuner: 0, |
||
155 | svhs: 2, |
||
156 | muxsel: { 2, 3, 1, 0}, |
||
157 | tuner_type: -1, |
||
158 | },{ |
||
159 | name: "MIRO PCTV", |
||
160 | video_inputs: 4, |
||
161 | audio_inputs: 1, |
||
162 | tuner: 0, |
||
163 | svhs: 2, |
||
164 | gpiomask: 15, |
||
165 | muxsel: { 2, 3, 1, 1}, |
||
166 | audiomux: { 2, 0, 0, 0, 10}, |
||
167 | needs_tvaudio: 1, |
||
168 | tuner_type: -1, |
||
169 | },{ |
||
170 | name: "Hauppauge (bt848)", |
||
171 | video_inputs: 4, |
||
172 | audio_inputs: 1, |
||
173 | tuner: 0, |
||
174 | svhs: 2, |
||
175 | gpiomask: 7, |
||
176 | muxsel: { 2, 3, 1, 1}, |
||
177 | audiomux: { 0, 1, 2, 3, 4}, |
||
178 | needs_tvaudio: 1, |
||
179 | tuner_type: -1, |
||
180 | },{ |
||
181 | name: "STB", |
||
182 | video_inputs: 3, |
||
183 | audio_inputs: 1, |
||
184 | tuner: 0, |
||
185 | svhs: 2, |
||
186 | gpiomask: 7, |
||
187 | muxsel: { 2, 3, 1, 1}, |
||
188 | audiomux: { 4, 0, 2, 3, 1}, |
||
189 | no_msp34xx: 1, |
||
190 | needs_tvaudio: 1, |
||
191 | tuner_type: -1, |
||
192 | },{ |
||
193 | |||
194 | /* ---- card 0x04 ---------------------------------- */ |
||
195 | name: "Intel", |
||
196 | video_inputs: 3, |
||
197 | audio_inputs: 1, |
||
198 | tuner: 0, |
||
199 | svhs: -1, |
||
200 | gpiomask: 7, |
||
201 | muxsel: { 2, 3, 1, 1}, |
||
202 | audiomux: { 0, 1, 2, 3, 4}, |
||
203 | needs_tvaudio: 1, |
||
204 | tuner_type: -1, |
||
205 | },{ |
||
206 | name: "Diamond DTV2000", |
||
207 | video_inputs: 4, |
||
208 | audio_inputs: 1, |
||
209 | tuner: 0, |
||
210 | svhs: 2, |
||
211 | gpiomask: 3, |
||
212 | muxsel: { 2, 3, 1, 0}, |
||
213 | audiomux: { 0, 1, 0, 1, 3}, |
||
214 | needs_tvaudio: 1, |
||
215 | tuner_type: -1, |
||
216 | },{ |
||
217 | name: "AVerMedia TVPhone", |
||
218 | video_inputs: 3, |
||
219 | audio_inputs: 1, |
||
220 | tuner: 0, |
||
221 | svhs: 3, |
||
222 | muxsel: { 2, 3, 1, 1}, |
||
223 | gpiomask: 0x0f, |
||
224 | audiomux: { 0x0c, 0x04, 0x08, 0x04, 0}, |
||
225 | /* 0x04 for some cards ?? */ |
||
226 | needs_tvaudio: 1, |
||
227 | tuner_type: -1, |
||
228 | audio_hook: avermedia_tvphone_audio, |
||
229 | },{ |
||
230 | name: "MATRIX-Vision MV-Delta", |
||
231 | video_inputs: 5, |
||
232 | audio_inputs: 1, |
||
233 | tuner: -1, |
||
234 | svhs: 3, |
||
235 | gpiomask: 0, |
||
236 | muxsel: { 2, 3, 1, 0, 0}, |
||
237 | audiomux: {0 }, |
||
238 | needs_tvaudio: 1, |
||
239 | tuner_type: -1, |
||
240 | },{ |
||
241 | |||
242 | /* ---- card 0x08 ---------------------------------- */ |
||
243 | name: "FlyVideo II (Bt848) LR26", |
||
244 | video_inputs: 4, |
||
245 | audio_inputs: 1, |
||
246 | tuner: 0, |
||
247 | svhs: 2, |
||
248 | gpiomask: 0xc00, |
||
249 | muxsel: { 2, 3, 1, 1}, |
||
250 | audiomux: { 0, 0xc00, 0x800, 0x400, 0xc00, 0}, |
||
251 | needs_tvaudio: 1, |
||
252 | pll: PLL_28, |
||
253 | tuner_type: -1, |
||
254 | },{ |
||
255 | name: "IXMicro TurboTV", |
||
256 | video_inputs: 3, |
||
257 | audio_inputs: 1, |
||
258 | tuner: 0, |
||
259 | svhs: 2, |
||
260 | gpiomask: 3, |
||
261 | muxsel: { 2, 3, 1, 1}, |
||
262 | audiomux: { 1, 1, 2, 3, 0}, |
||
263 | needs_tvaudio: 1, |
||
264 | tuner_type: -1, |
||
265 | },{ |
||
266 | name: "Hauppauge (bt878)", |
||
267 | video_inputs: 4, |
||
268 | audio_inputs: 1, |
||
269 | tuner: 0, |
||
270 | svhs: 2, |
||
271 | gpiomask: 0x0f, /* old: 7 */ |
||
272 | muxsel: { 2, 0, 1, 1}, |
||
273 | audiomux: { 0, 1, 2, 3, 4}, |
||
274 | needs_tvaudio: 1, |
||
275 | pll: PLL_28, |
||
276 | tuner_type: -1, |
||
277 | },{ |
||
278 | name: "MIRO PCTV pro", |
||
279 | video_inputs: 3, |
||
280 | audio_inputs: 1, |
||
281 | tuner: 0, |
||
282 | svhs: 2, |
||
283 | gpiomask: 0x3014f, |
||
284 | muxsel: { 2, 3, 1, 1}, |
||
285 | audiomux: { 0x20001,0x10001, 0, 0,10}, |
||
286 | needs_tvaudio: 1, |
||
287 | tuner_type: -1, |
||
288 | },{ |
||
289 | |||
290 | /* ---- card 0x0c ---------------------------------- */ |
||
291 | name: "ADS Technologies Channel Surfer TV", |
||
292 | video_inputs: 3, |
||
293 | audio_inputs: 1, |
||
294 | tuner: 0, |
||
295 | svhs: 2, |
||
296 | gpiomask: 15, |
||
297 | muxsel: { 2, 3, 1, 1}, |
||
298 | audiomux: { 13, 14, 11, 7, 0, 0}, |
||
299 | needs_tvaudio: 1, |
||
300 | tuner_type: -1, |
||
301 | },{ |
||
302 | name: "AVerMedia TVCapture 98", |
||
303 | video_inputs: 3, |
||
304 | audio_inputs: 4, |
||
305 | tuner: 0, |
||
306 | svhs: 2, |
||
307 | gpiomask: 15, |
||
308 | muxsel: { 2, 3, 1, 1}, |
||
309 | audiomux: { 13, 14, 11, 7, 0, 0}, |
||
310 | needs_tvaudio: 1, |
||
311 | pll: PLL_28, |
||
312 | tuner_type: -1, |
||
313 | },{ |
||
314 | name: "Aimslab Video Highway Xtreme (VHX)", |
||
315 | video_inputs: 3, |
||
316 | audio_inputs: 1, |
||
317 | tuner: 0, |
||
318 | svhs: 2, |
||
319 | gpiomask: 7, |
||
320 | muxsel: { 2, 3, 1, 1}, |
||
321 | audiomux: { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */ |
||
322 | needs_tvaudio: 1, |
||
323 | tuner_type: -1, |
||
324 | },{ |
||
325 | name: "Zoltrix TV-Max", |
||
326 | video_inputs: 3, |
||
327 | audio_inputs: 1, |
||
328 | tuner: 0, |
||
329 | svhs: 2, |
||
330 | gpiomask: 15, |
||
331 | muxsel: { 2, 3, 1, 1}, |
||
332 | audiomux: {0 , 0, 1 , 0, 10}, |
||
333 | needs_tvaudio: 1, |
||
334 | tuner_type: -1, |
||
335 | },{ |
||
336 | |||
337 | /* ---- card 0x10 ---------------------------------- */ |
||
338 | name: "Pixelview PlayTV (bt878)", |
||
339 | video_inputs: 3, |
||
340 | audio_inputs: 1, |
||
341 | tuner: 0, |
||
342 | svhs: 2, |
||
343 | gpiomask: 0x01fe00, |
||
344 | muxsel: { 2, 3, 1, 1}, |
||
345 | audiomux: { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 }, |
||
346 | needs_tvaudio: 1, |
||
347 | pll: PLL_28, |
||
348 | tuner_type: -1, |
||
349 | },{ |
||
350 | name: "Leadtek WinView 601", |
||
351 | video_inputs: 3, |
||
352 | audio_inputs: 1, |
||
353 | tuner: 0, |
||
354 | svhs: 2, |
||
355 | gpiomask: 0x8300f8, |
||
356 | muxsel: { 2, 3, 1, 1,0}, |
||
357 | audiomux: { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007}, |
||
358 | needs_tvaudio: 1, |
||
359 | tuner_type: -1, |
||
360 | audio_hook: winview_audio, |
||
361 | has_radio: 1, |
||
362 | },{ |
||
363 | name: "AVEC Intercapture", |
||
364 | video_inputs: 3, |
||
365 | audio_inputs: 2, |
||
366 | tuner: 0, |
||
367 | svhs: 2, |
||
368 | gpiomask: 0, |
||
369 | muxsel: {2, 3, 1, 1}, |
||
370 | audiomux: {1, 0, 0, 0, 0}, |
||
371 | needs_tvaudio: 1, |
||
372 | tuner_type: -1, |
||
373 | },{ |
||
374 | name: "LifeView FlyKit w/o Tuner", |
||
375 | video_inputs: 3, |
||
376 | audio_inputs: 1, |
||
377 | tuner: -1, |
||
378 | svhs: -1, |
||
379 | gpiomask: 0x8dff00, |
||
380 | muxsel: { 2, 3, 1, 1}, |
||
381 | audiomux: { 0 }, |
||
382 | no_msp34xx: 1, |
||
383 | tuner_type: -1, |
||
384 | },{ |
||
385 | |||
386 | /* ---- card 0x14 ---------------------------------- */ |
||
387 | name: "CEI Raffles Card", |
||
388 | video_inputs: 3, |
||
389 | audio_inputs: 3, |
||
390 | tuner: 0, |
||
391 | svhs: 2, |
||
392 | muxsel: {2, 3, 1, 1}, |
||
393 | tuner_type: -1, |
||
394 | },{ |
||
395 | name: "Lucky Star Image World ConferenceTV", |
||
396 | video_inputs: 3, |
||
397 | audio_inputs: 1, |
||
398 | tuner: 0, |
||
399 | svhs: 2, |
||
400 | gpiomask: 0x00fffe07, |
||
401 | muxsel: { 2, 3, 1, 1}, |
||
402 | audiomux: { 131072, 1, 1638400, 3, 4}, |
||
403 | needs_tvaudio: 1, |
||
404 | pll: PLL_28, |
||
405 | tuner_type: TUNER_PHILIPS_PAL_I, |
||
406 | },{ |
||
407 | name: "Phoebe Tv Master + FM (CPH050)", |
||
408 | video_inputs: 3, |
||
409 | audio_inputs: 1, |
||
410 | tuner: 0, |
||
411 | svhs: 2, |
||
412 | gpiomask: 0xc00, |
||
413 | muxsel: { 2, 3, 1, 1}, |
||
414 | audiomux: {0, 1, 0x800, 0x400, 0xc00, 0}, |
||
415 | needs_tvaudio: 1, |
||
416 | tuner_type: -1, |
||
417 | },{ |
||
418 | name: "Modular Technology MM205 PCTV, bt878", |
||
419 | video_inputs: 2, |
||
420 | audio_inputs: 1, |
||
421 | tuner: 0, |
||
422 | svhs: -1, |
||
423 | gpiomask: 7, |
||
424 | muxsel: { 2, 3 }, |
||
425 | audiomux: { 0, 0, 0, 0, 0 }, |
||
426 | no_msp34xx: 1, |
||
427 | pll: PLL_28, |
||
428 | tuner_type: TUNER_ALPS_TSBB5_PAL_I, |
||
429 | },{ |
||
430 | |||
431 | /* ---- card 0x18 ---------------------------------- */ |
||
432 | name: "[many vendors] CPH05X/06X (bt878)", |
||
433 | video_inputs: 3, |
||
434 | audio_inputs: 1, |
||
435 | tuner: 0, |
||
436 | svhs: 2, |
||
437 | gpiomask: 0xe00, |
||
438 | muxsel: { 2, 3, 1, 1}, |
||
439 | audiomux: {0x400, 0x400, 0x400, 0x400, 0xc00}, |
||
440 | needs_tvaudio: 1, |
||
441 | pll: PLL_28, |
||
442 | tuner_type: -1, |
||
443 | },{ |
||
444 | name: "Terratec/Vobis TV-Boostar", |
||
445 | video_inputs: 3, |
||
446 | audio_inputs: 1, |
||
447 | tuner: 0, |
||
448 | svhs: 2, |
||
449 | gpiomask: 16777215, |
||
450 | muxsel: { 2, 3, 1, 1}, |
||
451 | audiomux: { 131072, 1, 1638400, 3,4}, |
||
452 | needs_tvaudio: 1, |
||
453 | tuner_type: -1, |
||
454 | },{ |
||
455 | name: "Newer Hauppauge WinCam (bt878)", |
||
456 | video_inputs: 4, |
||
457 | audio_inputs: 1, |
||
458 | tuner: 0, |
||
459 | svhs: 3, |
||
460 | gpiomask: 7, |
||
461 | muxsel: { 2, 0, 1, 1}, |
||
462 | audiomux: { 0, 1, 2, 3, 4}, |
||
463 | needs_tvaudio: 1, |
||
464 | tuner_type: -1, |
||
465 | },{ |
||
466 | name: "MAXI TV Video PCI2", |
||
467 | video_inputs: 3, |
||
468 | audio_inputs: 1, |
||
469 | tuner: 0, |
||
470 | svhs: 2, |
||
471 | gpiomask: 0xffff, |
||
472 | muxsel: { 2, 3, 1, 1}, |
||
473 | audiomux: { 0, 1, 2, 3, 0xc00}, |
||
474 | needs_tvaudio: 1, |
||
475 | tuner_type: TUNER_PHILIPS_SECAM, |
||
476 | },{ |
||
477 | |||
478 | /* ---- card 0x1c ---------------------------------- */ |
||
479 | name: "Terratec TerraTV+", |
||
480 | video_inputs: 3, |
||
481 | audio_inputs: 1, |
||
482 | tuner: 0, |
||
483 | svhs: 2, |
||
484 | gpiomask: 0x70000, |
||
485 | muxsel: { 2, 3, 1, 1}, |
||
486 | audiomux: { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000}, |
||
487 | needs_tvaudio: 1, |
||
488 | tuner_type: TUNER_PHILIPS_PAL, |
||
489 | audio_hook: terratv_audio, |
||
490 | },{ |
||
491 | /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */ |
||
492 | name: "Imagenation PXC200", |
||
493 | video_inputs: 5, |
||
494 | audio_inputs: 1, |
||
495 | tuner: -1, |
||
496 | svhs: 1, /* was: 4 */ |
||
497 | gpiomask: 0, |
||
498 | muxsel: { 2, 3, 1, 0, 0}, |
||
499 | audiomux: { 0 }, |
||
500 | needs_tvaudio: 1, |
||
501 | tuner_type: -1, |
||
502 | },{ |
||
503 | name: "FlyVideo 98", |
||
504 | video_inputs: 3, |
||
505 | audio_inputs: 1, |
||
506 | tuner: 0, |
||
507 | svhs: 2, |
||
508 | gpiomask: 0x1800, //0x8dfe00 |
||
509 | muxsel: {2, 3, 1, 1}, |
||
510 | audiomux: { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 }, |
||
511 | needs_tvaudio: 1, |
||
512 | tuner_type: -1, |
||
513 | },{ |
||
514 | name: "iProTV", |
||
515 | video_inputs: 3, |
||
516 | audio_inputs: 1, |
||
517 | tuner: 0, |
||
518 | svhs: 2, |
||
519 | gpiomask: 1, |
||
520 | muxsel: { 2, 3, 1, 1}, |
||
521 | audiomux: { 1, 0, 0, 0, 0 }, |
||
522 | tuner_type: -1, |
||
523 | },{ |
||
524 | |||
525 | /* ---- card 0x20 ---------------------------------- */ |
||
526 | name: "Intel Create and Share PCI", |
||
527 | video_inputs: 4, |
||
528 | audio_inputs: 1, |
||
529 | tuner: -1, |
||
530 | svhs: 2, |
||
531 | gpiomask: 7, |
||
532 | muxsel: { 2, 3, 1, 1}, |
||
533 | audiomux: { 4, 4, 4, 4, 4}, |
||
534 | needs_tvaudio: 1, |
||
535 | tuner_type: -1, |
||
536 | },{ |
||
537 | name: "Terratec TerraTValue", |
||
538 | video_inputs: 3, |
||
539 | audio_inputs: 1, |
||
540 | tuner: 0, |
||
541 | svhs: 2, |
||
542 | gpiomask: 0xffff00, |
||
543 | muxsel: { 2, 3, 1, 1}, |
||
544 | audiomux: { 0x500, 0, 0x300, 0x900, 0x900}, |
||
545 | needs_tvaudio: 1, |
||
546 | pll: PLL_28, |
||
547 | tuner_type: TUNER_PHILIPS_PAL, |
||
548 | },{ |
||
549 | name: "Leadtek WinFast 2000", |
||
550 | video_inputs: 3, |
||
551 | audio_inputs: 1, |
||
552 | tuner: 0, |
||
553 | svhs: 2, |
||
554 | gpiomask: 0xc33000, |
||
555 | muxsel: { 2, 3, 1, 1,0}, |
||
556 | audiomux: { 0x422000,0x001000,0x621100,0x620000,0x800000,0x620000}, |
||
557 | needs_tvaudio: 0, |
||
558 | pll: PLL_28, |
||
559 | tuner_type: -1, |
||
560 | audio_hook: winfast2000_audio, |
||
561 | },{ |
||
562 | name: "Flyvideo 98 (LR50Q) / Chronos Video Shuttle II", |
||
563 | video_inputs: 3, |
||
564 | audio_inputs: 3, |
||
565 | tuner: 0, |
||
566 | svhs: 2, |
||
567 | gpiomask: 0x1800, |
||
568 | muxsel: { 2, 3, 1, 1}, |
||
569 | audiomux: { 0, 0x800, 0x1000, 0x1000, 0x1800}, |
||
570 | needs_tvaudio: 1, |
||
571 | pll: PLL_28, |
||
572 | tuner_type: -1, |
||
573 | },{ |
||
574 | |||
575 | /* ---- card 0x24 ---------------------------------- */ |
||
576 | name: "Flyvideo 98FM (LR50Q) / Typhoon TView TV/FM Tuner", |
||
577 | video_inputs: 3, |
||
578 | audio_inputs: 3, |
||
579 | tuner: 0, |
||
580 | svhs: 2, |
||
581 | gpiomask: 0x1800, |
||
582 | muxsel: { 2, 3, 1, 1}, |
||
583 | audiomux: { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 }, |
||
584 | needs_tvaudio: 1, |
||
585 | pll: PLL_28, |
||
586 | tuner_type: -1, |
||
587 | has_radio: 1, |
||
588 | },{ |
||
589 | name: "PixelView PlayTV pro", |
||
590 | video_inputs: 3, |
||
591 | audio_inputs: 1, |
||
592 | tuner: 0, |
||
593 | svhs: 2, |
||
594 | gpiomask: 0xff, |
||
595 | muxsel: { 2, 3, 1, 1 }, |
||
596 | audiomux: { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 }, |
||
597 | no_msp34xx: 1, |
||
598 | pll: PLL_28, |
||
599 | tuner_type: -1, |
||
600 | },{ |
||
601 | name: "TView99 CPH06X", |
||
602 | video_inputs: 4, |
||
603 | audio_inputs: 1, |
||
604 | tuner: 0, |
||
605 | svhs: 2, |
||
606 | gpiomask: 0x551e00, |
||
607 | muxsel: { 2, 3, 1, 0}, |
||
608 | audiomux: { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 }, |
||
609 | needs_tvaudio: 1, |
||
610 | pll: PLL_28, |
||
611 | tuner_type: -1, |
||
612 | },{ |
||
613 | name: "Pinnacle PCTV Studio/Rave", |
||
614 | video_inputs: 3, |
||
615 | audio_inputs: 1, |
||
616 | tuner: 0, |
||
617 | svhs: 2, |
||
618 | gpiomask: 0x03000F, |
||
619 | muxsel: { 2, 3, 1, 1}, |
||
620 | audiomux: { 2, 0, 0, 0, 1}, |
||
621 | needs_tvaudio: 1, |
||
622 | pll: PLL_28, |
||
623 | tuner_type: -1, |
||
624 | },{ |
||
625 | |||
626 | /* ---- card 0x28 ---------------------------------- */ |
||
627 | name: "STB2", |
||
628 | video_inputs: 3, |
||
629 | audio_inputs: 1, |
||
630 | tuner: 0, |
||
631 | svhs: 2, |
||
632 | gpiomask: 7, |
||
633 | muxsel: { 2, 3, 1, 1}, |
||
634 | audiomux: { 4, 0, 2, 3, 1}, |
||
635 | no_msp34xx: 1, |
||
636 | needs_tvaudio: 1, |
||
637 | tuner_type: -1, |
||
638 | },{ |
||
639 | name: "AVerMedia TVPhone 98", |
||
640 | video_inputs: 3, |
||
641 | audio_inputs: 4, |
||
642 | tuner: 0, |
||
643 | svhs: 2, |
||
644 | gpiomask: 12, |
||
645 | muxsel: { 2, 3, 1, 1}, |
||
646 | audiomux: { 13, 4, 11, 7, 0, 0}, |
||
647 | needs_tvaudio: 1, |
||
648 | pll: PLL_28, |
||
649 | tuner_type: -1, |
||
650 | has_radio: 1, |
||
651 | },{ |
||
652 | name: "ProVideo PV951", /* pic16c54 */ |
||
653 | video_inputs: 3, |
||
654 | audio_inputs: 1, |
||
655 | tuner: 0, |
||
656 | svhs: 2, |
||
657 | gpiomask: 0, |
||
658 | muxsel: { 2, 3, 1, 1}, |
||
659 | audiomux: { 0, 0, 0, 0, 0}, |
||
660 | no_msp34xx: 1, |
||
661 | pll: PLL_28, |
||
662 | tuner_type: 1, |
||
663 | },{ |
||
664 | name: "Little OnAir TV", |
||
665 | video_inputs: 3, |
||
666 | audio_inputs: 1, |
||
667 | tuner: 0, |
||
668 | svhs: 2, |
||
669 | gpiomask: 0xe00b, |
||
670 | muxsel: {2, 3, 1, 1}, |
||
671 | audiomux: {0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc}, |
||
672 | no_msp34xx: 1, |
||
673 | tuner_type: -1, |
||
674 | },{ |
||
675 | |||
676 | /* ---- card 0x2c ---------------------------------- */ |
||
677 | name: "Sigma TVII-FM", |
||
678 | video_inputs: 2, |
||
679 | audio_inputs: 1, |
||
680 | tuner: 0, |
||
681 | svhs: -1, |
||
682 | gpiomask: 3, |
||
683 | muxsel: {2, 3, 1, 1}, |
||
684 | audiomux: {1, 1, 0, 2, 3}, |
||
685 | no_msp34xx: 1, |
||
686 | pll: PLL_NONE, |
||
687 | tuner_type: -1, |
||
688 | },{ |
||
689 | name: "MATRIX-Vision MV-Delta 2", |
||
690 | video_inputs: 5, |
||
691 | audio_inputs: 1, |
||
692 | tuner: -1, |
||
693 | svhs: 3, |
||
694 | gpiomask: 0, |
||
695 | muxsel: { 2, 3, 1, 0, 0}, |
||
696 | audiomux: {0 }, |
||
697 | no_msp34xx: 1, |
||
698 | pll: PLL_28, |
||
699 | tuner_type: -1, |
||
700 | },{ |
||
701 | name: "Zoltrix Genie TV/FM", |
||
702 | video_inputs: 3, |
||
703 | audio_inputs: 1, |
||
704 | tuner: 0, |
||
705 | svhs: 2, |
||
706 | gpiomask: 0xbcf03f, |
||
707 | muxsel: { 2, 3, 1, 1}, |
||
708 | audiomux: { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f}, |
||
709 | no_msp34xx: 1, |
||
710 | pll: PLL_28, |
||
711 | tuner_type: 21, |
||
712 | },{ |
||
713 | name: "Terratec TV/Radio+", |
||
714 | video_inputs: 3, |
||
715 | audio_inputs: 1, |
||
716 | tuner: 0, |
||
717 | svhs: 2, |
||
718 | gpiomask: 0x1f0000, |
||
719 | muxsel: { 2, 3, 1, 1}, |
||
720 | audiomux: { 0xe2ffff, 0xebffff, 0, 0, 0xe0ffff, 0xe2ffff }, |
||
721 | needs_tvaudio: 1, |
||
722 | no_msp34xx: 1, |
||
723 | pll: PLL_35, |
||
724 | tuner_type: 1, |
||
725 | has_radio: 1, |
||
726 | },{ |
||
727 | |||
728 | /* ---- card 0x30 ---------------------------------- */ |
||
729 | name: "Dynalink Magic TView ", |
||
730 | video_inputs: 3, |
||
731 | audio_inputs: 1, |
||
732 | tuner: 0, |
||
733 | svhs: 2, |
||
734 | gpiomask: 15, |
||
735 | muxsel: { 2, 3, 1, 1}, |
||
736 | audiomux: {2,0,0,0,1}, |
||
737 | needs_tvaudio: 1, |
||
738 | pll: PLL_28, |
||
739 | tuner_type: -1, |
||
740 | },{ |
||
741 | name: "IODATA GV-BCTV3/PCI", |
||
742 | video_inputs: 3, |
||
743 | audio_inputs: 1, |
||
744 | tuner: 0, |
||
745 | svhs: 2, |
||
746 | gpiomask: 0x010f00, |
||
747 | muxsel: {2, 3, 0, 0}, |
||
748 | audiomux: {0x10000, 0, 0x10000, 0, 0, 0}, |
||
749 | no_msp34xx: 1, |
||
750 | pll: PLL_28, |
||
751 | tuner_type: TUNER_ALPS_TSHC6_NTSC, |
||
752 | audio_hook: gvbctv3pci_audio, |
||
753 | },{ |
||
754 | name: "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP", |
||
755 | video_inputs: 4, |
||
756 | audio_inputs: 1, |
||
757 | tuner: 0, |
||
758 | svhs: 3, |
||
759 | gpiomask: 0xAA0000, |
||
760 | muxsel: { 2,3,1,1 }, |
||
761 | audiomux: { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 }, |
||
762 | no_msp34xx: 1, |
||
763 | pll: PLL_28, |
||
764 | tuner_type: TUNER_PHILIPS_PAL_I, |
||
765 | },{ |
||
766 | name: "Eagle Wireless Capricorn2 (bt878A)", |
||
767 | video_inputs: 4, |
||
768 | audio_inputs: 1, |
||
769 | tuner: 0, |
||
770 | svhs: 2, |
||
771 | gpiomask: 7, |
||
772 | muxsel: { 2, 0, 1, 1}, |
||
773 | audiomux: { 0, 1, 2, 3, 4}, |
||
774 | pll: PLL_28, |
||
775 | tuner_type: -1 /* TUNER_ALPS_TMDH2_NTSC */, |
||
776 | },{ |
||
777 | |||
778 | /* ---- card 0x34 ---------------------------------- */ |
||
267 | giacomo | 779 | /* David H€rdeman <david@2gen.com> */ |
170 | giacomo | 780 | name: "Pinnacle PCTV Studio Pro", |
781 | video_inputs: 3, |
||
782 | audio_inputs: 1, |
||
783 | tuner: 0, |
||
784 | svhs: 2, |
||
785 | gpiomask: 0x03000F, |
||
786 | muxsel: { 2, 3, 1, 1}, |
||
787 | audiomux: { 1, 0x10001, 0, 0, 10}, |
||
788 | needs_tvaudio: 1, |
||
789 | pll: PLL_28, |
||
790 | tuner_type: -1, |
||
791 | },{ |
||
792 | /* Claas Langbehn <claas@bigfoot.com>, |
||
793 | Sven Grothklags <sven@upb.de> */ |
||
794 | name: "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS", |
||
795 | video_inputs: 3, |
||
796 | audio_inputs: 3, |
||
797 | tuner: 0, |
||
798 | svhs: 2, |
||
799 | gpiomask: 0x1c, |
||
800 | muxsel: { 2, 3, 1, 1}, |
||
801 | audiomux: { 0, 0, 0x10, 8, 4 }, |
||
802 | needs_tvaudio: 1, |
||
803 | pll: PLL_28, |
||
804 | tuner_type: TUNER_PHILIPS_PAL_I, |
||
805 | has_radio: 1, |
||
806 | },{ |
||
267 | giacomo | 807 | /* Tim R€stermundt <rosterm@uni-muenster.de> |
170 | giacomo | 808 | in de.comp.os.unix.linux.hardware: |
809 | options bttv card=0 pll=1 radio=1 gpiomask=0x18e0 |
||
810 | audiomux=0x44c71f,0x44d71f,0,0x44d71f,0x44dfff |
||
811 | options tuner type=5 */ |
||
812 | name: "Lifetec LT 9415 TV (LR90 Rev.F)", |
||
813 | video_inputs: 4, |
||
814 | audio_inputs: 1, |
||
815 | tuner: 0, |
||
816 | svhs: 2, |
||
817 | gpiomask: 0x18e0, |
||
818 | muxsel: { 2, 3, 1, 1}, |
||
819 | audiomux: { 0x0000,0x0800,0x1000,0x1000,0x18e0 }, |
||
820 | /* 0x0000: Tuner normal stereo |
||
821 | 0x0080: Tuner A2 SAP (second audio program = Zweikanalton) |
||
822 | 0x0880: Tuner A2 stereo */ |
||
823 | pll: PLL_28, |
||
824 | tuner_type: TUNER_PHILIPS_PAL, |
||
825 | audio_hook: lt9415_audio, |
||
826 | has_radio: 1, |
||
827 | },{ |
||
828 | /* Miguel Angel Alvarez <maacruz@navegalia.com> |
||
829 | old Easy TV BT848 version (model CPH031) */ |
||
830 | name: "BESTBUY Easy TV (CPH031)", |
||
831 | video_inputs: 4, |
||
832 | audio_inputs: 1, |
||
833 | tuner: 0, |
||
834 | svhs: 2, |
||
835 | gpiomask: 0xF, |
||
836 | muxsel: { 2, 3, 1, 0}, |
||
837 | audiomux: { 2, 0, 0, 0, 10}, |
||
838 | needs_tvaudio: 0, |
||
839 | pll: PLL_28, |
||
840 | tuner_type: TUNER_TEMIC_PAL, |
||
841 | },{ |
||
842 | |||
843 | /* ---- card 0x38 ---------------------------------- */ |
||
844 | /* Gordon Heydon <gjheydon@bigfoot.com ('98) */ |
||
845 | name: "FlyVideo '98/FM", |
||
846 | video_inputs: 3, |
||
847 | audio_inputs: 3, |
||
848 | tuner: 0, |
||
849 | svhs: 2, |
||
850 | gpiomask: 0x1800, |
||
851 | muxsel: { 2, 3, 0, 1}, |
||
852 | audiomux: { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 }, |
||
853 | needs_tvaudio: 1, |
||
854 | pll: PLL_28, |
||
855 | tuner_type: 5, |
||
856 | },{ |
||
857 | /* This is the ultimate cheapo capture card |
||
858 | * just a BT848A on a small PCB! |
||
859 | * Steve Hosgood <steve@equiinet.com> */ |
||
860 | name: "GrandTec 'Grand Video Capture' (Bt848)", |
||
861 | video_inputs: 2, |
||
862 | audio_inputs: 0, |
||
863 | tuner: -1, |
||
864 | svhs: 1, |
||
865 | gpiomask: 0, |
||
866 | muxsel: { 3, 1 }, |
||
867 | audiomux: { 0 }, |
||
868 | needs_tvaudio: 0, |
||
869 | no_msp34xx: 1, |
||
870 | pll: PLL_35, |
||
871 | tuner_type: -1, |
||
872 | },{ |
||
873 | /* Daniel Herrington <daniel.herrington@home.com> */ |
||
874 | name: "Phoebe TV Master Only (No FM) CPH060", |
||
875 | video_inputs: 3, |
||
876 | audio_inputs: 1, |
||
877 | tuner: 0, |
||
878 | svhs: 2, |
||
879 | gpiomask: 0xe00, |
||
880 | muxsel: { 2, 3, 1, 1}, |
||
881 | audiomux: { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 }, |
||
882 | needs_tvaudio: 1, |
||
883 | pll: PLL_NONE, |
||
884 | tuner_type: TUNER_TEMIC_4036FY5_NTSC, |
||
885 | },{ |
||
886 | /* Matti Mottus <mottus@physic.ut.ee> */ |
||
887 | name: "TV Capturer (CPH03X)", |
||
888 | video_inputs: 4, |
||
889 | audio_inputs: 1, |
||
890 | tuner: 0, |
||
891 | svhs: 2, |
||
892 | gpiomask: 0x03000F, |
||
893 | muxsel: { 2, 3, 1, 0}, |
||
894 | audiomux: { 2,0,0,0,1 }, |
||
895 | pll: PLL_28, |
||
896 | tuner_type: 0, |
||
897 | },{ |
||
898 | |||
899 | /* ---- card 0x3c ---------------------------------- */ |
||
900 | /* Philip Blundell <philb@gnu.org> */ |
||
901 | name: "Modular Technology MM100PCTV", |
||
902 | video_inputs: 2, |
||
903 | audio_inputs: 2, |
||
904 | tuner: 0, |
||
905 | svhs: -1, |
||
906 | gpiomask: 11, |
||
907 | muxsel: { 2, 3, 1, 1}, |
||
908 | audiomux: { 2, 0, 0, 1, 8}, |
||
909 | pll: PLL_35, |
||
910 | tuner_type: TUNER_TEMIC_PAL, |
||
911 | |||
912 | },{ |
||
913 | /* Adrian Cox <adrian@humboldt.co.uk */ |
||
914 | name: "AG Electronics GMV1", |
||
915 | video_inputs: 2, |
||
916 | audio_inputs: 0, |
||
917 | tuner: -1, |
||
918 | svhs: 1, |
||
919 | gpiomask: 0xF, |
||
920 | muxsel: { 2, 2}, |
||
921 | audiomux: { }, |
||
922 | no_msp34xx: 1, |
||
923 | needs_tvaudio: 0, |
||
924 | pll: PLL_28, |
||
925 | tuner_type: -1, |
||
926 | },{ |
||
927 | /* Miguel Angel Alvarez <maacruz@navegalia.com> |
||
928 | new Easy TV BT878 version (model CPH061) |
||
929 | special thanks to Informatica Mieres for providing the card */ |
||
930 | name: "BESTBUY Easy TV (bt878)", |
||
931 | video_inputs: 3, |
||
932 | audio_inputs: 2, |
||
933 | tuner: 0, |
||
934 | svhs: 2, |
||
935 | gpiomask: 0xFF, |
||
936 | muxsel: { 2, 3, 1, 0}, |
||
937 | audiomux: { 1, 0, 4, 4, 9}, |
||
938 | needs_tvaudio: 0, |
||
939 | pll: PLL_28, |
||
940 | tuner_type: TUNER_PHILIPS_PAL, |
||
941 | },{ |
||
942 | /* Lukas Gebauer <geby@volny.cz> */ |
||
943 | name: "ATI TV-Wonder", |
||
944 | video_inputs: 3, |
||
945 | audio_inputs: 1, |
||
946 | tuner: 0, |
||
947 | svhs: 2, |
||
948 | gpiomask: 0xf03f, |
||
949 | muxsel: { 2, 3, 1, 0 }, |
||
950 | audiomux: { 0xbffe, 0, 0xbfff, 0, 0xbffe}, |
||
951 | pll: PLL_28, |
||
952 | tuner_type: TUNER_TEMIC_4006FN5_MULTI_PAL, |
||
953 | },{ |
||
954 | |||
955 | /* ---- card 0x40 ---------------------------------- */ |
||
956 | /* Lukas Gebauer <geby@volny.cz> */ |
||
957 | name: "ATI TV-Wonder VE", |
||
958 | video_inputs: 2, |
||
959 | audio_inputs: 1, |
||
960 | tuner: 0, |
||
961 | svhs: -1, |
||
962 | gpiomask: 1, |
||
963 | muxsel: { 2, 3, 0, 1}, |
||
964 | audiomux: { 0, 0, 1, 0, 0}, |
||
965 | no_msp34xx: 1, |
||
966 | pll: PLL_28, |
||
967 | tuner_type: TUNER_TEMIC_4006FN5_MULTI_PAL, |
||
968 | },{ |
||
969 | /* DeeJay <deejay@westel900.net (2000S) */ |
||
970 | name: "FlyVideo 2000S", |
||
971 | video_inputs: 3, |
||
972 | audio_inputs: 3, |
||
973 | tuner: 0, |
||
974 | svhs: 2, |
||
975 | gpiomask: 0x18e0, |
||
976 | muxsel: { 2, 3, 0, 1}, |
||
977 | /* Radio changed from 1e80 to 0x800 to make |
||
978 | Flyvideo2000S in .hu happy (gm)*/ |
||
979 | /* -dk-???: set mute=0x1800 for tda9874h daughterboard */ |
||
980 | audiomux: { 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 }, |
||
981 | audio_hook: fv2000s_audio, |
||
982 | no_msp34xx: 1, |
||
983 | no_tda9875: 1, |
||
984 | needs_tvaudio: 1, |
||
985 | pll: PLL_28, |
||
986 | tuner_type: 5, |
||
987 | },{ |
||
988 | name: "Terratec TValueRadio", |
||
989 | video_inputs: 3, |
||
990 | audio_inputs: 1, |
||
991 | tuner: 0, |
||
992 | svhs: 2, |
||
993 | gpiomask: 0xffff00, |
||
994 | muxsel: { 2, 3, 1, 1}, |
||
995 | audiomux: { 0x500, 0x500, 0x300, 0x900, 0x900}, |
||
996 | needs_tvaudio: 1, |
||
997 | pll: PLL_28, |
||
998 | tuner_type: TUNER_PHILIPS_PAL, |
||
999 | has_radio: 1, |
||
1000 | },{ |
||
1001 | /* TANAKA Kei <peg00625@nifty.com> */ |
||
1002 | name: "IODATA GV-BCTV4/PCI", |
||
1003 | video_inputs: 3, |
||
1004 | audio_inputs: 1, |
||
1005 | tuner: 0, |
||
1006 | svhs: 2, |
||
1007 | gpiomask: 0x010f00, |
||
1008 | muxsel: {2, 3, 0, 0}, |
||
1009 | audiomux: {0x10000, 0, 0x10000, 0, 0, 0}, |
||
1010 | no_msp34xx: 1, |
||
1011 | pll: PLL_28, |
||
1012 | tuner_type: TUNER_SHARP_2U5JF5540_NTSC, |
||
1013 | audio_hook: gvbctv3pci_audio, |
||
1014 | },{ |
||
1015 | |||
1016 | /* ---- card 0x44 ---------------------------------- */ |
||
1017 | name: "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)", |
||
1018 | // try "insmod msp3400 simple=0" if you have |
||
1019 | // sound problems with this card. |
||
1020 | video_inputs: 4, |
||
1021 | audio_inputs: 1, |
||
1022 | tuner: 0, |
||
1023 | svhs: -1, |
||
1024 | gpiomask: 0x4f8a00, |
||
1025 | // 0x100000: 1=MSP enabled (0=disable again) |
||
1026 | // 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) |
||
1027 | audiomux: {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff}, |
||
1028 | // tvtuner, radio, external,internal, mute, stereo |
||
1029 | /* tuner, Composit, SVid, Composit-on-Svid-adapter*/ |
||
1030 | muxsel: { 2, 3 ,0 ,1}, |
||
1031 | tuner_type: TUNER_MT2032, |
||
1032 | pll: PLL_28, |
||
1033 | has_radio: 1, |
||
1034 | },{ |
||
1035 | /* Philip Blundell <pb@nexus.co.uk> */ |
||
1036 | name: "Active Imaging AIMMS", |
||
1037 | video_inputs: 1, |
||
1038 | audio_inputs: 0, |
||
1039 | tuner: -1, |
||
1040 | tuner_type: -1, |
||
1041 | pll: PLL_28, |
||
1042 | muxsel: { 2 }, |
||
1043 | gpiomask: 0 |
||
1044 | },{ |
||
1045 | /* Tomasz Pyra <hellfire@sedez.iq.pl> */ |
||
1046 | name: "Pixelview PV-BT878P+ (Rev.4C)", |
||
1047 | video_inputs: 3, |
||
1048 | audio_inputs: 4, |
||
1049 | tuner: 0, |
||
1050 | svhs: 2, |
||
1051 | gpiomask: 15, |
||
1052 | muxsel: { 2, 3, 1, 1}, |
||
1053 | audiomux: { 0, 0, 11, 7, 13, 0}, |
||
1054 | needs_tvaudio: 1, |
||
1055 | pll: PLL_28, |
||
1056 | tuner_type: 25, |
||
1057 | },{ |
||
1058 | name: "Flyvideo 98EZ (capture only)", |
||
1059 | video_inputs: 4, |
||
1060 | audio_inputs: 0, |
||
1061 | tuner: -1, |
||
1062 | svhs: 2, |
||
1063 | muxsel: { 2, 3, 1, 1}, // AV1, AV2, SVHS, CVid adapter on SVHS |
||
1064 | pll: PLL_28, |
||
1065 | no_msp34xx: 1, |
||
1066 | },{ |
||
1067 | |||
1068 | /* ---- card 0x48 ---------------------------------- */ |
||
1069 | /* Dariusz Kowalewski <darekk@automex.pl> */ |
||
1070 | name: "Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)", |
||
1071 | video_inputs: 3, |
||
1072 | audio_inputs: 1, |
||
1073 | tuner: 0, |
||
1074 | svhs: 2, |
||
1075 | gpiomask: 0x3f, |
||
1076 | muxsel: { 2, 3, 0, 1 }, |
||
1077 | audiomux: { 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 }, |
||
1078 | needs_tvaudio: 1, |
||
1079 | no_msp34xx: 1, |
||
1080 | no_tda9875: 1, |
||
1081 | pll: PLL_28, |
||
1082 | tuner_type: -1, |
||
1083 | audio_hook: pvbt878p9b_audio, |
||
1084 | has_radio: 1, |
||
1085 | },{ |
||
1086 | /* Clay Kunz <ckunz@mail.arc.nasa.gov> */ |
||
1087 | /* you must jumper JP5 for the card to work */ |
||
1088 | name: "Sensoray 311", |
||
1089 | video_inputs: 5, |
||
1090 | audio_inputs: 0, |
||
1091 | tuner: -1, |
||
1092 | svhs: 4, |
||
1093 | gpiomask: 0, |
||
1094 | muxsel: { 2, 3, 1, 0, 0}, |
||
1095 | audiomux: { 0 }, |
||
1096 | needs_tvaudio: 0, |
||
1097 | tuner_type: -1, |
||
1098 | },{ |
||
1099 | /* Miguel Freitas <miguel@cetuc.puc-rio.br> */ |
||
1100 | name: "RemoteVision MX (RV605)", |
||
1101 | video_inputs: 16, |
||
1102 | audio_inputs: 0, |
||
1103 | tuner: -1, |
||
1104 | svhs: -1, |
||
1105 | gpiomask: 0x00, |
||
1106 | gpiomask2: 0x07ff, |
||
1107 | muxsel: { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03, |
||
1108 | 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 }, |
||
1109 | no_msp34xx: 1, |
||
1110 | no_tda9875: 1, |
||
1111 | tuner_type: -1, |
||
1112 | muxsel_hook: rv605_muxsel, |
||
1113 | },{ |
||
1114 | name: "Powercolor MTV878/ MTV878R/ MTV878F", |
||
1115 | video_inputs: 3, |
||
1116 | audio_inputs: 2, |
||
1117 | tuner: 0, |
||
1118 | svhs: 2, |
||
1119 | gpiomask: 0x1C800F, // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset |
||
1120 | muxsel: { 2, 1, 1, }, |
||
1121 | audiomux: { 0, 1, 2, 2, 4 }, |
||
1122 | needs_tvaudio: 0, |
||
1123 | tuner_type: TUNER_PHILIPS_PAL, |
||
1124 | pll: PLL_28, |
||
1125 | has_radio: 1, |
||
1126 | },{ |
||
1127 | |||
1128 | /* ---- card 0x4c ---------------------------------- */ |
||
1129 | /* Masaki Suzuki <masaki@btree.org> */ |
||
1130 | name: "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)", |
||
1131 | video_inputs: 3, |
||
1132 | audio_inputs: 1, |
||
1133 | tuner: 0, |
||
1134 | svhs: 2, |
||
1135 | gpiomask: 0x140007, |
||
1136 | muxsel: { 2, 3, 1, 1 }, |
||
1137 | audiomux: { 0, 1, 2, 3, 4, 0 }, |
||
1138 | tuner_type: TUNER_PHILIPS_NTSC, |
||
1139 | audio_hook: windvr_audio, |
||
1140 | },{ |
||
1141 | name: "GrandTec Multi Capture Card (Bt878)", |
||
1142 | video_inputs: 4, |
||
1143 | audio_inputs: 0, |
||
1144 | tuner: -1, |
||
1145 | svhs: -1, |
||
1146 | gpiomask: 0, |
||
1147 | muxsel: { 2, 3, 1, 0 }, |
||
1148 | audiomux: { 0 }, |
||
1149 | needs_tvaudio: 0, |
||
1150 | no_msp34xx: 1, |
||
1151 | pll: PLL_28, |
||
1152 | tuner_type: -1, |
||
1153 | },{ |
||
1154 | /* http://www.aopen.com/products/video/va1000.htm */ |
||
1155 | name: "AOPEN VA1000", |
||
1156 | video_inputs: 3, /* coax, AV, s-vid */ |
||
1157 | audio_inputs: 1, |
||
1158 | tuner: 0, |
||
1159 | tuner_type: TUNER_LG_PAL, /* actually TP18PSB12P (PAL B/G) */ |
||
1160 | audiomux: { 2, 0, 0, 0 }, |
||
1161 | muxsel: { 2, 3, 1, 0 }, |
||
1162 | pll: PLL_28, |
||
1163 | },{ |
||
1164 | name: "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */ |
||
1165 | video_inputs: 4, /* id-inputs-clock */ |
||
1166 | audio_inputs: 0, |
||
1167 | tuner: -1, |
||
1168 | svhs: 3, |
||
1169 | muxsel: { 3, 2, 0, 1 }, |
||
1170 | pll: PLL_28, |
||
1171 | tuner_type: -1, |
||
1172 | no_msp34xx: 1, |
||
1173 | no_tda9875: 1, |
||
1174 | no_tda7432: 1, |
||
1175 | },{ |
||
1176 | /* ---- card 0x50 ---------------------------------- */ |
||
1177 | name: "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */ |
||
1178 | video_inputs: 3, |
||
1179 | audio_inputs: 0, |
||
1180 | tuner: -1, |
||
1181 | svhs: 2, |
||
1182 | muxsel: { 2, 3, 1 }, |
||
1183 | pll: PLL_28, |
||
1184 | tuner_type: -1, |
||
1185 | no_msp34xx: 1, |
||
1186 | no_tda9875: 1, |
||
1187 | no_tda7432: 1, |
||
1188 | },{ |
||
1189 | name: "Osprey 101 (848)", /* 0x05-40C0-C1 */ |
||
1190 | video_inputs: 2, |
||
1191 | audio_inputs: 0, |
||
1192 | tuner: -1, |
||
1193 | svhs: 1, |
||
1194 | muxsel: { 3, 1 }, |
||
1195 | pll: PLL_28, |
||
1196 | tuner_type: -1, |
||
1197 | no_msp34xx: 1, |
||
1198 | no_tda9875: 1, |
||
1199 | no_tda7432: 1, |
||
1200 | },{ |
||
1201 | name: "Osprey 101/151", /* 0x1(4|5)-0004-C4 */ |
||
1202 | video_inputs: 1, |
||
1203 | audio_inputs: 0, |
||
1204 | tuner: -1, |
||
1205 | svhs: -1, |
||
1206 | muxsel: { 0 }, |
||
1207 | pll: PLL_28, |
||
1208 | tuner_type: -1, |
||
1209 | no_msp34xx: 1, |
||
1210 | no_tda9875: 1, |
||
1211 | no_tda7432: 1, |
||
1212 | },{ |
||
1213 | name: "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */ |
||
1214 | video_inputs: 2, |
||
1215 | audio_inputs: 0, |
||
1216 | tuner: -1, |
||
1217 | svhs: 1, |
||
1218 | muxsel: { 0, 1 }, |
||
1219 | pll: PLL_28, |
||
1220 | tuner_type: -1, |
||
1221 | no_msp34xx: 1, |
||
1222 | no_tda9875: 1, |
||
1223 | no_tda7432: 1, |
||
1224 | },{ |
||
1225 | /* ---- card 0x54 ---------------------------------- */ |
||
1226 | name: "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */ |
||
1227 | video_inputs: 1, |
||
1228 | audio_inputs: 1, |
||
1229 | tuner: -1, |
||
1230 | svhs: -1, |
||
1231 | muxsel: { 0 }, |
||
1232 | pll: PLL_28, |
||
1233 | tuner_type: -1, |
||
1234 | no_msp34xx: 1, |
||
1235 | no_tda9875: 1, |
||
1236 | no_tda7432: 1, |
||
1237 | },{ |
||
1238 | name: "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */ |
||
1239 | video_inputs: 2, |
||
1240 | audio_inputs: 1, |
||
1241 | tuner: -1, |
||
1242 | svhs: 1, |
||
1243 | muxsel: { 0, 1 }, |
||
1244 | pll: PLL_28, |
||
1245 | tuner_type: -1, |
||
1246 | no_msp34xx: 1, |
||
1247 | no_tda9875: 1, |
||
1248 | no_tda7432: 1, |
||
1249 | },{ |
||
1250 | name: "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */ |
||
1251 | video_inputs: 2, |
||
1252 | audio_inputs: 1, |
||
1253 | tuner: -1, |
||
1254 | svhs: 1, |
||
1255 | muxsel: { 2, 3 }, |
||
1256 | pll: PLL_28, |
||
1257 | tuner_type: -1, |
||
1258 | no_msp34xx: 1, |
||
1259 | no_tda9875: 1, |
||
1260 | no_tda7432: 1, |
||
1261 | },{ |
||
1262 | name: "Osprey 5x0", /* 500 and 540 */ |
||
1263 | video_inputs: 2, |
||
1264 | audio_inputs: 1, |
||
1265 | tuner: -1, |
||
1266 | svhs: 1, |
||
1267 | muxsel: { 0, 1 }, |
||
1268 | pll: PLL_28, |
||
1269 | tuner_type: -1, |
||
1270 | no_msp34xx: 1, |
||
1271 | no_tda9875: 1, |
||
1272 | no_tda7432: 1, |
||
1273 | },{ |
||
1274 | /* ---- card 0x58 ---------------------------------- */ |
||
1275 | name: "Osprey 2000", /* 2000 */ |
||
1276 | video_inputs: 2, |
||
1277 | audio_inputs: 1, |
||
1278 | tuner: -1, |
||
1279 | svhs: 1, |
||
1280 | muxsel: { 2, 3 }, |
||
1281 | pll: PLL_28, |
||
1282 | tuner_type: -1, |
||
1283 | no_msp34xx: 1, |
||
1284 | no_tda9875: 1, |
||
1285 | no_tda7432: 1, /* must avoid, conflicts with the bt860 */ |
||
1286 | }}; |
||
1287 | |||
1288 | const int bttv_num_tvcards = (sizeof(bttv_tvcards)/sizeof(struct tvcard)); |
||
1289 | |||
1290 | /* ----------------------------------------------------------------------- */ |
||
1291 | |||
1292 | static unsigned char eeprom_data[256]; |
||
1293 | |||
1294 | /* |
||
1295 | * identify card |
||
1296 | */ |
||
1297 | void bttv_idcard(struct bttv *btv) |
||
1298 | { |
||
1299 | unsigned int gpiobits; |
||
1300 | int i,type; |
||
1301 | unsigned short tmp; |
||
1302 | |||
1303 | /* read PCI subsystem ID */ |
||
1304 | pci_read_config_word(btv->dev, 2, &tmp); |
||
1305 | btv->cardid = tmp << 16; |
||
1306 | pci_read_config_word(btv->dev, 0, &tmp); |
||
1307 | btv->cardid |= tmp; |
||
1308 | |||
272 | giacomo | 1309 | printk(KERN_INFO "cardid=%08x",btv->cardid); |
170 | giacomo | 1310 | if (0 != btv->cardid && 0xffffffff != btv->cardid) { |
1311 | /* look for the card */ |
||
1312 | for (type = -1, i = 0; cards[i].id != 0; i++) |
||
1313 | if (cards[i].id == btv->cardid) |
||
1314 | type = i; |
||
1315 | |||
1316 | if (type != -1) { |
||
1317 | /* found it */ |
||
1318 | printk(KERN_INFO "bttv%d: %s [card=%d], " |
||
1319 | "PCI ID is %04x:%04x\n", |
||
1320 | btv->nr,cards[type].name,cards[type].cardnr, |
||
1321 | btv->cardid & 0xffff, btv->cardid >> 16); |
||
1322 | btv->type = cards[type].cardnr; |
||
1323 | } else { |
||
1324 | /* 404 */ |
||
1325 | printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n", |
||
1326 | btv->nr, btv->cardid&0xffff, btv->cardid>>16); |
||
1327 | } |
||
1328 | } |
||
1329 | |||
1330 | /* let the user override the autodetected type */ |
||
1331 | if (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards) |
||
1332 | btv->type=card[btv->nr]; |
||
1333 | |||
1334 | /* print which card config we are using */ |
||
1335 | sprintf(btv->video_dev.name,"BT%d%s(%.23s)", |
||
1336 | btv->id, |
||
1337 | (btv->id==848 && btv->revision==0x12) ? "A" : "", |
||
1338 | bttv_tvcards[btv->type].name); |
||
1339 | printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->nr, |
||
1340 | btv->video_dev.name,btv->type, |
||
1341 | (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards) ? |
||
1342 | "insmod option" : "autodetected"); |
||
1343 | |||
1344 | /* overwrite gpio stuff ?? */ |
||
1345 | if (-1 == audioall && -1 == audiomux[0]) |
||
1346 | return; |
||
1347 | |||
1348 | if (-1 != audiomux[0]) { |
||
1349 | gpiobits = 0; |
||
1350 | for (i = 0; i < 5; i++) { |
||
1351 | bttv_tvcards[btv->type].audiomux[i] = audiomux[i]; |
||
1352 | gpiobits |= audiomux[i]; |
||
1353 | } |
||
1354 | } else { |
||
1355 | gpiobits = audioall; |
||
1356 | for (i = 0; i < 5; i++) { |
||
1357 | bttv_tvcards[btv->type].audiomux[i] = audioall; |
||
1358 | } |
||
1359 | } |
||
1360 | bttv_tvcards[btv->type].gpiomask = (-1 != gpiomask) ? gpiomask : gpiobits; |
||
1361 | cprintf("[info ] bttv%d: gpio config override: mask=0x%lx, mux=", |
||
1362 | btv->nr,bttv_tvcards[btv->type].gpiomask); |
||
1363 | for (i = 0; i < 5; i++) { |
||
1364 | cprintf("%s0x%lx", i ? "," : "", bttv_tvcards[btv->type].audiomux[i]); |
||
1365 | } |
||
1366 | cprintf("\n"); |
||
1367 | } |
||
1368 | |||
1369 | /* |
||
1370 | * (most) board specific initialisations goes here |
||
1371 | */ |
||
1372 | |||
1373 | static void flyvideo_gpio(struct bttv *btv) |
||
1374 | { |
||
1375 | int gpio,outbits; |
||
1376 | int tuner=-1,ttype; |
||
1377 | |||
1378 | outbits = btread(BT848_GPIO_OUT_EN); |
||
1379 | btwrite(0x00, BT848_GPIO_OUT_EN); |
||
1380 | udelay(8); // without this we would see the 0x1800 mask |
||
1381 | gpio=gpioread(); |
||
1382 | btwrite(outbits, BT848_GPIO_OUT_EN); |
||
1383 | // all cards provide GPIO info, some have an additional eeprom |
||
1384 | |||
1385 | // lowest 3 bytes are remote control codes (no handshake needed) |
||
1386 | ttype=(gpio&0x0f0000)>>16; |
||
1387 | switch(ttype) { |
||
1388 | case 0: tuner=4; // None |
||
1389 | break; |
||
1390 | case 4: tuner=5; // Philips PAL |
||
1391 | break; |
||
1392 | case 6: tuner=37; // LG PAL (newer TAPC series) |
||
1393 | break; |
||
1394 | case 0xC: tuner=3; // Philips SECAM(+PAL) |
||
1395 | break; |
||
1396 | default: |
||
1397 | printk(KERN_INFO "bttv%d: flyvideo_gpio: unknown tuner type.\n", btv->nr); |
||
1398 | } |
||
1399 | |||
1400 | printk(KERN_INFO "bttv%d: Flyvideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n", |
||
1401 | btv->nr, |
||
1402 | gpio&0x400000? "yes":"no", |
||
1403 | gpio&0x800000? "yes":"no", tuner, gpio); |
||
1404 | |||
1405 | btv->tuner_type = tuner; |
||
1406 | btv->has_radio = gpio&0x400000? 1:0; |
||
1407 | } |
||
1408 | |||
1409 | int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1, |
||
1410 | 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 }; |
||
1411 | int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, |
||
1412 | 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,0,0,0 }; |
||
1413 | |||
1414 | /* initialization part one -- before registering i2c bus */ |
||
1415 | void bttv_init_card1(struct bttv *btv) |
||
1416 | { |
||
1417 | if (btv->type == BTTV_HAUPPAUGE || btv->type == BTTV_HAUPPAUGE878) |
||
1418 | boot_msp34xx(btv,5); |
||
1419 | if (btv->type == BTTV_VOODOOTV_FM) |
||
1420 | boot_msp34xx(btv,20); |
||
1421 | |||
1422 | /*printk("bttv: end of init -- pre i2c\n");*/ |
||
1423 | } |
||
1424 | |||
1425 | /* initialization part one -- after registering i2c bus */ |
||
1426 | void bttv_init_card2(struct bttv *btv) |
||
1427 | { |
||
1428 | /* miro/pinnacle */ |
||
1429 | if (btv->type == BTTV_MIRO || |
||
1430 | btv->type == BTTV_MIROPRO || |
||
1431 | btv->type == BTTV_PINNACLE || |
||
1432 | btv->type == BTTV_PINNACLEPRO) { |
||
1433 | int id,msp; |
||
1434 | id = ((gpioread()>>10) & 31) -1; |
||
1435 | msp = bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx"); |
||
1436 | btv->tuner_type = miro_tunermap[id]; |
||
1437 | if (0 == (gpioread() & 0x20)) { |
||
1438 | btv->has_radio = 1; |
||
1439 | if (!miro_fmtuner[id]) { |
||
1440 | btv->has_matchbox = 1; |
||
1441 | btv->mbox_we = (1<<6); |
||
1442 | btv->mbox_most = (1<<7); |
||
1443 | btv->mbox_clk = (1<<8); |
||
1444 | btv->mbox_data = (1<<9); |
||
1445 | btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9); |
||
1446 | } |
||
1447 | } else { |
||
1448 | btv->has_radio = 0; |
||
1449 | } |
||
1450 | if (-1 != msp) { |
||
1451 | if (btv->type == BTTV_MIRO) |
||
1452 | btv->type = BTTV_MIROPRO; |
||
1453 | if (btv->type == BTTV_PINNACLE) |
||
1454 | btv->type = BTTV_PINNACLEPRO; |
||
1455 | } |
||
1456 | if (bttv_verbose) |
||
1457 | printk(KERN_INFO "bttv%d: miro: id=%d tuner=%d " |
||
1458 | "radio=%s stereo=%s\n", |
||
1459 | btv->nr, id+1, btv->tuner_type, |
||
1460 | !btv->has_radio ? "no" : |
||
1461 | (btv->has_matchbox ? "matchbox" : "fmtuner"), |
||
1462 | (-1 == msp) ? "no" : "yes"); |
||
1463 | #if 0 |
||
1464 | if (btv->has_matchbox) { |
||
1465 | if (bttv_verbose) |
||
1466 | printk(KERN_INFO "Initializing TEA5757...\n"); |
||
1467 | init_tea5757(btv); |
||
1468 | } |
||
1469 | #endif |
||
1470 | } |
||
1471 | |||
1472 | if (btv->type == BTTV_FLYVIDEO_98 || |
||
1473 | btv->type == BTTV_FLYVIDEO || |
||
1474 | btv->type == BTTV_TYPHOON_TVIEW || |
||
1475 | btv->type == BTTV_CHRONOS_VS2 || |
||
1476 | btv->type == BTTV_FLYVIDEO_98FM || |
||
1477 | btv->type == BTTV_FLYVIDEO2000 || |
||
1478 | btv->type == BTTV_FLYVIDEO98EZ) |
||
1479 | flyvideo_gpio(btv); |
||
1480 | |||
1481 | if (btv->type == BTTV_HAUPPAUGE || btv->type == BTTV_HAUPPAUGE878) { |
||
1482 | /* pick up some config infos from the eeprom */ |
||
1483 | bttv_readee(btv,eeprom_data,0xa0); |
||
1484 | hauppauge_eeprom(btv); |
||
1485 | } |
||
1486 | |||
1487 | if ((btv->type >= BTTV_OSPREY_BEGIN) && (btv->type <= BTTV_OSPREY_END)) { |
||
1488 | /* check for config info in the eeprom */ |
||
1489 | bttv_readee(btv,eeprom_data,0xa0); |
||
1490 | osprey_eeprom(btv); |
||
1491 | } |
||
1492 | |||
1493 | if (btv->type == BTTV_AVERMEDIA98 || btv->type == BTTV_AVPHONE98) { |
||
1494 | bttv_readee(btv,eeprom_data,0xa0); |
||
1495 | avermedia_eeprom(btv); |
||
1496 | } |
||
1497 | |||
1498 | if (btv->type == BTTV_PXC200) |
||
1499 | init_PXC200(btv); |
||
1500 | |||
1501 | if (btv->type == BTTV_VHX) { |
||
1502 | btv->has_radio = 1; |
||
1503 | btv->has_matchbox = 1; |
||
1504 | btv->mbox_we = 0x20; |
||
1505 | btv->mbox_most = 0; |
||
1506 | btv->mbox_clk = 0x08; |
||
1507 | btv->mbox_data = 0x10; |
||
1508 | btv->mbox_mask = 0x38; |
||
1509 | } |
||
1510 | |||
1511 | if (btv->type == BTTV_LIFETEC_9415) { |
||
1512 | if (gpioread() & 0x4000) |
||
1513 | cprintf("bttv%d: lifetec: tv mono/fm stereo card\n", btv->nr); |
||
1514 | else |
||
1515 | cprintf("bttv%d: lifetec: stereo(TDA9821) card\n",btv->nr); |
||
1516 | } |
||
1517 | |||
1518 | if (btv->type == BTTV_MAGICTVIEW061) { |
||
1519 | if(btv->cardid == 0x4002144f) { |
||
1520 | btv->has_radio=1; |
||
1521 | cprintf("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->nr); |
||
1522 | } |
||
1523 | } |
||
1524 | |||
1525 | /* pll configuration */ |
||
1526 | if (!(btv->id==848 && btv->revision==0x11)) { |
||
1527 | /* defaults from card list */ |
||
1528 | if (PLL_28 == bttv_tvcards[btv->type].pll) { |
||
1529 | btv->pll.pll_ifreq=28636363; |
||
1530 | btv->pll.pll_crystal=BT848_IFORM_XT0; |
||
1531 | } |
||
1532 | if (PLL_35 == bttv_tvcards[btv->type].pll) { |
||
1533 | btv->pll.pll_ifreq=35468950; |
||
1534 | btv->pll.pll_crystal=BT848_IFORM_XT1; |
||
1535 | } |
||
1536 | /* insmod options can override */ |
||
1537 | switch (pll[btv->nr]) { |
||
1538 | case 0: /* none */ |
||
1539 | btv->pll.pll_crystal = 0; |
||
1540 | btv->pll.pll_ifreq = 0; |
||
1541 | btv->pll.pll_ofreq = 0; |
||
1542 | break; |
||
1543 | case 1: /* 28 MHz */ |
||
1544 | case 28: |
||
1545 | btv->pll.pll_ifreq = 28636363; |
||
1546 | btv->pll.pll_ofreq = 0; |
||
1547 | btv->pll.pll_crystal = BT848_IFORM_XT0; |
||
1548 | break; |
||
1549 | case 2: /* 35 MHz */ |
||
1550 | case 35: |
||
1551 | btv->pll.pll_ifreq = 35468950; |
||
1552 | btv->pll.pll_ofreq = 0; |
||
1553 | btv->pll.pll_crystal = BT848_IFORM_XT1; |
||
1554 | break; |
||
1555 | } |
||
1556 | } |
||
1557 | |||
1558 | /* tuner configuration (from card list / insmod option) */ |
||
1559 | if (-1 != bttv_tvcards[btv->type].tuner_type) |
||
1560 | btv->tuner_type = bttv_tvcards[btv->type].tuner_type; |
||
1561 | if (-1 != tuner[btv->nr]) |
||
1562 | btv->tuner_type = tuner[btv->nr]; |
||
1563 | |||
1564 | if (bttv_tvcards[btv->type].has_radio) |
||
1565 | btv->has_radio=1; |
||
1566 | |||
1567 | /* try to detect audio/fader chips */ |
||
1568 | if (!bttv_tvcards[btv->type].no_msp34xx && |
||
1569 | bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0) { |
||
1570 | } |
||
1571 | |||
1572 | if (!bttv_tvcards[btv->type].no_tda9875 && |
||
1573 | bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0) { |
||
1574 | } |
||
1575 | |||
1576 | if (!bttv_tvcards[btv->type].no_tda7432 && |
||
1577 | bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0) { |
||
1578 | } |
||
1579 | |||
1580 | if (bttv_tvcards[btv->type].needs_tvaudio) { |
||
1581 | } |
||
1582 | |||
1583 | if (bttv_tvcards[btv->type].tuner != -1) { |
||
1584 | } |
||
1585 | } |
||
1586 | |||
1587 | |||
1588 | /* ----------------------------------------------------------------------- */ |
||
1589 | /* some hauppauge specific stuff */ |
||
1590 | |||
1591 | static struct HAUPPAUGE_TUNER |
||
1592 | { |
||
1593 | int id; |
||
1594 | char *name; |
||
1595 | } |
||
1596 | hauppauge_tuner[] = |
||
1597 | { |
||
1598 | { TUNER_ABSENT, "" }, |
||
1599 | { TUNER_ABSENT, "External" }, |
||
1600 | { TUNER_ABSENT, "Unspecified" }, |
||
1601 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, |
||
1602 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, |
||
1603 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, |
||
1604 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, |
||
1605 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256" }, |
||
1606 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, |
||
1607 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, |
||
1608 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, |
||
1609 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, |
||
1610 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256 MK2" }, |
||
1611 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, |
||
1612 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, |
||
1613 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, |
||
1614 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, |
||
1615 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, |
||
1616 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, |
||
1617 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, |
||
1618 | { TUNER_PHILIPS_PAL_DK,"Philips FR1256 MK2" }, |
||
1619 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, |
||
1620 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, |
||
1621 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, |
||
1622 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, |
||
1623 | { TUNER_PHILIPS_PAL_DK,"Philips FM1256" }, |
||
1624 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, |
||
1625 | { TUNER_ABSENT, "Samsung TCPN9082D" }, |
||
1626 | { TUNER_ABSENT, "Samsung TCPM9092P" }, |
||
1627 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, |
||
1628 | { TUNER_ABSENT, "Samsung TCPN9085D" }, |
||
1629 | { TUNER_ABSENT, "Samsung TCPB9085P" }, |
||
1630 | { TUNER_ABSENT, "Samsung TCPL9091P" }, |
||
1631 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, |
||
1632 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, |
||
1633 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, |
||
1634 | { TUNER_ABSENT, "Philips TD1536" }, |
||
1635 | { TUNER_ABSENT, "Philips TD1536D" }, |
||
1636 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ |
||
1637 | { TUNER_ABSENT, "Philips FI1256MP" }, |
||
1638 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, |
||
1639 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, |
||
1640 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, |
||
1641 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, |
||
1642 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, |
||
1643 | { TUNER_ABSENT, "Philips TD1536D_FH_44"}, |
||
1644 | { TUNER_LG_NTSC_FM, "LG TP18NSR01F"}, |
||
1645 | { TUNER_LG_PAL_FM, "LG TP18PSB01D"}, |
||
1646 | { TUNER_LG_PAL, "LG TP18PSB11D"}, |
||
1647 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, |
||
1648 | { TUNER_LG_PAL_I, "LG TAPC-I701D"} |
||
1649 | }; |
||
1650 | |||
1651 | static void hauppauge_eeprom(struct bttv *btv) |
||
1652 | { |
||
1653 | int blk2,tuner,radio,model; |
||
1654 | |||
1655 | if (eeprom_data[0] != 0x84 || eeprom_data[2] != 0) |
||
1656 | printk(KERN_WARNING "bttv%d: Hauppauge eeprom: invalid\n", |
||
1657 | btv->nr); |
||
1658 | |||
1659 | /* Block 2 starts after len+3 bytes header */ |
||
1660 | blk2 = eeprom_data[1] + 3; |
||
1661 | |||
1662 | /* decode + use some config infos */ |
||
1663 | model = eeprom_data[12] << 8 | eeprom_data[11]; |
||
1664 | tuner = eeprom_data[9]; |
||
1665 | radio = eeprom_data[blk2-1] & 0x01; |
||
1666 | |||
1667 | if (tuner < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) |
||
1668 | btv->tuner_type = hauppauge_tuner[tuner].id; |
||
1669 | if (radio) |
||
1670 | btv->has_radio = 1; |
||
1671 | |||
1672 | if (bttv_verbose) |
||
1673 | printk(KERN_INFO "bttv%d: Hauppauge eeprom: model=%d, " |
||
1674 | "tuner=%s (%d), radio=%s\n", |
||
1675 | btv->nr, model, hauppauge_tuner[tuner].name, |
||
1676 | btv->tuner_type, radio ? "yes" : "no"); |
||
1677 | } |
||
1678 | |||
1679 | static void osprey_eeprom(struct bttv *btv) |
||
1680 | { |
||
1681 | int i = 0; |
||
1682 | int detected_type = btv->type; |
||
1683 | unsigned char *ee = eeprom_data; |
||
1684 | unsigned long serial = 0; |
||
1685 | |||
1686 | if (bttv_debug) { |
||
1687 | printk(KERN_INFO "Osprey: EEPROM dump\n"); |
||
1688 | for(;i<256; i+= 16) { |
||
1689 | cprintf("[info ] Osprey 100:(%02X) %02X %02X %02X %02X %02X %02X %02X %02X -- %02X %02X %02X %02X %02X %02X %02X %02X\n", |
||
1690 | i,ee[i+ 0],ee[i+ 1],ee[i+ 2],ee[i+ 3], |
||
1691 | ee[i+ 4],ee[i+ 5],ee[i+ 6],ee[i+ 7], |
||
1692 | ee[i+ 8],ee[i+ 9],ee[i+10],ee[i+11], |
||
1693 | ee[i+12],ee[i+13],ee[i+14],ee[i+15] ); |
||
1694 | } |
||
1695 | } |
||
1696 | |||
1697 | if (btv->type == 0) { |
||
1698 | /* this might be an antique...check for MMAC label in eeprom */ |
||
1699 | if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) { |
||
1700 | unsigned char checksum = 0; |
||
1701 | /* that looks like an old card...verify checksum */ |
||
1702 | for (i =0; i<21; i++) checksum += ee[i]; |
||
1703 | if (checksum == ee[21]) { |
||
1704 | btv->type = BTTV_OSPREY1x0_848; |
||
1705 | for (i = 12; i < 21; i++) serial *= 10,serial += ee[i] - '0'; |
||
1706 | } |
||
1707 | } |
||
1708 | } else { |
||
1709 | /* we know this is an osprey card, find a valid eeprom descriptor */ |
||
1710 | int offset = 4*16; |
||
1711 | |||
1712 | for(; offset < 8*16; offset += 16) { |
||
1713 | unsigned short checksum = 0; |
||
1714 | /* verify the checksum */ |
||
1715 | for(i = 0; i<14; i++) checksum += ee[i+offset]; |
||
1716 | checksum = ~checksum; /* no idea why */ |
||
1717 | if ((((checksum>>8) & 0x0FF) == ee[offset+14]) && |
||
1718 | ((checksum & 0x0FF) == ee[offset+15])) { |
||
1719 | break; |
||
1720 | } |
||
1721 | } |
||
1722 | |||
1723 | if (offset < 8*16) { |
||
1724 | /* found a valid descriptor */ |
||
1725 | unsigned short type = (ee[offset+4]<<8) | (ee[offset+5]); |
||
1726 | |||
1727 | switch(type) { |
||
1728 | /* 848 based */ |
||
1729 | case 0x0004: { |
||
1730 | btv->type = BTTV_OSPREY1x0_848; |
||
1731 | break; |
||
1732 | } |
||
1733 | case 0x0005: { |
||
1734 | btv->type = BTTV_OSPREY101_848; |
||
1735 | break; |
||
1736 | } |
||
1737 | /* 878 based */ |
||
1738 | case 0x0012: |
||
1739 | case 0x0013: { |
||
1740 | btv->type = BTTV_OSPREY1x0; |
||
1741 | break; |
||
1742 | } |
||
1743 | case 0x0014: |
||
1744 | case 0x0015: { |
||
1745 | btv->type = BTTV_OSPREY1x1; |
||
1746 | break; |
||
1747 | } |
||
1748 | case 0x0016: |
||
1749 | case 0x0017: |
||
1750 | case 0x0020: { |
||
1751 | btv->type = BTTV_OSPREY1x1_SVID; |
||
1752 | break; |
||
1753 | } |
||
1754 | case 0x0018: |
||
1755 | case 0x0019: |
||
1756 | case 0x001E: |
||
1757 | case 0x001F: { |
||
1758 | btv->type = BTTV_OSPREY2xx; |
||
1759 | break; |
||
1760 | } |
||
1761 | case 0x001A: |
||
1762 | case 0x001B: { |
||
1763 | btv->type = BTTV_OSPREY2x0_SVID; |
||
1764 | break; |
||
1765 | } |
||
1766 | case 0x0060: |
||
1767 | case 0x0070: { |
||
1768 | btv->type = BTTV_OSPREY2x0; |
||
1769 | //enable output on select control lines |
||
1770 | btwrite(0x000303, BT848_GPIO_OUT_EN); |
||
1771 | break; |
||
1772 | } |
||
1773 | default: { |
||
1774 | /* unknown...leave as generic, but get a serial # */ |
||
1775 | break; |
||
1776 | } |
||
1777 | } |
||
1778 | |||
1779 | serial = (ee[offset+6] << 24) |
||
1780 | | (ee[offset+7] << 16) |
||
1781 | | (ee[offset+8] << 8) |
||
1782 | | (ee[offset+9]); |
||
1783 | } |
||
1784 | } |
||
1785 | |||
1786 | if ((btv->type != detected_type) || (serial != 0)){ |
||
1787 | /* reprint which card config we are using */ |
||
1788 | sprintf(btv->video_dev.name,"BT%d%s(%.23s)", |
||
1789 | btv->id, |
||
1790 | (btv->id==848 && btv->revision==0x12) ? "A" : "", |
||
1791 | bttv_tvcards[btv->type].name); |
||
1792 | printk(KERN_INFO "bttv%d: is now:%s [card=%d,%s] Serial#: %ld\n", |
||
1793 | btv->nr, |
||
1794 | btv->video_dev.name, |
||
1795 | btv->type, |
||
1796 | (card[btv->nr] >= 0 && card[btv->nr] < bttv_num_tvcards) ? |
||
1797 | "insmod option" : "autodetected", |
||
1798 | serial); |
||
1799 | } |
||
1800 | } |
||
1801 | |||
1802 | |||
1803 | /* ----------------------------------------------------------------------- */ |
||
1804 | /* AVermedia specific stuff, from bktr_card.c */ |
||
1805 | |||
1806 | int tuner_0_table[] = { |
||
1807 | TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL, |
||
1808 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL, |
||
1809 | TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL, |
||
1810 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM, |
||
1811 | TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL}; |
||
1812 | #if 0 |
||
1813 | int tuner_0_fm_table[] = { |
||
1814 | PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL, |
||
1815 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
1816 | PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL, |
||
1817 | PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM, |
||
1818 | PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL}; |
||
1819 | #endif |
||
1820 | |||
1821 | int tuner_1_table[] = { |
||
1822 | TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL, |
||
1823 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
1824 | TUNER_TEMIC_PAL, TUNER_TEMIC_PAL, |
||
1825 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, //TUNER_TEMIC_SECAM |
||
1826 | TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL}; |
||
1827 | |||
1828 | static void avermedia_eeprom(struct bttv *btv) |
||
1829 | { |
||
1830 | int tuner_make,tuner_tv_fm,tuner_format,tuner=0,remote; |
||
1831 | |||
1832 | tuner_make = (eeprom_data[0x41] & 0x7); |
||
1833 | tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3; |
||
1834 | tuner_format = (eeprom_data[0x42] & 0xf0) >> 4; |
||
1835 | remote = (eeprom_data[0x42] & 0x01); |
||
1836 | |||
1837 | if (tuner_make == 0 || tuner_make == 2) |
||
1838 | if(tuner_format <=9) |
||
1839 | tuner = tuner_0_table[tuner_format]; |
||
1840 | if (tuner_make == 1) |
||
1841 | if(tuner_format <=9) |
||
1842 | tuner = tuner_1_table[tuner_format]; |
||
1843 | |||
1844 | cprintf("[info ] bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=", |
||
1845 | btv->nr,eeprom_data[0x41],eeprom_data[0x42]); |
||
1846 | if(tuner) { |
||
1847 | btv->tuner_type=tuner; |
||
1848 | cprintf("%d",tuner); |
||
1849 | } else |
||
1850 | cprintf("Unknown type"); |
||
1851 | cprintf(" radio:%s remote control:%s\n", |
||
1852 | tuner_tv_fm?"yes":"no", |
||
1853 | remote?"yes":"no"); |
||
1854 | } |
||
1855 | |||
1856 | /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */ |
||
1857 | void bttv_tda9880_setnorm(struct bttv *btv, int norm) |
||
1858 | { |
||
1859 | // fix up our card entry |
||
1860 | if(norm==VIDEO_MODE_NTSC) { |
||
1861 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x957fff; |
||
1862 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x957fff; |
||
1863 | dprintk("bttv_tda9880_setnorm to NTSC\n"); |
||
1864 | } |
||
1865 | else { |
||
1866 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[0]=0x947fff; |
||
1867 | bttv_tvcards[BTTV_VOODOOTV_FM].audiomux[4]=0x947fff; |
||
1868 | dprintk("bttv_tda9880_setnorm to PAL\n"); |
||
1869 | } |
||
1870 | // set GPIO according |
||
1871 | gpioaor(bttv_tvcards[btv->type].audiomux[btv->audio], |
||
1872 | ~bttv_tvcards[btv->type].gpiomask); |
||
1873 | } |
||
1874 | |||
1875 | |||
1876 | /* |
||
1877 | * reset/enable the MSP on some Hauppauge cards |
||
267 | giacomo | 1878 | * Thanks to Ky€sti M€lkki (kmalkki@cc.hut.fi)! |
170 | giacomo | 1879 | * |
1880 | * Hauppauge: pin 5 |
||
1881 | * Voodoo: pin 20 |
||
1882 | */ |
||
1883 | static void boot_msp34xx(struct bttv *btv, int pin) |
||
1884 | { |
||
1885 | int mask = (1 << pin); |
||
1886 | |||
1887 | btor(mask, BT848_GPIO_OUT_EN); |
||
1888 | gpioand(~mask); |
||
1889 | udelay(2500); |
||
1890 | gpioor(mask); |
||
1891 | if (bttv_gpio) |
||
1892 | bttv_gpio_tracking(btv,"msp34xx"); |
||
1893 | |||
1894 | if (bttv_verbose) |
||
1895 | printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line " |
||
1896 | "init [%d]\n", btv->nr, pin); |
||
1897 | } |
||
1898 | |||
1899 | |||
1900 | /* ----------------------------------------------------------------------- */ |
||
1901 | /* Imagenation L-Model PXC200 Framegrabber */ |
||
1902 | /* This is basically the same procedure as |
||
1903 | * used by Alessandro Rubini in his pxc200 |
||
1904 | * driver, but using BTTV functions */ |
||
1905 | |||
1906 | static void init_PXC200(struct bttv *btv) |
||
1907 | { |
||
1908 | /* Initialise GPIO-connevted stuff */ |
||
1909 | btwrite(1<<13,BT848_GPIO_OUT_EN); /* Reset pin only */ |
||
1910 | gpiowrite(0); |
||
1911 | udelay(3); |
||
1912 | gpiowrite(1<<13); |
||
1913 | /* GPIO inputs are pulled up, so no need to drive |
||
1914 | * reset pin any longer */ |
||
1915 | btwrite(0,BT848_GPIO_OUT_EN); |
||
1916 | if (bttv_gpio) |
||
1917 | bttv_gpio_tracking(btv,"pxc200"); |
||
1918 | |||
1919 | /* we could/should try and reset/control the AD pots? but |
||
1920 | right now we simply turned off the crushing. Without |
||
1921 | this the AGC drifts drifts |
||
1922 | remember the EN is reverse logic --> |
||
1923 | setting BT848_ADC_AGC_EN disable the AGC |
||
1924 | tboult@eecs.lehigh.edu |
||
1925 | */ |
||
1926 | btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC); |
||
1927 | |||
1928 | /* Initialise MAX517 DAC */ |
||
1929 | printk(KERN_INFO "Setting DAC reference voltage level ...\n"); |
||
1930 | bttv_I2CWrite(btv,0x5E,0,0x80,1); |
||
1931 | |||
1932 | /* Initialise 12C508 PIC */ |
||
1933 | /* The I2CWrite and I2CRead commmands are actually to the |
||
1934 | * same chips - but the R/W bit is included in the address |
||
1935 | * argument so the numbers are different */ |
||
1936 | |||
1937 | printk(KERN_INFO "PXC200 Initialised.\n"); |
||
1938 | } |
||
1939 | |||
1940 | /* ----------------------------------------------------------------------- */ |
||
1941 | /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */ |
||
1942 | /* |
||
1943 | * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu> |
||
1944 | * This code is placed under the terms of the GNU General Public License |
||
1945 | * |
||
1946 | * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00 |
||
1947 | */ |
||
1948 | |||
1949 | #if 0 |
||
1950 | /* bus bits on the GPIO port */ |
||
1951 | #define TEA_WE 6 |
||
1952 | #define TEA_DATA 9 |
||
1953 | #define TEA_CLK 8 |
||
1954 | #define TEA_MOST 7 |
||
1955 | #endif |
||
1956 | |||
1957 | #define BUS_LOW(bit) gpioand(~(bit)) |
||
1958 | #define BUS_HIGH(bit) gpioor((bit)) |
||
1959 | #define BUS_IN(bit) (gpioread() & (bit)) |
||
1960 | |||
1961 | /* TEA5757 register bits */ |
||
1962 | #define TEA_FREQ 0:14 |
||
1963 | #define TEA_BUFFER 15:15 |
||
1964 | |||
1965 | #define TEA_SIGNAL_STRENGTH 16:17 |
||
1966 | |||
1967 | #define TEA_PORT1 18:18 |
||
1968 | #define TEA_PORT0 19:19 |
||
1969 | |||
1970 | #define TEA_BAND 20:21 |
||
1971 | #define TEA_BAND_FM 0 |
||
1972 | #define TEA_BAND_MW 1 |
||
1973 | #define TEA_BAND_LW 2 |
||
1974 | #define TEA_BAND_SW 3 |
||
1975 | |||
1976 | #define TEA_MONO 22:22 |
||
1977 | #define TEA_ALLOW_STEREO 0 |
||
1978 | #define TEA_FORCE_MONO 1 |
||
1979 | |||
1980 | #define TEA_SEARCH_DIRECTION 23:23 |
||
1981 | #define TEA_SEARCH_DOWN 0 |
||
1982 | #define TEA_SEARCH_UP 1 |
||
1983 | |||
1984 | #define TEA_STATUS 24:24 |
||
1985 | #define TEA_STATUS_TUNED 0 |
||
1986 | #define TEA_STATUS_SEARCHING 1 |
||
1987 | |||
1988 | /* ----------------------------------------------------------------------- */ |
||
1989 | /* winview */ |
||
1990 | |||
1991 | void winview_audio(struct bttv *btv, struct video_audio *v, int set) |
||
1992 | { |
||
1993 | /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */ |
||
1994 | int bits_out, loops, vol, data; |
||
1995 | |||
1996 | if (!set) { |
||
1997 | /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */ |
||
1998 | v->flags |= VIDEO_AUDIO_VOLUME; |
||
1999 | return; |
||
2000 | } |
||
2001 | |||
2002 | /* 32 levels logarithmic */ |
||
2003 | vol = 32 - ((v->volume>>11)); |
||
2004 | /* units */ |
||
2005 | bits_out = (PT2254_DBS_IN_2>>(vol%5)); |
||
2006 | /* tens */ |
||
2007 | bits_out |= (PT2254_DBS_IN_10>>(vol/5)); |
||
2008 | bits_out |= PT2254_L_CHANNEL | PT2254_R_CHANNEL; |
||
2009 | data = gpioread(); |
||
2010 | data &= ~(WINVIEW_PT2254_CLK| WINVIEW_PT2254_DATA| |
||
2011 | WINVIEW_PT2254_STROBE); |
||
2012 | for (loops = 17; loops >= 0 ; loops--) { |
||
2013 | if (bits_out & (1<<loops)) |
||
2014 | data |= WINVIEW_PT2254_DATA; |
||
2015 | else |
||
2016 | data &= ~WINVIEW_PT2254_DATA; |
||
2017 | gpiowrite(data); |
||
2018 | udelay(5); |
||
2019 | data |= WINVIEW_PT2254_CLK; |
||
2020 | gpiowrite(data); |
||
2021 | udelay(5); |
||
2022 | data &= ~WINVIEW_PT2254_CLK; |
||
2023 | gpiowrite(data); |
||
2024 | } |
||
2025 | data |= WINVIEW_PT2254_STROBE; |
||
2026 | data &= ~WINVIEW_PT2254_DATA; |
||
2027 | gpiowrite(data); |
||
2028 | udelay(10); |
||
2029 | data &= ~WINVIEW_PT2254_STROBE; |
||
2030 | gpiowrite(data); |
||
2031 | } |
||
2032 | |||
2033 | /* ----------------------------------------------------------------------- */ |
||
2034 | /* mono/stereo control for various cards (which don't use i2c chips but */ |
||
2035 | /* connect something to the GPIO pins */ |
||
2036 | |||
2037 | static void |
||
2038 | gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2039 | { |
||
2040 | unsigned int con = 0; |
||
2041 | |||
2042 | if (set) { |
||
2043 | btor(0x300, BT848_GPIO_OUT_EN); |
||
2044 | if (v->mode & VIDEO_SOUND_LANG1) |
||
2045 | con = 0x000; |
||
2046 | if (v->mode & VIDEO_SOUND_LANG2) |
||
2047 | con = 0x300; |
||
2048 | if (v->mode & VIDEO_SOUND_STEREO) |
||
2049 | con = 0x200; |
||
2050 | // if (v->mode & VIDEO_SOUND_MONO) |
||
2051 | // con = 0x100; |
||
2052 | gpioaor(con, ~0x300); |
||
2053 | } else { |
||
2054 | v->mode = VIDEO_SOUND_STEREO | |
||
2055 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2056 | } |
||
2057 | } |
||
2058 | |||
2059 | /* |
||
2060 | * Mario Medina Nussbaum <medisoft@alohabbs.org.mx> |
||
2061 | * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo, |
||
2062 | * 0xdde enables mono and 0xccd enables sap |
||
2063 | * |
||
2064 | * Petr Vandrovec <VANDROVE@vc.cvut.cz> |
||
2065 | * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select |
||
2066 | * input/output sound connection, so both must be set for output mode. |
||
2067 | * |
||
2068 | * Looks like it's needed only for the "tvphone", the "tvphone 98" |
||
2069 | * handles this with a tda9840 |
||
2070 | * |
||
2071 | */ |
||
2072 | static void |
||
2073 | avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2074 | { |
||
2075 | int val = 0; |
||
2076 | |||
2077 | if (set) { |
||
2078 | if (v->mode & VIDEO_SOUND_LANG1) /* SAP */ |
||
2079 | val = 0x02; |
||
2080 | if (v->mode & VIDEO_SOUND_STEREO) |
||
2081 | val = 0x01; |
||
2082 | if (val) { |
||
2083 | gpioaor(val, ~0x03); |
||
2084 | if (bttv_gpio) |
||
2085 | bttv_gpio_tracking(btv,"avermedia"); |
||
2086 | } |
||
2087 | } else { |
||
2088 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2089 | VIDEO_SOUND_LANG1; |
||
2090 | return; |
||
2091 | } |
||
2092 | } |
||
2093 | |||
2094 | /* Lifetec 9415 handling */ |
||
2095 | static void |
||
2096 | lt9415_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2097 | { |
||
2098 | int val = 0; |
||
2099 | |||
2100 | if (gpioread() & 0x4000) { |
||
2101 | v->mode = VIDEO_SOUND_MONO; |
||
2102 | return; |
||
2103 | } |
||
2104 | |||
2105 | if (set) { |
||
2106 | if (v->mode & VIDEO_SOUND_LANG2) /* A2 SAP */ |
||
2107 | val = 0x0080; |
||
2108 | if (v->mode & VIDEO_SOUND_STEREO) /* A2 stereo */ |
||
2109 | val = 0x0880; |
||
2110 | if ((v->mode & VIDEO_SOUND_LANG1) || |
||
2111 | (v->mode & VIDEO_SOUND_MONO)) |
||
2112 | val = 0; |
||
2113 | gpioaor(val, ~0x0880); |
||
2114 | if (bttv_gpio) |
||
2115 | bttv_gpio_tracking(btv,"lt9415"); |
||
2116 | } else { |
||
2117 | /* autodetect doesn't work with this card :-( */ |
||
2118 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2119 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2120 | return; |
||
2121 | } |
||
2122 | } |
||
2123 | |||
2124 | |||
2125 | static void |
||
2126 | terratv_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2127 | { |
||
2128 | unsigned int con = 0; |
||
2129 | |||
2130 | if (set) { |
||
2131 | btor(0x180000, BT848_GPIO_OUT_EN); |
||
2132 | if (v->mode & VIDEO_SOUND_LANG2) |
||
2133 | con = 0x080000; |
||
2134 | if (v->mode & VIDEO_SOUND_STEREO) |
||
2135 | con = 0x180000; |
||
2136 | gpioaor(con, ~0x180000); |
||
2137 | if (bttv_gpio) |
||
2138 | bttv_gpio_tracking(btv,"terratv"); |
||
2139 | } else { |
||
2140 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2141 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2142 | } |
||
2143 | } |
||
2144 | |||
2145 | static void |
||
2146 | winfast2000_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2147 | { |
||
2148 | unsigned long val = 0; |
||
2149 | |||
2150 | if (set) { |
||
2151 | /*btor (0xc32000, BT848_GPIO_OUT_EN);*/ |
||
2152 | if (v->mode & VIDEO_SOUND_MONO) /* Mono */ |
||
2153 | val = 0x420000; |
||
2154 | if (v->mode & VIDEO_SOUND_LANG1) /* Mono */ |
||
2155 | val = 0x420000; |
||
2156 | if (v->mode & VIDEO_SOUND_LANG2) /* SAP */ |
||
2157 | val = 0x410000; |
||
2158 | if (v->mode & VIDEO_SOUND_STEREO) /* Stereo */ |
||
2159 | val = 0x020000; |
||
2160 | if (val) { |
||
2161 | gpioaor(val, ~0x430000); |
||
2162 | if (bttv_gpio) |
||
2163 | bttv_gpio_tracking(btv,"winfast2000"); |
||
2164 | } |
||
2165 | } else { |
||
2166 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2167 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2168 | } |
||
2169 | } |
||
2170 | |||
2171 | /* |
||
2172 | * Dariusz Kowalewski <darekk@automex.pl> |
||
2173 | * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM |
||
2174 | * revision 9B has on-board TDA9874A sound decoder). |
||
2175 | */ |
||
2176 | static void |
||
2177 | pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2178 | { |
||
2179 | unsigned int val = 0; |
||
2180 | |||
2181 | if (btv->radio) |
||
2182 | return; |
||
2183 | |||
2184 | if (set) { |
||
2185 | if (v->mode & VIDEO_SOUND_MONO) { |
||
2186 | val = 0x01; |
||
2187 | } |
||
2188 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
2189 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
2190 | val = 0x02; |
||
2191 | } |
||
2192 | if (val) { |
||
2193 | gpioaor(val, ~0x03); |
||
2194 | if (bttv_gpio) |
||
2195 | bttv_gpio_tracking(btv,"pvbt878p9b"); |
||
2196 | } |
||
2197 | } else { |
||
2198 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2199 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2200 | } |
||
2201 | } |
||
2202 | |||
2203 | /* |
||
2204 | * Dariusz Kowalewski <darekk@automex.pl> |
||
2205 | * sound control for FlyVideo 2000S (with tda9874 decoder) |
||
2206 | * based on pvbt878p9b_audio() - this is not tested, please fix!!! |
||
2207 | */ |
||
2208 | static void |
||
2209 | fv2000s_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2210 | { |
||
2211 | unsigned int val = 0xffff; |
||
2212 | |||
2213 | if (btv->radio) |
||
2214 | return; |
||
2215 | |||
2216 | if (set) { |
||
2217 | if (v->mode & VIDEO_SOUND_MONO) { |
||
2218 | val = 0x0000; |
||
2219 | } |
||
2220 | if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2)) |
||
2221 | || (v->mode & VIDEO_SOUND_STEREO)) { |
||
2222 | val = 0x1080; //-dk-???: 0x0880, 0x0080, 0x1800 ... |
||
2223 | } |
||
2224 | if (val != 0xffff) { |
||
2225 | gpioaor(val, ~0x1800); |
||
2226 | if (bttv_gpio) |
||
2227 | bttv_gpio_tracking(btv,"fv2000s"); |
||
2228 | } |
||
2229 | } else { |
||
2230 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2231 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2232 | } |
||
2233 | } |
||
2234 | |||
2235 | /* |
||
2236 | * sound control for Canopus WinDVR PCI |
||
2237 | * Masaki Suzuki <masaki@btree.org> |
||
2238 | */ |
||
2239 | static void |
||
2240 | windvr_audio(struct bttv *btv, struct video_audio *v, int set) |
||
2241 | { |
||
2242 | unsigned long val = 0; |
||
2243 | |||
2244 | if (set) { |
||
2245 | if (v->mode & VIDEO_SOUND_MONO) |
||
2246 | val = 0x040000; |
||
2247 | if (v->mode & VIDEO_SOUND_LANG1) |
||
2248 | val = 0; |
||
2249 | if (v->mode & VIDEO_SOUND_LANG2) |
||
2250 | val = 0x100000; |
||
2251 | if (v->mode & VIDEO_SOUND_STEREO) |
||
2252 | val = 0; |
||
2253 | if (val) { |
||
2254 | gpioaor(val, ~0x140000); |
||
2255 | if (bttv_gpio) |
||
2256 | bttv_gpio_tracking(btv,"windvr"); |
||
2257 | } |
||
2258 | } else { |
||
2259 | v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO | |
||
2260 | VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2; |
||
2261 | } |
||
2262 | } |
||
2263 | |||
2264 | /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas] |
||
2265 | * |
||
2266 | * This is needed because rv605 don't use a normal multiplex, but a crosspoint |
||
2267 | * switch instead (CD22M3494E). This IC can have multiple active connections |
||
2268 | * between Xn (input) and Yn (output) pins. We need to clear any existing |
||
2269 | * connection prior to establish a new one, pulsing the STROBE pin. |
||
2270 | * |
||
2271 | * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin. |
||
2272 | * GPIO pins are wired as: |
||
2273 | * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler) |
||
2274 | * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler) |
||
2275 | * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler) |
||
2276 | * GPIO[8] - - P3[5] (microcontroler) |
||
2277 | * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler) |
||
2278 | * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler) |
||
2279 | * GPINTR - - P3[4] (microcontroler) |
||
2280 | * |
||
2281 | * The microcontroler is a 80C32 like. It should be possible to change xpoint |
||
2282 | * configuration either directly (as we are doing) or using the microcontroler |
||
2283 | * which is also wired to I2C interface. I have no further info on the |
||
2284 | * microcontroler features, one would need to disassembly the firmware. |
||
2285 | * note: the vendor refused to give any information on this product, all |
||
2286 | * that stuff was found using a multimeter! :) |
||
2287 | */ |
||
2288 | static void rv605_muxsel(struct bttv *btv, unsigned int input) |
||
2289 | { |
||
2290 | /* reset all conections */ |
||
2291 | gpioaor(0x200,~0x200); |
||
2292 | udelay(1000); |
||
2293 | gpioaor(0x000,~0x200); |
||
2294 | udelay(1000); |
||
2295 | |||
2296 | /* create a new conection */ |
||
2297 | gpioaor(0x080,~0x480); |
||
2298 | gpioaor(0x480,~0x480); |
||
2299 | udelay(1000); |
||
2300 | gpioaor(0x080,~0x480); |
||
2301 | udelay(1000); |
||
2302 | } |
||
2303 | |||
2304 | |||
2305 | /* ----------------------------------------------------------------------- */ |
||
2306 | /* motherboard chipset specific stuff */ |
||
2307 | |||
2308 | void bttv_check_chipset(void) |
||
2309 | { |
||
2310 | int pcipci_fail = 0; |
||
2311 | struct pci_dev dev; |
||
2312 | BYTE bus, dv; |
||
2313 | |||
181 | giacomo | 2314 | triton1 = 0; |
2315 | vsfx = 0; |
||
170 | giacomo | 2316 | |
2317 | if (pci_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, 0, &bus, &dv)) pcipci_fail = 1; |
||
2318 | if (pci_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, 0, &bus, &dv)) pcipci_fail = 1; |
||
2319 | if (pci_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, 0, &bus, &dv)) triton1 = 1; |
||
2320 | if (pci_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_0, 0, &bus, &dv)) triton1 = 1; |
||
2321 | if (pci_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, 0, &bus, &dv)) triton1 = 1; |
||
2322 | if (pci_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, 0, &bus, &dv)) vsfx = 1; |
||
2323 | |||
2324 | /* print warnings about any quirks found */ |
||
2325 | if (triton1) |
||
2326 | printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n"); |
||
2327 | if (vsfx) |
||
2328 | printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); |
||
2329 | |||
2330 | if (pcipci_fail) { |
||
2331 | printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); |
||
2332 | if (-1 == no_overlay) { |
||
2333 | printk(KERN_WARNING "bttv: going to disable overlay.\n"); |
||
2334 | no_overlay = 1; |
||
2335 | } |
||
2336 | } |
||
2337 | |||
2338 | if(pci_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, 0, &bus, &dv)) { |
||
2339 | unsigned char b; |
||
2340 | dev.bus->number = bus; |
||
2341 | dev.devfn = dv; |
||
2342 | pci_read_config_byte(&dev, 0x53, &b); |
||
2343 | if (bttv_debug) |
||
2344 | printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, " |
||
2345 | "bufcon=0x%02x\n",b); |
||
2346 | } |
||
2347 | |||
2348 | } |
||
2349 | |||
2350 | int bttv_handle_chipset(struct bttv *btv) |
||
2351 | { |
||
2352 | unsigned char command; |
||
2353 | |||
2354 | if (!triton1 && !vsfx) |
||
2355 | return 0; |
||
2356 | |||
2357 | if (bttv_verbose) { |
||
2358 | if (triton1) |
||
2359 | printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->nr); |
||
2360 | if (vsfx && btv->id >= 878) |
||
2361 | printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->nr); |
||
2362 | } |
||
2363 | |||
2364 | if (btv->id < 878) { |
||
2365 | /* bt848 (mis)uses a bit in the irq mask for etbf */ |
||
2366 | if (triton1) |
||
2367 | btv->triton1 = BT848_INT_ETBF; |
||
2368 | } else { |
||
2369 | /* bt878 has a bit in the pci config space for it */ |
||
2370 | pci_read_config_byte(btv->dev, BT878_DEVCTRL, &command); |
||
2371 | if (triton1) |
||
2372 | command |= BT878_EN_TBFX; |
||
2373 | if (vsfx) |
||
2374 | command |= BT878_EN_VSFX; |
||
2375 | pci_write_config_byte(btv->dev, BT878_DEVCTRL, command); |
||
2376 | } |
||
2377 | return 0; |
||
2378 | } |
||
2379 |