Hello, > does anybody have the TRUST 814 PCI [4-inputs x 1-chip] card working > with the bttv driver? looking at the pictures on the Trust website this card seems to be identical to the "Grandtec X-Guard" card i bought some weeks ago: http://io.ram.rwth-aachen.de/xguard.jpg This card uses two dual-4-input-video multiplexers that are controlled by the vision878's gpio pins. That way up to 16 inputs are connected to the 4 inputs of the vison878. I have sent the modifications to the bttv driver necessary to make the card work to Gerd, but got no response yet. However, the modifications are quite simple. I have attached the patch for bttv-0.7.105. It works fine for me. Please let me know if it works for you card, too! Tschuess Markus -- Markus Lichtenstein
diff --unified --recursive --new-file bttv-0.7.105/driver/bttv-cards.c bttv-0.7.105-sauber/driver/bttv-cards.c --- bttv-0.7.105/driver/bttv-cards.c 2003-02-14 11:43:36.000000000 +0100 +++ bttv-0.7.105-sauber/driver/bttv-cards.c 2003-03-07 13:19:22.000000000 +0100 @@ -61,6 +61,7 @@ static void adtvk503_audio(struct bttv *btv, struct video_audio *v, int set); static void rv605_muxsel(struct bttv *btv, unsigned int input); static void eagle_muxsel(struct bttv *btv, unsigned int input); +static void xguard_muxsel(struct bttv *btv, unsigned int input); static int terratec_active_radio_upgrade(struct bttv *btv); static int tea5757_read(struct bttv *btv); @@ -216,6 +217,8 @@ { 0x1466aa06, BTTV_PV150, "Provideo PV150B-3" }, { 0x1467aa07, BTTV_PV150, "Provideo PV150B-4" }, + { 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" }, + // likely broken, vendor id doesn't match the other magic views ... //{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, @@ -1628,7 +1631,35 @@ .pll = PLL_28, .tuner_type = 2, .audio_hook = adtvk503_audio, -}}; +} +, +{ + .name = "Grand X-Guard", + .video_inputs = 16, + .audio_inputs = 0, + .tuner = -1, + .svhs = -1, + // heisst das, dass die Audio-Initialisierung die Finger davon + // laesst?: + .gpiomask = 0x00, + // und das, dass ich auf die unteren 8bit schreiben kann?: + .gpiomask2 = 0xff, + // die ersten 4 Eingaenge haengen am MUX0, die zweiten an MUX1 usw. + .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 }, + .muxsel_hook = xguard_muxsel, + // bekommt man die Tuner- und Audio-Geschichten irgendwie + // einfacher ganz abgeschaltet? + .needs_tvaudio = 0, + .no_msp34xx = 1, + .no_tda9875 = 1, + .no_tda7432 = 1, + .pll = PLL_28, + .tuner_type = 4, +} + + + +}; const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); @@ -1930,6 +1961,89 @@ btor(LM1882_SYNC_DRIVE, BT848_GPIO_DATA); } + +static void xguard_muxsel(struct bttv *btv, unsigned int input) +{ +int mask; + +// The Grandtec X-Guard framegrabber card uses two Dual 4-channel +// video multiplexers to provide up to 16 video inputs. These +// multiplexers are controlled by the lower 8 GPIO pins of the +// bt878. The multiplexers probably Pericom PI5V331Q or similar. + +// xxx0 is pin xxx of multiplexer U5, +// yyy1 is pin yyy of multiplexer U2 + +#define ENA0 0x01 +#define ENB0 0x02 +#define ENA1 0x04 +#define ENB1 0x08 + +#define IN10 0x10 +#define IN00 0x20 +#define IN11 0x40 +#define IN01 0x80 + + switch(input) { + case 0: + mask=(ENB0); + break; + case 1: + mask=(ENB0|IN00); + break; + case 2: + mask=(ENB0|IN10); + break; + case 3: + mask=(ENB0|IN00|IN10); + break; + + case 4: + mask=(ENA0); + break; + case 5: + mask=(ENA0|IN00); + break; + case 6: + mask=(ENA0|IN10); + break; + case 7: + mask=(ENA0|IN00|IN10); + break; + + case 8: + mask=(ENB1); + break; + case 9: + mask=(ENB1|IN01); + break; + case 10: + mask=(ENB1|IN11); + break; + case 11: + mask=(ENB1|IN01|IN11); + break; + + case 12: + mask=(ENA1); + break; + case 13: + mask=(ENA1|IN01); + break; + case 14: + mask=(ENA1|IN11); + break; + case 15: + mask=(ENA1|IN01|IN11); + break; + } +// printk("bttv%d: xguard_muxsel: mask %d\n",btv->nr,mask); + btwrite(mask, BT848_GPIO_DATA); +} + + + + /* ----------------------------------------------------------------------- */ /* initialization part one -- before registering i2c bus */ diff --unified --recursive --new-file bttv-0.7.105/driver/bttv.h bttv-0.7.105-sauber/driver/bttv.h --- bttv-0.7.105/driver/bttv.h 2003-02-04 16:14:27.000000000 +0100 +++ bttv-0.7.105-sauber/driver/bttv.h 2003-03-07 13:14:19.000000000 +0100 @@ -110,6 +110,7 @@ #define BTTV_EURESYS_PICOLO 0x61 #define BTTV_PV150 0x62 #define BTTV_AD_TVK503 0x63 +#define BTTV_XGUARD 0x64 /* i2c address list */ #define I2C_TSA5522 0xc2