]> err.no Git - linux-2.6/blobdiff - drivers/media/video/cx88/cx88-cards.c
V4L (0990): Enable IR support for the Nova-S-Plus
[linux-2.6] / drivers / media / video / cx88 / cx88-cards.c
index f2268631b7c01246546cbfb26e53eb28031d9bbe..1976e04d8ace15a1d6616f514bfc3ba5568295a9 100644 (file)
@@ -567,6 +567,7 @@ struct cx88_board cx88_boards[] = {
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
+               .tda9887_conf   = TDA9887_PRESENT,
                .input          = {{
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
@@ -711,6 +712,7 @@ struct cx88_board cx88_boards[] = {
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
+               .tda9887_conf   = TDA9887_PRESENT,
                .input          = {{
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
@@ -895,6 +897,37 @@ struct cx88_board cx88_boards[] = {
                        .gpio3  = 0x0000,
                }},
        },
+       [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
+               .name           = "Hauppauge Nova-S-Plus DVB-S",
+               .tuner_type     = TUNER_ABSENT,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               /* fixme: add the analog gpio stuff here */
+               .input          = {{
+                       .type   = CX88_VMUX_DVB,
+                       .vmux   = 0,
+               },{
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+               }},
+               .dvb            = 1,
+       },
+       [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
+               .name           = "Hauppauge Nova-SE2 DVB-S",
+               .tuner_type     = TUNER_ABSENT,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .input          = {{
+                       .type   = CX88_VMUX_DVB,
+                       .vmux   = 0,
+               }},
+               .dvb            = 1,
+       },
 };
 const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
 
@@ -1042,6 +1075,18 @@ struct cx88_subid cx88_subids[] = {
                .subvendor = 0x1461,
                .subdevice = 0x000a,
                .card      = CX88_BOARD_AVERTV_303,
+       },{
+               .subvendor = 0x0070,
+               .subdevice = 0x9200,
+               .card      = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
+       },{
+               .subvendor = 0x0070,
+               .subdevice = 0x9201,
+               .card      = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
+       },{
+               .subvendor = 0x0070,
+               .subdevice = 0x9202,
+               .card      = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
        },
 };
 const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
@@ -1083,41 +1128,28 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
        tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
        core->tuner_type = tv.tuner_type;
        core->has_radio  = tv.has_radio;
-}
-
-static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee)
-{
-       int model;
-       int tuner;
 
        /* Make sure we support the board model */
-       model = ee[0x1f] << 24 | ee[0x1e] << 16 | ee[0x1d] << 8 | ee[0x1c];
-       switch(model) {
-       case 90002:
-       case 90500:
-       case 90501:
+       switch (tv.model)
+       {
+       case 90002: /* Nova-T-PCI (9002) */
+       case 92001: /* Nova-S-Plus (Video and IR) */
+       case 92002: /* Nova-S-Plus (Video and IR) */
+       case 90003: /* Nova-T-PCI (9002 No RF out) */
+       case 90500: /* Nova-T-PCI (oem) */
+       case 90501: /* Nova-T-PCI (oem/IR) */
+       case 92000: /* Nova-SE2 (OEM, No Video or IR) */
+
                /* known */
                break;
        default:
                printk("%s: warning: unknown hauppauge model #%d\n",
-                      core->name, model);
+                      core->name, tv.model);
                break;
        }
 
-       /* Make sure we support the tuner */
-       tuner = ee[0x2d];
-       switch(tuner) {
-       case 0x4B: /* dtt 7595 */
-       case 0x4C: /* dtt 7592 */
-               break;
-       default:
-               printk("%s: error: unknown hauppauge tuner 0x%02x\n",
-                      core->name, tuner);
-               return -ENODEV;
-       }
-       printk(KERN_INFO "%s: hauppauge eeprom: model=%d, tuner=%d\n",
-              core->name, model, tuner);
-       return 0;
+       printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
+                       core->name, tv.model);
 }
 
 /* ----------------------------------------------------------------------- */
@@ -1201,7 +1233,7 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
 
 void cx88_card_setup(struct cx88_core *core)
 {
-       static u8 eeprom[128];
+       static u8 eeprom[256];
 
        if (0 == core->i2c_rc) {
                core->i2c_client.addr = 0xa0 >> 1;
@@ -1222,9 +1254,11 @@ void cx88_card_setup(struct cx88_core *core)
                if (0 == core->i2c_rc)
                        leadtek_eeprom(core,eeprom);
                break;
+       case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
+       case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
        case CX88_BOARD_HAUPPAUGE_DVB_T1:
                if (0 == core->i2c_rc)
-                       hauppauge_eeprom_dvb(core,eeprom);
+                       hauppauge_eeprom(core,eeprom);
                break;
        case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
        case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: