diff options
author | Manu Abraham <manu@linuxtv.org> | 2005-11-09 00:35:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:01 -0500 |
commit | 29b2f784da28cc8289f17a07360997093b7b0156 (patch) | |
tree | f87fc11e5e9ab8c9598f2869b6d37eebe60cb12f /drivers/media/dvb/bt8xx/dst.c | |
parent | b05a581d4865d74c0e270d27156a88d2dee9494e (diff) |
[PATCH] dvb: dst: Correcty Identify Tuner and Daughterboards
- Identify Tuner, Daughterboards correctly
- Added partial support for
VP-10320A (DVB-S), VP-20210 (DVB-C), VP-3040 (DVB-T)
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/bt8xx/dst.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index b3c9d7327ac1..6f9e5c168038 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -690,8 +690,8 @@ struct dst_types dst_tlist[] = { | |||
690 | .device_id = "DTT-CI", | 690 | .device_id = "DTT-CI", |
691 | .offset = 1, | 691 | .offset = 1, |
692 | .dst_type = DST_TYPE_IS_TERR, | 692 | .dst_type = DST_TYPE_IS_TERR, |
693 | .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_2, | 693 | .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE, |
694 | .dst_feature = 0 | 694 | .dst_feature = DST_TYPE_HAS_CA |
695 | }, | 695 | }, |
696 | 696 | ||
697 | { | 697 | { |
@@ -796,6 +796,56 @@ static int dst_get_vendor(struct dst_state *state) | |||
796 | return 0; | 796 | return 0; |
797 | } | 797 | } |
798 | 798 | ||
799 | static int dst_get_tuner_info(struct dst_state *state) | ||
800 | { | ||
801 | u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||
802 | u8 get_tuner_2[] = { 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||
803 | |||
804 | get_tuner_1[7] = dst_check_sum(get_tuner_1, 7); | ||
805 | get_tuner_2[7] = dst_check_sum(get_tuner_2, 7); | ||
806 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { | ||
807 | if (dst_command(state, get_tuner_2, 8) < 0) { | ||
808 | dprintk(verbose, DST_INFO, 1, "Unsupported Command"); | ||
809 | return -1; | ||
810 | } | ||
811 | } else { | ||
812 | if (dst_command(state, get_tuner_1, 8) < 0) { | ||
813 | dprintk(verbose, DST_INFO, 1, "Unsupported Command"); | ||
814 | return -1; | ||
815 | } | ||
816 | } | ||
817 | memset(&state->board_info, '\0', 8); | ||
818 | memcpy(&state->board_info, &state->rxbuffer, 8); | ||
819 | if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { | ||
820 | if (state->board_info[1] == 0x0b) { | ||
821 | if (state->type_flags & DST_TYPE_HAS_TS204) | ||
822 | state->type_flags &= ~DST_TYPE_HAS_TS204; | ||
823 | state->type_flags |= DST_TYPE_HAS_NEWTUNE; | ||
824 | dprintk(verbose, DST_INFO, 1, "DST type has TS=188"); | ||
825 | } else { | ||
826 | if (state->type_flags & DST_TYPE_HAS_NEWTUNE) | ||
827 | state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; | ||
828 | state->type_flags |= DST_TYPE_HAS_TS204; | ||
829 | dprintk(verbose, DST_INFO, 1, "DST type has TS=204"); | ||
830 | } | ||
831 | } else { | ||
832 | if (state->board_info[0] == 0xbc) { | ||
833 | if (state->type_flags & DST_TYPE_HAS_TS204) | ||
834 | state->type_flags &= ~DST_TYPE_HAS_TS204; | ||
835 | state->type_flags |= DST_TYPE_HAS_NEWTUNE; | ||
836 | dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]); | ||
837 | |||
838 | } else if (state->board_info[0] == 0xcc) { | ||
839 | if (state->type_flags & DST_TYPE_HAS_NEWTUNE) | ||
840 | state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; | ||
841 | state->type_flags |= DST_TYPE_HAS_TS204; | ||
842 | dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]); | ||
843 | } | ||
844 | } | ||
845 | |||
846 | return 0; | ||
847 | } | ||
848 | |||
799 | static int dst_get_device_id(struct dst_state *state) | 849 | static int dst_get_device_id(struct dst_state *state) |
800 | { | 850 | { |
801 | u8 reply; | 851 | u8 reply; |
@@ -886,6 +936,10 @@ static int dst_probe(struct dst_state *state) | |||
886 | dprintk(verbose, DST_INFO, 1, "MAC: Unsupported command"); | 936 | dprintk(verbose, DST_INFO, 1, "MAC: Unsupported command"); |
887 | return 0; | 937 | return 0; |
888 | } | 938 | } |
939 | if ((state->type_flags & DST_TYPE_HAS_MULTI_FE) || (state->type_flags & DST_TYPE_HAS_FW_BUILD)) { | ||
940 | if (dst_get_tuner_info(state) < 0) | ||
941 | dprintk(verbose, DST_INFO, 1, "Tuner: Unsupported command"); | ||
942 | } | ||
889 | if (state->type_flags & DST_TYPE_HAS_FW_BUILD) { | 943 | if (state->type_flags & DST_TYPE_HAS_FW_BUILD) { |
890 | if (dst_fw_ver(state) < 0) { | 944 | if (dst_fw_ver(state) < 0) { |
891 | dprintk(verbose, DST_INFO, 1, "FW: Unsupported command"); | 945 | dprintk(verbose, DST_INFO, 1, "FW: Unsupported command"); |