diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 17:00:02 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 17:00:02 -0400 |
commit | 67394f8f069c2fdf90f3b6d851824c07815442af (patch) | |
tree | 0c33e62d34dbaecea434ae9ece3cc0c56db8b1f7 /drivers/media/dvb/b2c2/flexcop-misc.c | |
parent | 450cbfbbbd88876e3ccec1d277f613221ca82bb7 (diff) | |
parent | 9636273dae265b9354b861b373cd43cd76a6d0fe (diff) |
Merge with /usr/src/ntfs-2.6.git
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-misc.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-misc.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-misc.c b/drivers/media/dvb/b2c2/flexcop-misc.c new file mode 100644 index 000000000000..19e06da46774 --- /dev/null +++ b/drivers/media/dvb/b2c2/flexcop-misc.c | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III | ||
3 | * | ||
4 | * flexcop-misc.c - miscellaneous functions. | ||
5 | * | ||
6 | * see flexcop.c for copyright information. | ||
7 | */ | ||
8 | #include "flexcop.h" | ||
9 | |||
10 | void flexcop_determine_revision(struct flexcop_device *fc) | ||
11 | { | ||
12 | flexcop_ibi_value v = fc->read_ibi_reg(fc,misc_204); | ||
13 | |||
14 | switch (v.misc_204.Rev_N_sig_revision_hi) { | ||
15 | case 0x2: | ||
16 | deb_info("found a FlexCopII.\n"); | ||
17 | fc->rev = FLEXCOP_II; | ||
18 | break; | ||
19 | case 0x3: | ||
20 | deb_info("found a FlexCopIIb.\n"); | ||
21 | fc->rev = FLEXCOP_IIB; | ||
22 | break; | ||
23 | case 0x0: | ||
24 | deb_info("found a FlexCopIII.\n"); | ||
25 | fc->rev = FLEXCOP_III; | ||
26 | break; | ||
27 | default: | ||
28 | err("unkown FlexCop Revision: %x. Please report the linux-dvb@linuxtv.org.",v.misc_204.Rev_N_sig_revision_hi); | ||
29 | break; | ||
30 | } | ||
31 | |||
32 | if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps)) | ||
33 | deb_info("this FlexCop has the additional 32 hardware pid filter.\n"); | ||
34 | else | ||
35 | deb_info("this FlexCop has only the 6 basic main hardware pid filter.\n"); | ||
36 | /* bus parts have to decide if hw pid filtering is used or not. */ | ||
37 | } | ||
38 | |||
39 | const char *flexcop_revision_names[] = { | ||
40 | "Unkown chip", | ||
41 | "FlexCopII", | ||
42 | "FlexCopIIb", | ||
43 | "FlexCopIII", | ||
44 | }; | ||
45 | |||
46 | const char *flexcop_device_names[] = { | ||
47 | "Unkown device", | ||
48 | "AirStar 2 DVB-T", | ||
49 | "AirStar 2 ATSC", | ||
50 | "SkyStar 2 DVB-S", | ||
51 | "SkyStar 2 DVB-S (old version)", | ||
52 | "CableStar 2 DVB-C", | ||
53 | }; | ||
54 | |||
55 | const char *flexcop_bus_names[] = { | ||
56 | "USB", | ||
57 | "PCI", | ||
58 | }; | ||
59 | |||
60 | void flexcop_device_name(struct flexcop_device *fc,const char *prefix,const | ||
61 | char *suffix) | ||
62 | { | ||
63 | info("%s '%s' at the '%s' bus controlled by a '%s' %s",prefix, | ||
64 | flexcop_device_names[fc->dev_type],flexcop_bus_names[fc->bus_type], | ||
65 | flexcop_revision_names[fc->rev],suffix); | ||
66 | } | ||