]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/bt8xx/dst.c
V4L/DVB (4170): ATSC typecheck bugfix
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / bt8xx / dst.c
index 0e35406557e38493d425f41f0788da35d3e84957..97d6c632542a050fd1c96e488d8eb21e83bf7ac1 100644 (file)
@@ -38,6 +38,10 @@ static unsigned int dst_addons;
 module_param(dst_addons, int, 0644);
 MODULE_PARM_DESC(dst_addons, "CA daughterboard, default is 0 (No addons)");
 
+static unsigned int dst_algo;
+module_param(dst_algo, int, 0644);
+MODULE_PARM_DESC(dst_algo, "tuning algo: default is 0=(SW), 1=(HW)");
+
 #define HAS_LOCK               1
 #define ATTEMPT_TUNE           2
 #define HAS_POWER              4
@@ -539,6 +543,8 @@ static void dst_type_flags_print(u32 type_flags)
        dprintk(verbose, DST_ERROR, 0, "DST type flags :");
        if (type_flags & DST_TYPE_HAS_NEWTUNE)
                dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner", DST_TYPE_HAS_NEWTUNE);
+       if (type_flags & DST_TYPE_HAS_NEWTUNE_2)
+               dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner 2", DST_TYPE_HAS_NEWTUNE_2);
        if (type_flags & DST_TYPE_HAS_TS204)
                dprintk(verbose, DST_ERROR, 0, " 0x%x ts204", DST_TYPE_HAS_TS204);
        if (type_flags & DST_TYPE_HAS_SYMDIV)
@@ -582,6 +588,120 @@ static int dst_type_print(u8 type)
        return 0;
 }
 
