Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92406
b: refs/heads/master
c: 9507901
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent eaa1290 commit beeed83
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2cb8fcc006ce59255de67e3fe9f65fb79db633b
refs/heads/master: 9507901ef329b2dd3417372c7c9b2abcfd5c1885
4 changes: 4 additions & 0 deletions trunk/Documentation/video4linux/CARDLIST.cx88
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@
57 -> ADS Tech Instant Video PCI [1421:0390]
58 -> Pinnacle PCTV HD 800i [11bd:0051]
59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530]
60 -> Pinnacle Hybrid PCTV [12ab:1788]
61 -> Winfast TV2000 XP Global [107d:6f18]
62 -> PowerColor Real Angel 330 [14f1:ea3d]
63 -> Geniatech X8000-MT DVBT [14f1:8852]
188 changes: 187 additions & 1 deletion trunk/drivers/media/video/cx88/cx88-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,124 @@ static const struct cx88_board cx88_boards[] = {
} },
.mpeg = CX88_MPEG_DVB,
},
[CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
.name = "Pinnacle Hybrid PCTV",
.tuner_type = TUNER_XC2028,
.tuner_addr = 0x61,
.input = { {
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
}, {
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
}, {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
} },
.radio = {
.type = CX88_RADIO,
.gpio0 = 0x004ff,
.gpio1 = 0x010ff,
.gpio2 = 0x0ff,
},
},
[CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
.name = "Winfast TV2000 XP Global",
.tuner_type = TUNER_XC2028,
.tuner_addr = 0x61,
.input = { {
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
.gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
.gpio1 = 0x0000,
.gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */

}, {
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
.gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
.gpio1 = 0x0000,
.gpio2 = 0x0808, /* pin 19:audio = 1 (line) */

}, {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
} },
.radio = {
.type = CX88_RADIO,
.gpio0 = 0x004ff,
.gpio1 = 0x010ff,
.gpio2 = 0x0ff,
},
},
[CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
.name = "PowerColor Real Angel 330",
.tuner_type = TUNER_XC2028,
.tuner_addr = 0x61,
.input = { {
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
.gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
.gpio1 = 0x0000,
.gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
}, {
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
.gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
.gpio1 = 0x0000,
.gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
}, {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
.gpio0 = 0x000ff,
.gpio1 = 0x0f37d,
.gpio2 = 0x00019,
.gpio3 = 0x00000,
} },
.radio = {
.type = CX88_RADIO,
.gpio0 = 0x000ff,
.gpio1 = 0x0f35d,
.gpio2 = 0x00019,
.gpio3 = 0x00000,
},
},
[CX88_BOARD_GENIATECH_X8000_MT] = {
/* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
.name = "Geniatech X8000-MT DVBT",
.tuner_type = TUNER_XC2028,
.tuner_addr = 0x61,
.input = { {
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
.gpio0 = 0x00000000,
.gpio1 = 0x00e3e341,
.gpio2 = 0x00000000,
.gpio3 = 0x00000000,
}, {
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
.gpio0 = 0x00000000,
.gpio1 = 0x00e3e361,
.gpio2 = 0x00000000,
.gpio3 = 0x00000000,
}, {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
.gpio0 = 0x00000000,
.gpio1 = 0x00e3e361,
.gpio2 = 0x00000000,
.gpio3 = 0x00000000,
} },
.radio = {
.type = CX88_RADIO,
.gpio0 = 0x00000000,
.gpio1 = 0x00e3e341,
.gpio2 = 0x00000000,
.gpio3 = 0x00000000,
},
.mpeg = CX88_MPEG_DVB,
}
};

/* ------------------------------------------------------------------ */
Expand Down Expand Up @@ -1743,7 +1861,23 @@ static const struct cx88_subid cx88_subids[] = {
.subvendor = 0x18ac,
.subdevice = 0xd530,
.card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
},
}, {
.subvendor = 0x12ab,
.subdevice = 0x1788,
.card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
}, {
.subvendor = 0x14f1,
.subdevice = 0xea3d,
.card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
}, {
.subvendor = 0x107d,
.subdevice = 0x6f18,
.card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
}, {
.subvendor = 0x14f1,
.subdevice = 0x8852,
.card = CX88_BOARD_GENIATECH_X8000_MT,
}
};

