diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2006-06-21 09:28:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:18 -0400 |
commit | 5aef20aeff7e9b0741ecc80365a3f7416900e494 (patch) | |
tree | 01dfc6c53845b70202da375510716a7703ca3a63 /drivers | |
parent | 3da2f4c0c64f4267594016c7bda3cc13fe7c95fb (diff) |
V4L/DVB (4171): Fix Daughterboard detection
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 33 | ||||
-rw-r--r-- | drivers/media/dvb/bt8xx/dst_common.h | 1 |
2 files changed, 6 insertions, 28 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 97d6c632542a..35d25c04e5c5 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -965,13 +965,11 @@ static int dst_get_tuner_info(struct dst_state *state) | |||
965 | get_tuner_2[7] = dst_check_sum(get_tuner_2, 7); | 965 | get_tuner_2[7] = dst_check_sum(get_tuner_2, 7); |
966 | dprintk(verbose, DST_ERROR, 1, "DST TYpe = MULTI FE"); | 966 | dprintk(verbose, DST_ERROR, 1, "DST TYpe = MULTI FE"); |
967 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { | 967 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { |
968 | // if (dst_command(state, get_tuner_2, 8) < 0) { | ||
969 | if (dst_command(state, get_tuner_1, 8) < 0) { | 968 | if (dst_command(state, get_tuner_1, 8) < 0) { |
970 | dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported"); | 969 | dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported"); |
971 | return -1; | 970 | return -1; |
972 | } | 971 | } |
973 | } else { | 972 | } else { |
974 | // if (dst_command(state, get_tuner_1, 8) < 0) { | ||
975 | if (dst_command(state, get_tuner_2, 8) < 0) { | 973 | if (dst_command(state, get_tuner_2, 8) < 0) { |
976 | dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported"); | 974 | dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported"); |
977 | return -1; | 975 | return -1; |
@@ -981,39 +979,18 @@ static int dst_get_tuner_info(struct dst_state *state) | |||
981 | memcpy(&state->board_info, &state->rxbuffer, 8); | 979 | memcpy(&state->board_info, &state->rxbuffer, 8); |
982 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { | 980 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { |
983 | dprintk(verbose, DST_ERROR, 1, "DST type has TS=188"); | 981 | dprintk(verbose, DST_ERROR, 1, "DST type has TS=188"); |
984 | /* | ||
985 | if (state->board_info[1] == 0x0b) { | ||
986 | if (state->type_flags & DST_TYPE_HAS_TS204) | ||
987 | state->type_flags &= ~DST_TYPE_HAS_TS204; | ||
988 | state->type_flags |= DST_TYPE_HAS_NEWTUNE; | ||
989 | dprintk(verbose, DST_INFO, 1, "DST type has TS=188"); | ||
990 | } else { | ||
991 | if (state->type_flags & DST_TYPE_HAS_NEWTUNE) | ||
992 | state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; | ||
993 | state->type_flags |= DST_TYPE_HAS_TS204; | ||
994 | dprintk(verbose, DST_INFO, 1, "DST type has TS=204"); | ||
995 | } | ||
996 | } else { | ||
997 | */ | ||
998 | } | 982 | } |
999 | if (state->board_info[0] == 0xbc) { | 983 | if (state->board_info[0] == 0xbc) { |
1000 | // if (state->type_flags & DST_TYPE_HAS_TS204) | 984 | if (state->type_flags != DST_TYPE_IS_ATSC) |
1001 | // state->type_flags &= ~DST_TYPE_HAS_TS204; | ||
1002 | // state->type_flags |= DST_TYPE_HAS_NEWTUNE; | ||
1003 | if (state->type_flags != DST_TYPE_IS_ATSC)) | ||
1004 | state->type_flags |= DST_TYPE_HAS_NEWTUNE; | 985 | state->type_flags |= DST_TYPE_HAS_NEWTUNE; |
1005 | else | 986 | else |
1006 | state->type_flags |= DST_TYPE_HAS_NEWTUNE_2; | 987 | state->type_flags |= DST_TYPE_HAS_NEWTUNE_2; |
1007 | 988 | ||
1008 | dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]); | 989 | if (state->board_info[1] == 0x01) { |
1009 | 990 | state->dst_hw_cap |= DST_TYPE_HAS_DBOARD; | |
1010 | } else if (state->board_info[0] == 0xcc) { | 991 | dprintk(verbose, DST_ERROR, 1, "DST has Daughterboard"); |
1011 | // if (state->type_flags & DST_TYPE_HAS_NEWTUNE) | 992 | } |
1012 | // state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; | ||
1013 | state->type_flags |= DST_TYPE_HAS_TS204; | ||
1014 | dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]); | ||
1015 | } | 993 | } |
1016 | // } | ||
1017 | 994 | ||
1018 | return 0; | 995 | return 0; |
1019 | } | 996 | } |
diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h index d384ab443e3b..abdaec848e17 100644 --- a/drivers/media/dvb/bt8xx/dst_common.h +++ b/drivers/media/dvb/bt8xx/dst_common.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define DST_TYPE_HAS_INC_COUNT 256 | 53 | #define DST_TYPE_HAS_INC_COUNT 256 |
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 | 57 | ||
57 | /* Card capability list */ | 58 | /* Card capability list */ |
58 | 59 | ||