Lines Matching +full:ati +full:- +full:target
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 bttv-cards.c
6 this file has configuration information - card-specific stuff
9 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
10 & Marcus Metzler (mocm@thp.uni-koeln.de)
11 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
31 #include <media/v4l2-common.h>
33 #include "bttv-audio-hook.h"
84 int no_overlay=-1;
86 static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
87 static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
88 static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
89 static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90 static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93 static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
124 "\t\t-1 = no audio\n"
139 /* ----------------------------------------------------------------------- */
148 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
150 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
151 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
152 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
153 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
154 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
155 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
157 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
158 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
165 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
166 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
167 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
168 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
182 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
221 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
222 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
223 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
224 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
226 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
227 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
228 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
229 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
231 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
232 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
233 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
234 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
235 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
236 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
237 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
238 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
239 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
240 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
242 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
243 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
244 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
258 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
259 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
260 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
261 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
262 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
263 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
266 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
289 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
313 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
316 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
317 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
318 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
319 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
320 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
324 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
325 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
326 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
327 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
328 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
329 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
331 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
332 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
333 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
334 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
335 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
336 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
337 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
338 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
339 { 0x3116f200, BTTV_BOARD_TVT_TD3116, "Tongwei Video Technology TD-3116" },
340 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR, "Aposonic W-DVR" },
341 { 0, -1, NULL }
344 /* ----------------------------------------------------------------------- */
348 /* ---- card 0x00 ---------------------------------- */
397 /* ---- card 0x04 ---------------------------------- */
436 .name = "MATRIX-Vision MV-Delta",
447 /* ---- card 0x08 ---------------------------------- */
499 /* ---- card 0x0c ---------------------------------- */
540 .name = "Zoltrix TV-Max",
552 /* ---- card 0x10 ---------------------------------- */
560 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
605 /* ---- card 0x14 ---------------------------------- */
657 /* ---- card 0x18 ---------------------------------- */
674 ….name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boost…
712 /* ---- card 0x1c ---------------------------------- */
727 gpio00: i2c-sda
728 gpio01: i2c-scl
729 gpio02: om5610-data
730 gpio03: om5610-clk
731 gpio04: om5610-wre
732 gpio05: om5610-stereo
733 gpio06: rds6588-davn
740 gpio16: u2-A0 (1st 4052bt)
741 gpio17: u2-A1
742 gpio18: u2-nEN
743 gpio19: u4-A0 (2nd 4052)
744 gpio20: u4-A1
745 u4-nEN - GND
758 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
797 /* ---- card 0x20 ---------------------------------- */
834 gpio23 -- hef4052:nEnable (0x800000)
835 gpio12 -- hef4052:A1
836 gpio13 -- hef4052:A0
865 /* ---- card 0x24 ---------------------------------- */
922 /* ---- card 0x28 ---------------------------------- */
979 /* ---- card 0x2c ---------------------------------- */
981 .name = "Sigma TVII-FM",
995 .name = "MATRIX-Vision MV-Delta 2",
1037 /* ---- card 0x30 ---------------------------------- */
1052 .name = "IODATA GV-BCTV3/PCI",
1066 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1105 /* ---- card 0x34 ---------------------------------- */
1146 /* Tim Röstermundt <rosterm@uni-muenster.de>
1183 /* ---- card 0x38 ---------------------------------- */
1244 /* ---- card 0x3c ---------------------------------- */
1291 .name = "ATI TV-Wonder",
1304 /* ---- card 0x40 ---------------------------------- */
1307 .name = "ATI TV-Wonder VE",
1329 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1354 .name = "IODATA GV-BCTV4/PCI",
1368 /* ---- card 0x44 ---------------------------------- */
1382 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1402 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1422 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1439 GPIO8-15: vrd866b ?
1455 /* ---- card 0x48 ---------------------------------- */
1458 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1477 GPIO8-15: vrd866b
1495 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1513 ….gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remot…
1523 /* ---- card 0x4c ---------------------------------- */
1552 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1577 GPIO3-7: n.c.
1578 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1580 GPIO16-21: n.c.
1585 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1595 /* ---- card 0x50 ---------------------------------- */
1610 .name = "IODATA GV-BCTV5/PCI",
1626 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1627 .video_inputs = 4, /* id-inputs-clock */
1638 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1650 /* ---- card 0x54 ---------------------------------- */
1652 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1664 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1676 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1688 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1700 /* ---- card 0x58 ---------------------------------- */
1702 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1714 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1748 /* ---- card 0x5C ---------------------------------- */
1762 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1811 /* ---- card 0x60 ---------------------------------- */
1839 /* Luc Van Hoeylandt <luc@e-magic.be> */
1855 .name = "AD-TVK503", /* 0x63 */
1871 /* ---- card 0x64 ---------------------------------- */
1884 - card lacks subsystem ID
1885 - stereo variant w/ daughter board with tda9874a @0xb0
1886 - Audio Routing:
1889 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1915 .name = "IVC-200",
1926 .name = "IVCE-8784",
1937 .name = "Grand X-Guard / Trust 814PCI",
1951 /* ---- card 0x68 ---------------------------------- */
1968 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1983 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
1995 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
2007 /* ---- card 0x6c ---------------------------------- */
2009 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2023 .name = "PHYTEC VD-009 Combi (bt878)",
2037 .name = "IVC-100",
2048 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2049 .name = "IVC-120G",
2063 /* ---- card 0x70 ---------------------------------- */
2065 .name = "pcHDTV HD-2000 TV",
2097 .name = "Teppro TEV-560/InterVision IV-560",
2109 /* ---- card 0x74 ---------------------------------- */
2162 /* ---- card 0x78 ---------------------------------- */
2190 ….gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs t…
2217 .name = "AVerMedia AVerTV DVB-T 771",
2230 /* ---- card 0x7c ---------------------------------- */
2233 …/* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see a…
2234 .name = "AverMedia AverTV DVB-T 761",
2237 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2248 /* andre.schwarz@matrix-vision.de */
2249 .name = "MATRIX Vision Sigma-SQ",
2263 /* andre.schwarz@matrix-vision.de */
2264 .name = "MATRIX Vision Sigma-SLC",
2292 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2296 /* ---- card 0x80 ---------------------------------- */
2299 .name = "DViCO FusionHDTV DVB-T Lite",
2310 .name = "V-Gear MyVCD",
2369 /* GPIO bits 0-9 used for analog switch:
2370 * 00 - 03: camera selector
2371 * 04 - 06: channel (controller) selector
2372 * 07: data (1->on, 0->off)
2406 /* ---- card 0x86---------------------------------- */
2419 /* ---- card 0x87---------------------------------- */
2423 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
2436 /* ---- card 0x88---------------------------------- */
2452 /* ---- card 0x89 ---------------------------------- */
2468 /* ---- card 0x8a ---------------------------------- */
2470 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2486 /* ---- card 0x8b ---------------------------------- */
2489 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2504 /* ---- card 0x8c ---------------------------------- */
2508 an 18-bit stereo A/D (CS5331A), which has:
2532 /* ---- card 0x8d ---------------------------------- */
2546 /* ---- card 0x8e ---------------------------------- */
2548 .name = "Sabrent TV-FM (bttv version)",
2562 /* ---- card 0x8f ---------------------------------- */
2569 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2615 /* ---- card 0x94---------------------------------- */
2630 /* ---- card 0x95---------------------------------- */
2632 .name = "Typhoon TV-Tuner PCI (50684)",
2646 .name = "Geovision GV-600",
2663 .name = "Kozumi KTV-01C",
2678 /* Encore TV Tuner Pro ENL TV-FM-2
2680 .name = "Encore ENL TV-FM-2",
2684 /* bit 6 -> IR disabled
2685 bit 18/17 = 00 -> mute
2686 01 -> enable external audio input
2687 10 -> internal audio input (mono?)
2688 11 -> internal audio input
2702 .name = "PHYTEC VD-012 (bt878)",
2715 .name = "PHYTEC VD-012-X1 (bt878)",
2728 .name = "PHYTEC VD-012-X2 (bt878)",
2742 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2745 * This is the first BT878A chip of the GV-800(S). It's the
2752 .name = "Geovision GV-800(S) (master)",
2769 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2772 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2776 .name = "Geovision GV-800(S) (slave)",
2803 /* ---- card 0xa0---------------------------------- */
2805 .name = "Tongwei Video Technology TD-3116",
2815 .name = "Aposonic W-DVR",
2852 .name = "Kworld V-Stream Xpert TV PVR878",
2866 /* ---- card 0xa6---------------------------------- */
2868 /* PCI-8604PW with special unlock sequence */
2869 .name = "PCI-8604PW",
2875 * as the on-board BNCs */
2886 /* ----------------------------------------------------------------------- */
2899 btv->cardid = btv->c.pci->subsystem_device << 16; in bttv_idcard()
2900 btv->cardid |= btv->c.pci->subsystem_vendor; in bttv_idcard()
2902 if (0 != btv->cardid && 0xffffffff != btv->cardid) { in bttv_idcard()
2904 for (type = -1, i = 0; cards[i].id != 0; i++) in bttv_idcard()
2905 if (cards[i].id == btv->cardid) in bttv_idcard()
2908 if (type != -1) { in bttv_idcard()
2911 btv->c.nr, cards[type].name, cards[type].cardnr, in bttv_idcard()
2912 btv->cardid & 0xffff, in bttv_idcard()
2913 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2914 btv->c.type = cards[type].cardnr; in bttv_idcard()
2918 btv->c.nr, btv->cardid & 0xffff, in bttv_idcard()
2919 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2920 …pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kerne… in bttv_idcard()
2925 if (card[btv->c.nr] < bttv_num_tvcards) in bttv_idcard()
2926 btv->c.type=card[btv->c.nr]; in bttv_idcard()
2930 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type, in bttv_idcard()
2931 card[btv->c.nr] < bttv_num_tvcards in bttv_idcard()
2940 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2941 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i]; in bttv_idcard()
2946 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2947 bttv_tvcards[btv->c.type].gpiomux[i] = audioall; in bttv_idcard()
2950 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits; in bttv_idcard()
2952 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask); in bttv_idcard()
2953 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2955 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]); in bttv_idcard()
2967 int type = -1; in identify_by_eeprom()
2976 if (-1 != type) { in identify_by_eeprom()
2977 btv->c.type = type; in identify_by_eeprom()
2979 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type); in identify_by_eeprom()
2997 * GPIO14-12: n.c. in flyvideo_gpio()
3011 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */ in flyvideo_gpio()
3017 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */ in flyvideo_gpio()
3023 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr); in flyvideo_gpio()
3041 btv->c.nr, has_radio ? "yes" : "no", in flyvideo_gpio()
3044 btv->c.nr, is_lr90 ? "yes" : "no", in flyvideo_gpio()
3049 btv->tuner_type = tuner_type; in flyvideo_gpio()
3050 btv->has_radio = has_radio; in flyvideo_gpio()
3056 btv->audio_mode_gpio = lt9415_audio; in flyvideo_gpio()
3057 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */ in flyvideo_gpio()
3072 id = ((gpio>>10) & 63) -1; in miro_pinnacle_gpio()
3075 btv->tuner_type = miro_tunermap[id]; in miro_pinnacle_gpio()
3077 btv->has_radio = 1; in miro_pinnacle_gpio()
3079 btv->has_tea575x = 1; in miro_pinnacle_gpio()
3080 btv->tea_gpio.wren = 6; in miro_pinnacle_gpio()
3081 btv->tea_gpio.most = 7; in miro_pinnacle_gpio()
3082 btv->tea_gpio.clk = 8; in miro_pinnacle_gpio()
3083 btv->tea_gpio.data = 9; in miro_pinnacle_gpio()
3087 btv->has_radio = 0; in miro_pinnacle_gpio()
3089 if (-1 != msp) { in miro_pinnacle_gpio()
3090 if (btv->c.type == BTTV_BOARD_MIRO) in miro_pinnacle_gpio()
3091 btv->c.type = BTTV_BOARD_MIROPRO; in miro_pinnacle_gpio()
3092 if (btv->c.type == BTTV_BOARD_PINNACLE) in miro_pinnacle_gpio()
3093 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3096 btv->c.nr, id+1, btv->tuner_type, in miro_pinnacle_gpio()
3097 !btv->has_radio ? "no" : in miro_pinnacle_gpio()
3098 (btv->has_tea575x ? "tea575x" : "fmtuner"), in miro_pinnacle_gpio()
3099 (-1 == msp) ? "no" : "yes"); in miro_pinnacle_gpio()
3102 id = 63 - id; in miro_pinnacle_gpio()
3103 btv->has_radio = 0; in miro_pinnacle_gpio()
3107 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3111 btv->has_radio = 1; in miro_pinnacle_gpio()
3112 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3116 btv->has_radio = 1; in miro_pinnacle_gpio()
3117 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3121 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3125 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3129 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3133 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3139 if (-1 != msp) in miro_pinnacle_gpio()
3140 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3142 btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); in miro_pinnacle_gpio()
3143 btv->tuner_type = TUNER_MT2032; in miro_pinnacle_gpio()
3166 * the eagles does not use the standard muxsel-bits but
3189 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3195 IN - sensor inputs, INx - sensor inputs and TI XORed together
3196 O1,O2,O3 - alarm outputs (relays)
3235 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3237 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3238 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3267 /* ----------------------------------------------------------------------- */
3272 * BT878A has a audio-reset register. in bttv_reset_audio()
3274 * function-0 (video capture) address space. in bttv_reset_audio()
3275 * 2. It is enough to do this once per power-up of the card. in bttv_reset_audio()
3276 * 3. There is a typo in the Conexant doc -- it is not at in bttv_reset_audio()
3277 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!). in bttv_reset_audio()
3278 * --//Shrikumar 030609 in bttv_reset_audio()
3280 if (btv->id != 878) in bttv_reset_audio()
3284 pr_debug("%d: BT878A ARESET\n", btv->c.nr); in bttv_reset_audio()
3290 /* initialization part one -- before registering i2c bus */
3293 switch (btv->c.type) { in bttv_init_card1()
3311 btv->use_i2c_hw = 1; in bttv_init_card1()
3321 if (!bttv_tvcards[btv->c.type].has_dvb) in bttv_init_card1()
3325 /* initialization part two -- after registering i2c bus */
3328 btv->tuner_type = UNSET; in bttv_init_card2()
3330 if (BTTV_BOARD_UNKNOWN == btv->c.type) { in bttv_init_card2()
3335 switch (btv->c.type) { in bttv_init_card2()
3375 btv->has_radio = 1; in bttv_init_card2()
3376 btv->has_tea575x = 1; in bttv_init_card2()
3377 btv->tea_gpio.wren = 5; in bttv_init_card2()
3378 btv->tea_gpio.most = 6; in bttv_init_card2()
3379 btv->tea_gpio.clk = 3; in bttv_init_card2()
3380 btv->tea_gpio.data = 4; in bttv_init_card2()
3388 if (btv->cardid == 0x3002144f) { in bttv_init_card2()
3389 btv->has_radio=1; in bttv_init_card2()
3391 btv->c.nr); in bttv_init_card2()
3395 if (btv->cardid == 0x3060121a) { in bttv_init_card2()
3398 btv->has_radio=0; in bttv_init_card2()
3399 btv->tuner_type=TUNER_TEMIC_NTSC; in bttv_init_card2()
3439 if (!(btv->id==848 && btv->revision==0x11)) { in bttv_init_card2()
3441 if (PLL_28 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3442 btv->pll.pll_ifreq=28636363; in bttv_init_card2()
3443 btv->pll.pll_crystal=BT848_IFORM_XT0; in bttv_init_card2()
3445 if (PLL_35 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3446 btv->pll.pll_ifreq=35468950; in bttv_init_card2()
3447 btv->pll.pll_crystal=BT848_IFORM_XT1; in bttv_init_card2()
3449 if (PLL_14 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3450 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3451 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3454 switch (pll[btv->c.nr]) { in bttv_init_card2()
3456 btv->pll.pll_crystal = 0; in bttv_init_card2()
3457 btv->pll.pll_ifreq = 0; in bttv_init_card2()
3458 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3462 btv->pll.pll_ifreq = 28636363; in bttv_init_card2()
3463 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3464 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3468 btv->pll.pll_ifreq = 35468950; in bttv_init_card2()
3469 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3470 btv->pll.pll_crystal = BT848_IFORM_XT1; in bttv_init_card2()
3474 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3475 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3476 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3480 btv->pll.pll_current = -1; in bttv_init_card2()
3483 if (UNSET != bttv_tvcards[btv->c.type].tuner_type) in bttv_init_card2()
3484 if (UNSET == btv->tuner_type) in bttv_init_card2()
3485 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; in bttv_init_card2()
3486 if (UNSET != tuner[btv->c.nr]) in bttv_init_card2()
3487 btv->tuner_type = tuner[btv->c.nr]; in bttv_init_card2()
3489 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3490 pr_info("%d: tuner absent\n", btv->c.nr); in bttv_init_card2()
3491 else if (btv->tuner_type == UNSET) in bttv_init_card2()
3492 pr_warn("%d: tuner type unset\n", btv->c.nr); in bttv_init_card2()
3494 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type); in bttv_init_card2()
3497 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr); in bttv_init_card2()
3499 btv->c.nr); in bttv_init_card2()
3502 if (UNSET == btv->tuner_type) in bttv_init_card2()
3503 btv->tuner_type = TUNER_ABSENT; in bttv_init_card2()
3505 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ? in bttv_init_card2()
3506 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET; in bttv_init_card2()
3507 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ? in bttv_init_card2()
3508 UNSET : bttv_tvcards[btv->c.type].svhs; in bttv_init_card2()
3509 if (svhs[btv->c.nr] != UNSET) in bttv_init_card2()
3510 btv->svhs = svhs[btv->c.nr]; in bttv_init_card2()
3511 if (remote[btv->c.nr] != UNSET) in bttv_init_card2()
3512 btv->has_remote = remote[btv->c.nr]; in bttv_init_card2()
3514 if (bttv_tvcards[btv->c.type].has_radio) in bttv_init_card2()
3515 btv->has_radio = 1; in bttv_init_card2()
3516 if (bttv_tvcards[btv->c.type].has_remote) in bttv_init_card2()
3517 btv->has_remote = 1; in bttv_init_card2()
3518 if (!bttv_tvcards[btv->c.type].no_gpioirq) in bttv_init_card2()
3519 btv->gpioirq = 1; in bttv_init_card2()
3520 if (bttv_tvcards[btv->c.type].volume_gpio) in bttv_init_card2()
3521 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio; in bttv_init_card2()
3522 if (bttv_tvcards[btv->c.type].audio_mode_gpio) in bttv_init_card2()
3523 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio; in bttv_init_card2()
3525 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3528 if (btv->has_saa6588 || saa6588[btv->c.nr]) { in bttv_init_card2()
3537 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3538 &btv->c.i2c_adap, "saa6588", 0, addrs); in bttv_init_card2()
3539 btv->has_saa6588 = (sd != NULL); in bttv_init_card2()
3547 switch (audiodev[btv->c.nr]) { in bttv_init_card2()
3548 case -1: in bttv_init_card2()
3562 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3563 &btv->c.i2c_adap, "msp3400", 0, addrs); in bttv_init_card2()
3564 if (btv->sd_msp34xx) in bttv_init_card2()
3576 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3577 &btv->c.i2c_adap, "tda7432", 0, addrs)) in bttv_init_card2()
3584 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3585 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3586 if (btv->sd_tvaudio) in bttv_init_card2()
3592 pr_warn("%d: unknown audiodev value!\n", btv->c.nr); in bttv_init_card2()
3602 if (!bttv_tvcards[btv->c.type].no_msp34xx) { in bttv_init_card2()
3603 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3604 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3606 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { in bttv_init_card2()
3607 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3608 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3613 if (btv->sd_msp34xx) in bttv_init_card2()
3617 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3618 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3619 if (btv->sd_tvaudio) { in bttv_init_card2()
3622 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3623 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3627 if (!bttv_tvcards[btv->c.type].no_tda7432) { in bttv_init_card2()
3633 btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3634 &btv->c.i2c_adap, "tda7432", 0, addrs); in bttv_init_card2()
3635 if (btv->sd_tda7432) in bttv_init_card2()
3638 if (btv->sd_tvaudio) in bttv_init_card2()
3642 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr); in bttv_init_card2()
3651 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) in bttv_init_tuner()
3652 addr = bttv_tvcards[btv->c.type].tuner_addr; in bttv_init_tuner()
3654 if (btv->tuner_type != TUNER_ABSENT) { in bttv_init_tuner()
3658 if (btv->has_radio) in bttv_init_tuner()
3659 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3660 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3662 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3663 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3665 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3666 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3670 tun_setup.type = btv->tuner_type; in bttv_init_tuner()
3673 if (btv->has_radio) in bttv_init_tuner()
3679 if (btv->tda9887_conf) { in bttv_init_tuner()
3683 tda9887_cfg.priv = &btv->tda9887_conf; in bttv_init_tuner()
3689 /* ----------------------------------------------------------------------- */
3694 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; in modtec_eeprom()
3696 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3698 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I; in modtec_eeprom()
3700 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3702 btv->tuner_type=TUNER_PHILIPS_NTSC; in modtec_eeprom()
3704 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3707 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3716 btv->tuner_type = tv.tuner_type; in hauppauge_eeprom()
3717 btv->has_radio = tv.has_radio; in hauppauge_eeprom()
3720 btv->c.nr, tv.model); in hauppauge_eeprom()
3728 btv->c.nr, in hauppauge_eeprom()
3729 bttv_tvcards[btv->c.type].name, in hauppauge_eeprom()
3731 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; in hauppauge_eeprom()
3736 btv->radio_uses_msp_demodulator = 1; in hauppauge_eeprom()
3739 /* ----------------------------------------------------------------------- */
3743 struct bttv *btv = tea->private_data; in bttv_tea575x_set_pins()
3744 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_pins()
3752 if (btv->mbox_ior) { in bttv_tea575x_set_pins()
3754 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0); in bttv_tea575x_set_pins()
3757 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_set_pins()
3758 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_set_pins()
3764 struct bttv *btv = tea->private_data; in bttv_tea575x_get_pins()
3765 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_get_pins()
3769 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3771 gpio_bits(btv->mbox_ior | btv->mbox_csel, 0); in bttv_tea575x_get_pins()
3775 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3777 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_get_pins()
3778 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_get_pins()
3791 struct bttv *btv = tea->private_data; in bttv_tea575x_set_direction()
3792 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_direction()
3811 btv->tea.private_data = btv; in tea575x_init()
3812 btv->tea.ops = &bttv_tea_ops; in tea575x_init()
3813 if (!snd_tea575x_hw_init(&btv->tea)) { in tea575x_init()
3814 pr_info("%d: detected TEA575x radio\n", btv->c.nr); in tea575x_init()
3815 btv->tea.mute = false; in tea575x_init()
3819 btv->has_tea575x = 0; in tea575x_init()
3820 btv->has_radio = 0; in tea575x_init()
3822 return -ENODEV; in tea575x_init()
3825 /* ----------------------------------------------------------------------- */
3829 btv->has_radio = 1; in terratec_active_radio_upgrade()
3830 btv->has_tea575x = 1; in terratec_active_radio_upgrade()
3831 btv->tea_gpio.wren = 4; in terratec_active_radio_upgrade()
3832 btv->tea_gpio.most = 5; in terratec_active_radio_upgrade()
3833 btv->tea_gpio.clk = 3; in terratec_active_radio_upgrade()
3834 btv->tea_gpio.data = 2; in terratec_active_radio_upgrade()
3836 btv->mbox_iow = 1 << 8; in terratec_active_radio_upgrade()
3837 btv->mbox_ior = 1 << 9; in terratec_active_radio_upgrade()
3838 btv->mbox_csel = 1 << 10; in terratec_active_radio_upgrade()
3841 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr); in terratec_active_radio_upgrade()
3842 btv->has_saa6588 = 1; in terratec_active_radio_upgrade()
3849 /* ----------------------------------------------------------------------- */
3852 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3855 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3906 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); in pvr_boot()
3908 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr); in pvr_boot()
3911 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); in pvr_boot()
3913 btv->c.nr, (rc < 0) ? "failed" : "ok"); in pvr_boot()
3918 /* ----------------------------------------------------------------------- */
3925 int cardid = -1; in osprey_eeprom()
3928 if (btv->c.type == BTTV_BOARD_UNKNOWN) { in osprey_eeprom()
3938 serial *= 10, serial += ee[i] - '0'; in osprey_eeprom()
4010 btv->c.nr, type); in osprey_eeprom()
4017 btv->c.nr, cardid, in osprey_eeprom()
4020 if (cardid<0 || btv->c.type == cardid) in osprey_eeprom()
4024 if (card[btv->c.nr] < bttv_num_tvcards) { in osprey_eeprom()
4026 btv->c.nr); in osprey_eeprom()
4029 btv->c.nr, btv->c.type, cardid); in osprey_eeprom()
4030 btv->c.type = cardid; in osprey_eeprom()
4034 /* ----------------------------------------------------------------------- */
4038 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
4039 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
4059 btv->has_remote = (eeprom_data[0x42] & 0x01); in avermedia_eeprom()
4070 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */ in avermedia_eeprom()
4073 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]); in avermedia_eeprom()
4075 btv->tuner_type = tuner_type; in avermedia_eeprom()
4081 btv->has_remote ? "yes" : "no"); in avermedia_eeprom()
4087 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
4095 if (btv->audio_input == TVAUDIO_INPUT_TUNER) { in bttv_tda9880_setnorm()
4096 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN) in bttv_tda9880_setnorm()
4102 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits); in bttv_tda9880_setnorm()
4128 btv->c.nr, pin); in boot_msp34xx()
4131 /* ----------------------------------------------------------------------- */
4132 /* Imagenation L-Model PXC200 Framegrabber */
4145 /* Initialise GPIO-connevted stuff */ in init_PXC200()
4159 remember the EN is reverse logic --> in init_PXC200()
4172 * same chips - but the R/W bit is included in the address in init_PXC200()
4178 /* First of all, enable the clock line. This is used in the PXC200-F */ in init_PXC200()
4185 * value sent to the GPIO-connected stuff in init_PXC200()
4194 if (tmp != -1) { in init_PXC200()
4205 /* ----------------------------------------------------------------------- */
4207 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4213 * - 0x0E
4214 * - sleep 1ms
4215 * - 0x10 + 0x0E
4216 * - sleep 10ms
4217 * - 0x0E
4219 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4223 * - write 0x4400 + 0x0E
4224 * - sleep 10ms
4225 * - write 0x4410 + 0x0E
4226 * - sleep 1ms
4227 * - write 0x0E
4229 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
4232 /* ----------------------------------------------------------------------- */
4239 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n", in init_RTV24()
4240 btv->c.nr); in init_RTV24()
4253 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n", in init_RTV24()
4254 btv->c.nr, dataRead); in init_RTV24()
4266 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n", in init_RTV24()
4267 btv->c.nr, dataRead); in init_RTV24()
4272 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr); in init_RTV24()
4277 /* ----------------------------------------------------------------------- */
4279 * The PCI-8604PW contains a CPLD, probably an ispMACH 4A, that filters
4297 /* ----------------------------------------------------------------------- */
4303 if ((PCI_SLOT(btv->c.pci->devfn) & ~3) != 0xC) { in init_PCI8604PW()
4304 pr_warn("This is not a PCI-8604PW\n"); in init_PCI8604PW()
4308 if (PCI_SLOT(btv->c.pci->devfn) != 0xD) in init_PCI8604PW()
4321 pr_debug("PCI-8604PW in state %i, toggling pin\n", in init_PCI8604PW()
4329 pr_info("PCI-8604PW unlocked\n"); in init_PCI8604PW()
4337 pr_err("PCI-8604PW locked until reset\n"); in init_PCI8604PW()
4340 pr_err("PCI-8604PW in unknown state %i\n", state); in init_PCI8604PW()
4357 pr_err("PCI-8604PW invalid transition %i -> %i\n", in init_PCI8604PW()
4374 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4375 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4376 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4377 * GPIO[8] - - P3[5] (microcontroller)
4378 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4379 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4380 * GPINTR - - P3[4] (microcontroller)
4428 * GPIO[16:19] - Video input selection
4429 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4430 * GPIO[?:?] - Digital I/O.
4451 * The following routines for the Kodicom-4400r get a little mind-twisting.
4469 * is routed to which controller. The switch comprises an X-address
4470 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4471 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4495 * requested camera number (0 - 15).
4503 mctlr = master[btv->c.nr]; in kodicom4400r_muxsel()
4507 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */ in kodicom4400r_muxsel()
4511 if (mctlr->sw_status[yaddr] != xaddr) in kodicom4400r_muxsel()
4514 kodicom4400r_write(mctlr, mctlr->sw_status[yaddr], yaddr, 0); in kodicom4400r_muxsel()
4515 mctlr->sw_status[yaddr] = xaddr; in kodicom4400r_muxsel()
4535 btv->sw_status[ix] = ix; in kodicom4400r_init()
4543 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3)) in kodicom4400r_init()
4545 master[btv->c.nr-1] = btv; in kodicom4400r_init()
4546 master[btv->c.nr] = btv; in kodicom4400r_init()
4547 master[btv->c.nr+1] = btv; in kodicom4400r_init()
4548 master[btv->c.nr+2] = btv; in kodicom4400r_init()
4551 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4588 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input); in picolo_tetra_muxsel()
4589 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/ in picolo_tetra_muxsel()
4611 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4612 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4613 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4614 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4618 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4633 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n", in ivc120_muxsel()
4634 btv->c.nr, input, matrix, key); in ivc120_muxsel()
4648 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */ in ivc120_muxsel()
4650 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */ in ivc120_muxsel()
4652 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */ in ivc120_muxsel()
4654 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */ in ivc120_muxsel()
4672 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4691 btv->c.nr, rc); in PXC200_muxsel()
4699 btv->c.nr, rc); in PXC200_muxsel()
4706 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */ in PXC200_muxsel()
4714 if (btv->cardid == PX_PXC200A_CARDID) { in PXC200_muxsel()
4721 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4732 * needed because bttv-driver sets mux before calling this function in PXC200_muxsel()
4734 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4739 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux); in PXC200_muxsel()
4746 if (input == btv->svhs) in phytec_muxsel()
4753 * GeoVision GV-800(S) functions
4758 * camera is routed to which controller. The switch comprises an X-address
4759 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4760 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4772 * GPIO bits 0-9 are used for the analog switch: in gv800s_write()
4773 * 00 - 03: camera selector in gv800s_write()
4774 * 04 - 06: 878A (controller) selector in gv800s_write()
4777 * 18: data (1->on, 0->off) in gv800s_write()
4792 * GeoVision GV-800(S) muxsel
4796 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4798 * The parameter 'input' is the requested camera number (0-4) on the controller.
4818 mctlr = master[btv->c.nr]; in gv800s_muxsel()
4823 yaddr = (btv->c.nr - mctlr->c.nr) & 3; in gv800s_muxsel()
4827 if (mctlr->sw_status[yaddr] != xaddr) { in gv800s_muxsel()
4829 gv800s_write(mctlr, mctlr->sw_status[yaddr], yaddr, 0); in gv800s_muxsel()
4830 mctlr->sw_status[yaddr] = xaddr; in gv800s_muxsel()
4835 /* GeoVision GV-800(S) "master" chip init */
4846 btv->sw_status[ix] = ix; in gv800s_init()
4853 if (btv->c.nr > BTTV_MAX-4) in gv800s_init()
4859 master[btv->c.nr] = btv; in gv800s_init()
4860 master[btv->c.nr+1] = btv; in gv800s_init()
4861 master[btv->c.nr+2] = btv; in gv800s_init()
4862 master[btv->c.nr+3] = btv; in gv800s_init()
4865 /* ----------------------------------------------------------------------- */
4873 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */ in bttv_check_chipset()
4921 btv->c.nr); in bttv_handle_chipset()
4922 if (vsfx && btv->id >= 878) in bttv_handle_chipset()
4923 pr_info("%d: enabling VSFX\n", btv->c.nr); in bttv_handle_chipset()
4926 btv->c.nr, latency); in bttv_handle_chipset()
4929 if (btv->id < 878) { in bttv_handle_chipset()
4932 btv->triton1 = BT848_INT_ETBF; in bttv_handle_chipset()
4935 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command); in bttv_handle_chipset()
4940 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command); in bttv_handle_chipset()
4943 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency); in bttv_handle_chipset()