/* ----------------------------------------------------------------------- */
Expand Down Expand Up @@ -1875,6 +2009,50 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
CX88_RADIO : 0;
}

/* ----------------------------------------------------------------------- */
/* some Geniatech specific stuff */

static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mode)
{
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

switch (command) {
case XC2028_TUNER_RESET:
switch (INPUT(core->input).type) {
case CX88_RADIO:
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
cx_write(MO_GP1_IO, 0x101000);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
return 0;
case CX88_VMUX_DVB:
cx_write(MO_GP1_IO, 0x030302);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
cx_write(MO_GP1_IO, 0x101000);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
return 0;
default:
cx_write(MO_GP1_IO, 0x030301);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
cx_write(MO_GP1_IO, 0x101000);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
return 0;
}
}
return -EINVAL;
}

/* ----------------------------------------------------------------------- */
/* some DViCO specific stuff */

Expand Down Expand Up @@ -1914,6 +2092,14 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
struct i2c_algo_bit_data *i2c_algo = priv;
struct cx88_core *core = i2c_algo->data;

/* Board-specific callbacks */
switch (core->boardnr) {
case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
case CX88_BOARD_GENIATECH_X8000_MT:
return cx88_xc3028_geniatech_tuner_callback(priv, command, arg);
}

switch (command) {
case XC2028_TUNER_RESET:
{
Expand Down
44 changes: 43 additions & 1 deletion trunk/drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,16 @@ static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = {
.tuner_callback = cx88_tuner_callback,
};

static struct zl10353_config cx88_geniatech_x8000_mt = {
.demod_address = (0x1e >> 1),
.no_tuner = 1,
};


static int dvb_register(struct cx8802_dev *dev)
{
int attach_xc3028 = 0;

/* init struct videobuf_dvb */
dev->dvb.name = dev->core->name;
dev->ts_gen_cntrl = 0x0c;
Expand Down Expand Up @@ -727,16 +735,50 @@ static int dvb_register(struct cx8802_dev *dev)
fe->ops.tuner_ops.set_config(fe, &ctl);
}
break;
case CX88_BOARD_PINNACLE_HYBRID_PCTV:
dev->dvb.frontend = dvb_attach(zl10353_attach,
&cx88_geniatech_x8000_mt,
&dev->core->i2c_adap);
attach_xc3028 = 1;
break;
case CX88_BOARD_GENIATECH_X8000_MT:
dev->ts_gen_cntrl = 0x00;

dev->dvb.frontend = dvb_attach(zl10353_attach,
&cx88_geniatech_x8000_mt,
&dev->core->i2c_adap);
attach_xc3028 = 1;
break;
default:
printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n",
dev->core->name);
break;
}
if (NULL == dev->dvb.frontend) {
printk(KERN_ERR "%s/2: frontend initialization failed\n", dev->core->name);
printk(KERN_ERR
"%s/2: frontend initialization failed\n",
dev->core->name);
return -1;
}

if (attach_xc3028) {
struct dvb_frontend *fe;
struct xc2028_config cfg = {
.i2c_adap = &dev->core->i2c_adap,
.i2c_addr = 0x61,
.video_dev = dev->core,
};
fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg);
if (!fe) {
printk(KERN_ERR "%s/2: xc3028 attach failed\n",
dev->core->name);
dvb_frontend_detach(dev->dvb.frontend);
dvb_unregister_frontend(dev->dvb.frontend);
dev->dvb.frontend = NULL;
return -1;
}
}

/* Ensure all frontends negotiate bus access */
dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl;

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/video/cx88/cx88.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ extern struct sram_channel cx88_sram_channels[];
#define CX88_BOARD_ADSTECH_PTV_390 57
#define CX88_BOARD_PINNACLE_PCTV_HD_800i 58
#define CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO 59
#define CX88_BOARD_PINNACLE_HYBRID_PCTV 60
#define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL 61
#define CX88_BOARD_POWERCOLOR_REAL_ANGEL 62
#define CX88_BOARD_GENIATECH_X8000_MT 63

enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
Expand Down

0 comments on commit beeed83

Please sign in to comment.