summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2006-06-21 17:27:53 +0400
committerManu Abraham <manu@linuxtv.org>2006-06-21 17:27:53 +0400
commitc803d36573458c7fb96238c68265d01c3b066077 (patch)
treef4dd0a51f1648f634bfc88b23d49ecb7114f8d90 /linux
parentc6505cf0afe8781c3b42d48ef9ae338529c6d0c7 (diff)
downloadmediapointer-dvb-s2-c803d36573458c7fb96238c68265d01c3b066077.tar.gz
mediapointer-dvb-s2-c803d36573458c7fb96238c68265d01c3b066077.tar.bz2
Add in tuner names
From: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c33
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_common.h6
2 files changed, 37 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c
index d2a7e413e..52cbe1500 100644
--- a/linux/drivers/media/dvb/bt8xx/dst.c
+++ b/linux/drivers/media/dvb/bt8xx/dst.c
@@ -586,6 +586,23 @@ static int dst_type_print(u8 type)
return 0;
}
+struct tuner_types tuner_list[] = {
+ {
+ .tuner_type = 2,
+ .tuner_name = "L 64724"
+ },
+
+ {
+ .tuner_type = 4,
+ .tuner_name = "STV 0299"
+ },
+
+ {
+ .tuner_type = 8,
+ .tuner_name = "MB 86A15"
+ },
+};
+
/*
Known cards list
Satellite
@@ -656,7 +673,7 @@ static struct dst_types dst_tlist[] = {
.type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_2,
.dst_feature = DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4 | DST_TYPE_HAS_DISEQC5
| DST_TYPE_HAS_MAC | DST_TYPE_HAS_MOTO,
- .tuner_type = TUNER_TYPE_STV0299
+ .tuner_type = TUNER_TYPE_MULTI
},
{
@@ -890,8 +907,10 @@ static int dst_get_device_id(struct dst_state *state)
{
u8 reply;
- int i;
+ int i, j;
struct dst_types *p_dst_type;
+ struct tuner_types *p_tuner_list;
+
u8 use_dst_type = 0;
u32 use_type_flags = 0;
@@ -930,6 +949,16 @@ static int dst_get_device_id(struct dst_state *state)
state->dst_hw_cap = p_dst_type->dst_feature;
dprintk(verbose, DST_ERROR, 1, "Recognise [%s]\n", p_dst_type->device_id);
+ if (p_dst_type->tuner_type != TUNER_TYPE_MULTI) {
+ state->tuner_type = p_dst_type->tuner_type;
+
+ for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) {
+ if (p_dst_type->tuner_type == p_tuner_list->tuner_type) {
+ state->tuner_name = p_tuner_list->tuner_name;
+ dprintk(verbose, DST_ERROR, 1, "DST has a [%s] based tuner\n", state->tuner_name);
+ }
+ }
+ }
break;
}
}
diff --git a/linux/drivers/media/dvb/bt8xx/dst_common.h b/linux/drivers/media/dvb/bt8xx/dst_common.h
index 5e624e317..1a4c02080 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_common.h
+++ b/linux/drivers/media/dvb/bt8xx/dst_common.h
@@ -128,6 +128,7 @@ struct dst_state {
u8 vendor[8];
u8 board_info[8];
u32 tuner_type;
+ char *tuner_name;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex dst_mutex;
#else
@@ -135,6 +136,11 @@ struct dst_state {
#endif
};
+struct tuner_types {
+ u32 tuner_type;
+ char *tuner_name;
+};
+
struct dst_types {
char *device_id;
int offset;