aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c40
-rw-r--r--drivers/media/dvb/bt8xx/dst_common.h1
2 files changed, 23 insertions, 18 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 5aa34f8bcbfa..c538d272cf80 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -568,6 +568,8 @@ static void dst_type_flags_print(struct dst_state *state)
568 dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner 2", DST_TYPE_HAS_NEWTUNE_2); 568 dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner 2", DST_TYPE_HAS_NEWTUNE_2);
569 if (type_flags & DST_TYPE_HAS_TS204) 569 if (type_flags & DST_TYPE_HAS_TS204)
570 dprintk(verbose, DST_ERROR, 0, " 0x%x ts204", DST_TYPE_HAS_TS204); 570 dprintk(verbose, DST_ERROR, 0, " 0x%x ts204", DST_TYPE_HAS_TS204);
571 if (type_flags & DST_TYPE_HAS_VLF)
572 dprintk(verbose, DST_ERROR, 0, " 0x%x VLF", DST_TYPE_HAS_VLF);
571 if (type_flags & DST_TYPE_HAS_SYMDIV) 573 if (type_flags & DST_TYPE_HAS_SYMDIV)
572 dprintk(verbose, DST_ERROR, 0, " 0x%x symdiv", DST_TYPE_HAS_SYMDIV); 574 dprintk(verbose, DST_ERROR, 0, " 0x%x symdiv", DST_TYPE_HAS_SYMDIV);
573 if (type_flags & DST_TYPE_HAS_FW_1) 575 if (type_flags & DST_TYPE_HAS_FW_1)
@@ -825,7 +827,7 @@ static struct dst_types dst_tlist[] = {
825 .device_id = "DSTMCI", 827 .device_id = "DSTMCI",
826 .offset = 1, 828 .offset = 1,
827 .dst_type = DST_TYPE_IS_SAT, 829 .dst_type = DST_TYPE_IS_SAT,
828 .type_flags = DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_INC_COUNT, 830 .type_flags = DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_INC_COUNT | DST_TYPE_HAS_VLF,
829 .dst_feature = DST_TYPE_HAS_CA | DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4 831 .dst_feature = DST_TYPE_HAS_CA | DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4
830 | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC, 832 | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC,
831 .tuner_type = TUNER_TYPE_MULTI 833 .tuner_type = TUNER_TYPE_MULTI
@@ -844,7 +846,7 @@ static struct dst_types dst_tlist[] = {
844 .device_id = "DCT-CI", 846 .device_id = "DCT-CI",
845 .offset = 1, 847 .offset = 1,
846 .dst_type = DST_TYPE_IS_CABLE, 848 .dst_type = DST_TYPE_IS_CABLE,
847 .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_FW_2, 849 .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_VLF,
848 .dst_feature = DST_TYPE_HAS_CA, 850 .dst_feature = DST_TYPE_HAS_CA,
849 .tuner_type = 0 851 .tuner_type = 0
850 }, 852 },
@@ -862,7 +864,7 @@ static struct dst_types dst_tlist[] = {
862 .device_id = "DTT-CI", 864 .device_id = "DTT-CI",
863 .offset = 1, 865 .offset = 1,
864 .dst_type = DST_TYPE_IS_TERR, 866 .dst_type = DST_TYPE_IS_TERR,
865 .type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE, 867 .type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_VLF,
866 .dst_feature = DST_TYPE_HAS_CA, 868 .dst_feature = DST_TYPE_HAS_CA,
867 .tuner_type = 0 869 .tuner_type = 0
868 }, 870 },
@@ -1047,12 +1049,12 @@ static int dst_get_tuner_info(struct dst_state *state)
1047 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { 1049 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
1048 if (dst_command(state, get_tuner_1, 8) < 0) { 1050 if (dst_command(state, get_tuner_1, 8) < 0) {
1049 dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported"); 1051 dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported");
1050 return -1; 1052 goto force;
1051 } 1053 }
1052 } else { 1054 } else {
1053 if (dst_command(state, get_tuner_2, 8) < 0) { 1055 if (dst_command(state, get_tuner_2, 8) < 0) {
1054 dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported"); 1056 dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported");
1055 return -1; 1057 goto force;
1056 } 1058 }
1057 } 1059 }
1058 memset(&state->board_info, '\0', 8); 1060 memset(&state->board_info, '\0', 8);
@@ -1073,6 +1075,13 @@ static int dst_get_tuner_info(struct dst_state *state)
1073 } 1075 }
1074 1076
1075 return 0; 1077 return 0;
1078force:
1079 if (!strncmp(state->fw_name, "DCT-CI", 6)) {
1080 state->type_flags |= DST_TYPE_HAS_TS204;
1081 dprintk(verbose, DST_ERROR, 1, "Forcing [%s] to TS188", state->fw_name);
1082 }
1083
1084 return -1;
1076} 1085}
1077 1086
1078static int dst_get_device_id(struct dst_state *state) 1087static int dst_get_device_id(struct dst_state *state)
@@ -1189,7 +1198,6 @@ static int dst_probe(struct dst_state *state)
1189 } 1198 }
1190 if (dst_get_mac(state) < 0) { 1199 if (dst_get_mac(state) < 0) {
1191 dprintk(verbose, DST_INFO, 1, "MAC: Unsupported command"); 1200 dprintk(verbose, DST_INFO, 1, "MAC: Unsupported command");
1192 return 0;
1193 } 1201 }
1194 if ((state->type_flags & DST_TYPE_HAS_MULTI_FE) || (state->type_flags & DST_TYPE_HAS_FW_BUILD)) { 1202 if ((state->type_flags & DST_TYPE_HAS_MULTI_FE) || (state->type_flags & DST_TYPE_HAS_FW_BUILD)) {
1195 if (dst_get_tuner_info(state) < 0) 1203 if (dst_get_tuner_info(state) < 0)
@@ -1340,10 +1348,7 @@ static int dst_get_tuna(struct dst_state *state)
1340 state->diseq_flags &= ~(HAS_LOCK); 1348 state->diseq_flags &= ~(HAS_LOCK);
1341 if (!dst_wait_dst_ready(state, NO_DELAY)) 1349 if (!dst_wait_dst_ready(state, NO_DELAY))
1342 return -EIO; 1350 return -EIO;
1343// if (state->type_flags & DST_TYPE_HAS_NEWTUNE) 1351 if ((state->type_flags & DST_TYPE_HAS_VLF) &&
1344// /* how to get variable length reply ???? */
1345 if ((state->type_flags & DST_TYPE_HAS_TS188) &&
1346 !(state->dst_type == DST_TYPE_IS_CABLE) &&
1347 !(state->dst_type == DST_TYPE_IS_ATSC)) 1352 !(state->dst_type == DST_TYPE_IS_ATSC))
1348 1353
1349 retval = read_dst(state, state->rx_tuna, 10); 1354 retval = read_dst(state, state->rx_tuna, 10);
@@ -1353,8 +1358,7 @@ static int dst_get_tuna(struct dst_state *state)
1353 dprintk(verbose, DST_DEBUG, 1, "read not successful"); 1358 dprintk(verbose, DST_DEBUG, 1, "read not successful");
1354 return retval; 1359 return retval;
1355 } 1360 }
1356// if (state->type_flags & DST_TYPE_HAS_NEWTUNE) { 1361 if ((state->type_flags & DST_TYPE_HAS_VLF) &&
1357 if ((state->type_flags & DST_TYPE_HAS_TS188) &&
1358 !(state->dst_type == DST_TYPE_IS_CABLE) && 1362 !(state->dst_type == DST_TYPE_IS_CABLE) &&
1359 !(state->dst_type == DST_TYPE_IS_ATSC)) { 1363 !(state->dst_type == DST_TYPE_IS_ATSC)) {
1360 1364
@@ -1404,8 +1408,7 @@ static int dst_write_tuna(struct dvb_frontend *fe)
1404 goto error; 1408 goto error;
1405 } 1409 }
1406// if (state->type_flags & DST_TYPE_HAS_NEWTUNE) { 1410// if (state->type_flags & DST_TYPE_HAS_NEWTUNE) {
1407 if ((state->type_flags & DST_TYPE_HAS_TS188) && 1411 if ((state->type_flags & DST_TYPE_HAS_VLF) &&
1408 (!(state->dst_type == DST_TYPE_IS_CABLE)) &&
1409 (!(state->dst_type == DST_TYPE_IS_ATSC))) { 1412 (!(state->dst_type == DST_TYPE_IS_ATSC))) {
1410 1413
1411 state->tx_tuna[9] = dst_check_sum(&state->tx_tuna[0], 9); 1414 state->tx_tuna[9] = dst_check_sum(&state->tx_tuna[0], 9);
@@ -1561,7 +1564,8 @@ static int dst_init(struct dvb_frontend *fe)
1561 static u8 sat_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x55, 0xbd, 0x50, 0x00, 0x00 }; 1564 static u8 sat_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x55, 0xbd, 0x50, 0x00, 0x00 };
1562 static u8 ter_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; 1565 static u8 ter_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
1563 static u8 ter_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; 1566 static u8 ter_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
1564 static u8 cable_tuna[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; 1567 static u8 cab_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
1568 static u8 cab_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
1565 static u8 atsc_tuner[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; 1569 static u8 atsc_tuner[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 };
1566 1570
1567 state->inversion = INVERSION_OFF; 1571 state->inversion = INVERSION_OFF;
@@ -1572,11 +1576,11 @@ static int dst_init(struct dvb_frontend *fe)
1572 state->bandwidth = BANDWIDTH_7_MHZ; 1576 state->bandwidth = BANDWIDTH_7_MHZ;
1573 state->cur_jiff = jiffies; 1577 state->cur_jiff = jiffies;
1574 if (state->dst_type == DST_TYPE_IS_SAT) 1578 if (state->dst_type == DST_TYPE_IS_SAT)
1575 memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_TS188) ? sat_tuna_188 : sat_tuna_204), sizeof (sat_tuna_204)); 1579 memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? sat_tuna_188 : sat_tuna_204), sizeof (sat_tuna_204));
1576 else if (state->dst_type == DST_TYPE_IS_TERR) 1580 else if (state->dst_type == DST_TYPE_IS_TERR)
1577 memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_TS188) ? ter_tuna_188 : ter_tuna_204), sizeof (ter_tuna_204)); 1581 memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? ter_tuna_188 : ter_tuna_204), sizeof (ter_tuna_204));
1578 else if (state->dst_type == DST_TYPE_IS_CABLE) 1582 else if (state->dst_type == DST_TYPE_IS_CABLE)
1579 memcpy(state->tx_tuna, cable_tuna, sizeof (cable_tuna)); 1583 memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? cab_tuna_188 : cab_tuna_204), sizeof (cab_tuna_204));
1580 else if (state->dst_type == DST_TYPE_IS_ATSC) 1584 else if (state->dst_type == DST_TYPE_IS_ATSC)
1581 memcpy(state->tx_tuna, atsc_tuner, sizeof (atsc_tuner)); 1585 memcpy(state->tx_tuna, atsc_tuner, sizeof (atsc_tuner));
1582 1586
diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h
index 0e7e19543224..0677b047b3a7 100644
--- a/drivers/media/dvb/bt8xx/dst_common.h
+++ b/drivers/media/dvb/bt8xx/dst_common.h
@@ -54,6 +54,7 @@
54#define DST_TYPE_HAS_MULTI_FE 512 54#define DST_TYPE_HAS_MULTI_FE 512
55#define DST_TYPE_HAS_NEWTUNE_2 1024 55#define DST_TYPE_HAS_NEWTUNE_2 1024
56#define DST_TYPE_HAS_DBOARD 2048 56#define DST_TYPE_HAS_DBOARD 2048
57#define DST_TYPE_HAS_VLF 4096
57 58
58/* Card capability list */ 59/* Card capability list */
59 60