+struct tuner_types tuner_list[] = {
+       {
+               .tuner_type = TUNER_TYPE_L64724,
+               .tuner_name = "L 64724",
+               .board_name = "UNKNOWN",
+               .fw_name    = "UNKNOWN"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_STV0299,
+               .tuner_name = "STV 0299",
+               .board_name = "VP1020",
+               .fw_name    = "DST-MOT"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_STV0299,
+               .tuner_name = "STV 0299",
+               .board_name = "VP1020",
+               .fw_name    = "DST-03T"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_MB86A15,
+               .tuner_name = "MB 86A15",
+               .board_name = "VP1022",
+               .fw_name    = "DST-03T"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_MB86A15,
+               .tuner_name = "MB 86A15",
+               .board_name = "VP1025",
+               .fw_name    = "DST-03T"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_STV0299,
+               .tuner_name = "STV 0299",
+               .board_name = "VP1030",
+               .fw_name    = "DST-CI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_STV0299,
+               .tuner_name = "STV 0299",
+               .board_name = "VP1030",
+               .fw_name    = "DSTMCI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP2030",
+               .fw_name    = "DCT-CI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP2031",
+               .fw_name    = "DCT-CI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP2040",
+               .fw_name    = "DCT-CI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP3020",
+               .fw_name    = "DTTFTA"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP3021",
+               .fw_name    = "DTTFTA"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_TDA10046,
+               .tuner_name = "TDA10046",
+               .board_name = "VP3040",
+               .fw_name    = "DTT-CI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_UNKNOWN,
+               .tuner_name = "UNKNOWN",
+               .board_name = "VP3051",
+               .fw_name    = "DTTNXT"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_NXT200x,
+               .tuner_name = "NXT200x",
+               .board_name = "VP3220",
+               .fw_name    = "ATSCDI"
+       },
+
+       {
+               .tuner_type = TUNER_TYPE_NXT200x,
+               .tuner_name = "NXT200x",
+               .board_name = "VP3250",
+               .fw_name    = "ATSCAD"
+       },
+};
+
 /*
        Known cards list
        Satellite
@@ -623,7 +743,8 @@ static struct dst_types dst_tlist[] = {
                .offset = 0,
                .dst_type =  DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_OBS_REGS,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },      /*      obsolete        */
 
        {
@@ -631,7 +752,8 @@ static struct dst_types dst_tlist[] = {
                .offset = 0,
                .dst_type =  DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },      /*      obsolete        */
 
        {
@@ -639,7 +761,8 @@ static struct dst_types dst_tlist[] = {
                .offset =  0,
                .dst_type = DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },      /*      obsolete        */
 
        {
@@ -648,7 +771,8 @@ static struct dst_types dst_tlist[] = {
                .dst_type = DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_2,
                .dst_feature = DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4 | DST_TYPE_HAS_DISEQC5
-                                                        | DST_TYPE_HAS_MAC | DST_TYPE_HAS_MOTO
+                                                        | DST_TYPE_HAS_MAC | DST_TYPE_HAS_MOTO,
+               .tuner_type = TUNER_TYPE_MULTI
         },
 
        {
@@ -656,15 +780,17 @@ static struct dst_types dst_tlist[] = {
                .offset =  0,
                .dst_type = DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },      /*      obsolete        */
 
        {
                .device_id = "DST-CI",
                .offset = 1,
                .dst_type = DST_TYPE_IS_SAT,
-               .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1,
-               .dst_feature = DST_TYPE_HAS_CA
+               .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_1,
+               .dst_feature = DST_TYPE_HAS_CA,
+               .tuner_type = 0
        },      /*      An OEM board    */
 
        {
@@ -673,7 +799,8 @@ static struct dst_types dst_tlist[] = {
                .dst_type = DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_INC_COUNT,
                .dst_feature = DST_TYPE_HAS_CA | DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4
-                                                       | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC
+                                                       | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC,
+               .tuner_type = TUNER_TYPE_MULTI
        },
 
        {
@@ -681,16 +808,17 @@ static struct dst_types dst_tlist[] = {
                .offset = 1,
                .dst_type = DST_TYPE_IS_SAT,
                .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },      /* unknown to vendor    */
 
        {
                .device_id = "DCT-CI",
                .offset = 1,
                .dst_type = DST_TYPE_IS_CABLE,
-               .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1
-                                                       | DST_TYPE_HAS_FW_2,
-               .dst_feature = DST_TYPE_HAS_CA
+               .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_FW_2,
+               .dst_feature = DST_TYPE_HAS_CA,
+               .tuner_type = 0
        },
 
        {
@@ -698,15 +826,17 @@ static struct dst_types dst_tlist[] = {
                .offset = 1,
                .dst_type = DST_TYPE_IS_CABLE,
                .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_3 | DST_TYPE_HAS_FW_BUILD,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },
 
        {
                .device_id = "DTT-CI",
                .offset = 1,
                .dst_type = DST_TYPE_IS_TERR,
-               .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE,
-               .dst_feature = DST_TYPE_HAS_CA
+               .type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE,
+               .dst_feature = DST_TYPE_HAS_CA,
+               .tuner_type = 0
        },
 
        {
@@ -714,7 +844,8 @@ static struct dst_types dst_tlist[] = {
                .offset = 1,
                .dst_type = DST_TYPE_IS_TERR,
                .type_flags = DST_TYPE_HAS_FW_2,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },
 
        {
@@ -722,7 +853,8 @@ static struct dst_types dst_tlist[] = {
                .offset = 1,
                .dst_type = DST_TYPE_IS_TERR,
                .type_flags = DST_TYPE_HAS_FW_2,
-               .dst_feature = DST_TYPE_HAS_ANALOG
+               .dst_feature = DST_TYPE_HAS_ANALOG,
+               .tuner_type = 0
        },
 
        {
@@ -730,15 +862,17 @@ static struct dst_types dst_tlist[] = {
                .offset = 1,
                .dst_type = DST_TYPE_IS_ATSC,
                .type_flags = DST_TYPE_HAS_FW_2,
-               .dst_feature = 0
+               .dst_feature = 0,
+               .tuner_type = 0
        },
 
        {
                .device_id = "ATSCAD",
                .offset = 1,
                .dst_type = DST_TYPE_IS_ATSC,
-               .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD,
-               .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG
+               .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD,
+               .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG,
+               .tuner_type = 0
        },
 
        { }
@@ -783,6 +917,9 @@ static int dst_fw_ver(struct dst_state *state)
 
 static int dst_card_type(struct dst_state *state)
 {
+       int j;
+       struct tuner_types *p_tuner_list = NULL;
+
        u8 get_type[] = { 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
        get_type[7] = dst_check_sum(get_type, 7);
        if (dst_command(state, get_type, 8) < 0) {
@@ -790,9 +927,17 @@ static int dst_card_type(struct dst_state *state)
                return -1;
        }
        memset(&state->card_info, '\0', 8);
-       memcpy(&state->card_info, &state->rxbuffer, 8);
+       memcpy(&state->card_info, &state->rxbuffer, 7);
        dprintk(verbose, DST_ERROR, 1, "Device Model=[%s]", &state->card_info[0]);
 
+       for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) {
+               if (!strcmp(&state->card_info[0], p_tuner_list->board_name)) {
+                       state->tuner_type = p_tuner_list->tuner_type;
+                       dprintk(verbose, DST_ERROR, 1, "DST has [%s] tuner, tuner type=[%d]\n",
+                               p_tuner_list->tuner_name, p_tuner_list->tuner_type);
+               }
+       }
+
        return 0;
 }
 
@@ -805,7 +950,7 @@ static int dst_get_vendor(struct dst_state *state)
                return -1;
        }
        memset(&state->vendor, '\0', 8);
-       memcpy(&state->vendor, &state->rxbuffer, 8);
+       memcpy(&state->vendor, &state->rxbuffer, 7);
        dprintk(verbose, DST_ERROR, 1, "Vendor=[%s]", &state->vendor[0]);
 
        return 0;
@@ -818,20 +963,25 @@ static int dst_get_tuner_info(struct dst_state *state)
 
        get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
        get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
+       dprintk(verbose, DST_ERROR, 1, "DST TYpe = MULTI FE");
        if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
-               if (dst_command(state, get_tuner_2, 8) < 0) {
-                       dprintk(verbose, DST_INFO, 1, "Unsupported Command");
+//             if (dst_command(state, get_tuner_2, 8) < 0) {
+               if (dst_command(state, get_tuner_1, 8) < 0) {
+                       dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported");
                        return -1;
                }
        } else {
-               if (dst_command(state, get_tuner_1, 8) < 0) {
-                       dprintk(verbose, DST_INFO, 1, "Unsupported Command");
+//             if (dst_command(state, get_tuner_1, 8) < 0) {
+               if (dst_command(state, get_tuner_2, 8) < 0) {
+                       dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported");
                        return -1;
                }
        }
        memset(&state->board_info, '\0', 8);
        memcpy(&state->board_info, &state->rxbuffer, 8);
        if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
+               dprintk(verbose, DST_ERROR, 1, "DST type has TS=188");
+/*
                if (state->board_info[1] == 0x0b) {
                        if (state->type_flags & DST_TYPE_HAS_TS204)
                                state->type_flags &= ~DST_TYPE_HAS_TS204;
@@ -844,19 +994,26 @@ static int dst_get_tuner_info(struct dst_state *state)
                        dprintk(verbose, DST_INFO, 1, "DST type has TS=204");
                }
        } else {
-               if (state->board_info[0] == 0xbc) {
-                       if (state->type_flags & DST_TYPE_HAS_TS204)
-                               state->type_flags &= ~DST_TYPE_HAS_TS204;
+*/
+       }
+       if (state->board_info[0] == 0xbc) {
+//             if (state->type_flags & DST_TYPE_HAS_TS204)
+//                     state->type_flags &= ~DST_TYPE_HAS_TS204;
+//             state->type_flags |= DST_TYPE_HAS_NEWTUNE;
+               if (state->type_flags != DST_TYPE_IS_ATSC))
                        state->type_flags |= DST_TYPE_HAS_NEWTUNE;
-                       dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]);
+               else
+                       state->type_flags |= DST_TYPE_HAS_NEWTUNE_2;
 
-               } else if (state->board_info[0] == 0xcc) {
-                       if (state->type_flags & DST_TYPE_HAS_NEWTUNE)
-                               state->type_flags &= ~DST_TYPE_HAS_NEWTUNE;
-                       state->type_flags |= DST_TYPE_HAS_TS204;
-                       dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]);
-               }
+               dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]);
+
+       } else if (state->board_info[0] == 0xcc) {
+//             if (state->type_flags & DST_TYPE_HAS_NEWTUNE)
+//                     state->type_flags &= ~DST_TYPE_HAS_NEWTUNE;
+               state->type_flags |= DST_TYPE_HAS_TS204;
+               dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]);
        }
