mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
- fix dynamic fmode changes
- 69Mhz no longer needed for MaxS8 on GT link - show state in GT link change
This commit is contained in:
parent
5c4db2b594
commit
4e1b527c35
@ -1292,6 +1292,8 @@ static int lnb_command(struct ddb *dev, u32 link, u32 lnb, u32 cmd)
|
||||
break;
|
||||
msleep(20);
|
||||
}
|
||||
if (c == 10)
|
||||
pr_info("lnb_command lnb = %08x cmd = %08x\n", lnb, cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1542,14 +1544,15 @@ static int mxl_fw_read(void *priv, u8 *buf, u32 len)
|
||||
return ddbridge_flashread(dev, link->nr, buf, 0xc0000, len);
|
||||
}
|
||||
|
||||
static int lnb_init_fmode(struct ddb *dev, struct ddb_link *link, u32 fmode)
|
||||
static int lnb_init_fmode(struct ddb *dev, struct ddb_link *link, u32 fm)
|
||||
{
|
||||
u32 l = link->nr;
|
||||
|
||||
if (link->lnb.setmode == fmode)
|
||||
if (link->lnb.fmode == fm)
|
||||
return 0;
|
||||
if (fmode == 2 || fmode == 1) {
|
||||
pr_info("Set fmode link %u = %u\n", l, fm);
|
||||
mutex_lock(&link->lnb.lock);
|
||||
if (fm == 2 || fm == 1) {
|
||||
lnb_set_tone(dev, l, 0, SEC_TONE_OFF);
|
||||
if (old_quattro) {
|
||||
lnb_set_tone(dev, l, 1, SEC_TONE_OFF);
|
||||
@ -1559,9 +1562,9 @@ static int lnb_init_fmode(struct ddb *dev, struct ddb_link *link, u32 fmode)
|
||||
lnb_set_tone(dev, l, 2, SEC_TONE_OFF);
|
||||
}
|
||||
lnb_set_tone(dev, l, 3, SEC_TONE_ON);
|
||||
mutex_unlock(&link->lnb.lock);
|
||||
}
|
||||
link->lnb.setmode = fmode;
|
||||
link->lnb.fmode = fm;
|
||||
mutex_unlock(&link->lnb.lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1584,12 +1587,10 @@ static int fe_attach_mxl5xx(struct ddb_input *input)
|
||||
struct mxl5xx_cfg cfg;
|
||||
int demod, tuner;
|
||||
|
||||
link->lnb.fmode = fmode;
|
||||
|
||||
cfg = mxl5xx;
|
||||
cfg.fw_priv = link;
|
||||
if (dev->link[0].info->type == DDB_OCTONET)
|
||||
cfg.ts_clk = 69;
|
||||
;//cfg.ts_clk = 69;
|
||||
|
||||
demod = input->nr;
|
||||
tuner = demod & 3;
|
||||
@ -4228,8 +4229,7 @@ static ssize_t fmode_store(struct device *device, struct device_attribute *attr,
|
||||
return -EINVAL;
|
||||
if (val > 3)
|
||||
return -EINVAL;
|
||||
dev->link[num].lnb.fmode = val;
|
||||
lnb_init_fmode(dev, &dev->link[num], fmode);
|
||||
lnb_init_fmode(dev, &dev->link[num], val);
|
||||
return count;
|
||||
}
|
||||
|
||||
@ -4421,7 +4421,11 @@ static void ddb_device_destroy(struct ddb *dev)
|
||||
|
||||
static void gtl_link_handler(unsigned long priv)
|
||||
{
|
||||
printk("GT link change\n");
|
||||
struct ddb *dev = (struct ddb *) priv;
|
||||
u32 regs = dev->link[0].info->regmap->gtl->base;
|
||||
|
||||
printk("GT link change: %u\n",
|
||||
(1 & ddbreadl(dev, regs)));
|
||||
}
|
||||
|
||||
static void link_tasklet(unsigned long data)
|
||||
@ -4502,6 +4506,7 @@ static int ddb_gtl_init_link(struct ddb *dev, u32 l)
|
||||
|
||||
spin_lock_init(&link->lock);
|
||||
mutex_init(&link->lnb.lock);
|
||||
link->lnb.fmode = 0xffffffff;
|
||||
mutex_init(&link->flash_mutex);
|
||||
|
||||
if (!(1 & ddbreadl(dev, regs))) {
|
||||
|
Loading…
Reference in New Issue
Block a user