aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/bt8xx/dst.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 17b3c650cad7..2475cb6fb587 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -667,7 +667,7 @@ static struct dst_types dst_tlist[] = {
667 .device_id = "DST-CI", 667 .device_id = "DST-CI",
668 .offset = 1, 668 .offset = 1,
669 .dst_type = DST_TYPE_IS_SAT, 669 .dst_type = DST_TYPE_IS_SAT,
670 .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1, 670 .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_1,
671 .dst_feature = DST_TYPE_HAS_CA 671 .dst_feature = DST_TYPE_HAS_CA
672 }, /* An OEM board */ 672 }, /* An OEM board */
673 673
@@ -692,8 +692,7 @@ static struct dst_types dst_tlist[] = {
692 .device_id = "DCT-CI", 692 .device_id = "DCT-CI",
693 .offset = 1, 693 .offset = 1,
694 .dst_type = DST_TYPE_IS_CABLE, 694 .dst_type = DST_TYPE_IS_CABLE,
695 .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1 695 .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_FW_2,
696 | DST_TYPE_HAS_FW_2,
697 .dst_feature = DST_TYPE_HAS_CA 696 .dst_feature = DST_TYPE_HAS_CA
698 }, 697 },
699 698
@@ -709,7 +708,7 @@ static struct dst_types dst_tlist[] = {
709 .device_id = "DTT-CI", 708 .device_id = "DTT-CI",
710 .offset = 1, 709 .offset = 1,
711 .dst_type = DST_TYPE_IS_TERR, 710 .dst_type = DST_TYPE_IS_TERR,
712 .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE, 711 .type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE,
713 .dst_feature = DST_TYPE_HAS_CA 712 .dst_feature = DST_TYPE_HAS_CA
714 }, 713 },
715 714
@@ -741,7 +740,7 @@ static struct dst_types dst_tlist[] = {
741 .device_id = "ATSCAD", 740 .device_id = "ATSCAD",
742 .offset = 1, 741 .offset = 1,
743 .dst_type = DST_TYPE_IS_ATSC, 742 .dst_type = DST_TYPE_IS_ATSC,
744 .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD, 743 .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD,
745 .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG 744 .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG
746 }, 745 },
747 746
@@ -822,20 +821,25 @@ static int dst_get_tuner_info(struct dst_state *state)
822 821
823 get_tuner_1[7] = dst_check_sum(get_tuner_1, 7); 822 get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
824 get_tuner_2[7] = dst_check_sum(get_tuner_2, 7); 823 get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
824 dprintk(verbose, DST_ERROR, 1, "DST TYpe = MULTI FE");
825 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { 825 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
826 if (dst_command(state, get_tuner_2, 8) < 0) { 826// if (dst_command(state, get_tuner_2, 8) < 0) {
827 dprintk(verbose, DST_INFO, 1, "Unsupported Command"); 827 if (dst_command(state, get_tuner_1, 8) < 0) {
828 dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported");
828 return -1; 829 return -1;
829 } 830 }
830 } else { 831 } else {
831 if (dst_command(state, get_tuner_1, 8) < 0) { 832// if (dst_command(state, get_tuner_1, 8) < 0) {
832 dprintk(verbose, DST_INFO, 1, "Unsupported Command"); 833 if (dst_command(state, get_tuner_2, 8) < 0) {
834 dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported");
833 return -1; 835 return -1;
834 } 836 }
835 } 837 }
836 memset(&state->board_info, '\0', 8); 838 memset(&state->board_info, '\0', 8);
837 memcpy(&state->board_info, &state->rxbuffer, 8); 839 memcpy(&state->board_info, &state->rxbuffer, 8);
838 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { 840 if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
841 dprintk(verbose, DST_ERROR, 1, "DST type has TS=188");
842/*
839 if (state->board_info[1] == 0x0b) { 843 if (state->board_info[1] == 0x0b) {
840 if (state->type_flags & DST_TYPE_HAS_TS204) 844 if (state->type_flags & DST_TYPE_HAS_TS204)
841 state->type_flags &= ~DST_TYPE_HAS_TS204; 845 state->type_flags &= ~DST_TYPE_HAS_TS204;
@@ -848,19 +852,21 @@ static int dst_get_tuner_info(struct dst_state *state)
848 dprintk(verbose, DST_INFO, 1, "DST type has TS=204"); 852 dprintk(verbose, DST_INFO, 1, "DST type has TS=204");
849 } 853 }
850 } else { 854 } else {
851 if (state->board_info[0] == 0xbc) { 855*/
852 if (state->type_flags & DST_TYPE_HAS_TS204) 856 }
853 state->type_flags &= ~DST_TYPE_HAS_TS204; 857 if (state->board_info[0] == 0xbc) {
854 state->type_flags |= DST_TYPE_HAS_NEWTUNE; 858// if (state->type_flags & DST_TYPE_HAS_TS204)
855 dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]); 859// state->type_flags &= ~DST_TYPE_HAS_TS204;
860 state->type_flags |= DST_TYPE_HAS_NEWTUNE;
861 dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]);
856 862
857 } else if (state->board_info[0] == 0xcc) { 863 } else if (state->board_info[0] == 0xcc) {
858 if (state->type_flags & DST_TYPE_HAS_NEWTUNE) 864// if (state->type_flags & DST_TYPE_HAS_NEWTUNE)
859 state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; 865// state->type_flags &= ~DST_TYPE_HAS_NEWTUNE;
860 state->type_flags |= DST_TYPE_HAS_TS204; 866 state->type_flags |= DST_TYPE_HAS_TS204;
861 dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]); 867 dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]);
862 }
863 } 868 }
869// }
864 870
865 return 0; 871 return 0;
866} 872}