Commit f797608c authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)

Fix the code so that the zl10353 version of the Terratec Cinergy T XS USB
starts working again.  This includes fixing what must have been a typo in the
GPIO definition for the digital side of the board, and setting of the
disable_i2c_gate_ctrl property for the zl10353 config, so that the i2c bus
doesn't get wedged the first time something tries to close the gate.

Also, add a printk() making clear that the mt352 version still isn't
supported.  This issue is still being actively debugged, but in the meantime
at least the dmesg output will show a very clear error...

Thanks to Jelle de Jong for providing sample hardware to test with.

Thanks to Simon Kenyon for testing various patches and providing SSH access to
his environment so I could debug with access to a valid signal source.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Cc: Simon Kenyon <simon@koala.ie>
Signed-off-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 43cb9fe3
...@@ -845,7 +845,7 @@ struct em28xx_board em28xx_boards[] = { ...@@ -845,7 +845,7 @@ struct em28xx_board em28xx_boards[] = {
.tuner_gpio = default_tuner_gpio, .tuner_gpio = default_tuner_gpio,
.decoder = EM28XX_TVP5150, .decoder = EM28XX_TVP5150,
.has_dvb = 1, .has_dvb = 1,
.dvb_gpio = default_analog, .dvb_gpio = default_digital,
.input = { { .input = { {
.type = EM28XX_VMUX_TELEVISION, .type = EM28XX_VMUX_TELEVISION,
.vmux = TVP5150_COMPOSITE0, .vmux = TVP5150_COMPOSITE0,
......
...@@ -243,6 +243,14 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = { ...@@ -243,6 +243,14 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = {
.mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK
}; };
static struct zl10353_config em28xx_terratec_xs_zl10353_xc3028 = {
.demod_address = (0x1e >> 1),
.no_tuner = 1,
.disable_i2c_gate_ctrl = 1,
.parallel_ts = 1,
.if2 = 45600,
};
#ifdef EM28XX_DRX397XD_SUPPORT #ifdef EM28XX_DRX397XD_SUPPORT
/* [TODO] djh - not sure yet what the device config needs to contain */ /* [TODO] djh - not sure yet what the device config needs to contain */
static struct drx397xD_config em28xx_drx397xD_with_xc3028 = { static struct drx397xD_config em28xx_drx397xD_with_xc3028 = {
...@@ -433,7 +441,6 @@ static int dvb_init(struct em28xx *dev) ...@@ -433,7 +441,6 @@ static int dvb_init(struct em28xx *dev)
} }
break; break;
case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
case EM2880_BOARD_TERRATEC_HYBRID_XS:
case EM2880_BOARD_KWORLD_DVB_310U: case EM2880_BOARD_KWORLD_DVB_310U:
case EM2880_BOARD_EMPIRE_DUAL_TV: case EM2880_BOARD_EMPIRE_DUAL_TV:
dvb->frontend = dvb_attach(zl10353_attach, dvb->frontend = dvb_attach(zl10353_attach,
...@@ -444,6 +451,25 @@ static int dvb_init(struct em28xx *dev) ...@@ -444,6 +451,25 @@ static int dvb_init(struct em28xx *dev)
goto out_free; goto out_free;
} }
break; break;
case EM2880_BOARD_TERRATEC_HYBRID_XS:
dvb->frontend = dvb_attach(zl10353_attach,
&em28xx_terratec_xs_zl10353_xc3028,
&dev->i2c_adap);
if (dvb->frontend == NULL) {
/* This board could have either a zl10353 or a mt352.
If the chip id isn't for zl10353, try mt352 */
/* FIXME: make support for mt352 work */
printk(KERN_ERR "version of this board with mt352 not "
"currently supported\n");
result = -EINVAL;
goto out_free;
}
if (attach_xc3028(0x61, dev) < 0) {
result = -EINVAL;
goto out_free;
}
break;
case EM2883_BOARD_KWORLD_HYBRID_330U: case EM2883_BOARD_KWORLD_HYBRID_330U:
case EM2882_BOARD_EVGA_INDTUBE: case EM2882_BOARD_EVGA_INDTUBE:
dvb->frontend = dvb_attach(s5h1409_attach, dvb->frontend = dvb_attach(s5h1409_attach,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment