summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2004-10-31 13:35:37 +0000
committerPatrick Boettcher <devnull@localhost>2004-10-31 13:35:37 +0000
commitb8c933a4132a513316cf1a0dcaa898af0aa27640 (patch)
treeecf57fc4fd59f0e33e9f16e31d7f0d57fc7d049f
parentc1f991cdce4cb77edb015bf9203c1daf3d7ea4cc (diff)
downloadmediapointer-dvb-s2-b8c933a4132a513316cf1a0dcaa898af0aa27640.tar.gz
mediapointer-dvb-s2-b8c933a4132a513316cf1a0dcaa898af0aa27640.tar.bz2
- corrected tuner address, it was broken since FE_REFACTORING.
Andrew, was there a reason why you >> 1 the pll address and << 1 always when it was needed?
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb.c27
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mb.c6
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mb_priv.h6
3 files changed, 23 insertions, 16 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
index 88092509c..32d52b2c9 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb.c
@@ -221,12 +221,12 @@ static void dibusb_urb_complete(struct urb *urb, struct pt_regs *ptregs)
{
struct usb_dibusb *dib = urb->context;
- deb_xfer("urb complete feedcount: %d, status: %d\n",dib->feedcount,urb->status);
+ deb_ts("urb complete feedcount: %d, status: %d\n",dib->feedcount,urb->status);
if (dib->feedcount > 0 && urb->status == 0) {
- deb_xfer("URB return len: %d\n",urb->actual_length);
+ deb_ts("URB return len: %d\n",urb->actual_length);
if (urb->actual_length % 188)
- deb_xfer("TS Packets: %d, %d\n", urb->actual_length/188,urb->actual_length % 188);
+ deb_ts("TS Packets: %d, %d\n", urb->actual_length/188,urb->actual_length % 188);
/* Francois recommends to drop not full-filled packets, even if they may
* contain valid TS packets
@@ -396,11 +396,24 @@ static u32 dibusb_i2c_func(struct i2c_adapter *adapter)
return I2C_FUNC_I2C;
}
+static int thomson_cable_eu_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
+
+static struct dib3000mb_config thomson_cable_eu_config = {
+ .demod_address = 0x10,
+ .pll_addr = 194,
+ .pll_set = thomson_cable_eu_pll_set,
+};
+
static int thomson_cable_eu_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
{
struct usb_dibusb* dib = (struct usb_dibusb*) fe->dvb->priv;
u8 buf[4];
- struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) };
+ struct i2c_msg msg = {
+ .addr = thomson_cable_eu_config.pll_addr,
+ .flags = 0,
+ .buf = buf,
+ .len = sizeof(buf)
+ };
u32 tfreq = (params->frequency + 36125000) / 62500;
int vu,p0,p1,p2;
@@ -424,12 +437,6 @@ static int thomson_cable_eu_pll_set(struct dvb_frontend* fe, struct dvb_frontend
return 0;
}
-static struct dib3000mb_config thomson_cable_eu_config = {
- .demod_address = 0x10,
- .pll_addr = 0x61,
- .pll_set = thomson_cable_eu_pll_set,
-};
-
static struct i2c_algorithm dibusb_algo = {
.name = "DiBcom USB i2c algorithm",
.id = I2C_ALGO_BIT,
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c
index 79d4a11e7..79698cf4c 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mb.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mb.c
@@ -17,7 +17,7 @@
* Amaury Demol (ademol@dibcom.fr) from DiBcom for providing specs and driver
* sources, on which this driver (and the dvb-dibusb) are based.
*
- * $Id: dib3000mb.c,v 1.13 2004/10/28 17:37:07 quincy Exp $$
+ * $Id: dib3000mb.c,v 1.14 2004/10/31 13:35:38 pmp Exp $$
*
* see Documentation/dvb/README.dibusb for more information
*
@@ -155,10 +155,10 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe,
if (tuner) {
wr(DIB3000MB_REG_TUNER,
- DIB3000MB_ACTIVATE_TUNER_XFER(state->config->pll_addr << 1));
+ DIB3000MB_ACTIVATE_TUNER_XFER(state->config->pll_addr));
state->config->pll_set(fe, fep);
wr(DIB3000MB_REG_TUNER,
- DIB3000MB_DEACTIVATE_TUNER_XFER(state->config->pll_addr << 1));
+ DIB3000MB_DEACTIVATE_TUNER_XFER(state->config->pll_addr));
deb_setf("bandwidth: ");
switch (ofdm->bandwidth) {
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb_priv.h b/linux/drivers/media/dvb/frontends/dib3000mb_priv.h
index 9875403ab..9ea8217f7 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mb_priv.h
+++ b/linux/drivers/media/dvb/frontends/dib3000mb_priv.h
@@ -7,7 +7,7 @@
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, version 2.
*
- * $Id: dib3000mb_priv.h,v 1.2 2004/10/28 17:37:07 quincy Exp $
+ * $Id: dib3000mb_priv.h,v 1.3 2004/10/31 13:35:38 pmp Exp $
*
* for more information see dib3000mb.c .
*/
@@ -528,8 +528,8 @@ static u16 dib3000mb_filter_coeffs[] = {
/* set the tuner i2c address */
#define DIB3000MB_REG_TUNER ( 1089)
-#define DIB3000MB_ACTIVATE_TUNER_XFER(a) (0xffff & (a << 7))
-#define DIB3000MB_DEACTIVATE_TUNER_XFER(a) (0xffff & ((a << 7) + 0x80))
+#define DIB3000MB_ACTIVATE_TUNER_XFER(a) (0xffff & ((a) << 7))
+#define DIB3000MB_DEACTIVATE_TUNER_XFER(a) (0xffff & (((a) << 7) + 0x80))
/* monitoring registers (read only) */