Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92729
b: refs/heads/master
c: 9a1b04e
h: refs/heads/master
i:
  92727: 5b78b6d
v: v3
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 9e0808f commit d1694b1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b37f2d6a31fc8e80c79a0a214d83b128aa796543
refs/heads/master: 9a1b04e461fc8127c902a988cd9a082ba0680b11
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/dvb-usb/ttusb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ static struct tda10086_config tda10086_config = {
.demod_address = 0x0e,
.invert = 0,
.diseqc_tone = 1,
.xtal_freq = TDA10086_XTAL_16M,
};

static int ttusb2_frontend_attach(struct dvb_usb_adapter *adap)
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/media/dvb/frontends/tda10086.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,15 @@ static int tda10086_init(struct dvb_frontend* fe)
tda10086_write_byte(state, 0x32, 0x00); // irq off
tda10086_write_byte(state, 0x31, 0x56); // setup AFC

// setup PLL (assumes 16Mhz XIN)
// setup PLL (this assumes SACLK = 96MHz)
tda10086_write_byte(state, 0x55, 0x2c); // misc PLL setup
tda10086_write_byte(state, 0x3a, 0x0b); // M=12
tda10086_write_byte(state, 0x3b, 0x01); // P=2
if (state->config->xtal_freq == TDA10086_XTAL_16M) {
tda10086_write_byte(state, 0x3a, 0x0b); // M=12
tda10086_write_byte(state, 0x3b, 0x01); // P=2
} else {
tda10086_write_byte(state, 0x3a, 0x17); // M=24
tda10086_write_byte(state, 0x3b, 0x00); // P=1
}
tda10086_write_mask(state, 0x55, 0x20, 0x00); // powerup PLL

// setup TS interface
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/media/dvb/frontends/tda10086.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
#include <linux/dvb/frontend.h>
#include <linux/firmware.h>

enum tda10086_xtal {
TDA10086_XTAL_16M,
TDA10086_XTAL_4M
};

struct tda10086_config
{
/* the demodulator's i2c address */
Expand All @@ -36,6 +41,9 @@ struct tda10086_config

/* do we need the diseqc signal with carrier? */
u8 diseqc_tone;

/* frequency of the reference xtal */
enum tda10086_xtal xtal_freq;
};

#if defined(CONFIG_DVB_TDA10086) || (defined(CONFIG_DVB_TDA10086_MODULE) && defined(MODULE))
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/ttpci/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ static struct tda10086_config tda10086_config = {
.demod_address = 0x0e,
.invert = 0,
.diseqc_tone = 1,
.xtal_freq = TDA10086_XTAL_16M,
};

static u8 read_pwm(struct budget* budget)
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,14 @@ static struct tda10086_config flydvbs = {
.demod_address = 0x0e,
.invert = 0,
.diseqc_tone = 0,
.xtal_freq = TDA10086_XTAL_16M,
};

static struct tda10086_config sd1878_4m = {
.demod_address = 0x0e,
.invert = 0,
.diseqc_tone = 0,
.xtal_freq = TDA10086_XTAL_4M,
};

/* ------------------------------------------------------------------
Expand Down Expand Up @@ -1206,7 +1214,7 @@ static int dvb_init(struct saa7134_dev *dev)
break;
case SAA7134_BOARD_MD7134_BRIDGE_2:
dev->dvb.frontend = dvb_attach(tda10086_attach,
&flydvbs, &dev->i2c_adap);
&sd1878_4m, &dev->i2c_adap);
if (dev->dvb.frontend) {
struct dvb_frontend *fe;
if (dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
Expand Down

0 comments on commit d1694b1

Please sign in to comment.