+//     }
 
        return 0;
 }
@@ -865,8 +1022,10 @@ static int dst_get_device_id(struct dst_state *state)
 {
        u8 reply;
 
-       int i;
+       int i, j;
        struct dst_types *p_dst_type;
+       struct tuner_types *p_tuner_list;
+
        u8 use_dst_type = 0;
        u32 use_type_flags = 0;
 
@@ -905,6 +1064,16 @@ static int dst_get_device_id(struct dst_state *state)
                        state->dst_hw_cap = p_dst_type->dst_feature;
                        dprintk(verbose, DST_ERROR, 1, "Recognise [%s]\n", p_dst_type->device_id);
 
+                       if (p_dst_type->tuner_type != TUNER_TYPE_MULTI) {
+                               state->tuner_type = p_dst_type->tuner_type;
+
+                               for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) {
+                                       if (p_dst_type->tuner_type == p_tuner_list->tuner_type) {
+                                               state->tuner_type = p_tuner_list->tuner_type;
+                                               dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner\n", p_tuner_list->tuner_name);
+                                       }
+                               }
+                       }
                        break;
                }
        }
@@ -926,15 +1095,15 @@ static int dst_get_device_id(struct dst_state *state)
 static int dst_probe(struct dst_state *state)
 {
        mutex_init(&state->dst_mutex);
-       if ((rdc_8820_reset(state)) < 0) {
-               dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed.");
-               return -1;
-       }
-       if (dst_addons & DST_TYPE_HAS_CA)
+       if (dst_addons & DST_TYPE_HAS_CA) {
+               if ((rdc_8820_reset(state)) < 0) {
+                       dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed.");
+                       return -1;
+               }
                msleep(4000);
-       else
+       } else {
                msleep(100);
-
+       }
        if ((dst_comm_init(state)) < 0) {
                dprintk(verbose, DST_ERROR, 1, "DST Initialization Failed.");
                return -1;
@@ -1308,6 +1477,7 @@ static int dst_init(struct dvb_frontend *fe)
        static u8 ter_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
        static u8 cab_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
        static u8 cab_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
+       static u8 atsc_tuner[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
 
        state->inversion = INVERSION_OFF;
        state->voltage = SEC_VOLTAGE_13;
@@ -1322,6 +1492,8 @@ static int dst_init(struct dvb_frontend *fe)
                memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_NEWTUNE) ? ter_tuna_188 : ter_tuna_204), sizeof (ter_tuna_204));
        else if (state->dst_type == DST_TYPE_IS_CABLE)
                memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_NEWTUNE) ? cab_tuna_188 : cab_tuna_204), sizeof (cab_tuna_204));
