cine s2 v7 has TS lines crossed

This commit is contained in:
Ralph Metzler
2015-12-10 18:26:45 +01:00
parent af746a02dd
commit 829929a41f
6 changed files with 49 additions and 31 deletions

View File

@@ -1223,14 +1223,7 @@ static int tuner_attach_stv6110(struct ddb_input *input, int type)
return 0;
}
static struct stv0910_cfg stv0910 = {
.adr = 0x6c,
.parallel = 1,
.rptlvl = 4,
.clk = 30000000,
};
static struct stv0910_cfg stv0910_aa = {
static struct stv0910_cfg stv0910_p = {
.adr = 0x68,
.parallel = 1,
.rptlvl = 4,
@@ -1241,11 +1234,16 @@ static int demod_attach_stv0910(struct ddb_input *input, int type)
{
struct i2c_adapter *i2c = &input->port->i2c->adap;
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 (!dvb->fe)
if (type)
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,
&stv0910, (input->nr & 1));
&cfg, (input->nr & 1));
}
if (!dvb->fe) {
pr_err("No STV0910 found!\n");
return -ENODEV;
@@ -1910,12 +1908,18 @@ static int dvb_input_attach(struct ddb_input *input)
if (tuner_attach_stv6111(input, 0) < 0)
return -ENODEV;
break;
case DDB_TUNER_DVBS_STV0910_P:
case DDB_TUNER_DVBS_STV0910_PR:
if (demod_attach_stv0910(input, 1) < 0)
return -ENODEV;
if (tuner_attach_stv6111(input, 1) < 0)
return -ENODEV;
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
case DDB_TUNER_DVBCT_TR:
if (demod_attach_drxk(input) < 0)
@@ -1933,7 +1937,9 @@ static int dvb_input_attach(struct ddb_input *input)
case DDB_TUNER_DVBCT2_SONY_P:
case DDB_TUNER_DVBC2T2_SONY_P:
case DDB_TUNER_ISDBT_SONY_P:
if (!input->port->dev->link[input->port->lnr].info->serial)
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:
@@ -2292,12 +2298,17 @@ static void ddb_port_probe(struct ddb_port *port)
} else if (port_has_stv0900_aa(port, &id)) {
port->name = "DUAL DVB-S2";
port->class = DDB_PORT_TUNER;
port->type = DDB_TUNER_DVBS_ST_AA;
port->type_name = "DVBS_ST_AA";
if (id == 0x51)
port->type = DDB_TUNER_DVBS_STV0910_P;
else
if (id == 0x51) {
if (port->nr == 0 &&
dev->link[l].info->ts_quirks & TS_QUIRK_REVERSED)
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_name = "DVBS_ST_AA";
}
ddbwritel(dev, I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
} else if (port_has_drxks(port)) {
port->name = "DUAL DVB-C/T";
@@ -4541,7 +4552,7 @@ static struct ddb_info octopus_ct_gtl = {
.i2c_mask = 0x0f,
.board_control = 0xff,
.board_control_2 = 0xf00,
.serial = 1,
.ts_quirks = TS_QUIRK_SERIAL,
};

View File

@@ -63,6 +63,7 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
{
struct ddb *dev = (struct ddb *) pci_get_drvdata(pdev);
ddb_device_destroy(dev);
ddb_nsd_detach(dev);
ddb_ports_detach(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)
ddbwritel(dev, 0, ETHER_CONTROL);
ddbwritel(dev, 0, INTERRUPT_ENABLE);
ddbwritel(dev, 0, MSI1_ENABLE);
if (dev->msi == 2)
free_irq(dev->pdev->irq + 1, dev);
@@ -80,7 +82,6 @@ static void __devexit ddb_remove(struct pci_dev *pdev)
#endif
ddb_ports_release(dev);
ddb_buffers_free(dev);
ddb_device_destroy(dev);
ddb_unmap(dev);
pci_set_drvdata(pdev, 0);
@@ -359,6 +360,7 @@ static struct ddb_info ddb_v7 = {
.i2c_mask = 0x0f,
.board_control = 2,
.board_control_2 = 4,
.ts_quirks = TS_QUIRK_REVERSED,
};
static struct ddb_info ddb_ctv7 = {
@@ -432,7 +434,7 @@ static struct ddb_info ddb_ct_8 = {
.i2c_mask = 0x0f,
.board_control = 0x0ff,
.board_control_2 = 0xf00,
.serial = 1,
.ts_quirks = TS_QUIRK_SERIAL,
};
static struct ddb_info ddb_mod = {

View File

@@ -160,7 +160,9 @@ struct ddb_info {
u8 ns_num;
u8 mdio_num;
u8 con_clock; /* use a continuous clock */
u8 serial; /* override to serial transfer */
u8 ts_quirks;
#define TS_QUIRK_SERIAL 1
#define TS_QUIRK_REVERSED 2
struct ddb_regmap *regmap;
};
@@ -290,6 +292,7 @@ struct ddb_port {
#define DDB_TUNER_MXL5XX 11
#define DDB_CI_EXTERNAL_XO2 12
#define DDB_CI_EXTERNAL_XO2_B 13
#define DDB_TUNER_DVBS_STV0910_PR 14
#define DDB_TUNER_XO2 32
#define DDB_TUNER_DVBS_STV0910 (DDB_TUNER_XO2 + 0)

View File

@@ -114,15 +114,15 @@ static int __exit octonet_remove(struct platform_device *pdev)
dev = platform_get_drvdata(pdev);
ddb_device_destroy(dev);
ddb_nsd_detach(dev);
ddb_ports_detach(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);
free_irq(platform_get_irq(dev->pfdev, 0), dev);
free_irq(platform_get_irq(dev->pfdev, 0), dev);
ddb_ports_release(dev);
octonet_unmap(dev);
platform_set_drvdata(pdev, 0);