[media] cx23885: TeVii s471 card support
authorIgor M. Liplianin <liplianin@me.by>
Fri, 11 May 2012 14:45:42 +0000 (11:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 20 May 2012 14:09:26 +0000 (11:09 -0300)
The card is similar to TeVii s470, but has different LNB power control.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/ds3000.c
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-core.c
drivers/media/video/cx23885/cx23885-dvb.c
drivers/media/video/cx23885/cx23885.h

index af65d013db11e8ed843c555fe0dc73d114103729..4c8ac2657c4af0d602c0d776a8b98a03efcfdc21 100644 (file)
@@ -1114,7 +1114,10 @@ static int ds3000_set_frontend(struct dvb_frontend *fe)
                        ds3000_writereg(state,
                                ds3000_dvbs2_init_tab[i],
                                ds3000_dvbs2_init_tab[i + 1]);
-               ds3000_writereg(state, 0xfe, 0x98);
+               if (c->symbol_rate >= 30000000)
+                       ds3000_writereg(state, 0xfe, 0x54);
+               else
+                       ds3000_writereg(state, 0xfe, 0x98);
                break;
        default:
                return 1;
index 19b5499d2624cc9b130e8340062222fd12a465e3..13739e002a63fb6460bec16572bad10581fcb998 100644 (file)
@@ -497,6 +497,10 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "TerraTec Cinergy T PCIe Dual",
                .portb          = CX23885_MPEG_DVB,
                .portc          = CX23885_MPEG_DVB,
+       },
+       [CX23885_BOARD_TEVII_S471] = {
+               .name           = "TeVii S471",
+               .portb          = CX23885_MPEG_DVB,
        }
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -705,6 +709,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x153b,
                .subdevice = 0x117e,
                .card      = CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL,
+       }, {
+               .subvendor = 0xd471,
+               .subdevice = 0x9022,
+               .card      = CX23885_BOARD_TEVII_S471,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1460,6 +1468,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
                ts1->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
                break;
        case CX23885_BOARD_TEVII_S470:
+       case CX23885_BOARD_TEVII_S471:
        case CX23885_BOARD_DVBWORLD_2005:
                ts1->gen_ctrl_val  = 0x5; /* Parallel */
                ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
index 6ad227029a0f2b497f9b7853891fb107b85c192e..697728f0943037d2aed76a6a0eba841083b63c17 100644 (file)
@@ -1046,6 +1046,13 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
        if (cx23885_boards[dev->board].ci_type > 0)
                cx_clear(RDR_RDRCTL1, 1 << 8);
 
+       switch (dev->board) {
+       case CX23885_BOARD_TEVII_S470:
+       case CX23885_BOARD_TEVII_S471:
+               cx_clear(RDR_RDRCTL1, 1 << 8);
+               break;
+       }
+
        return 0;
 }
 
index 6835eb1fc09319cb52c006f6af6e299f7fc76833..a80a92c474558a4c555a473c89aa1df568c88288 100644 (file)
@@ -1173,6 +1173,13 @@ static int dvb_register(struct cx23885_tsport *port)
                        break;
                }
                break;
+       case CX23885_BOARD_TEVII_S471:
+               i2c_bus = &dev->i2c_bus[1];
+
+               fe0->dvb.frontend = dvb_attach(ds3000_attach,
+                                       &tevii_ds3000_config,
+                                       &i2c_bus->i2c_adap);
+               break;
        default:
                printk(KERN_INFO "%s: The frontend of your DVB/ATSC card "
                        " isn't supported yet\n",
index f020f0568df4a8c8c15d098c1c4d6ad9f39367f5..d884784a1c8582f8a97c379dacc5ef603d2f934c 100644 (file)
@@ -89,6 +89,7 @@
 #define CX23885_BOARD_MPX885                   32
 #define CX23885_BOARD_MYGICA_X8507             33
 #define CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL 34
+#define CX23885_BOARD_TEVII_S471               35
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002