summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/b2c2/flexcop-misc.c
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-03-09 12:36:49 +0000
committerPatrick Boettcher <devnull@localhost>2005-03-09 12:36:49 +0000
commit8a64b813388b3ceab573104d53d848274b75138a (patch)
tree8a28df764fb7c2fc05b4cc07a9a97543bc3f24b2 /linux/drivers/media/dvb/b2c2/flexcop-misc.c
parente73ff4b3aa10d5aa507600a3545885d752c0c163 (diff)
downloadmediapointer-dvb-s2-8a64b813388b3ceab573104d53d848274b75138a.tar.gz
mediapointer-dvb-s2-8a64b813388b3ceab573104d53d848274b75138a.tar.bz2
- moved the flexcop-driver-suite to linux/drivers
- adapted build-2.6 (removed skystar2 from insmod.sh) - corrected some bugs in Kconfig - tried compilation with linux 2.6.11 (as module and as compiled-in-driver)
Diffstat (limited to 'linux/drivers/media/dvb/b2c2/flexcop-misc.c')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-misc.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-misc.c b/linux/drivers/media/dvb/b2c2/flexcop-misc.c
new file mode 100644
index 000000000..986ffcac4
--- /dev/null
+++ b/linux/drivers/media/dvb/b2c2/flexcop-misc.c
@@ -0,0 +1,66 @@
+/*
+ * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III
+ *
+ * flexcop-misc.c - miscellaneous functions.
+ *
+ * see flexcop.c for copyright information.
+ */
+#include "flexcop.h"
+
+void flexcop_determine_revision(struct flexcop_device *fc)
+{
+ flexcop_ibi_value v = fc->read_ibi_reg(fc,misc_204);
+
+ switch (v.misc_204.Rev_N_sig_revision_hi) {
+ case 0x2:
+ deb_info("found a FlexCopII.\n");
+ fc->rev = FLEXCOP_II;
+ break;
+ case 0x3:
+ deb_info("found a FlexCopIIb.\n");
+ fc->rev = FLEXCOP_IIB;
+ break;
+ case 0x0:
+ deb_info("found a FlexCopIII.\n");
+ fc->rev = FLEXCOP_III;
+ break;
+ default:
+ err("unkown FlexCop Revision: %x. Please report the linux-dvb@linuxtv.org.",v.misc_204.Rev_N_sig_revision_hi);
+ break;
+ }
+
+ if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps))
+ deb_info("this FlexCop has the additional 32 hardware pid filter.\n");
+ else
+ deb_info("this FlexCop has only the 6 basic main hardware pid filter.\n");
+ /* bus parts have to decide if hw pid filtering is used or not. */
+}
+
+const char *flexcop_revision_names[] = {
+ "Unkown chip",
+ "FlexCopII",
+ "FlexCopIIb",
+ "FlexCopIII",
+};
+
+const char *flexcop_device_names[] = {
+ "Unkown device",
+ "AirStar 2 DVB-T",
+ "AirStar 2 ATSC",
+ "SkyStar 2 DVB-S",
+ "SkyStar 2 DVB-S (old version)",
+ "CableStar 2 DVB-C",
+};
+
+const char *flexcop_bus_names[] = {
+ "USB",
+ "PCI",
+};
+
+void flexcop_device_name(struct flexcop_device *fc,const char *prefix,const
+ char *suffix)
+{
+ info("%s '%s' at the '%s' bus controlled by a '%s' %s",prefix,
+ flexcop_device_names[fc->dev_type],flexcop_bus_names[fc->bus_type],
+ flexcop_revision_names[fc->rev],suffix);
+}