+       else if (state->dst_type == DST_TYPE_IS_ATSC)
+               memcpy(state->tx_tuna, atsc_tuner, sizeof (atsc_tuner));
 
        return 0;
 }
@@ -1360,7 +1532,36 @@ static int dst_read_snr(struct dvb_frontend *fe, u16 *snr)
        return 0;
 }
 
-static int dst_set_frontend(struct dvb_frontend* fe,
+static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
+{
+       struct dst_state *state = fe->demodulator_priv;
+
+       if (p != NULL) {
+               dst_set_freq(state, p->frequency);
+               dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
+
+               if (state->dst_type == DST_TYPE_IS_SAT) {
+                       if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
+                               dst_set_inversion(state, p->inversion);
+                       dst_set_fec(state, p->u.qpsk.fec_inner);
+                       dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
+                       dst_set_polarization(state);
+                       dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
+
+               } else if (state->dst_type == DST_TYPE_IS_TERR)
+                       dst_set_bandwidth(state, p->u.ofdm.bandwidth);
+               else if (state->dst_type == DST_TYPE_IS_CABLE) {
+                       dst_set_fec(state, p->u.qam.fec_inner);
+                       dst_set_symbolrate(state, p->u.qam.symbol_rate);
+                       dst_set_modulation(state, p->u.qam.modulation);
+               }
+               dst_write_tuna(fe);
+       }
+
+       return 0;
+}
+
+static int dst_tune_frontend(struct dvb_frontend* fe,
                            struct dvb_frontend_parameters* p,
                            unsigned int mode_flags,
                            int *delay,
@@ -1397,6 +1598,11 @@ static int dst_set_frontend(struct dvb_frontend* fe,
        return 0;
 }
 
+static int dst_get_tuning_algo(struct dvb_frontend *fe)
+{
+       return dst_algo;
+}
+
 static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
 {
        struct dst_state *state = fe->demodulator_priv;
@@ -1476,8 +1682,10 @@ static struct dvb_frontend_ops dst_dvbt_ops = {
 
        .release = dst_release,
        .init = dst_init,
-       .tune = dst_set_frontend,
+       .tune = dst_tune_frontend,
+       .set_frontend = dst_set_frontend,
        .get_frontend = dst_get_frontend,
+       .get_frontend_algo = dst_get_tuning_algo,
        .read_status = dst_read_status,
        .read_signal_strength = dst_read_signal_strength,
        .read_snr = dst_read_snr,
@@ -1500,8 +1708,10 @@ static struct dvb_frontend_ops dst_dvbs_ops = {
 
        .release = dst_release,
        .init = dst_init,
-       .tune = dst_set_frontend,
+       .tune = dst_tune_frontend,
+       .set_frontend = dst_set_frontend,
        .get_frontend = dst_get_frontend,
+       .get_frontend_algo = dst_get_tuning_algo,
        .read_status = dst_read_status,
        .read_signal_strength = dst_read_signal_strength,
        .read_snr = dst_read_snr,
@@ -1527,8 +1737,10 @@ static struct dvb_frontend_ops dst_dvbc_ops = {
 
        .release = dst_release,
        .init = dst_init,
-       .tune = dst_set_frontend,
+       .tune = dst_tune_frontend,
+       .set_frontend = dst_set_frontend,
        .get_frontend = dst_get_frontend,
+       .get_frontend_algo = dst_get_tuning_algo,
        .read_status = dst_read_status,
        .read_signal_strength = dst_read_signal_strength,
        .read_snr = dst_read_snr,
@@ -1548,8 +1760,10 @@ static struct dvb_frontend_ops dst_atsc_ops = {
 
        .release = dst_release,
        .init = dst_init,
-       .tune = dst_set_frontend,
+       .tune = dst_tune_frontend,
+       .set_frontend = dst_set_frontend,
        .get_frontend = dst_get_frontend,
+       .get_frontend_algo = dst_get_tuning_algo,
        .read_status = dst_read_status,
        .read_signal_strength = dst_read_signal_strength,
        .read_snr = dst_read_snr,