diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2006-06-21 09:28:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:17 -0400 |
commit | 364f255af783a105b262eae018f0cad68e186681 (patch) | |
tree | 1fe87d02376c1a9eebaf9cc29e48473c33d9b4d8 /drivers/media/dvb | |
parent | 351634d27a90a7668554452f4ba1688043aa1128 (diff) |
V4L/DVB (4167): Add Board Names
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 30 | ||||
-rw-r--r-- | drivers/media/dvb/bt8xx/dst_common.h | 7 |
2 files changed, 32 insertions, 5 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 68db48bf89f4..21f327d9f7d5 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -589,18 +589,27 @@ static int dst_type_print(u8 type) | |||
589 | struct tuner_types tuner_list[] = { | 589 | struct tuner_types tuner_list[] = { |
590 | { | 590 | { |
591 | .tuner_type = 2, | 591 | .tuner_type = 2, |
592 | .tuner_name = "L 64724" | 592 | .tuner_name = "L 64724", |
593 | .board_name = " " | ||
593 | }, | 594 | }, |
594 | 595 | ||
595 | { | 596 | { |
596 | .tuner_type = 4, | 597 | .tuner_type = 4, |
597 | .tuner_name = "STV 0299" | 598 | .tuner_name = "STV 0299", |
599 | .board_name = "VP1030" | ||
598 | }, | 600 | }, |
599 | 601 | ||
600 | { | 602 | { |
601 | .tuner_type = 8, | 603 | .tuner_type = 8, |
602 | .tuner_name = "MB 86A15" | 604 | .tuner_name = "MB 86A15", |
605 | .board_name = "VP1025" | ||
603 | }, | 606 | }, |
607 | |||
608 | { | ||
609 | .tuner_type = 16, | ||
610 | .tuner_name = "NXT 200x", | ||
611 | .board_name = "VP3250" | ||
612 | } | ||
604 | }; | 613 | }; |
605 | 614 | ||
606 | /* | 615 | /* |
@@ -818,6 +827,9 @@ static int dst_fw_ver(struct dst_state *state) | |||
818 | 827 | ||
819 | static int dst_card_type(struct dst_state *state) | 828 | static int dst_card_type(struct dst_state *state) |
820 | { | 829 | { |
830 | int j; | ||
831 | struct tuner_types *p_tuner_list = NULL; | ||
832 | |||
821 | u8 get_type[] = { 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | 833 | u8 get_type[] = { 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
822 | get_type[7] = dst_check_sum(get_type, 7); | 834 | get_type[7] = dst_check_sum(get_type, 7); |
823 | if (dst_command(state, get_type, 8) < 0) { | 835 | if (dst_command(state, get_type, 8) < 0) { |
@@ -828,6 +840,14 @@ static int dst_card_type(struct dst_state *state) | |||
828 | memcpy(&state->card_info, &state->rxbuffer, 7); | 840 | memcpy(&state->card_info, &state->rxbuffer, 7); |
829 | dprintk(verbose, DST_ERROR, 1, "Device Model=[%s]", &state->card_info[0]); | 841 | dprintk(verbose, DST_ERROR, 1, "Device Model=[%s]", &state->card_info[0]); |
830 | 842 | ||
843 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { | ||
844 | if (!strcmp(&state->card_info[0], p_tuner_list->board_name)) { | ||
845 | state->tuner_type = p_tuner_list->tuner_type; | ||
846 | dprintk(verbose, DST_ERROR, 1, "DST has [%s] tuner, tuner type=[%d]\n", | ||
847 | p_tuner_list->tuner_name, p_tuner_list->tuner_type); | ||
848 | } | ||
849 | } | ||
850 | |||
831 | return 0; | 851 | return 0; |
832 | } | 852 | } |
833 | 853 | ||
@@ -954,8 +974,8 @@ static int dst_get_device_id(struct dst_state *state) | |||
954 | 974 | ||
955 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { | 975 | for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { |
956 | if (p_dst_type->tuner_type == p_tuner_list->tuner_type) { | 976 | if (p_dst_type->tuner_type == p_tuner_list->tuner_type) { |
957 | state->tuner_name = p_tuner_list->tuner_name; | 977 | state->tuner_type = p_tuner_list->tuner_type; |
958 | dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner\n", state->tuner_name); | 978 | dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner\n", p_tuner_list->tuner_name); |
959 | } | 979 | } |
960 | } | 980 | } |
961 | } | 981 | } |
diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h index 19449592fd99..9323f948e940 100644 --- a/drivers/media/dvb/bt8xx/dst_common.h +++ b/drivers/media/dvb/bt8xx/dst_common.h | |||
@@ -65,10 +65,16 @@ | |||
65 | #define DST_TYPE_HAS_SESSION 128 | 65 | #define DST_TYPE_HAS_SESSION 128 |
66 | 66 | ||
67 | #define TUNER_TYPE_MULTI 1 | 67 | #define TUNER_TYPE_MULTI 1 |
68 | |||
69 | /* DVB-S */ | ||
68 | #define TUNER_TYPE_L64724 2 | 70 | #define TUNER_TYPE_L64724 2 |
69 | #define TUNER_TYPE_STV0299 4 | 71 | #define TUNER_TYPE_STV0299 4 |
70 | #define TUNER_TYPE_MB86A15 8 | 72 | #define TUNER_TYPE_MB86A15 8 |
71 | 73 | ||
74 | /* ATSC */ | ||
75 | #define TUNER_TYPE_NXT200x 16 | ||
76 | |||
77 | |||
72 | #define RDC_8820_PIO_0_DISABLE 0 | 78 | #define RDC_8820_PIO_0_DISABLE 0 |
73 | #define RDC_8820_PIO_0_ENABLE 1 | 79 | #define RDC_8820_PIO_0_ENABLE 1 |
74 | #define RDC_8820_INT 2 | 80 | #define RDC_8820_INT 2 |
@@ -132,6 +138,7 @@ struct dst_state { | |||
132 | struct tuner_types { | 138 | struct tuner_types { |
133 | u32 tuner_type; | 139 | u32 tuner_type; |
134 | char *tuner_name; | 140 | char *tuner_name; |
141 | char *board_name; | ||
135 | }; | 142 | }; |
136 | 143 | ||
137 | struct dst_types { | 144 | struct dst_types { |