mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
Release 0.9.21
This commit is contained in:
commit
7eb4ff762c
@ -842,7 +842,8 @@ static int ts_open(struct inode *inode, struct file *file)
|
|||||||
} else if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
|
} else if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
|
||||||
if (!output)
|
if (!output)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
} else
|
||||||
|
return -EINVAL;
|
||||||
err = dvb_generic_open(inode, file);
|
err = dvb_generic_open(inode, file);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
@ -1222,14 +1223,7 @@ static int tuner_attach_stv6110(struct ddb_input *input, int type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct stv0910_cfg stv0910 = {
|
static struct stv0910_cfg stv0910_p = {
|
||||||
.adr = 0x6c,
|
|
||||||
.parallel = 1,
|
|
||||||
.rptlvl = 4,
|
|
||||||
.clk = 30000000,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct stv0910_cfg stv0910_aa = {
|
|
||||||
.adr = 0x68,
|
.adr = 0x68,
|
||||||
.parallel = 1,
|
.parallel = 1,
|
||||||
.rptlvl = 4,
|
.rptlvl = 4,
|
||||||
@ -1240,19 +1234,24 @@ static int demod_attach_stv0910(struct ddb_input *input, int type)
|
|||||||
{
|
{
|
||||||
struct i2c_adapter *i2c = &input->port->i2c->adap;
|
struct i2c_adapter *i2c = &input->port->i2c->adap;
|
||||||
struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1];
|
struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1];
|
||||||
|
struct stv0910_cfg cfg = stv0910_p;
|
||||||
|
|
||||||
dvb->fe = dvb_attach(stv0910_attach, i2c, &stv0910_aa, (input->nr & 1));
|
if (type)
|
||||||
if (!dvb->fe)
|
cfg.parallel = 2;
|
||||||
|
dvb->fe = dvb_attach(stv0910_attach, i2c, &cfg, (input->nr & 1));
|
||||||
|
if (!dvb->fe) {
|
||||||
|
cfg.adr = 0x6c;
|
||||||
dvb->fe = dvb_attach(stv0910_attach, i2c,
|
dvb->fe = dvb_attach(stv0910_attach, i2c,
|
||||||
&stv0910, (input->nr & 1));
|
&cfg, (input->nr & 1));
|
||||||
|
}
|
||||||
if (!dvb->fe) {
|
if (!dvb->fe) {
|
||||||
pr_err("No STV0910 found!\n");
|
pr_err("No STV0910 found!\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
if (!dvb_attach(lnbh25_attach, dvb->fe, i2c,
|
if (!dvb_attach(lnbh25_attach, dvb->fe, i2c,
|
||||||
((input->nr & 1) ? 0x09 : 0x08))) {
|
((input->nr & 1) ? 0x0d : 0x0c))) {
|
||||||
if (!dvb_attach(lnbh25_attach, dvb->fe, i2c,
|
if (!dvb_attach(lnbh25_attach, dvb->fe, i2c,
|
||||||
((input->nr & 1) ? 0x0d : 0x0c))) {
|
((input->nr & 1) ? 0x09 : 0x08))) {
|
||||||
pr_err("No LNBH25 found!\n");
|
pr_err("No LNBH25 found!\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
@ -1855,6 +1854,7 @@ static int dvb_input_attach(struct ddb_input *input)
|
|||||||
struct ddb_port *port = input->port;
|
struct ddb_port *port = input->port;
|
||||||
struct dvb_adapter *adap = dvb->adap;
|
struct dvb_adapter *adap = dvb->adap;
|
||||||
struct dvb_demux *dvbdemux = &dvb->demux;
|
struct dvb_demux *dvbdemux = &dvb->demux;
|
||||||
|
int par = 0;
|
||||||
|
|
||||||
dvb->attached = 0x01;
|
dvb->attached = 0x01;
|
||||||
|
|
||||||
@ -1908,12 +1908,18 @@ static int dvb_input_attach(struct ddb_input *input)
|
|||||||
if (tuner_attach_stv6111(input, 0) < 0)
|
if (tuner_attach_stv6111(input, 0) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
break;
|
break;
|
||||||
case DDB_TUNER_DVBS_STV0910_P:
|
case DDB_TUNER_DVBS_STV0910_PR:
|
||||||
if (demod_attach_stv0910(input, 1) < 0)
|
if (demod_attach_stv0910(input, 1) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tuner_attach_stv6111(input, 1) < 0)
|
if (tuner_attach_stv6111(input, 1) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
break;
|
break;
|
||||||
|
case DDB_TUNER_DVBS_STV0910_P:
|
||||||
|
if (demod_attach_stv0910(input, 0) < 0)
|
||||||
|
return -ENODEV;
|
||||||
|
if (tuner_attach_stv6111(input, 1) < 0)
|
||||||
|
return -ENODEV;
|
||||||
|
break;
|
||||||
#ifdef CONFIG_DVB_DRXK
|
#ifdef CONFIG_DVB_DRXK
|
||||||
case DDB_TUNER_DVBCT_TR:
|
case DDB_TUNER_DVBCT_TR:
|
||||||
if (demod_attach_drxk(input) < 0)
|
if (demod_attach_drxk(input) < 0)
|
||||||
@ -1928,18 +1934,17 @@ static int dvb_input_attach(struct ddb_input *input)
|
|||||||
if (tuner_attach_tda18212dd(input) < 0)
|
if (tuner_attach_tda18212dd(input) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
break;
|
break;
|
||||||
case DDB_TUNER_DVBCT2_SONY:
|
|
||||||
case DDB_TUNER_DVBC2T2_SONY:
|
|
||||||
case DDB_TUNER_ISDBT_SONY:
|
|
||||||
if (demod_attach_cxd2843(input, 0) < 0)
|
|
||||||
return -ENODEV;
|
|
||||||
if (tuner_attach_tda18212dd(input) < 0)
|
|
||||||
return -ENODEV;
|
|
||||||
break;
|
|
||||||
case DDB_TUNER_DVBCT2_SONY_P:
|
case DDB_TUNER_DVBCT2_SONY_P:
|
||||||
case DDB_TUNER_DVBC2T2_SONY_P:
|
case DDB_TUNER_DVBC2T2_SONY_P:
|
||||||
case DDB_TUNER_ISDBT_SONY_P:
|
case DDB_TUNER_ISDBT_SONY_P:
|
||||||
if (demod_attach_cxd2843(input, 1) < 0)
|
if (input->port->dev->link[input->port->lnr].info->ts_quirks & TS_QUIRK_SERIAL)
|
||||||
|
par = 0;
|
||||||
|
else
|
||||||
|
par = 1;
|
||||||
|
case DDB_TUNER_DVBCT2_SONY:
|
||||||
|
case DDB_TUNER_DVBC2T2_SONY:
|
||||||
|
case DDB_TUNER_ISDBT_SONY:
|
||||||
|
if (demod_attach_cxd2843(input, par) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tuner_attach_tda18212dd(input) < 0)
|
if (tuner_attach_tda18212dd(input) < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@ -2167,6 +2172,12 @@ static char *xo2names[] = {
|
|||||||
"", ""
|
"", ""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char *xo2types[] = {
|
||||||
|
"DVBS_ST", "DVBCT2_SONY",
|
||||||
|
"ISDBT_SONY", "DVBC2T2_SONY",
|
||||||
|
"ATSC_ST", "DVBC2T2_ST"
|
||||||
|
};
|
||||||
|
|
||||||
static void ddb_port_probe(struct ddb_port *port)
|
static void ddb_port_probe(struct ddb_port *port)
|
||||||
{
|
{
|
||||||
struct ddb *dev = port->dev;
|
struct ddb *dev = port->dev;
|
||||||
@ -2174,9 +2185,9 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
u8 id, type;
|
u8 id, type;
|
||||||
|
|
||||||
port->name = "NO MODULE";
|
port->name = "NO MODULE";
|
||||||
|
port->type_name = "NONE";
|
||||||
port->class = DDB_PORT_NONE;
|
port->class = DDB_PORT_NONE;
|
||||||
|
|
||||||
|
|
||||||
/* Handle missing ports and ports without I2C */
|
/* Handle missing ports and ports without I2C */
|
||||||
|
|
||||||
if (port->nr == ts_loop) {
|
if (port->nr == ts_loop) {
|
||||||
@ -2200,6 +2211,7 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
|
|
||||||
if (dev->link[l].info->type == DDB_OCTOPUS_MAX) {
|
if (dev->link[l].info->type == DDB_OCTOPUS_MAX) {
|
||||||
port->name = "DUAL DVB-S2 MAX";
|
port->name = "DUAL DVB-S2 MAX";
|
||||||
|
port->type_name = "MXL5XX";
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_MXL5XX;
|
port->type = DDB_TUNER_MXL5XX;
|
||||||
if (port->i2c)
|
if (port->i2c)
|
||||||
@ -2210,6 +2222,7 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
|
|
||||||
if (port->nr > 1 && dev->link[l].info->type == DDB_OCTOPUS_CI) {
|
if (port->nr > 1 && dev->link[l].info->type == DDB_OCTOPUS_CI) {
|
||||||
port->name = "CI internal";
|
port->name = "CI internal";
|
||||||
|
port->type_name = "INTERNAL";
|
||||||
port->class = DDB_PORT_CI;
|
port->class = DDB_PORT_CI;
|
||||||
port->type = DDB_CI_INTERNAL;
|
port->type = DDB_CI_INTERNAL;
|
||||||
}
|
}
|
||||||
@ -2222,6 +2235,7 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
if (port_has_cxd(port, &id)) {
|
if (port_has_cxd(port, &id)) {
|
||||||
if (id == 1) {
|
if (id == 1) {
|
||||||
port->name = "CI";
|
port->name = "CI";
|
||||||
|
port->type_name = "CXD2099";
|
||||||
port->class = DDB_PORT_CI;
|
port->class = DDB_PORT_CI;
|
||||||
port->type = DDB_CI_EXTERNAL_SONY;
|
port->type = DDB_CI_EXTERNAL_SONY;
|
||||||
ddbwritel(dev, I2C_SPEED_400,
|
ddbwritel(dev, I2C_SPEED_400,
|
||||||
@ -2238,31 +2252,37 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
port->name = "DuoFlex CI";
|
port->name = "DuoFlex CI";
|
||||||
port->class = DDB_PORT_CI;
|
port->class = DDB_PORT_CI;
|
||||||
port->type = DDB_CI_EXTERNAL_XO2;
|
port->type = DDB_CI_EXTERNAL_XO2;
|
||||||
|
port->type_name = "CI_XO2";
|
||||||
init_xo2_ci(port);
|
init_xo2_ci(port);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
id >>= 2;
|
id >>= 2;
|
||||||
if (id > 5) {
|
if (id > 5) {
|
||||||
port->name = "unknown XO2 DuoFlex";
|
port->name = "unknown XO2 DuoFlex";
|
||||||
|
port->type_name = "UNKNOWN";
|
||||||
} else {
|
} else {
|
||||||
port->name = xo2names[id];
|
port->name = xo2names[id];
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_XO2 + id;
|
port->type = DDB_TUNER_XO2 + id;
|
||||||
|
port->type_name = xo2types[id];
|
||||||
init_xo2(port);
|
init_xo2(port);
|
||||||
}
|
}
|
||||||
} else if (port_has_cxd28xx(port, &id)) {
|
} else if (port_has_cxd28xx(port, &id)) {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 0xa4:
|
case 0xa4:
|
||||||
port->name = "DUAL DVB-CT2 CXD2843";
|
port->name = "DUAL DVB-C2T2 CXD2843";
|
||||||
port->type = DDB_TUNER_DVBC2T2_SONY_P;
|
port->type = DDB_TUNER_DVBC2T2_SONY_P;
|
||||||
|
port->type_name = "DVBC2T2_SONY";
|
||||||
break;
|
break;
|
||||||
case 0xb1:
|
case 0xb1:
|
||||||
port->name = "DUAL DVB-CT2 CXD2837";
|
port->name = "DUAL DVB-CT2 CXD2837";
|
||||||
port->type = DDB_TUNER_DVBCT2_SONY_P;
|
port->type = DDB_TUNER_DVBCT2_SONY_P;
|
||||||
|
port->type_name = "DVBCT2_SONY";
|
||||||
break;
|
break;
|
||||||
case 0xb0:
|
case 0xb0:
|
||||||
port->name = "DUAL ISDB-T CXD2838";
|
port->name = "DUAL ISDB-T CXD2838";
|
||||||
port->type = DDB_TUNER_ISDBT_SONY_P;
|
port->type = DDB_TUNER_ISDBT_SONY_P;
|
||||||
|
port->type_name = "ISDBT_SONY";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
@ -2273,25 +2293,34 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
port->name = "DUAL DVB-S2";
|
port->name = "DUAL DVB-S2";
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_DVBS_ST;
|
port->type = DDB_TUNER_DVBS_ST;
|
||||||
|
port->type_name = "DVBS_ST";
|
||||||
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
||||||
} else if (port_has_stv0900_aa(port, &id)) {
|
} else if (port_has_stv0900_aa(port, &id)) {
|
||||||
port->name = "DUAL DVB-S2";
|
port->name = "DUAL DVB-S2";
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_DVBS_ST_AA;
|
if (id == 0x51) {
|
||||||
if (id == 0x51)
|
if (port->nr == 0 &&
|
||||||
port->type = DDB_TUNER_DVBS_STV0910_P;
|
dev->link[l].info->ts_quirks & TS_QUIRK_REVERSED)
|
||||||
else
|
port->type = DDB_TUNER_DVBS_STV0910_PR;
|
||||||
|
else
|
||||||
|
port->type = DDB_TUNER_DVBS_STV0910_P;
|
||||||
|
port->type_name = "DVBS_ST_0910";
|
||||||
|
} else {
|
||||||
port->type = DDB_TUNER_DVBS_ST_AA;
|
port->type = DDB_TUNER_DVBS_ST_AA;
|
||||||
|
port->type_name = "DVBS_ST_AA";
|
||||||
|
}
|
||||||
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
||||||
} else if (port_has_drxks(port)) {
|
} else if (port_has_drxks(port)) {
|
||||||
port->name = "DUAL DVB-C/T";
|
port->name = "DUAL DVB-C/T";
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_DVBCT_TR;
|
port->type = DDB_TUNER_DVBCT_TR;
|
||||||
|
port->type_name = "DVBCT_TR";
|
||||||
ddbwritel(dev, I2C_SPEED_400, port->i2c->regs + I2C_TIMING);
|
ddbwritel(dev, I2C_SPEED_400, port->i2c->regs + I2C_TIMING);
|
||||||
} else if (port_has_stv0367(port)) {
|
} else if (port_has_stv0367(port)) {
|
||||||
port->name = "DUAL DVB-C/T";
|
port->name = "DUAL DVB-C/T";
|
||||||
port->class = DDB_PORT_TUNER;
|
port->class = DDB_PORT_TUNER;
|
||||||
port->type = DDB_TUNER_DVBCT_ST;
|
port->type = DDB_TUNER_DVBCT_ST;
|
||||||
|
port->type_name = "DVBCT_ST";
|
||||||
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
|
||||||
} else if (port_has_encti(port)) {
|
} else if (port_has_encti(port)) {
|
||||||
port->name = "ENCTI";
|
port->name = "ENCTI";
|
||||||
@ -3040,6 +3069,7 @@ static void ddb_ports_init(struct ddb *dev)
|
|||||||
ddb_output_init(port, i, i + 8);
|
ddb_output_init(port, i, i + 8);
|
||||||
break;
|
break;
|
||||||
case DDB_OCTOPUS_MAX:
|
case DDB_OCTOPUS_MAX:
|
||||||
|
case DDB_OCTOPUS_MAX_CT:
|
||||||
ddb_input_init(port, 2 * i, 0, 2 * i, 2 * p);
|
ddb_input_init(port, 2 * i, 0, 2 * i, 2 * p);
|
||||||
ddb_input_init(port, 2 * i + 1, 1, 2 * i + 1, 2 * p + 1);
|
ddb_input_init(port, 2 * i + 1, 1, 2 * i + 1, 2 * p + 1);
|
||||||
break;
|
break;
|
||||||
@ -3857,15 +3887,6 @@ static char *class_name[] = {
|
|||||||
"NONE", "CI", "TUNER", "LOOP", "MOD"
|
"NONE", "CI", "TUNER", "LOOP", "MOD"
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *type_name[] = {
|
|
||||||
"NONE", "DVBS_ST", "DVBS_ST_AA", "DVBCT_TR",
|
|
||||||
"DVBCT_ST", "INTERNAL", "CXD2099", "DVBCT2_SONY",
|
|
||||||
"DVBC2T2_SONY", "ISDBT_SONY", "DVBS_ST", "MXL5XX",
|
|
||||||
"TYPE0C", "TYPE0D", "TYPE0E", "TYPE0F",
|
|
||||||
"DVBS_ST", "DVBCT2_SONY", "ISDBT_SONY", "DVBC2T2_SONY",
|
|
||||||
"ATSC_ST", "DVBC2T2_ST"
|
|
||||||
};
|
|
||||||
|
|
||||||
static ssize_t fan_show(struct device *device,
|
static ssize_t fan_show(struct device *device,
|
||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
@ -3978,7 +3999,7 @@ static ssize_t mod_show(struct device *device,
|
|||||||
|
|
||||||
return sprintf(buf, "%s:%s\n",
|
return sprintf(buf, "%s:%s\n",
|
||||||
class_name[dev->port[num].class],
|
class_name[dev->port[num].class],
|
||||||
type_name[dev->port[num].type]);
|
dev->port[num].type_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t led_show(struct device *device,
|
static ssize_t led_show(struct device *device,
|
||||||
@ -4466,15 +4487,13 @@ static void gtl_irq_handler(unsigned long priv)
|
|||||||
struct ddb *dev = link->dev;
|
struct ddb *dev = link->dev;
|
||||||
u32 s, off = 32 * link->nr, tag = DDB_LINK_TAG(link->nr);
|
u32 s, off = 32 * link->nr, tag = DDB_LINK_TAG(link->nr);
|
||||||
|
|
||||||
s = ddbreadl(dev, tag | INTERRUPT_STATUS);
|
while ((s = ddbreadl(dev, tag | INTERRUPT_STATUS))) {
|
||||||
//printk("gtl_irq %08x = %08x\n", tag | INTERRUPT_STATUS, s);
|
ddbwritel(dev, s, tag | INTERRUPT_ACK);
|
||||||
if (!s)
|
LINK_IRQ_HANDLE(0);
|
||||||
return;
|
LINK_IRQ_HANDLE(1);
|
||||||
ddbwritel(dev, s, tag | INTERRUPT_ACK);
|
LINK_IRQ_HANDLE(2);
|
||||||
LINK_IRQ_HANDLE(0);
|
LINK_IRQ_HANDLE(3);
|
||||||
LINK_IRQ_HANDLE(1);
|
}
|
||||||
LINK_IRQ_HANDLE(2);
|
|
||||||
LINK_IRQ_HANDLE(3);
|
|
||||||
#else
|
#else
|
||||||
printk("gtlirq\n");
|
printk("gtlirq\n");
|
||||||
tasklet_schedule(&link->tasklet);
|
tasklet_schedule(&link->tasklet);
|
||||||
@ -4508,6 +4527,35 @@ static struct ddb_info octopus_max_gtl = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static struct ddb_regset octopus_maxct_gtl_i2c = {
|
||||||
|
.base = 0x80,
|
||||||
|
.num = 0x04,
|
||||||
|
.size = 0x20,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ddb_regset octopus_maxct_gtl_i2c_buf = {
|
||||||
|
.base = 0x1000,
|
||||||
|
.num = 0x04,
|
||||||
|
.size = 0x200,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ddb_regmap octopus_maxct_gtl_map = {
|
||||||
|
.i2c = &octopus_maxct_gtl_i2c,
|
||||||
|
.i2c_buf = &octopus_maxct_gtl_i2c_buf,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct ddb_info octopus_ct_gtl = {
|
||||||
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
|
.name = "Digital Devices Octopus MAX CT GTL",
|
||||||
|
.regmap = &octopus_maxct_gtl_map,
|
||||||
|
.port_num = 4,
|
||||||
|
.i2c_mask = 0x0f,
|
||||||
|
.board_control = 0xff,
|
||||||
|
.board_control_2 = 0xf00,
|
||||||
|
.ts_quirks = TS_QUIRK_SERIAL,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static int ddb_gtl_init_link(struct ddb *dev, u32 l)
|
static int ddb_gtl_init_link(struct ddb *dev, u32 l)
|
||||||
{
|
{
|
||||||
struct ddb_link *link = &dev->link[l];
|
struct ddb_link *link = &dev->link[l];
|
||||||
@ -4541,9 +4589,14 @@ static int ddb_gtl_init_link(struct ddb *dev, u32 l)
|
|||||||
link->regs = regs;
|
link->regs = regs;
|
||||||
|
|
||||||
id = ddbreadl(dev, DDB_LINK_TAG(l) | 8);
|
id = ddbreadl(dev, DDB_LINK_TAG(l) | 8);
|
||||||
if (id == 0x0007dd01)
|
switch (id) {
|
||||||
|
case 0x0007dd01:
|
||||||
link->info = &octopus_max_gtl;
|
link->info = &octopus_max_gtl;
|
||||||
else {
|
break;
|
||||||
|
case 0x0008dd01:
|
||||||
|
link->info = &octopus_ct_gtl;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
pr_info("DDBridge: Detected GT link but found invalid ID %08x. "
|
pr_info("DDBridge: Detected GT link but found invalid ID %08x. "
|
||||||
"You might have to update (flash) the add-on card first.",
|
"You might have to update (flash) the add-on card first.",
|
||||||
id);
|
id);
|
||||||
@ -4565,7 +4618,7 @@ static int ddb_gtl_init_link(struct ddb *dev, u32 l)
|
|||||||
|
|
||||||
tasklet_init(&link->tasklet, link_tasklet, (unsigned long) link);
|
tasklet_init(&link->tasklet, link_tasklet, (unsigned long) link);
|
||||||
ddbwritel(dev, 0xffffffff, DDB_LINK_TAG(l) | INTERRUPT_ACK);
|
ddbwritel(dev, 0xffffffff, DDB_LINK_TAG(l) | INTERRUPT_ACK);
|
||||||
ddbwritel(dev, 1, DDB_LINK_TAG(l) | INTERRUPT_ENABLE);
|
ddbwritel(dev, 0xf, DDB_LINK_TAG(l) | INTERRUPT_ENABLE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4595,9 +4648,9 @@ static int ddb_init_boards(struct ddb *dev)
|
|||||||
if (info->board_control) {
|
if (info->board_control) {
|
||||||
ddbwritel(dev, 0, DDB_LINK_TAG(l) | BOARD_CONTROL);
|
ddbwritel(dev, 0, DDB_LINK_TAG(l) | BOARD_CONTROL);
|
||||||
msleep(100);
|
msleep(100);
|
||||||
ddbwritel(dev, 4, DDB_LINK_TAG(l) | BOARD_CONTROL);
|
ddbwritel(dev, info->board_control_2, DDB_LINK_TAG(l) | BOARD_CONTROL);
|
||||||
usleep_range(2000, 3000);
|
usleep_range(2000, 3000);
|
||||||
ddbwritel(dev, 4 | info->board_control,
|
ddbwritel(dev, info->board_control_2 | info->board_control,
|
||||||
DDB_LINK_TAG(l) | BOARD_CONTROL);
|
DDB_LINK_TAG(l) | BOARD_CONTROL);
|
||||||
usleep_range(2000, 3000);
|
usleep_range(2000, 3000);
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,11 @@ static int ddb_i2c_cmd(struct ddb_i2c *i2c, u32 adr, u32 cmd)
|
|||||||
u32 istat = ddbreadl(dev, INTERRUPT_STATUS);
|
u32 istat = ddbreadl(dev, INTERRUPT_STATUS);
|
||||||
|
|
||||||
dev_err(dev->dev, "DDBridge IRS %08x\n", istat);
|
dev_err(dev->dev, "DDBridge IRS %08x\n", istat);
|
||||||
|
if (i2c->link) {
|
||||||
|
u32 listat = ddbreadl(dev, DDB_LINK_TAG(i2c->link) | INTERRUPT_STATUS);
|
||||||
|
dev_err(dev->dev, "DDBridge link %u IRS %08x\n",
|
||||||
|
i2c->link, listat);
|
||||||
|
}
|
||||||
if (istat & 1) {
|
if (istat & 1) {
|
||||||
ddbwritel(dev, istat & 1, INTERRUPT_ACK);
|
ddbwritel(dev, istat & 1, INTERRUPT_ACK);
|
||||||
} else {
|
} else {
|
||||||
|
@ -63,6 +63,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
|
|||||||
{
|
{
|
||||||
struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev);
|
struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev);
|
||||||
|
|
||||||
|
ddb_device_destroy(dev);
|
||||||
ddb_nsd_detach(dev);
|
ddb_nsd_detach(dev);
|
||||||
ddb_ports_detach(dev);
|
ddb_ports_detach(dev);
|
||||||
ddb_i2c_release(dev);
|
ddb_i2c_release(dev);
|
||||||
@ -70,6 +71,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
|
|||||||
if (dev->link[0].info->ns_num)
|
if (dev->link[0].info->ns_num)
|
||||||
ddbwritel(dev, 0, ETHER_CONTROL);
|
ddbwritel(dev, 0, ETHER_CONTROL);
|
||||||
ddbwritel(dev, 0, INTERRUPT_ENABLE);
|
ddbwritel(dev, 0, INTERRUPT_ENABLE);
|
||||||
|
|
||||||
ddbwritel(dev, 0, MSI1_ENABLE);
|
ddbwritel(dev, 0, MSI1_ENABLE);
|
||||||
if (dev->msi == 2)
|
if (dev->msi == 2)
|
||||||
free_irq(dev->pdev->irq + 1, dev);
|
free_irq(dev->pdev->irq + 1, dev);
|
||||||
@ -80,7 +82,6 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
|
|||||||
#endif
|
#endif
|
||||||
ddb_ports_release(dev);
|
ddb_ports_release(dev);
|
||||||
ddb_buffers_free(dev);
|
ddb_buffers_free(dev);
|
||||||
ddb_device_destroy(dev);
|
|
||||||
|
|
||||||
ddb_unmap(dev);
|
ddb_unmap(dev);
|
||||||
pci_set_drvdata(pdev, 0);
|
pci_set_drvdata(pdev, 0);
|
||||||
@ -357,7 +358,9 @@ static struct ddb_info ddb_v7 = {
|
|||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
.port_num = 4,
|
.port_num = 4,
|
||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
.board_control = 2,
|
.board_control = 2,
|
||||||
|
.board_control_2 = 4,
|
||||||
|
.ts_quirks = TS_QUIRK_REVERSED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ctv7 = {
|
static struct ddb_info ddb_ctv7 = {
|
||||||
@ -366,7 +369,8 @@ static struct ddb_info ddb_ctv7 = {
|
|||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
.port_num = 4,
|
.port_num = 4,
|
||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
.board_control = 3,
|
.board_control = 3,
|
||||||
|
.board_control_2 = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_satixS2v3 = {
|
static struct ddb_info ddb_satixS2v3 = {
|
||||||
@ -390,7 +394,7 @@ static struct ddb_info ddb_cis = {
|
|||||||
.name = "Digital Devices Octopus CI single",
|
.name = "Digital Devices Octopus CI single",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
.port_num = 3,
|
.port_num = 3,
|
||||||
.i2c_mask = 0x01,
|
.i2c_mask = 0x03,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ci_s2_pro = {
|
static struct ddb_info ddb_ci_s2_pro = {
|
||||||
@ -399,7 +403,8 @@ static struct ddb_info ddb_ci_s2_pro = {
|
|||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
.port_num = 4,
|
.port_num = 4,
|
||||||
.i2c_mask = 0x01,
|
.i2c_mask = 0x01,
|
||||||
.board_control = 3,
|
.board_control = 2,
|
||||||
|
.board_control_2 = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_dvbct = {
|
static struct ddb_info ddb_dvbct = {
|
||||||
@ -421,6 +426,17 @@ static struct ddb_info ddb_s2_48 = {
|
|||||||
.board_control = 1,
|
.board_control = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct ddb_info ddb_ct_8 = {
|
||||||
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
|
.name = "Digital Devices MAX CT8",
|
||||||
|
.regmap = &octopus_map,
|
||||||
|
.port_num = 4,
|
||||||
|
.i2c_mask = 0x0f,
|
||||||
|
.board_control = 0x0ff,
|
||||||
|
.board_control_2 = 0xf00,
|
||||||
|
.ts_quirks = TS_QUIRK_SERIAL,
|
||||||
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_mod = {
|
static struct ddb_info ddb_mod = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.name = "Digital Devices DVB-C modulator",
|
.name = "Digital Devices DVB-C modulator",
|
||||||
@ -467,6 +483,7 @@ static const struct pci_device_id ddb_id_tbl[] __devinitconst = {
|
|||||||
DDB_ID(DDVID, 0x0006, DDVID, 0x0032, ddb_ctv7),
|
DDB_ID(DDVID, 0x0006, DDVID, 0x0032, ddb_ctv7),
|
||||||
DDB_ID(DDVID, 0x0006, DDVID, 0x0033, ddb_ctv7),
|
DDB_ID(DDVID, 0x0006, DDVID, 0x0033, ddb_ctv7),
|
||||||
DDB_ID(DDVID, 0x0007, DDVID, 0x0023, ddb_s2_48),
|
DDB_ID(DDVID, 0x0007, DDVID, 0x0023, ddb_s2_48),
|
||||||
|
DDB_ID(DDVID, 0x0008, DDVID, 0x0034, ddb_ct_8),
|
||||||
DDB_ID(DDVID, 0x0011, DDVID, 0x0040, ddb_ci),
|
DDB_ID(DDVID, 0x0011, DDVID, 0x0040, ddb_ci),
|
||||||
DDB_ID(DDVID, 0x0011, DDVID, 0x0041, ddb_cis),
|
DDB_ID(DDVID, 0x0011, DDVID, 0x0041, ddb_cis),
|
||||||
DDB_ID(DDVID, 0x0012, DDVID, 0x0042, ddb_ci),
|
DDB_ID(DDVID, 0x0012, DDVID, 0x0042, ddb_ci),
|
||||||
|
@ -147,6 +147,7 @@ struct ddb_info {
|
|||||||
#define DDB_MOD 3
|
#define DDB_MOD 3
|
||||||
#define DDB_OCTONET 4
|
#define DDB_OCTONET 4
|
||||||
#define DDB_OCTOPUS_MAX 5
|
#define DDB_OCTOPUS_MAX 5
|
||||||
|
#define DDB_OCTOPUS_MAX_CT 6
|
||||||
char *name;
|
char *name;
|
||||||
u32 i2c_mask;
|
u32 i2c_mask;
|
||||||
u8 port_num;
|
u8 port_num;
|
||||||
@ -154,10 +155,14 @@ struct ddb_info {
|
|||||||
u8 fan_num;
|
u8 fan_num;
|
||||||
u8 temp_num;
|
u8 temp_num;
|
||||||
u8 temp_bus;
|
u8 temp_bus;
|
||||||
u8 board_control;
|
u32 board_control;
|
||||||
|
u32 board_control_2;
|
||||||
u8 ns_num;
|
u8 ns_num;
|
||||||
u8 mdio_num;
|
u8 mdio_num;
|
||||||
u8 con_clock;
|
u8 con_clock; /* use a continuous clock */
|
||||||
|
u8 ts_quirks;
|
||||||
|
#define TS_QUIRK_SERIAL 1
|
||||||
|
#define TS_QUIRK_REVERSED 2
|
||||||
struct ddb_regmap *regmap;
|
struct ddb_regmap *regmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -271,6 +276,7 @@ struct ddb_port {
|
|||||||
#define DDB_PORT_LOOP 3
|
#define DDB_PORT_LOOP 3
|
||||||
#define DDB_PORT_MOD 4
|
#define DDB_PORT_MOD 4
|
||||||
char *name;
|
char *name;
|
||||||
|
char *type_name;
|
||||||
u32 type;
|
u32 type;
|
||||||
#define DDB_TUNER_NONE 0
|
#define DDB_TUNER_NONE 0
|
||||||
#define DDB_TUNER_DVBS_ST 1
|
#define DDB_TUNER_DVBS_ST 1
|
||||||
@ -286,14 +292,15 @@ struct ddb_port {
|
|||||||
#define DDB_TUNER_MXL5XX 11
|
#define DDB_TUNER_MXL5XX 11
|
||||||
#define DDB_CI_EXTERNAL_XO2 12
|
#define DDB_CI_EXTERNAL_XO2 12
|
||||||
#define DDB_CI_EXTERNAL_XO2_B 13
|
#define DDB_CI_EXTERNAL_XO2_B 13
|
||||||
|
#define DDB_TUNER_DVBS_STV0910_PR 14
|
||||||
|
|
||||||
#define DDB_TUNER_XO2 16
|
#define DDB_TUNER_XO2 32
|
||||||
#define DDB_TUNER_DVBS_STV0910 16
|
#define DDB_TUNER_DVBS_STV0910 (DDB_TUNER_XO2 + 0)
|
||||||
#define DDB_TUNER_DVBCT2_SONY 17
|
#define DDB_TUNER_DVBCT2_SONY (DDB_TUNER_XO2 + 1)
|
||||||
#define DDB_TUNER_ISDBT_SONY 18
|
#define DDB_TUNER_ISDBT_SONY (DDB_TUNER_XO2 + 2)
|
||||||
#define DDB_TUNER_DVBC2T2_SONY 19
|
#define DDB_TUNER_DVBC2T2_SONY (DDB_TUNER_XO2 + 3)
|
||||||
#define DDB_TUNER_ATSC_ST 20
|
#define DDB_TUNER_ATSC_ST (DDB_TUNER_XO2 + 4)
|
||||||
#define DDB_TUNER_DVBC2T2_ST 21
|
#define DDB_TUNER_DVBC2T2_ST (DDB_TUNER_XO2 + 5)
|
||||||
|
|
||||||
struct ddb_input *input[2];
|
struct ddb_input *input[2];
|
||||||
struct ddb_output *output;
|
struct ddb_output *output;
|
||||||
@ -705,6 +712,6 @@ void ddbridge_mod_rate_handler(unsigned long data);
|
|||||||
|
|
||||||
int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);
|
int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);
|
||||||
|
|
||||||
#define DDBRIDGE_VERSION "0.9.20"
|
#define DDBRIDGE_VERSION "0.9.21"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -113,16 +113,17 @@ static int __exit octonet_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
dev = platform_get_drvdata(pdev);
|
dev = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
ddb_device_destroy(dev);
|
||||||
ddb_nsd_detach(dev);
|
ddb_nsd_detach(dev);
|
||||||
ddb_ports_detach(dev);
|
ddb_ports_detach(dev);
|
||||||
ddb_i2c_release(dev);
|
ddb_i2c_release(dev);
|
||||||
|
|
||||||
ddbwritel(dev, 0, ETHER_CONTROL);
|
if (dev->link[0].info->ns_num)
|
||||||
|
ddbwritel(dev, 0, ETHER_CONTROL);
|
||||||
ddbwritel(dev, 0, INTERRUPT_ENABLE);
|
ddbwritel(dev, 0, INTERRUPT_ENABLE);
|
||||||
free_irq(platform_get_irq(dev->pfdev, 0), dev);
|
|
||||||
|
|
||||||
|
free_irq(platform_get_irq(dev->pfdev, 0), dev);
|
||||||
ddb_ports_release(dev);
|
ddb_ports_release(dev);
|
||||||
ddb_device_destroy(dev);
|
|
||||||
octonet_unmap(dev);
|
octonet_unmap(dev);
|
||||||
platform_set_drvdata(pdev, 0);
|
platform_set_drvdata(pdev, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1008,6 +1008,15 @@ static void release(struct dvb_frontend *fe)
|
|||||||
kfree(state);
|
kfree(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int sleep(struct dvb_frontend *fe)
|
||||||
|
{
|
||||||
|
struct cxd_state *state = fe->demodulator_priv;
|
||||||
|
|
||||||
|
Stop(state);
|
||||||
|
ShutDown(state);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int Start(struct cxd_state *state, u32 IntermediateFrequency)
|
static int Start(struct cxd_state *state, u32 IntermediateFrequency)
|
||||||
{
|
{
|
||||||
enum demod_state newDemodState = Unknown;
|
enum demod_state newDemodState = Unknown;
|
||||||
@ -1889,9 +1898,10 @@ static struct dvb_frontend_ops common_ops_2843 = {
|
|||||||
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
||||||
FE_CAN_TRANSMISSION_MODE_AUTO |
|
FE_CAN_TRANSMISSION_MODE_AUTO |
|
||||||
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
||||||
FE_CAN_RECOVER | FE_CAN_MUTE_TS
|
FE_CAN_RECOVER | FE_CAN_MUTE_TS | FE_CAN_2G_MODULATION
|
||||||
},
|
},
|
||||||
.release = release,
|
.release = release,
|
||||||
|
.sleep = sleep,
|
||||||
.i2c_gate_ctrl = gate_ctrl,
|
.i2c_gate_ctrl = gate_ctrl,
|
||||||
.set_frontend = set_parameters,
|
.set_frontend = set_parameters,
|
||||||
|
|
||||||
@ -1926,9 +1936,10 @@ static struct dvb_frontend_ops common_ops_2837 = {
|
|||||||
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
||||||
FE_CAN_TRANSMISSION_MODE_AUTO |
|
FE_CAN_TRANSMISSION_MODE_AUTO |
|
||||||
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
||||||
FE_CAN_RECOVER | FE_CAN_MUTE_TS
|
FE_CAN_RECOVER | FE_CAN_MUTE_TS | FE_CAN_2G_MODULATION
|
||||||
},
|
},
|
||||||
.release = release,
|
.release = release,
|
||||||
|
.sleep = sleep,
|
||||||
.i2c_gate_ctrl = gate_ctrl,
|
.i2c_gate_ctrl = gate_ctrl,
|
||||||
.set_frontend = set_parameters,
|
.set_frontend = set_parameters,
|
||||||
|
|
||||||
@ -1955,15 +1966,16 @@ static struct dvb_frontend_ops common_ops_2838 = {
|
|||||||
.frequency_max = 865000000,
|
.frequency_max = 865000000,
|
||||||
.symbol_rate_min = 870000,
|
.symbol_rate_min = 870000,
|
||||||
.symbol_rate_max = 11700000,
|
.symbol_rate_max = 11700000,
|
||||||
.caps = FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
|
.caps = FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
|
||||||
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
||||||
FE_CAN_FEC_4_5 |
|
FE_CAN_FEC_4_5 |
|
||||||
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
||||||
FE_CAN_TRANSMISSION_MODE_AUTO |
|
FE_CAN_TRANSMISSION_MODE_AUTO |
|
||||||
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
|
||||||
FE_CAN_RECOVER | FE_CAN_MUTE_TS
|
FE_CAN_RECOVER | FE_CAN_MUTE_TS | FE_CAN_2G_MODULATION
|
||||||
},
|
},
|
||||||
.release = release,
|
.release = release,
|
||||||
|
.sleep = sleep,
|
||||||
.i2c_gate_ctrl = gate_ctrl,
|
.i2c_gate_ctrl = gate_ctrl,
|
||||||
.set_frontend = set_parameters,
|
.set_frontend = set_parameters,
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ struct stv {
|
|||||||
u16 regoff;
|
u16 regoff;
|
||||||
u8 i2crpt;
|
u8 i2crpt;
|
||||||
u8 tscfgh;
|
u8 tscfgh;
|
||||||
|
u8 tsgeneral;
|
||||||
u8 tsspeed;
|
u8 tsspeed;
|
||||||
unsigned long tune_time;
|
unsigned long tune_time;
|
||||||
|
|
||||||
@ -932,7 +933,7 @@ static int probe(struct stv *state)
|
|||||||
|
|
||||||
if (id != 0x51)
|
if (id != 0x51)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
pr_info("stv0910: found STV0910 id=0x%02x\n", id);
|
/* pr_info("stv0910: found STV0910 id=0x%02x\n", id); */
|
||||||
|
|
||||||
/* Configure the I2C repeater to off */
|
/* Configure the I2C repeater to off */
|
||||||
write_reg(state, RSTV0910_P1_I2CRPT, 0x24);
|
write_reg(state, RSTV0910_P1_I2CRPT, 0x24);
|
||||||
@ -944,7 +945,7 @@ static int probe(struct stv *state)
|
|||||||
write_reg(state, RSTV0910_OUTCFG, 0x00); /* OUTCFG */
|
write_reg(state, RSTV0910_OUTCFG, 0x00); /* OUTCFG */
|
||||||
write_reg(state, RSTV0910_PADCFG, 0x05); /* RF AGC Pads Dev = 05 */
|
write_reg(state, RSTV0910_PADCFG, 0x05); /* RF AGC Pads Dev = 05 */
|
||||||
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
||||||
write_reg(state, RSTV0910_TSGENERAL, 0x00); /* TSGENERAL */
|
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
|
||||||
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
|
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
|
||||||
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
|
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
|
||||||
|
|
||||||
@ -1359,6 +1360,7 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
state->tscfgh = 0x20 | (cfg->parallel ? 0 : 0x40);
|
state->tscfgh = 0x20 | (cfg->parallel ? 0 : 0x40);
|
||||||
|
state->tsgeneral = (cfg->parallel == 2) ? 0x02 : 0x00;
|
||||||
state->i2crpt = 0x0A | ((cfg->rptlvl & 0x07) << 4);
|
state->i2crpt = 0x0A | ((cfg->rptlvl & 0x07) << 4);
|
||||||
state->tsspeed = 0x40;
|
state->tsspeed = 0x40;
|
||||||
state->nr = nr;
|
state->nr = nr;
|
||||||
|
@ -306,7 +306,6 @@ static int set_params(struct dvb_frontend *fe)
|
|||||||
{
|
{
|
||||||
struct stv *state = fe->tuner_priv;
|
struct stv *state = fe->tuner_priv;
|
||||||
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
|
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
|
||||||
int status;
|
|
||||||
u32 freq, symb, cutoff;
|
u32 freq, symb, cutoff;
|
||||||
|
|
||||||
if (p->delivery_system != SYS_DVBS && p->delivery_system != SYS_DVBS2)
|
if (p->delivery_system != SYS_DVBS && p->delivery_system != SYS_DVBS2)
|
||||||
@ -321,7 +320,7 @@ static int set_params(struct dvb_frontend *fe)
|
|||||||
set_lof(state, freq, cutoff);
|
set_lof(state, freq, cutoff);
|
||||||
if (fe->ops.i2c_gate_ctrl)
|
if (fe->ops.i2c_gate_ctrl)
|
||||||
fe->ops.i2c_gate_ctrl(fe, 0);
|
fe->ops.i2c_gate_ctrl(fe, 0);
|
||||||
return status;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_frequency(struct dvb_frontend *fe, u32 *frequency)
|
static int get_frequency(struct dvb_frontend *fe, u32 *frequency)
|
||||||
|
@ -447,8 +447,8 @@ static int attach_init(struct tda_state *state)
|
|||||||
if (!state->m_isMaster)
|
if (!state->m_isMaster)
|
||||||
state->m_bLTEnable = false;
|
state->m_bLTEnable = false;
|
||||||
|
|
||||||
pr_info("tda18212dd: ChipID %04x %s\n", state->m_ID,
|
/*pr_info("tda18212dd: ChipID %04x %s\n", state->m_ID,
|
||||||
state->m_isMaster ? "master" : "slave");
|
state->m_isMaster ? "master" : "slave");*/
|
||||||
|
|
||||||
if (state->m_ID != 18212)
|
if (state->m_ID != 18212)
|
||||||
return -1;
|
return -1;
|
||||||
@ -457,7 +457,7 @@ static int attach_init(struct tda_state *state)
|
|||||||
if (stat < 0)
|
if (stat < 0)
|
||||||
return stat;
|
return stat;
|
||||||
|
|
||||||
pr_info("tda18212dd: PowerState %02x\n", PowerState);
|
/*pr_info("tda18212dd: PowerState %02x\n", PowerState);*/
|
||||||
|
|
||||||
if (state->m_isMaster) {
|
if (state->m_isMaster) {
|
||||||
if (PowerState & 0x02) {
|
if (PowerState & 0x02) {
|
||||||
@ -487,6 +487,7 @@ static int attach_init(struct tda_state *state)
|
|||||||
FinishCalibration(state);
|
FinishCalibration(state);
|
||||||
Standby(state);
|
Standby(state);
|
||||||
|
|
||||||
|
#if 0
|
||||||
{
|
{
|
||||||
u8 RFCal_Log[12];
|
u8 RFCal_Log[12];
|
||||||
|
|
||||||
@ -499,6 +500,7 @@ static int attach_init(struct tda_state *state)
|
|||||||
RFCal_Log[8], RFCal_Log[9],
|
RFCal_Log[8], RFCal_Log[9],
|
||||||
RFCal_Log[10], RFCal_Log[11]);
|
RFCal_Log[10], RFCal_Log[11]);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -775,6 +777,10 @@ static int sleep(struct dvb_frontend *fe)
|
|||||||
struct tda_state *state = fe->tuner_priv;
|
struct tda_state *state = fe->tuner_priv;
|
||||||
|
|
||||||
Standby(state);
|
Standby(state);
|
||||||
|
write_reg(state, THERMO_2, 0x01);
|
||||||
|
read_reg1(state, THERMO_1);
|
||||||
|
write_reg(state, THERMO_2, 0x00);
|
||||||
|
printk("sleep: temp = %u\n", state->Regs[THERMO_1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user