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/bt8xx/dst.c | |
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/bt8xx/dst.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 30 |
1 files changed, 25 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 | } |