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"
136 /* ----------------------------------------------------------------------- */
145 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
147 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
148 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
149 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
150 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
151 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
152 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
162 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
163 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
164 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
165 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
179 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
218 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
219 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
220 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
221 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
223 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
224 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
225 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
226 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
228 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
229 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
230 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
231 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
232 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
233 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
234 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
235 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
236 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
237 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
238 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
239 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
240 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
258 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
259 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
260 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
263 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
286 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
310 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
313 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
314 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
315 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
316 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
317 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
321 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
322 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
323 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
324 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
325 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
326 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
328 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
329 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
330 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
331 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
332 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
333 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
334 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
335 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
336 { 0x3116f200, BTTV_BOARD_TVT_TD3116, "Tongwei Video Technology TD-3116" },
337 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR, "Aposonic W-DVR" },
338 { 0, -1, NULL }
341 /* ----------------------------------------------------------------------- */
345 /* ---- card 0x00 ---------------------------------- */
394 /* ---- card 0x04 ---------------------------------- */
433 .name = "MATRIX-Vision MV-Delta",
444 /* ---- card 0x08 ---------------------------------- */
496 /* ---- card 0x0c ---------------------------------- */
537 .name = "Zoltrix TV-Max",
549 /* ---- card 0x10 ---------------------------------- */
557 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
602 /* ---- card 0x14 ---------------------------------- */
654 /* ---- card 0x18 ---------------------------------- */
671 ….name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boost…
709 /* ---- card 0x1c ---------------------------------- */
724 gpio00: i2c-sda
725 gpio01: i2c-scl
726 gpio02: om5610-data
727 gpio03: om5610-clk
728 gpio04: om5610-wre
729 gpio05: om5610-stereo
730 gpio06: rds6588-davn
737 gpio16: u2-A0 (1st 4052bt)
738 gpio17: u2-A1
739 gpio18: u2-nEN
740 gpio19: u4-A0 (2nd 4052)
741 gpio20: u4-A1
742 u4-nEN - GND
755 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
794 /* ---- card 0x20 ---------------------------------- */
831 gpio23 -- hef4052:nEnable (0x800000)
832 gpio12 -- hef4052:A1
833 gpio13 -- hef4052:A0
862 /* ---- card 0x24 ---------------------------------- */
919 /* ---- card 0x28 ---------------------------------- */
976 /* ---- card 0x2c ---------------------------------- */
978 .name = "Sigma TVII-FM",
992 .name = "MATRIX-Vision MV-Delta 2",
1034 /* ---- card 0x30 ---------------------------------- */
1049 .name = "IODATA GV-BCTV3/PCI",
1063 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1081 GPIO20: U5.A1 (second hef4052bt)
1102 /* ---- card 0x34 ---------------------------------- */
1143 /* Tim Röstermundt <rosterm@uni-muenster.de>
1180 /* ---- card 0x38 ---------------------------------- */
1241 /* ---- card 0x3c ---------------------------------- */
1288 .name = "ATI TV-Wonder",
1301 /* ---- card 0x40 ---------------------------------- */
1304 .name = "ATI TV-Wonder VE",
1326 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1351 .name = "IODATA GV-BCTV4/PCI",
1365 /* ---- card 0x44 ---------------------------------- */
1379 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1399 * tuner, Composite, SVid, Composite-on-Svid-adapter */
1419 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1436 GPIO8-15: vrd866b ?
1452 /* ---- card 0x48 ---------------------------------- */
1455 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1474 GPIO8-15: vrd866b
1475 GPIO20,22,23: R30,R29,R28
1492 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1510 ….gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remot…
1520 /* ---- card 0x4c ---------------------------------- */
1549 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1574 GPIO3-7: n.c.
1575 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1577 GPIO16-21: n.c.
1582 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1583 .name = "DSP Design TCVIDEO",
1592 /* ---- card 0x50 ---------------------------------- */
1607 .name = "IODATA GV-BCTV5/PCI",
1623 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1624 .video_inputs = 4, /* id-inputs-clock */
1635 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1647 /* ---- card 0x54 ---------------------------------- */
1649 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1661 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1673 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1685 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1697 /* ---- card 0x58 ---------------------------------- */
1699 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1711 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
1745 /* ---- card 0x5C ---------------------------------- */
1759 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1808 /* ---- card 0x60 ---------------------------------- */
1836 /* Luc Van Hoeylandt <luc@e-magic.be> */
1852 .name = "AD-TVK503", /* 0x63 */
1868 /* ---- card 0x64 ---------------------------------- */
1881 - card lacks subsystem ID
1882 - stereo variant w/ daughter board with tda9874a @0xb0
1883 - Audio Routing:
1886 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1912 .name = "IVC-200",
1923 .name = "IVCE-8784",
1934 .name = "Grand X-Guard / Trust 814PCI",
1948 /* ---- card 0x68 ---------------------------------- */
1965 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1980 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
1992 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
2004 /* ---- card 0x6c ---------------------------------- */
2006 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2020 .name = "PHYTEC VD-009 Combi (bt878)",
2034 .name = "IVC-100",
2045 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2046 .name = "IVC-120G",
2060 /* ---- card 0x70 ---------------------------------- */
2062 .name = "pcHDTV HD-2000 TV",
2094 .name = "Teppro TEV-560/InterVision IV-560",
2106 /* ---- card 0x74 ---------------------------------- */
2159 /* ---- card 0x78 ---------------------------------- */
2187 ….gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs t…
2214 .name = "AVerMedia AVerTV DVB-T 771",
2227 /* ---- card 0x7c ---------------------------------- */
2230 …/* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see a…
2231 .name = "AverMedia AverTV DVB-T 761",
2234 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2245 /* andre.schwarz@matrix-vision.de */
2246 .name = "MATRIX Vision Sigma-SQ",
2260 /* andre.schwarz@matrix-vision.de */
2261 .name = "MATRIX Vision Sigma-SLC",
2289 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2293 /* ---- card 0x80 ---------------------------------- */
2296 .name = "DViCO FusionHDTV DVB-T Lite",
2307 .name = "V-Gear MyVCD",
2366 /* GPIO bits 0-9 used for analog switch:
2367 * 00 - 03: camera selector
2368 * 04 - 06: channel (controller) selector
2369 * 07: data (1->on, 0->off)
2403 /* ---- card 0x86---------------------------------- */
2416 /* ---- card 0x87---------------------------------- */
2420 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
2433 /* ---- card 0x88---------------------------------- */
2449 /* ---- card 0x89 ---------------------------------- */
2465 /* ---- card 0x8a ---------------------------------- */
2467 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2483 /* ---- card 0x8b ---------------------------------- */
2486 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2501 /* ---- card 0x8c ---------------------------------- */
2505 an 18-bit stereo A/D (CS5331A), which has:
2529 /* ---- card 0x8d ---------------------------------- */
2543 /* ---- card 0x8e ---------------------------------- */
2545 .name = "Sabrent TV-FM (bttv version)",
2559 /* ---- card 0x8f ---------------------------------- */
2566 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2612 /* ---- card 0x94---------------------------------- */
2627 /* ---- card 0x95---------------------------------- */
2629 .name = "Typhoon TV-Tuner PCI (50684)",
2643 .name = "Geovision GV-600",
2660 .name = "Kozumi KTV-01C",
2675 /* Encore TV Tuner Pro ENL TV-FM-2
2677 .name = "Encore ENL TV-FM-2",
2681 /* bit 6 -> IR disabled
2682 bit 18/17 = 00 -> mute
2683 01 -> enable external audio input
2684 10 -> internal audio input (mono?)
2685 11 -> internal audio input
2699 .name = "PHYTEC VD-012 (bt878)",
2712 .name = "PHYTEC VD-012-X1 (bt878)",
2725 .name = "PHYTEC VD-012-X2 (bt878)",
2739 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2742 * This is the first BT878A chip of the GV-800(S). It's the
2749 .name = "Geovision GV-800(S) (master)",
2766 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2769 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2773 .name = "Geovision GV-800(S) (slave)",
2800 /* ---- card 0xa0---------------------------------- */
2802 .name = "Tongwei Video Technology TD-3116",
2812 .name = "Aposonic W-DVR",
2849 .name = "Kworld V-Stream Xpert TV PVR878",
2863 /* ---- card 0xa6---------------------------------- */
2865 /* PCI-8604PW with special unlock sequence */
2866 .name = "PCI-8604PW",
2872 * as the on-board BNCs */
2883 /* ----------------------------------------------------------------------- */
2896 btv->cardid = btv->c.pci->subsystem_device << 16; in bttv_idcard()
2897 btv->cardid |= btv->c.pci->subsystem_vendor; in bttv_idcard()
2899 if (0 != btv->cardid && 0xffffffff != btv->cardid) { in bttv_idcard()
2901 for (type = -1, i = 0; cards[i].id != 0; i++) in bttv_idcard()
2902 if (cards[i].id == btv->cardid) in bttv_idcard()
2905 if (type != -1) { in bttv_idcard()
2908 btv->c.nr, cards[type].name, cards[type].cardnr, in bttv_idcard()
2909 btv->cardid & 0xffff, in bttv_idcard()
2910 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2911 btv->c.type = cards[type].cardnr; in bttv_idcard()
2915 btv->c.nr, btv->cardid & 0xffff, in bttv_idcard()
2916 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2917 …pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kerne… in bttv_idcard()
2922 if (card[btv->c.nr] < bttv_num_tvcards) in bttv_idcard()
2923 btv->c.type=card[btv->c.nr]; in bttv_idcard()
2927 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type, in bttv_idcard()
2928 card[btv->c.nr] < bttv_num_tvcards in bttv_idcard()
2937 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2938 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i]; in bttv_idcard()
2943 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2944 bttv_tvcards[btv->c.type].gpiomux[i] = audioall; in bttv_idcard()
2947 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits; in bttv_idcard()
2949 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask); in bttv_idcard()
2950 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) { in bttv_idcard()
2952 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]); in bttv_idcard()
2964 int type = -1; in identify_by_eeprom()
2973 if (-1 != type) { in identify_by_eeprom()
2974 btv->c.type = type; in identify_by_eeprom()
2976 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type); in identify_by_eeprom()
2994 * GPIO14-12: n.c. in flyvideo_gpio()
3008 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */ in flyvideo_gpio()
3014 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */ in flyvideo_gpio()
3020 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr); in flyvideo_gpio()
3038 btv->c.nr, has_radio ? "yes" : "no", in flyvideo_gpio()
3041 btv->c.nr, is_lr90 ? "yes" : "no", in flyvideo_gpio()
3046 btv->tuner_type = tuner_type; in flyvideo_gpio()
3047 btv->has_radio = has_radio; in flyvideo_gpio()
3053 btv->audio_mode_gpio = lt9415_audio; in flyvideo_gpio()
3054 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */ in flyvideo_gpio()
3069 id = ((gpio>>10) & 63) -1; in miro_pinnacle_gpio()
3072 btv->tuner_type = miro_tunermap[id]; in miro_pinnacle_gpio()
3074 btv->has_radio = 1; in miro_pinnacle_gpio()
3076 btv->has_tea575x = 1; in miro_pinnacle_gpio()
3077 btv->tea_gpio.wren = 6; in miro_pinnacle_gpio()
3078 btv->tea_gpio.most = 7; in miro_pinnacle_gpio()
3079 btv->tea_gpio.clk = 8; in miro_pinnacle_gpio()
3080 btv->tea_gpio.data = 9; in miro_pinnacle_gpio()
3084 btv->has_radio = 0; in miro_pinnacle_gpio()
3086 if (-1 != msp) { in miro_pinnacle_gpio()
3087 if (btv->c.type == BTTV_BOARD_MIRO) in miro_pinnacle_gpio()
3088 btv->c.type = BTTV_BOARD_MIROPRO; in miro_pinnacle_gpio()
3089 if (btv->c.type == BTTV_BOARD_PINNACLE) in miro_pinnacle_gpio()
3090 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3093 btv->c.nr, id+1, btv->tuner_type, in miro_pinnacle_gpio()
3094 !btv->has_radio ? "no" : in miro_pinnacle_gpio()
3095 (btv->has_tea575x ? "tea575x" : "fmtuner"), in miro_pinnacle_gpio()
3096 (-1 == msp) ? "no" : "yes"); in miro_pinnacle_gpio()
3099 id = 63 - id; in miro_pinnacle_gpio()
3100 btv->has_radio = 0; in miro_pinnacle_gpio()
3104 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3108 btv->has_radio = 1; in miro_pinnacle_gpio()
3109 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3113 btv->has_radio = 1; in miro_pinnacle_gpio()
3114 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3118 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3122 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3126 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3130 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3136 if (-1 != msp) in miro_pinnacle_gpio()
3137 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3139 btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); in miro_pinnacle_gpio()
3140 btv->tuner_type = TUNER_MT2032; in miro_pinnacle_gpio()
3163 * the eagles does not use the standard muxsel-bits but
3186 /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3192 IN - sensor inputs, INx - sensor inputs and TI XORed together
3193 O1,O2,O3 - alarm outputs (relays)
3232 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3234 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3235 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3264 /* ----------------------------------------------------------------------- */
3269 * BT878A has a audio-reset register. in bttv_reset_audio()
3271 * function-0 (video capture) address space. in bttv_reset_audio()
3272 * 2. It is enough to do this once per power-up of the card. in bttv_reset_audio()
3273 * 3. There is a typo in the Conexant doc -- it is not at in bttv_reset_audio()
3274 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!). in bttv_reset_audio()
3275 * --//Shrikumar 030609 in bttv_reset_audio()
3277 if (btv->id != 878) in bttv_reset_audio()
3281 pr_debug("%d: BT878A ARESET\n", btv->c.nr); in bttv_reset_audio()
3287 /* initialization part one -- before registering i2c bus */
3290 switch (btv->c.type) { in bttv_init_card1()
3308 btv->use_i2c_hw = 1; in bttv_init_card1()
3318 if (!bttv_tvcards[btv->c.type].has_dvb) in bttv_init_card1()
3322 /* initialization part two -- after registering i2c bus */
3325 btv->tuner_type = UNSET; in bttv_init_card2()
3327 if (BTTV_BOARD_UNKNOWN == btv->c.type) { in bttv_init_card2()
3332 switch (btv->c.type) { in bttv_init_card2()
3372 btv->has_radio = 1; in bttv_init_card2()
3373 btv->has_tea575x = 1; in bttv_init_card2()
3374 btv->tea_gpio.wren = 5; in bttv_init_card2()
3375 btv->tea_gpio.most = 6; in bttv_init_card2()
3376 btv->tea_gpio.clk = 3; in bttv_init_card2()
3377 btv->tea_gpio.data = 4; in bttv_init_card2()
3385 if (btv->cardid == 0x3002144f) { in bttv_init_card2()
3386 btv->has_radio=1; in bttv_init_card2()
3388 btv->c.nr); in bttv_init_card2()
3392 if (btv->cardid == 0x3060121a) { in bttv_init_card2()
3395 btv->has_radio=0; in bttv_init_card2()
3396 btv->tuner_type=TUNER_TEMIC_NTSC; in bttv_init_card2()
3436 if (!(btv->id==848 && btv->revision==0x11)) { in bttv_init_card2()
3438 if (PLL_28 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3439 btv->pll.pll_ifreq=28636363; in bttv_init_card2()
3440 btv->pll.pll_crystal=BT848_IFORM_XT0; in bttv_init_card2()
3442 if (PLL_35 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3443 btv->pll.pll_ifreq=35468950; in bttv_init_card2()
3444 btv->pll.pll_crystal=BT848_IFORM_XT1; in bttv_init_card2()
3446 if (PLL_14 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3447 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3448 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3451 switch (pll[btv->c.nr]) { in bttv_init_card2()
3453 btv->pll.pll_crystal = 0; in bttv_init_card2()
3454 btv->pll.pll_ifreq = 0; in bttv_init_card2()
3455 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3459 btv->pll.pll_ifreq = 28636363; in bttv_init_card2()
3460 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3461 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3465 btv->pll.pll_ifreq = 35468950; in bttv_init_card2()
3466 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3467 btv->pll.pll_crystal = BT848_IFORM_XT1; in bttv_init_card2()
3471 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3472 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3473 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3477 btv->pll.pll_current = -1; in bttv_init_card2()
3480 if (UNSET != bttv_tvcards[btv->c.type].tuner_type) in bttv_init_card2()
3481 if (UNSET == btv->tuner_type) in bttv_init_card2()
3482 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; in bttv_init_card2()
3483 if (UNSET != tuner[btv->c.nr]) in bttv_init_card2()
3484 btv->tuner_type = tuner[btv->c.nr]; in bttv_init_card2()
3486 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3487 pr_info("%d: tuner absent\n", btv->c.nr); in bttv_init_card2()
3488 else if (btv->tuner_type == UNSET) in bttv_init_card2()
3489 pr_warn("%d: tuner type unset\n", btv->c.nr); in bttv_init_card2()
3491 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type); in bttv_init_card2()
3494 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr); in bttv_init_card2()
3496 btv->c.nr); in bttv_init_card2()
3499 if (UNSET == btv->tuner_type) in bttv_init_card2()
3500 btv->tuner_type = TUNER_ABSENT; in bttv_init_card2()
3502 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ? in bttv_init_card2()
3503 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET; in bttv_init_card2()
3504 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ? in bttv_init_card2()
3505 UNSET : bttv_tvcards[btv->c.type].svhs; in bttv_init_card2()
3506 if (svhs[btv->c.nr] != UNSET) in bttv_init_card2()
3507 btv->svhs = svhs[btv->c.nr]; in bttv_init_card2()
3508 if (remote[btv->c.nr] != UNSET) in bttv_init_card2()
3509 btv->has_remote = remote[btv->c.nr]; in bttv_init_card2()
3511 if (bttv_tvcards[btv->c.type].has_radio) in bttv_init_card2()
3512 btv->has_radio = 1; in bttv_init_card2()
3513 if (bttv_tvcards[btv->c.type].has_remote) in bttv_init_card2()
3514 btv->has_remote = 1; in bttv_init_card2()
3515 if (!bttv_tvcards[btv->c.type].no_gpioirq) in bttv_init_card2()
3516 btv->gpioirq = 1; in bttv_init_card2()
3517 if (bttv_tvcards[btv->c.type].volume_gpio) in bttv_init_card2()
3518 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio; in bttv_init_card2()
3519 if (bttv_tvcards[btv->c.type].audio_mode_gpio) in bttv_init_card2()
3520 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio; in bttv_init_card2()
3522 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3525 if (btv->has_saa6588 || saa6588[btv->c.nr]) { in bttv_init_card2()
3534 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3535 &btv->c.i2c_adap, "saa6588", 0, addrs); in bttv_init_card2()
3536 btv->has_saa6588 = (sd != NULL); in bttv_init_card2()
3544 switch (audiodev[btv->c.nr]) { in bttv_init_card2()
3545 case -1: in bttv_init_card2()
3559 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3560 &btv->c.i2c_adap, "msp3400", 0, addrs); in bttv_init_card2()
3561 if (btv->sd_msp34xx) in bttv_init_card2()
3573 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3574 &btv->c.i2c_adap, "tda7432", 0, addrs)) in bttv_init_card2()
3581 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3582 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3583 if (btv->sd_tvaudio) in bttv_init_card2()
3589 pr_warn("%d: unknown audiodev value!\n", btv->c.nr); in bttv_init_card2()
3599 if (!bttv_tvcards[btv->c.type].no_msp34xx) { in bttv_init_card2()
3600 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3601 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3603 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { in bttv_init_card2()
3604 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3605 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3610 if (btv->sd_msp34xx) in bttv_init_card2()
3614 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3615 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3616 if (btv->sd_tvaudio) { in bttv_init_card2()
3619 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3620 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3624 if (!bttv_tvcards[btv->c.type].no_tda7432) { in bttv_init_card2()
3630 btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3631 &btv->c.i2c_adap, "tda7432", 0, addrs); in bttv_init_card2()
3632 if (btv->sd_tda7432) in bttv_init_card2()
3635 if (btv->sd_tvaudio) in bttv_init_card2()
3639 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr); in bttv_init_card2()
3648 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) in bttv_init_tuner()
3649 addr = bttv_tvcards[btv->c.type].tuner_addr; in bttv_init_tuner()
3651 if (btv->tuner_type != TUNER_ABSENT) { in bttv_init_tuner()
3655 if (btv->has_radio) in bttv_init_tuner()
3656 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3657 &btv->c.i2c_adap, "tuner", 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()
3667 tun_setup.type = btv->tuner_type; in bttv_init_tuner()
3670 if (btv->has_radio) in bttv_init_tuner()
3676 if (btv->tda9887_conf) { in bttv_init_tuner()
3680 tda9887_cfg.priv = &btv->tda9887_conf; in bttv_init_tuner()
3686 /* ----------------------------------------------------------------------- */
3691 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; in modtec_eeprom()
3693 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3695 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I; in modtec_eeprom()
3697 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3699 btv->tuner_type=TUNER_PHILIPS_NTSC; in modtec_eeprom()
3701 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3704 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3713 btv->tuner_type = tv.tuner_type; in hauppauge_eeprom()
3714 btv->has_radio = tv.has_radio; in hauppauge_eeprom()
3717 btv->c.nr, tv.model); in hauppauge_eeprom()
3725 btv->c.nr, in hauppauge_eeprom()
3726 bttv_tvcards[btv->c.type].name, in hauppauge_eeprom()
3728 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; in hauppauge_eeprom()
3733 btv->radio_uses_msp_demodulator = 1; in hauppauge_eeprom()
3736 /* ----------------------------------------------------------------------- */
3740 struct bttv *btv = tea->private_data; in bttv_tea575x_set_pins()
3741 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_pins()
3749 if (btv->mbox_ior) { in bttv_tea575x_set_pins()
3751 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0); in bttv_tea575x_set_pins()
3754 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_set_pins()
3755 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_set_pins()
3761 struct bttv *btv = tea->private_data; in bttv_tea575x_get_pins()
3762 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_get_pins()
3766 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3768 gpio_bits(btv->mbox_ior | btv->mbox_csel, 0); in bttv_tea575x_get_pins()
3772 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3774 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_get_pins()
3775 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_get_pins()
3788 struct bttv *btv = tea->private_data; in bttv_tea575x_set_direction()
3789 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_direction()
3808 btv->tea.private_data = btv; in tea575x_init()
3809 btv->tea.ops = &bttv_tea_ops; in tea575x_init()
3810 if (!snd_tea575x_hw_init(&btv->tea)) { in tea575x_init()
3811 pr_info("%d: detected TEA575x radio\n", btv->c.nr); in tea575x_init()
3812 btv->tea.mute = false; in tea575x_init()
3816 btv->has_tea575x = 0; in tea575x_init()
3817 btv->has_radio = 0; in tea575x_init()
3819 return -ENODEV; in tea575x_init()
3822 /* ----------------------------------------------------------------------- */
3826 btv->has_radio = 1; in terratec_active_radio_upgrade()
3827 btv->has_tea575x = 1; in terratec_active_radio_upgrade()
3828 btv->tea_gpio.wren = 4; in terratec_active_radio_upgrade()
3829 btv->tea_gpio.most = 5; in terratec_active_radio_upgrade()
3830 btv->tea_gpio.clk = 3; in terratec_active_radio_upgrade()
3831 btv->tea_gpio.data = 2; in terratec_active_radio_upgrade()
3833 btv->mbox_iow = 1 << 8; in terratec_active_radio_upgrade()
3834 btv->mbox_ior = 1 << 9; in terratec_active_radio_upgrade()
3835 btv->mbox_csel = 1 << 10; in terratec_active_radio_upgrade()
3838 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr); in terratec_active_radio_upgrade()
3839 btv->has_saa6588 = 1; in terratec_active_radio_upgrade()
3846 /* ----------------------------------------------------------------------- */
3849 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3852 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3903 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); in pvr_boot()
3905 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr); in pvr_boot()
3908 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); in pvr_boot()
3910 btv->c.nr, (rc < 0) ? "failed" : "ok"); in pvr_boot()
3915 /* ----------------------------------------------------------------------- */
3922 int cardid = -1; in osprey_eeprom()
3925 if (btv->c.type == BTTV_BOARD_UNKNOWN) { in osprey_eeprom()
3936 serial += ee[i] - '0'; in osprey_eeprom()
4009 btv->c.nr, type); in osprey_eeprom()
4016 btv->c.nr, cardid, in osprey_eeprom()
4019 if (cardid<0 || btv->c.type == cardid) in osprey_eeprom()
4023 if (card[btv->c.nr] < bttv_num_tvcards) { in osprey_eeprom()
4025 btv->c.nr); in osprey_eeprom()
4028 btv->c.nr, btv->c.type, cardid); in osprey_eeprom()
4029 btv->c.type = cardid; in osprey_eeprom()
4033 /* ----------------------------------------------------------------------- */
4037 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
4038 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
4058 btv->has_remote = (eeprom_data[0x42] & 0x01); in avermedia_eeprom()
4069 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */ in avermedia_eeprom()
4072 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]); in avermedia_eeprom()
4074 btv->tuner_type = tuner_type; in avermedia_eeprom()
4080 btv->has_remote ? "yes" : "no"); in avermedia_eeprom()
4086 * TDA9887 series. Instead it has two tri-state input pins, S0 and S1,
4094 if (btv->audio_input == TVAUDIO_INPUT_TUNER) { in bttv_tda9880_setnorm()
4095 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN) in bttv_tda9880_setnorm()
4101 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits); in bttv_tda9880_setnorm()
4127 btv->c.nr, pin); in boot_msp34xx()
4130 /* ----------------------------------------------------------------------- */
4131 /* Imagenation L-Model PXC200 Framegrabber */
4144 /* Initialise GPIO-connected stuff */ in init_PXC200()
4158 remember the EN is reverse logic --> in init_PXC200()
4171 * same chips - but the R/W bit is included in the address in init_PXC200()
4177 /* First of all, enable the clock line. This is used in the PXC200-F */ in init_PXC200()
4184 * value sent to the GPIO-connected stuff in init_PXC200()
4193 if (tmp != -1) { in init_PXC200()
4204 /* ----------------------------------------------------------------------- */
4206 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4212 * - 0x0E
4213 * - sleep 1ms
4214 * - 0x10 + 0x0E
4215 * - sleep 10ms
4216 * - 0x0E
4218 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4222 * - write 0x4400 + 0x0E
4223 * - sleep 10ms
4224 * - write 0x4410 + 0x0E
4225 * - sleep 1ms
4226 * - write 0x0E
4228 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
4231 /* ----------------------------------------------------------------------- */
4238 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n", in init_RTV24()
4239 btv->c.nr); in init_RTV24()
4252 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n", in init_RTV24()
4253 btv->c.nr, dataRead); in init_RTV24()
4265 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n", in init_RTV24()
4266 btv->c.nr, dataRead); in init_RTV24()
4271 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr); in init_RTV24()
4276 /* ----------------------------------------------------------------------- */
4278 * The PCI-8604PW contains a CPLD, probably an ispMACH 4A, that filters
4296 /* ----------------------------------------------------------------------- */
4302 if ((PCI_SLOT(btv->c.pci->devfn) & ~3) != 0xC) { in init_PCI8604PW()
4303 pr_warn("This is not a PCI-8604PW\n"); in init_PCI8604PW()
4307 if (PCI_SLOT(btv->c.pci->devfn) != 0xD) in init_PCI8604PW()
4320 pr_debug("PCI-8604PW in state %i, toggling pin\n", in init_PCI8604PW()
4328 pr_info("PCI-8604PW unlocked\n"); in init_PCI8604PW()
4336 pr_err("PCI-8604PW locked until reset\n"); in init_PCI8604PW()
4339 pr_err("PCI-8604PW in unknown state %i\n", state); in init_PCI8604PW()
4356 pr_err("PCI-8604PW invalid transition %i -> %i\n", in init_PCI8604PW()
4373 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4374 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4375 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4376 * GPIO[8] - - P3[5] (microcontroller)
4377 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4378 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4379 * GPINTR - - P3[4] (microcontroller)
4427 * GPIO[16:19] - Video input selection
4428 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4429 * GPIO[?:?] - Digital I/O.
4450 * The following routines for the Kodicom-4400r get a little mind-twisting.
4468 * is routed to which controller. The switch comprises an X-address
4469 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4470 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4494 * requested camera number (0 - 15).
4502 mctlr = master[btv->c.nr]; in kodicom4400r_muxsel()
4506 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */ in kodicom4400r_muxsel()
4510 if (mctlr->sw_status[yaddr] != xaddr) in kodicom4400r_muxsel()
4513 kodicom4400r_write(mctlr, mctlr->sw_status[yaddr], yaddr, 0); in kodicom4400r_muxsel()
4514 mctlr->sw_status[yaddr] = xaddr; in kodicom4400r_muxsel()
4534 btv->sw_status[ix] = ix; in kodicom4400r_init()
4542 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3)) in kodicom4400r_init()
4544 master[btv->c.nr-1] = btv; in kodicom4400r_init()
4545 master[btv->c.nr] = btv; in kodicom4400r_init()
4546 master[btv->c.nr+1] = btv; in kodicom4400r_init()
4547 master[btv->c.nr+2] = btv; in kodicom4400r_init()
4550 /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4587 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input); in picolo_tetra_muxsel()
4588 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/ in picolo_tetra_muxsel()
4610 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4611 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4612 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4613 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4617 /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4632 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n", in ivc120_muxsel()
4633 btv->c.nr, input, matrix, key); in ivc120_muxsel()
4647 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */ in ivc120_muxsel()
4649 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */ in ivc120_muxsel()
4651 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */ in ivc120_muxsel()
4653 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */ in ivc120_muxsel()
4671 #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4690 btv->c.nr, rc); in PXC200_muxsel()
4698 btv->c.nr, rc); in PXC200_muxsel()
4705 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */ in PXC200_muxsel()
4713 if (btv->cardid == PX_PXC200A_CARDID) { in PXC200_muxsel()
4720 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4731 * needed because bttv-driver sets mux before calling this function in PXC200_muxsel()
4733 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4738 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux); in PXC200_muxsel()
4745 if (input == btv->svhs) in phytec_muxsel()
4752 * GeoVision GV-800(S) functions
4757 * camera is routed to which controller. The switch comprises an X-address
4758 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4759 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4771 * GPIO bits 0-9 are used for the analog switch: in gv800s_write()
4772 * 00 - 03: camera selector in gv800s_write()
4773 * 04 - 06: 878A (controller) selector in gv800s_write()
4776 * 18: data (1->on, 0->off) in gv800s_write()
4791 * GeoVision GV-800(S) muxsel
4795 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4797 * The parameter 'input' is the requested camera number (0-4) on the controller.
4817 mctlr = master[btv->c.nr]; in gv800s_muxsel()
4822 yaddr = (btv->c.nr - mctlr->c.nr) & 3; in gv800s_muxsel()
4826 if (mctlr->sw_status[yaddr] != xaddr) { in gv800s_muxsel()
4828 gv800s_write(mctlr, mctlr->sw_status[yaddr], yaddr, 0); in gv800s_muxsel()
4829 mctlr->sw_status[yaddr] = xaddr; in gv800s_muxsel()
4834 /* GeoVision GV-800(S) "master" chip init */
4845 btv->sw_status[ix] = ix; in gv800s_init()
4852 if (btv->c.nr > BTTV_MAX-4) in gv800s_init()
4858 master[btv->c.nr] = btv; in gv800s_init()
4859 master[btv->c.nr+1] = btv; in gv800s_init()
4860 master[btv->c.nr+2] = btv; in gv800s_init()
4861 master[btv->c.nr+3] = btv; in gv800s_init()
4864 /* ----------------------------------------------------------------------- */
4908 btv->c.nr); in bttv_handle_chipset()
4909 if (vsfx && btv->id >= 878) in bttv_handle_chipset()
4910 pr_info("%d: enabling VSFX\n", btv->c.nr); in bttv_handle_chipset()
4913 btv->c.nr, latency); in bttv_handle_chipset()
4916 if (btv->id < 878) { in bttv_handle_chipset()
4919 btv->triton1 = BT848_INT_ETBF; in bttv_handle_chipset()
4922 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command); in bttv_handle_chipset()
4927 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command); in bttv_handle_chipset()
4930 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency); in bttv_handle_chipset()