summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-27 19:59:54 +0100
committerAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-27 19:59:54 +0100
commitedde0f5e0f83c7ce443153eb57353529b042383e (patch)
treec9563c5c2947316953aeea3884867adcc1dfde6f
parent9402ad1c2d4e071cca1ff27727c5a0060d6a047c (diff)
downloadmediapointer-dvb-s2-edde0f5e0f83c7ce443153eb57353529b042383e.tar.gz
mediapointer-dvb-s2-edde0f5e0f83c7ce443153eb57353529b042383e.tar.bz2
Disable stv0297_cs2 code from being used normally.
From: Mauro Carvalho Chehab <mchehab@infradead.org> stv0297_cs2 should be merged into the main stv0297. In order not to lose information we have come up with this temporary compromise. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
-rw-r--r--linux/drivers/media/dvb/b2c2/Makefile2
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c108
2 files changed, 110 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/b2c2/Makefile b/linux/drivers/media/dvb/b2c2/Makefile
index 7f16c445b..d288a67fb 100644
--- a/linux/drivers/media/dvb/b2c2/Makefile
+++ b/linux/drivers/media/dvb/b2c2/Makefile
@@ -3,8 +3,10 @@ b2c2-flexcop-objs = flexcop.o flexcop-fe-tuner.o flexcop-i2c.o \
flexcop-dma.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
+ifdef STV0297_CS2
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += stv0297_cs2.o
+endif
b2c2-flexcop-pci-objs = flexcop-pci.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index 353b9e987..21af462c0 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -11,7 +11,11 @@
#include "mt352.h"
#include "nxt200x.h"
#include "bcm3510.h"
+#ifdef STV0297_CS2
#include "stv0297_cs2.h"
+#else
+#include "stv0297.h"
+#endif
#include "mt312.h"
#include "lgdt330x.h"
#include "lg_h06xf.h"
@@ -398,11 +402,111 @@ int alps_tdee4_stv0297_tuner_set_params (struct dvb_frontend* fe, struct dvb_fro
return 0;
}
+#ifndef STV0297_CS2
+static u8 alps_tdee4_stv0297_inittab[] = {
+ 0x80, 0x01,
+ 0x80, 0x00,
+ 0x81, 0x01,
+ 0x81, 0x00,
+ 0x00, 0x09,
+ 0x01, 0x69,
+ 0x03, 0x00,
+ 0x04, 0x00,
+ 0x07, 0x00,
+ 0x08, 0x00,
+ 0x20, 0x00,
+ 0x21, 0x40,
+ 0x22, 0x00,
+ 0x23, 0x00,
+ 0x24, 0x40,
+ 0x25, 0x88,
+ 0x30, 0xff,
+ 0x31, 0x00,
+ 0x32, 0xff,
+ 0x33, 0x00,
+ 0x34, 0x50,
+ 0x35, 0x7f,
+ 0x36, 0x00,
+ 0x37, 0x20,
+ 0x38, 0x00,
+ 0x40, 0x1c,
+ 0x41, 0xff,
+ 0x42, 0x29,
+ 0x43, 0x00,
+ 0x44, 0xff,
+ 0x45, 0x00,
+ 0x46, 0x00,
+ 0x49, 0x04,
+ 0x4a, 0x00,
+ 0x4b, 0xf8,
+ 0x52, 0x30,
+ 0x55, 0xae,
+ 0x56, 0x47,
+ 0x57, 0xe1,
+ 0x58, 0x3a,
+ 0x5a, 0x1e,
+ 0x5b, 0x34,
+ 0x60, 0x00,
+ 0x63, 0x00,
+ 0x64, 0x00,
+ 0x65, 0x00,
+ 0x66, 0x00,
+ 0x67, 0x00,
+ 0x68, 0x00,
+ 0x69, 0x00,
+ 0x6a, 0x02,
+ 0x6b, 0x00,
+ 0x70, 0xff,
+ 0x71, 0x00,
+ 0x72, 0x00,
+ 0x73, 0x00,
+ 0x74, 0x0c,
+ 0x80, 0x00,
+ 0x81, 0x00,
+ 0x82, 0x00,
+ 0x83, 0x00,
+ 0x84, 0x04,
+ 0x85, 0x80,
+ 0x86, 0x24,
+ 0x87, 0x78,
+ 0x88, 0x10,
+ 0x89, 0x00,
+ 0x90, 0x01,
+ 0x91, 0x01,
+ 0xa0, 0x04,
+ 0xa1, 0x00,
+ 0xa2, 0x00,
+ 0xb0, 0x91,
+ 0xb1, 0x0b,
+ 0xc0, 0x53,
+ 0xc1, 0x70,
+ 0xc2, 0x12,
+ 0xd0, 0x00,
+ 0xd1, 0x00,
+ 0xd2, 0x00,
+ 0xd3, 0x00,
+ 0xd4, 0x00,
+ 0xd5, 0x00,
+ 0xde, 0x00,
+ 0xdf, 0x00,
+ 0x61, 0x49,
+ 0x62, 0x0b,
+ 0x53, 0x08,
+ 0x59, 0x08,
+ 0xff, 0xff,
+};
+#endif
static struct stv0297_config alps_tdee4_stv0297_config = {
.demod_address = 0x1c,
+#ifdef STV0297_CS2
.fclk = STV0297_PAL_FCLK,
.demodfreq = STV0297_PAL_IF - STV0297_PAL_FCLK,
+#else
+ .inittab = alps_tdee4_stv0297_inittab,
+// .invert = 1,
+// .pll_set = alps_tdee4_stv0297_pll_set,
+#endif
};
/* try to figure out the frontend, each card/box can have on of the following list */
@@ -448,7 +552,11 @@ int flexcop_frontend_init(struct flexcop_device *fc)
info("found the bcm3510 at i2c address: 0x%02x",air2pc_atsc_first_gen_config.demod_address);
} else
/* try the cable dvb (stv0297) */
+#ifdef STV0297_CS2
if ((fc->fe = stv0297_cs2_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
+#else
+ if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
+#endif
fc->dev_type = FC_CABLE;
fc->fe->ops->tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);