]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Tue, 23 Jun 2009 01:32:32 +0000 (22:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Jul 2009 17:30:06 +0000 (14:30 -0300)
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: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-dvb.c

index bd9b637c7ea553d813ff165860cd1964cd44aa2c..01fbb7d2e569043f429abbb3ff40be10809bd147 100644 (file)
@@ -845,7 +845,7 @@ struct em28xx_board em28xx_boards[] = {
                .tuner_gpio     = default_tuner_gpio,
                .decoder        = EM28XX_TVP5150,
                .has_dvb        = 1,
-               .dvb_gpio       = default_analog,
+               .dvb_gpio       = default_digital,
                .input          = { {
                        .type     = EM28XX_VMUX_TELEVISION,
                        .vmux     = TVP5150_COMPOSITE0,
index e7b47c8da8f3e7732208d666d952391717526883..3da97c32b8fad9ee2c315572143ba52fa217eef2 100644 (file)
@@ -243,6 +243,14 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = {
        .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
 /* [TODO] djh - not sure yet what the device config needs to contain */
 static struct drx397xD_config em28xx_drx397xD_with_xc3028 = {
@@ -433,7 +441,6 @@ static int dvb_init(struct em28xx *dev)
                }
                break;
        case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
-       case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2880_BOARD_KWORLD_DVB_310U:
        case EM2880_BOARD_EMPIRE_DUAL_TV:
                dvb->frontend = dvb_attach(zl10353_attach,
@@ -444,6 +451,25 @@ static int dvb_init(struct em28xx *dev)
                        goto out_free;
                }
                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 EM2882_BOARD_EVGA_INDTUBE:
                dvb->frontend = dvb_attach(s5h1409_attach,