[media] cx23885: Removed a spurious function cx23885_set_scale()
[pandora-kernel.git] / drivers / media / video / cx23885 / cx23885-dvb.c
index 3c315f9..bcb45be 100644 (file)
@@ -37,6 +37,7 @@
 #include "tda8290.h"
 #include "tda18271.h"
 #include "lgdt330x.h"
+#include "xc4000.h"
 #include "xc5000.h"
 #include "max2165.h"
 #include "tda10048.h"
@@ -843,7 +844,7 @@ static int dvb_register(struct cx23885_tsport *port)
                        static struct xc2028_ctrl ctl = {
                                .fname   = XC3028L_DEFAULT_FIRMWARE,
                                .max_len = 64,
-                               .demod   = 5000,
+                               .demod   = XC3028_FE_DIBCOM52,
                                /* This is true for all demods with
                                        v36 firmware? */
                                .type    = XC2028_D2633,
@@ -921,6 +922,26 @@ static int dvb_register(struct cx23885_tsport *port)
                                fe->ops.tuner_ops.set_config(fe, &ctl);
                }
                break;
+       case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000:
+               i2c_bus = &dev->i2c_bus[0];
+
+               fe0->dvb.frontend = dvb_attach(zl10353_attach,
+                                              &dvico_fusionhdtv_xc3028,
+                                              &i2c_bus->i2c_adap);
+               if (fe0->dvb.frontend != NULL) {
+                       struct dvb_frontend     *fe;
+                       struct xc4000_config    cfg = {
+                               .i2c_address      = 0x61,
+                               .default_pm       = 0,
+                               .dvb_amplitude    = 134,
+                               .set_smoothedcvbs = 1,
+                               .if_khz           = 4560
+                       };
+
+                       fe = dvb_attach(xc4000_attach, fe0->dvb.frontend,
+                                       &dev->i2c_bus[1].i2c_adap, &cfg);
+               }
+               break;
        case CX23885_BOARD_TBS_6920:
                i2c_bus = &dev->i2c_bus[1];
 
@@ -1249,7 +1270,7 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
         * implement MFE support.
         */
        fe0 = videobuf_dvb_get_frontend(&port->frontends, 1);
-       if (fe0->dvb.frontend)
+       if (fe0 && fe0->dvb.frontend)
                videobuf_dvb_unregister_bus(&port->frontends);
 
        switch (port->dev->board) {