summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-common.c76
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-mb.c25
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb.h24
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h2
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c70
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h7
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c2
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c4
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb.h20
-rw-r--r--linux/drivers/media/dvb/dvb-usb/umt-010.c7
-rw-r--r--linux/drivers/media/dvb/frontends/dvb-pll.c36
-rw-r--r--linux/drivers/media/dvb/frontends/dvb-pll.h5
12 files changed, 165 insertions, 113 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
index 048513b8f..f9d77017f 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -57,10 +57,13 @@ EXPORT_SYMBOL(dibusb_pid_filter_ctrl);
int dibusb_power_ctrl(struct dvb_usb_device *d, int onoff)
{
u8 b[3];
+ int ret;
b[0] = DIBUSB_REQ_SET_IOCTL;
b[1] = DIBUSB_IOCTL_CMD_POWER_MODE;
b[2] = onoff ? DIBUSB_IOCTL_POWER_WAKEUP : DIBUSB_IOCTL_POWER_SLEEP;
- return dvb_usb_generic_write(d,b,3);
+ ret = dvb_usb_generic_write(d,b,3);
+ msleep(10);
+ return ret;
}
EXPORT_SYMBOL(dibusb_power_ctrl);
@@ -157,75 +160,19 @@ int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
}
EXPORT_SYMBOL(dibusb_read_eeprom_byte);
-int dibusb_pll_init_i2c(struct dvb_frontend *fe)
-{
- struct dvb_usb_device *d = fe->dvb->priv;
- struct dibusb_state *st = d->priv;
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,1,st->pll_addr);
-
-// init;
-
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,0,st->pll_addr);
- return 0;
-}
-EXPORT_SYMBOL(dibusb_pll_init_i2c);
-
-int dibusb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep, u8 b[5])
-{
- struct dvb_usb_device *d = fe->dvb->priv;
- struct dibusb_state *st = d->priv;
- b[0] = st->pll_addr << 1;
-
- deb_info("pll addr: %x, freq: %d\n",st->pll_addr,fep->frequency);
-
- dvb_pll_configure(st->pll_desc,&b[1],fep->frequency,fep->u.ofdm.bandwidth);
-
- deb_info("pll-buf: %x %x %x %x %x\n",b[0],b[1],b[2],b[3],b[4]);
-
- return 0;
-}
-EXPORT_SYMBOL(dibusb_pll_set);
-
-int dibusb_pll_set_i2c(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep)
-{
- struct dvb_usb_device *d = fe->dvb->priv;
- struct dibusb_state *st = d->priv;
- int ret = 0;
- u8 b[5];
- struct i2c_msg msg = { .addr = st->pll_addr, .flags = 0, .buf = &b[1], .len = 4 };
-
- dibusb_pll_set(fe,fep,b);
-
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,1,st->pll_addr);
-
- if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
- err("tuner i2c write failed.");
- ret = -EREMOTEIO;
- }
-
- msleep(1);
-
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,0,st->pll_addr);
-
- return ret;
-}
-EXPORT_SYMBOL(dibusb_pll_set_i2c);
-
int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d)
{
struct dib3000_config demod_cfg;
struct dibusb_state *st = d->priv;
- demod_cfg.pll_set = dibusb_pll_set_i2c; /* dibusb_general_pll_set; */
- demod_cfg.pll_init = dibusb_pll_init_i2c; /* dibusb_general_pll_init; */
+ demod_cfg.pll_set = dvb_usb_pll_set_i2c;
+ demod_cfg.pll_init = dvb_usb_pll_init_i2c;
for (demod_cfg.demod_address = 0x8; demod_cfg.demod_address < 0xd; demod_cfg.demod_address++)
- if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL)
+ if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL) {
+ d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
return 0;
+ }
return -ENODEV;
}
@@ -233,9 +180,8 @@ EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach);
int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d)
{
- struct dibusb_state *st = d->priv;
- st->pll_addr = 0x60;
- st->pll_desc = &dvb_pll_env57h1xd5;
+ d->pll_addr = 0x60;
+ d->pll_desc = &dvb_pll_env57h1xd5;
return 0;
}
EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
index edca79948..c18ab031c 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -20,12 +20,14 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d)
struct dibusb_state *st = d->priv;
demod_cfg.demod_address = 0x8;
- demod_cfg.pll_set = dibusb_pll_set_i2c; /* dibusb_general_pll_set; */
- demod_cfg.pll_init = dibusb_pll_init_i2c; /* dibusb_general_pll_init; */
+ demod_cfg.pll_set = dvb_usb_pll_set_i2c;
+ demod_cfg.pll_init = dvb_usb_pll_init_i2c;
if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL)
return -ENODEV;
+ d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
+
return 0;
}
@@ -34,7 +36,6 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d)
* this out. */
static int dibusb_dib3000mb_tuner_attach (struct dvb_usb_device *d)
{
- struct dibusb_state *st = d->priv;
u8 b[2] = { 0,0 }, b2[1];
int ret = 0;
struct i2c_msg msg[2] = {
@@ -45,25 +46,27 @@ static int dibusb_dib3000mb_tuner_attach (struct dvb_usb_device *d)
/* the Panasonic sits on I2C addrass 0x60, the Thomson on 0x61 */
msg[0].addr = msg[1].addr = 0x60;
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,1,msg[0].addr);
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(d->fe,1,msg[0].addr);
if (i2c_transfer (&d->i2c_adap, msg, 2) != 2) {
err("tuner i2c write failed.");
ret = -EREMOTEIO;
}
- if (st && st->ops.tuner_pass_ctrl)
- st->ops.tuner_pass_ctrl(d->fe,0,msg[0].addr);
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(d->fe,0,msg[0].addr);
if (b2[0] == 0xfe) {
info("this device has the Thomson Cable onboard. Which is default.");
- st->pll_addr = 0x61;
- st->pll_desc = &dvb_pll_tua6010xs;
+ d->pll_addr = 0x61;
+ d->pll_desc = &dvb_pll_tua6010xs;
} else {
+ u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab };
info("this device has the Panasonic ENV77H11D5 onboard.");
- st->pll_addr = 0x60;
-// st->pll_desc = &dvb_pll_tua6010xs;
+ d->pll_addr = 0x60;
+ memcpy(d->pll_init,bpll,4);
+ d->pll_desc = &dvb_pll_tda665x;
}
return ret;
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb.h b/linux/drivers/media/dvb/dvb-usb/dibusb.h
index 88e47d027..6611f6297 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb.h
@@ -14,8 +14,6 @@
#define DVB_USB_LOG_PREFIX "dibusb"
#include "dvb-usb.h"
-#include "dvb-pll.h"
-
#include "dib3000.h"
/*
@@ -96,8 +94,6 @@
struct dibusb_state {
struct dib_fe_xfer_ops ops;
- struct dvb_pll_desc *pll_desc;
- u8 pll_addr;
/* for RC5 remote control */
int old_toggle;
@@ -106,19 +102,15 @@ struct dibusb_state {
extern struct i2c_algorithm dibusb_i2c_algo;
-extern int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d);
-extern int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d);
-
-extern int dibusb_pll_init_i2c(struct dvb_frontend *fe);
-extern int dibusb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep, u8 b[5]);
-extern int dibusb_pll_set_i2c(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep);
+extern int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *);
+extern int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *);
-extern int dibusb_streaming_ctrl(struct dvb_usb_device *d, int onoff);
-extern int dibusb_pid_filter(struct dvb_usb_device *d, int index, u16 pid, int onoff);
-extern int dibusb_pid_filter_ctrl(struct dvb_usb_device *d, int onoff);
-extern int dibusb_power_ctrl(struct dvb_usb_device *d, int onoff);
-extern int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff);
-extern int dibusb2_0_power_ctrl(struct dvb_usb_device *d, int onoff);
+extern int dibusb_streaming_ctrl(struct dvb_usb_device *, int);
+extern int dibusb_pid_filter(struct dvb_usb_device *, int, u16, int);
+extern int dibusb_pid_filter_ctrl(struct dvb_usb_device *, int);
+extern int dibusb_power_ctrl(struct dvb_usb_device *, int);
+extern int dibusb2_0_streaming_ctrl(struct dvb_usb_device *, int);
+extern int dibusb2_0_power_ctrl(struct dvb_usb_device *, int);
#define DEFAULT_RC_INTERVAL 150
//#define DEFAULT_RC_INTERVAL 100000
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h
index c617287df..67e0d73fb 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h
@@ -15,7 +15,7 @@ extern int dvb_usb_debug;
#define deb_info(args...) dprintk(dvb_usb_debug,0x01,args)
#define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args)
-#define deb_alot(args...) dprintk(dvb_usb_debug,0x04,args)
+#define deb_pll(args...) dprintk(dvb_usb_debug,0x04,args)
#define deb_ts(args...) dprintk(dvb_usb_debug,0x08,args)
#define deb_err(args...) dprintk(dvb_usb_debug,0x10,args)
#define deb_rc(args...) dprintk(dvb_usb_debug,0x20,args)
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index baab40cf9..9f0a8d90d 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -46,3 +46,73 @@ int dvb_usb_i2c_exit(struct dvb_usb_device *d)
d->state &= ~DVB_USB_STATE_I2C;
return 0;
}
+
+int dvb_usb_pll_init_i2c(struct dvb_frontend *fe)
+{
+ struct dvb_usb_device *d = fe->dvb->priv;
+ struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 };
+ int ret = 0;
+
+ /* if there is nothing to initialize */
+ if (d->pll_init[0] == 0x00 && d->pll_init[1] == 0x00 &&
+ d->pll_init[2] == 0x00 && d->pll_init[3] == 0x00)
+ return 0;
+
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(fe,1,d->pll_addr);
+
+ deb_pll("pll init: %x\n",d->pll_addr);
+ deb_pll("pll-buf: %x %x %x %x\n",d->pll_init[0],d->pll_init[1],
+ d->pll_init[2],d->pll_init[3]);
+
+ if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
+ err("tuner i2c write failed for pll_init.");
+ ret = -EREMOTEIO;
+ }
+ msleep(1);
+
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(fe,0,d->pll_addr);
+ return ret;
+}
+EXPORT_SYMBOL(dvb_usb_pll_init_i2c);
+
+int dvb_usb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep, u8 b[5])
+{
+ struct dvb_usb_device *d = fe->dvb->priv;
+
+ deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc);
+
+ b[0] = d->pll_addr << 1;
+ dvb_pll_configure(d->pll_desc,&b[1],fep->frequency,fep->u.ofdm.bandwidth);
+
+ deb_pll("pll-buf: %x %x %x %x %x\n",b[0],b[1],b[2],b[3],b[4]);
+
+ return 0;
+}
+EXPORT_SYMBOL(dvb_usb_pll_set);
+
+int dvb_usb_pll_set_i2c(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep)
+{
+ struct dvb_usb_device *d = fe->dvb->priv;
+ int ret = 0;
+ u8 b[5];
+ struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = &b[1], .len = 4 };
+
+ dvb_usb_pll_set(fe,fep,b);
+
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(fe,1,d->pll_addr);
+
+ if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
+ err("tuner i2c write failed for pll_set.");
+ ret = -EREMOTEIO;
+ }
+ msleep(1);
+
+ if (d->tuner_pass_ctrl)
+ d->tuner_pass_ctrl(fe,0,d->pll_addr);
+
+ return ret;
+}
+EXPORT_SYMBOL(dvb_usb_pll_set_i2c);
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 972965bed..bcb341918 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -18,6 +18,7 @@
#define USB_VID_COMPRO_UNK 0x145f
#define USB_VID_CYPRESS 0x04b4
#define USB_VID_DIBCOM 0x10b8
+#define USB_VID_DVICO 0x0fe9
#define USB_VID_EMPIA 0xeb1a
#define USB_VID_GRANDTEC 0x5032
#define USB_VID_HANFTEK 0x15f4
@@ -72,5 +73,11 @@
#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300
#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301
#define USB_PID_NEBULA_DIGITV 0x0201
+#define USB_PID_DVICO_BLUEBIRD_LGZ201 0xdb00
+#define USB_PID_DVICO_BLUEBIRD_TH7579 0xdb10
+#define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820
+#define USB_PID_DVICO_BLUEBIRD_LGZ201_1 0xdb01
+#define USB_PID_DVICO_BLUEBIRD_TH7579_2 0xdb11
+
#endif
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index f45867662..3aadec974 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -16,7 +16,7 @@
/* debug */
int dvb_usb_debug;
module_param_named(debug,dvb_usb_debug, int, 0644);
-MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,alot=4,ts=8,err=16,rc=32,fw=64 (or-able))." DVB_USB_DEBUG_STATUS);
+MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64 (or-able))." DVB_USB_DEBUG_STATUS);
/* general initialization functions */
int dvb_usb_exit(struct dvb_usb_device *d)
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
index 99ea3c510..83d476fb4 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-urb.c
@@ -46,10 +46,8 @@ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf,
if (ret)
err("recv bulk message failed: %d",ret);
- else {
- deb_alot("rlen: %d\n",rlen);
+ else
debug_dump(rbuf,actlen,deb_xfer);
- }
}
up(&d->usb_sem);
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
index ee2cacc05..d2d35c0cc 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -17,6 +17,8 @@
#include "dvb_net.h"
#include "dmxdev.h"
+#include "dvb-pll.h"
+
#include "dvb-usb-ids.h"
/* debug */
@@ -213,6 +215,10 @@ struct dvb_usb_properties {
* @usb_sem: semaphore of USB control messages (reading needs two messages)
* @i2c_sem: semaphore for i2c-transfers
* @i2c_adap: device's i2c_adapter if it uses I2CoverUSB
+ * @pll_addr: I2C address of the tuner for programming
+ * @pll_init: array containing the initialization buffer
+ * @pll_desc: pointer to the appropriate struct dvb_pll_desc
+ * @tuner_pass_ctrl: called to (de)activate tuner passthru of the demod
* @dvb_adap: device's dvb_adapter.
* @dmxdev: device's dmxdev.
* @demux: device's software demuxer.
@@ -261,6 +267,12 @@ struct dvb_usb_device {
struct semaphore i2c_sem;
struct i2c_adapter i2c_adap;
+ /* tuner programming information */
+ u8 pll_addr;
+ u8 pll_init[4];
+ struct dvb_pll_desc *pll_desc;
+ int (*tuner_pass_ctrl)(struct dvb_frontend *, int, u8);
+
/* dvb */
struct dvb_adapter dvb_adap;
struct dmxdev dmxdev;
@@ -290,7 +302,13 @@ extern void dvb_usb_device_exit(struct usb_interface *);
extern int dvb_usb_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16,int);
extern int dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);
-/* common used remote control parsing */
+/* commonly used remote control parsing */
extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *);
+/* commonly used pll init and set functions */
+extern int dvb_usb_pll_init_i2c(struct dvb_frontend *);
+extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]);
+extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *);
+
+
#endif
diff --git a/linux/drivers/media/dvb/dvb-usb/umt-010.c b/linux/drivers/media/dvb/dvb-usb/umt-010.c
index 55bd34c29..d9f0ce68a 100644
--- a/linux/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/linux/drivers/media/dvb/dvb-usb/umt-010.c
@@ -57,7 +57,7 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d)
memset(&umt_config,0,sizeof(struct mt352_config));
umt_config.demod_init = umt_mt352_demod_init;
umt_config.demod_address = 0xf;
- umt_config.pll_set = dibusb_pll_set;
+ umt_config.pll_set = dvb_usb_pll_set;
d->fe = mt352_attach(&umt_config, &d->i2c_adap);
@@ -66,9 +66,8 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d)
static int umt_tuner_attach (struct dvb_usb_device *d)
{
- struct dibusb_state *st = d->priv;
- st->pll_addr = 0x61;
- st->pll_desc = &dvb_pll_tua6034;
+ d->pll_addr = 0x61;
+ d->pll_desc = &dvb_pll_tua6034;
return 0;
}
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c
index 72e5521c1..168fd730d 100644
--- a/linux/drivers/media/dvb/frontends/dvb-pll.c
+++ b/linux/drivers/media/dvb/frontends/dvb-pll.c
@@ -1,5 +1,5 @@
/*
- * $Id: dvb-pll.c,v 1.2 2005/04/17 14:37:15 pb Exp $
+ * $Id: dvb-pll.c,v 1.3 2005/05/02 12:48:01 pb Exp $
*
* descriptions + helper functions for simple dvb plls.
*
@@ -145,19 +145,37 @@ struct dvb_pll_desc dvb_pll_env57h1xd5 = {
};
EXPORT_SYMBOL(dvb_pll_env57h1xd5);
-/* Philips TDA6650
+/* Philips TDA6650/TDA6651
* used in Panasonic ENV77H11D5
*/
-/*
-struct dvb_pll_desc dvb_pll_tda6650 = {
- .name = "Philips TDA6650",
+static void tda665x_bw(u8 *buf, int bandwidth)
+{
+ if (bandwidth == BANDWIDTH_8_MHZ)
+ buf[3] |= 0x08;
+}
+
+struct dvb_pll_desc dvb_pll_tda665x = {
+ .name = "Philips TDA6650/TDA6651",
.min = 44250000,
.max = 858000000,
- .count = ,
+ .setbw = tda665x_bw,
+ .count = 12,
.entries = {
- { , 36249333, 166667,
-*/
-
+ { 93834000, 36249333, 166667, 0xca, 0x61 /* 011 0 0 0 01 */ },
+ { 123834000, 36249333, 166667, 0xca, 0xa1 /* 101 0 0 0 01 */ },
+ { 161000000, 36249333, 166667, 0xca, 0xa1 /* 101 0 0 0 01 */ },
+ { 163834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
+ { 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ },
+ { 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ },
+ { 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
+ { 444000000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
+ { 583834000, 36249333, 166667, 0xca, 0x63 /* 011 0 0 0 11 */ },
+ { 793834000, 36249333, 166667, 0xca, 0xa3 /* 101 0 0 0 11 */ },
+ { 444834000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ },
+ { 861000000, 36249333, 166667, 0xca, 0xe3 /* 111 0 0 0 11 */ },
+ }
+};
+EXPORT_SYMBOL(dvb_pll_tda665x);
/* Infineon TUA6034
* used in LG TDTP E102P
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.h b/linux/drivers/media/dvb/frontends/dvb-pll.h
index 4b99d668a..c5aff1afe 100644
--- a/linux/drivers/media/dvb/frontends/dvb-pll.h
+++ b/linux/drivers/media/dvb/frontends/dvb-pll.h
@@ -1,5 +1,5 @@
/*
- * $Id: dvb-pll.h,v 1.5 2005/05/02 06:55:45 pb Exp $
+ * $Id: dvb-pll.h,v 1.6 2005/05/02 12:48:01 pb Exp $
*/
#ifndef __DVB_PLL_H__
@@ -17,7 +17,7 @@ struct dvb_pll_desc {
u32 stepsize;
u8 cb1;
u8 cb2;
- } entries[9];
+ } entries[12];
};
extern struct dvb_pll_desc dvb_pll_thomson_dtt7579;
@@ -29,6 +29,7 @@ extern struct dvb_pll_desc dvb_pll_unknown_1;
extern struct dvb_pll_desc dvb_pll_tua6010xs;
extern struct dvb_pll_desc dvb_pll_env57h1xd5;
extern struct dvb_pll_desc dvb_pll_tua6034;
+extern struct dvb_pll_desc dvb_pll_tda665x;
int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
u32 freq, int bandwidth);