Lines Matching +full:dsp +full:- +full:gpio20
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"
85 static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
86 static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
87 static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
88 static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
89 static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92 static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
122 "\t\t-1 = no audio\n"
137 /* ----------------------------------------------------------------------- */
146 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
148 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
149 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
150 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
151 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
152 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
153 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
163 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
164 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
165 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
166 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
180 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
219 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
220 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
221 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
222 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
224 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
225 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
226 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
227 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
229 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
230 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
231 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
232 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
233 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
234 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
235 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
236 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
237 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
238 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
239 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
240 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
242 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
258 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
259 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
260 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
261 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
264 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
287 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
311 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
314 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
315 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
316 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
317 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
318 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
322 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
323 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
324 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
325 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
326 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
327 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
329 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
330 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
331 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
332 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
333 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
334 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
335 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
336 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
337 { 0x3116f200, BTTV_BOARD_TVT_TD3116, "Tongwei Video Technology TD-3116" },
338 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR, "Aposonic W-DVR" },
339 { 0, -1, NULL }
342 /* ----------------------------------------------------------------------- */
346 /* ---- card 0x00 ---------------------------------- */
395 /* ---- card 0x04 ---------------------------------- */
434 .name = "MATRIX-Vision MV-Delta",
445 /* ---- card 0x08 ---------------------------------- */
497 /* ---- card 0x0c ---------------------------------- */
538 .name = "Zoltrix TV-Max",
550 /* ---- card 0x10 ---------------------------------- */
558 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
603 /* ---- card 0x14 ---------------------------------- */
655 /* ---- card 0x18 ---------------------------------- */
672 ….name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boost…
710 /* ---- card 0x1c ---------------------------------- */
725 gpio00: i2c-sda
726 gpio01: i2c-scl
727 gpio02: om5610-data
728 gpio03: om5610-clk
729 gpio04: om5610-wre
730 gpio05: om5610-stereo
731 gpio06: rds6588-davn
738 gpio16: u2-A0 (1st 4052bt)
739 gpio17: u2-A1
740 gpio18: u2-nEN
741 gpio19: u4-A0 (2nd 4052)
742 gpio20: u4-A1
743 u4-nEN - GND
756 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
795 /* ---- card 0x20 ---------------------------------- */
832 gpio23 -- hef4052:nEnable (0x800000)
833 gpio12 -- hef4052:A1
834 gpio13 -- hef4052:A0
863 /* ---- card 0x24 ---------------------------------- */
920 /* ---- card 0x28 ---------------------------------- */
977 /* ---- card 0x2c ---------------------------------- */
979 .name = "Sigma TVII-FM",
993 .name = "MATRIX-Vision MV-Delta 2",
1035 /* ---- card 0x30 ---------------------------------- */
1050 .name = "IODATA GV-BCTV3/PCI",
1064 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1082 GPIO20: U5.A1 (second hef4052bt)
1103 /* ---- card 0x34 ---------------------------------- */
1144 /* Tim Röstermundt <rosterm@uni-muenster.de>
1181 /* ---- card 0x38 ---------------------------------- */
1242 /* ---- card 0x3c ---------------------------------- */
1289 .name = "ATI TV-Wonder",
1302 /* ---- card 0x40 ---------------------------------- */
1305 .name = "ATI TV-Wonder VE",
1327 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1352 .name = "IODATA GV-BCTV4/PCI",
1366 /* ---- card 0x44 ---------------------------------- */
1380 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1400 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1420 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1437 GPIO8-15: vrd866b ?
1453 /* ---- card 0x48 ---------------------------------- */
1456 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1475 GPIO8-15: vrd866b
1476 GPIO20,22,23: R30,R29,R28
1493 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1511 ….gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remot…
1521 /* ---- card 0x4c ---------------------------------- */
1550 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1575 GPIO3-7: n.c.
1576 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1578 GPIO16-21: n.c.
1583 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1584 .name = "DSP Design TCVIDEO",
1593 /* ---- card 0x50 ---------------------------------- */
1608 .name = "IODATA GV-BCTV5/PCI",
1624 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1625 .video_inputs = 4, /* id-inputs-clock */
1636 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1648 /* ---- card 0x54 ---------------------------------- */
1650 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1662 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1674 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1686 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1698 /* ---- card 0x58 ---------------------------------- */
1700 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1712 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1746 /* ---- card 0x5C ---------------------------------- */
1760 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1809 /* ---- card 0x60 ---------------------------------- */
1837 /* Luc Van Hoeylandt <luc@e-magic.be> */
1853 .name = "AD-TVK503", /* 0x63 */
1869 /* ---- card 0x64 ---------------------------------- */
1882 - card lacks subsystem ID
1883 - stereo variant w/ daughter board with tda9874a @0xb0
1884 - Audio Routing:
1887 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1913 .name = "IVC-200",
1924 .name = "IVCE-8784",
1935 .name = "Grand X-Guard / Trust 814PCI",
1949 /* ---- card 0x68 ---------------------------------- */
1966 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1981 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
1993 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
2005 /* ---- card 0x6c ---------------------------------- */
2007 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2021 .name = "PHYTEC VD-009 Combi (bt878)",
2035 .name = "IVC-100",
2046 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2047 .name = "IVC-120G",
2061 /* ---- card 0x70 ---------------------------------- */
2063 .name = "pcHDTV HD-2000 TV",
2095 .name = "Teppro TEV-560/InterVision IV-560",
2107 /* ---- card 0x74 ---------------------------------- */
2160 /* ---- card 0x78 ---------------------------------- */
2188 ….gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs t…
2215 .name = "AVerMedia AVerTV DVB-T 771",
2228 /* ---- card 0x7c ---------------------------------- */
2231 …/* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see a…
2232 .name = "AverMedia AverTV DVB-T 761",
2235 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2246 /* andre.schwarz@matrix-vision.de */
2247 .name = "MATRIX Vision Sigma-SQ",
2261 /* andre.schwarz@matrix-vision.de */
2262 .name = "MATRIX Vision Sigma-SLC",
2290 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2294 /* ---- card 0x80 ---------------------------------- */
2297 .name = "DViCO FusionHDTV DVB-T Lite",
2308 .name = "V-Gear MyVCD",
2367 /* GPIO bits 0-9 used for analog switch:
2368 * 00 - 03: camera selector
2369 * 04 - 06: channel (controller) selector
2370 * 07: data (1->on, 0->off)
2404 /* ---- card 0x86---------------------------------- */
2417 /* ---- card 0x87---------------------------------- */
2421 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
2434 /* ---- card 0x88---------------------------------- */
2450 /* ---- card 0x89 ---------------------------------- */
2466 /* ---- card 0x8a ---------------------------------- */
2468 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2484 /* ---- card 0x8b ---------------------------------- */
2487 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2502 /* ---- card 0x8c ---------------------------------- */
2506 an 18-bit stereo A/D (CS5331A), which has:
2530 /* ---- card 0x8d ---------------------------------- */
2544 /* ---- card 0x8e ---------------------------------- */
2546 .name = "Sabrent TV-FM (bttv version)",
2560 /* ---- card 0x8f ---------------------------------- */
2567 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2613 /* ---- card 0x94---------------------------------- */
2628 /* ---- card 0x95---------------------------------- */
2630 .name = "Typhoon TV-Tuner PCI (50684)",
2644 .name = "Geovision GV-600",
2661 .name = "Kozumi KTV-01C",
2676 /* Encore TV Tuner Pro ENL TV-FM-2
2678 .name = "Encore ENL TV-FM-2",
2682 /* bit 6 -> IR disabled
2683 bit 18/17 = 00 -> mute
2684 01 -> enable external audio input
2685 10 -> internal audio input (mono?)
2686 11 -> internal audio input
2700 .name = "PHYTEC VD-012 (bt878)",
2713 .name = "PHYTEC VD-012-X1 (bt878)",
2726 .name = "PHYTEC VD-012-X2 (bt878)",
2740 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2743 * This is the first BT878A chip of the GV-800(S). It's the
2750 .name = "Geovision GV-800(S) (master)",
2767 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2770 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2774 .name = "Geovision GV-800(S) (slave)",
2801 /* ---- card 0xa0---------------------------------- */
2803 .name = "Tongwei Video Technology TD-3116",
2813 .name = "Aposonic W-DVR",
2850 .name = "Kworld V-Stream Xpert TV PVR878",
2864 /* ---- card 0xa6---------------------------------- */
2866 /* PCI-8604PW with special unlock sequence */
2867 .name = "PCI-8604PW",
2873 * as the on-board BNCs */
2884 /* ----------------------------------------------------------------------- */
2897 btv->cardid = btv->c.pci->subsystem_device << 16; in bttv_idcard()
2898 btv->cardid |= btv->c.pci->subsystem_vendor; in bttv_idcard()
2900 if (0 != btv->cardid && 0xffffffff != btv->cardid) { in bttv_idcard()
2902 for (type = -1, i = 0; cards[i].id != 0; i++) in bttv_idcard()
2903 if (cards[i].id == btv->cardid) in bttv_idcard()
2906 if (type != -1) { in bttv_idcard()
2909 btv->c.nr, cards[type].name, cards[type].cardnr, in bttv_idcard()
2910 btv->cardid & 0xffff, in bttv_idcard()
2911 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2912 btv->c.type = cards[type].cardnr; in bttv_idcard()
2916 btv->c.nr, btv->cardid & 0xffff, in bttv_idcard()
2917 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2918 …pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kerne… in bttv_idcard()
2923 if (card[btv->c.nr] < bttv_num_tvcards) in bttv_idcard()
2924 btv->c.type=card[btv->c.nr]; in bttv_idcard()
2928 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type, in bttv_idcard()
2929 card[btv->c.nr] < bttv_num_tvcards in bttv_idcard()
2938 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2939 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i]; in bttv_idcard()
2944 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2945 bttv_tvcards[btv->c.type].gpiomux[i] = audioall; in bttv_idcard()
2948 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits; in bttv_idcard()
2950 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask); in bttv_idcard()
2951 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2953 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]); in bttv_idcard()
2965 int type = -1; in identify_by_eeprom()
2974 if (-1 != type) { in identify_by_eeprom()
2975 btv->c.type = type; in identify_by_eeprom()
2977 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type); in identify_by_eeprom()
2995 * GPIO14-12: n.c. in flyvideo_gpio()
3009 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */ in flyvideo_gpio()
3015 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */ in flyvideo_gpio()
3021 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr); in flyvideo_gpio()
3039 btv->c.nr, has_radio ? "yes" : "no", in flyvideo_gpio()
3042 btv->c.nr, is_lr90 ? "yes" : "no", in flyvideo_gpio()
3047 btv->tuner_type = tuner_type; in flyvideo_gpio()
3048 btv->has_radio = has_radio; in flyvideo_gpio()
3054 btv->audio_mode_gpio = lt9415_audio; in flyvideo_gpio()
3055 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */ in flyvideo_gpio()
3070 id = ((gpio>>10) & 63) -1; in miro_pinnacle_gpio()
3073 btv->tuner_type = miro_tunermap[id]; in miro_pinnacle_gpio()
3075 btv->has_radio = 1; in miro_pinnacle_gpio()
3077 btv->has_tea575x = 1; in miro_pinnacle_gpio()
3078 btv->tea_gpio.wren = 6; in miro_pinnacle_gpio()
3079 btv->tea_gpio.most = 7; in miro_pinnacle_gpio()
3080 btv->tea_gpio.clk = 8; in miro_pinnacle_gpio()
3081 btv->tea_gpio.data = 9; in miro_pinnacle_gpio()
3085 btv->has_radio = 0; in miro_pinnacle_gpio()
3087 if (-1 != msp) { in miro_pinnacle_gpio()
3088 if (btv->c.type == BTTV_BOARD_MIRO) in miro_pinnacle_gpio()
3089 btv->c.type = BTTV_BOARD_MIROPRO; in miro_pinnacle_gpio()
3090 if (btv->c.type == BTTV_BOARD_PINNACLE) in miro_pinnacle_gpio()
3091 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3094 btv->c.nr, id+1, btv->tuner_type, in miro_pinnacle_gpio()
3095 !btv->has_radio ? "no" : in miro_pinnacle_gpio()
3096 (btv->has_tea575x ? "tea575x" : "fmtuner"), in miro_pinnacle_gpio()
3097 (-1 == msp) ? "no" : "yes"); in miro_pinnacle_gpio()
3100 id = 63 - id; in miro_pinnacle_gpio()
3101 btv->has_radio = 0; in miro_pinnacle_gpio()
3105 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3109 btv->has_radio = 1; in miro_pinnacle_gpio()
3110 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3114 btv->has_radio = 1; in miro_pinnacle_gpio()
3115 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3119 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3123 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3127 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3131 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3137 if (-1 != msp) in miro_pinnacle_gpio()
3138 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3140 btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); in miro_pinnacle_gpio()
3141 btv->tuner_type = TUNER_MT2032; in miro_pinnacle_gpio()
3164 * the eagles does not use the standard muxsel-bits but
3187 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3193 IN - sensor inputs, INx - sensor inputs and TI XORed together
3194 O1,O2,O3 - alarm outputs (relays)
3233 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3235 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3236 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3265 /* ----------------------------------------------------------------------- */
3270 * BT878A has a audio-reset register. in bttv_reset_audio()
3272 * function-0 (video capture) address space. in bttv_reset_audio()
3273 * 2. It is enough to do this once per power-up of the card. in bttv_reset_audio()
3274 * 3. There is a typo in the Conexant doc -- it is not at in bttv_reset_audio()
3275 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!). in bttv_reset_audio()
3276 * --//Shrikumar 030609 in bttv_reset_audio()
3278 if (btv->id != 878) in bttv_reset_audio()
3282 pr_debug("%d: BT878A ARESET\n", btv->c.nr); in bttv_reset_audio()
3288 /* initialization part one -- before registering i2c bus */
3291 switch (btv->c.type) { in bttv_init_card1()
3309 btv->use_i2c_hw = 1; in bttv_init_card1()
3319 if (!bttv_tvcards[btv->c.type].has_dvb) in bttv_init_card1()
3323 /* initialization part two -- after registering i2c bus */
3326 btv->tuner_type = UNSET; in bttv_init_card2()
3328 if (BTTV_BOARD_UNKNOWN == btv->c.type) { in bttv_init_card2()
3333 switch (btv->c.type) { in bttv_init_card2()
3373 btv->has_radio = 1; in bttv_init_card2()
3374 btv->has_tea575x = 1; in bttv_init_card2()
3375 btv->tea_gpio.wren = 5; in bttv_init_card2()
3376 btv->tea_gpio.most = 6; in bttv_init_card2()
3377 btv->tea_gpio.clk = 3; in bttv_init_card2()
3378 btv->tea_gpio.data = 4; in bttv_init_card2()
3386 if (btv->cardid == 0x3002144f) { in bttv_init_card2()
3387 btv->has_radio=1; in bttv_init_card2()
3389 btv->c.nr); in bttv_init_card2()
3393 if (btv->cardid == 0x3060121a) { in bttv_init_card2()
3396 btv->has_radio=0; in bttv_init_card2()
3397 btv->tuner_type=TUNER_TEMIC_NTSC; in bttv_init_card2()
3437 if (!(btv->id==848 && btv->revision==0x11)) { in bttv_init_card2()
3439 if (PLL_28 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3440 btv->pll.pll_ifreq=28636363; in bttv_init_card2()
3441 btv->pll.pll_crystal=BT848_IFORM_XT0; in bttv_init_card2()
3443 if (PLL_35 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3444 btv->pll.pll_ifreq=35468950; in bttv_init_card2()
3445 btv->pll.pll_crystal=BT848_IFORM_XT1; in bttv_init_card2()
3447 if (PLL_14 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3448 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3449 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3452 switch (pll[btv->c.nr]) { in bttv_init_card2()
3454 btv->pll.pll_crystal = 0; in bttv_init_card2()
3455 btv->pll.pll_ifreq = 0; in bttv_init_card2()
3456 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3460 btv->pll.pll_ifreq = 28636363; in bttv_init_card2()
3461 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3462 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3466 btv->pll.pll_ifreq = 35468950; in bttv_init_card2()
3467 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3468 btv->pll.pll_crystal = BT848_IFORM_XT1; in bttv_init_card2()
3472 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3473 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3474 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3478 btv->pll.pll_current = -1; in bttv_init_card2()
3481 if (UNSET != bttv_tvcards[btv->c.type].tuner_type) in bttv_init_card2()
3482 if (UNSET == btv->tuner_type) in bttv_init_card2()
3483 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; in bttv_init_card2()
3484 if (UNSET != tuner[btv->c.nr]) in bttv_init_card2()
3485 btv->tuner_type = tuner[btv->c.nr]; in bttv_init_card2()
3487 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3488 pr_info("%d: tuner absent\n", btv->c.nr); in bttv_init_card2()
3489 else if (btv->tuner_type == UNSET) in bttv_init_card2()
3490 pr_warn("%d: tuner type unset\n", btv->c.nr); in bttv_init_card2()
3492 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type); in bttv_init_card2()
3495 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr); in bttv_init_card2()
3497 btv->c.nr); in bttv_init_card2()
3500 if (UNSET == btv->tuner_type) in bttv_init_card2()
3501 btv->tuner_type = TUNER_ABSENT; in bttv_init_card2()
3503 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ? in bttv_init_card2()
3504 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET; in bttv_init_card2()
3505 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ? in bttv_init_card2()
3506 UNSET : bttv_tvcards[btv->c.type].svhs; in bttv_init_card2()
3507 if (svhs[btv->c.nr] != UNSET) in bttv_init_card2()
3508 btv->svhs = svhs[btv->c.nr]; in bttv_init_card2()
3509 if (remote[btv->c.nr] != UNSET) in bttv_init_card2()
3510 btv->has_remote = remote[btv->c.nr]; in bttv_init_card2()
3512 if (bttv_tvcards[btv->c.type].has_radio) in bttv_init_card2()
3513 btv->has_radio = 1; in bttv_init_card2()
3514 if (bttv_tvcards[btv->c.type].has_remote) in bttv_init_card2()
3515 btv->has_remote = 1; in bttv_init_card2()
3516 if (!bttv_tvcards[btv->c.type].no_gpioirq) in bttv_init_card2()
3517 btv->gpioirq = 1; in bttv_init_card2()
3518 if (bttv_tvcards[btv->c.type].volume_gpio) in bttv_init_card2()
3519 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio; in bttv_init_card2()
3520 if (bttv_tvcards[btv->c.type].audio_mode_gpio) in bttv_init_card2()
3521 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio; in bttv_init_card2()
3523 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3526 if (btv->has_saa6588 || saa6588[btv->c.nr]) { in bttv_init_card2()
3535 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3536 &btv->c.i2c_adap, "saa6588", 0, addrs); in bttv_init_card2()
3537 btv->has_saa6588 = (sd != NULL); in bttv_init_card2()
3545 switch (audiodev[btv->c.nr]) { in bttv_init_card2()
3546 case -1: in bttv_init_card2()
3560 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3561 &btv->c.i2c_adap, "msp3400", 0, addrs); in bttv_init_card2()
3562 if (btv->sd_msp34xx) in bttv_init_card2()
3574 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3575 &btv->c.i2c_adap, "tda7432", 0, addrs)) in bttv_init_card2()
3582 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3583 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3584 if (btv->sd_tvaudio) in bttv_init_card2()
3590 pr_warn("%d: unknown audiodev value!\n", btv->c.nr); in bttv_init_card2()
3600 if (!bttv_tvcards[btv->c.type].no_msp34xx) { in bttv_init_card2()
3601 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3602 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3604 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { in bttv_init_card2()
3605 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3606 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3611 if (btv->sd_msp34xx) in bttv_init_card2()
3615 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3616 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3617 if (btv->sd_tvaudio) { in bttv_init_card2()
3620 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3621 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3625 if (!bttv_tvcards[btv->c.type].no_tda7432) { in bttv_init_card2()
3631 btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3632 &btv->c.i2c_adap, "tda7432", 0, addrs); in bttv_init_card2()
3633 if (btv->sd_tda7432) in bttv_init_card2()
3636 if (btv->sd_tvaudio) in bttv_init_card2()
3640 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr); in bttv_init_card2()
3649 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) in bttv_init_tuner()
3650 addr = bttv_tvcards[btv->c.type].tuner_addr; in bttv_init_tuner()
3652 if (btv->tuner_type != TUNER_ABSENT) { in bttv_init_tuner()
3656 if (btv->has_radio) in bttv_init_tuner()
3657 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3658 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3660 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3661 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3663 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3664 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3668 tun_setup.type = btv->tuner_type; in bttv_init_tuner()
3671 if (btv->has_radio) in bttv_init_tuner()
3677 if (btv->tda9887_conf) { in bttv_init_tuner()
3681 tda9887_cfg.priv = &btv->tda9887_conf; in bttv_init_tuner()
3687 /* ----------------------------------------------------------------------- */
3692 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; in modtec_eeprom()
3694 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3696 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I; in modtec_eeprom()
3698 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3700 btv->tuner_type=TUNER_PHILIPS_NTSC; in modtec_eeprom()
3702 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3705 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3714 btv->tuner_type = tv.tuner_type; in hauppauge_eeprom()
3715 btv->has_radio = tv.has_radio; in hauppauge_eeprom()
3718 btv->c.nr, tv.model); in hauppauge_eeprom()
3726 btv->c.nr, in hauppauge_eeprom()
3727 bttv_tvcards[btv->c.type].name, in hauppauge_eeprom()
3729 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; in hauppauge_eeprom()
3734 btv->radio_uses_msp_demodulator = 1; in hauppauge_eeprom()
3737 /* ----------------------------------------------------------------------- */
3741 struct bttv *btv = tea->private_data; in bttv_tea575x_set_pins()
3742 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_pins()
3750 if (btv->mbox_ior) { in bttv_tea575x_set_pins()
3752 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0); in bttv_tea575x_set_pins()
3755 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_set_pins()
3756 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_set_pins()
3762 struct bttv *btv = tea->private_data; in bttv_tea575x_get_pins()
3763 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_get_pins()
3767 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3769 gpio_bits(btv->mbox_ior | btv->mbox_csel, 0); in bttv_tea575x_get_pins()
3773 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3775 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_get_pins()
3776 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_get_pins()
3789 struct bttv *btv = tea->private_data; in bttv_tea575x_set_direction()
3790 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_direction()
3809 btv->tea.private_data = btv; in tea575x_init()
3810 btv->tea.ops = &bttv_tea_ops; in tea575x_init()
3811 if (!snd_tea575x_hw_init(&btv->tea)) { in tea575x_init()
3812 pr_info("%d: detected TEA575x radio\n", btv->c.nr); in tea575x_init()
3813 btv->tea.mute = false; in tea575x_init()
3817 btv->has_tea575x = 0; in tea575x_init()
3818 btv->has_radio = 0; in tea575x_init()
3820 return -ENODEV; in tea575x_init()
3823 /* ----------------------------------------------------------------------- */
3827 btv->has_radio = 1; in terratec_active_radio_upgrade()
3828 btv->has_tea575x = 1; in terratec_active_radio_upgrade()
3829 btv->tea_gpio.wren = 4; in terratec_active_radio_upgrade()
3830 btv->tea_gpio.most = 5; in terratec_active_radio_upgrade()
3831 btv->tea_gpio.clk = 3; in terratec_active_radio_upgrade()
3832 btv->tea_gpio.data = 2; in terratec_active_radio_upgrade()
3834 btv->mbox_iow = 1 << 8; in terratec_active_radio_upgrade()
3835 btv->mbox_ior = 1 << 9; in terratec_active_radio_upgrade()
3836 btv->mbox_csel = 1 << 10; in terratec_active_radio_upgrade()
3839 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr); in terratec_active_radio_upgrade()
3840 btv->has_saa6588 = 1; in terratec_active_radio_upgrade()
3847 /* ----------------------------------------------------------------------- */
3850 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3853 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3904 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); in pvr_boot()
3906 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr); in pvr_boot()
3909 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); in pvr_boot()
3911 btv->c.nr, (rc < 0) ? "failed" : "ok"); in pvr_boot()
3916 /* ----------------------------------------------------------------------- */
3923 int cardid = -1; in osprey_eeprom()
3926 if (btv->c.type == BTTV_BOARD_UNKNOWN) { in osprey_eeprom()
3937 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 it 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-connected 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 /* ----------------------------------------------------------------------- */
4909 btv->c.nr); in bttv_handle_chipset()
4910 if (vsfx && btv->id >= 878) in bttv_handle_chipset()
4911 pr_info("%d: enabling VSFX\n", btv->c.nr); in bttv_handle_chipset()
4914 btv->c.nr, latency); in bttv_handle_chipset()
4917 if (btv->id < 878) { in bttv_handle_chipset()
4920 btv->triton1 = BT848_INT_ETBF; in bttv_handle_chipset()
4923 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command); in bttv_handle_chipset()
4928 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command); in bttv_handle_chipset()
4931 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency); in bttv_handle_chipset()