Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92389
b: refs/heads/master
c: 1b1cee3
h: refs/heads/master
i:
  92387: b119f48
v: v3
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 67f2a4e commit ea2f338
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 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: 6ab465a821756691009e58a51f1b4543cf1ae21a
refs/heads/master: 1b1cee35defe792da9aab2757c28338731c46e84
45 changes: 44 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,36 @@ static struct tda10086_config flydvbs = {
.diseqc_tone = 0,
};

/* ------------------------------------------------------------------
* special case: lnb supply is connected to the gated i2c
*/

static int md8800_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
{
int res = -EIO;
struct saa7134_dev *dev = fe->dvb->priv;
if (fe->ops.i2c_gate_ctrl) {
fe->ops.i2c_gate_ctrl(fe, 1);
if (dev->original_set_voltage)
res = dev->original_set_voltage(fe, voltage);
fe->ops.i2c_gate_ctrl(fe, 0);
}
return res;
};

static int md8800_set_high_voltage(struct dvb_frontend *fe, long arg)
{
int res = -EIO;
struct saa7134_dev *dev = fe->dvb->priv;
if (fe->ops.i2c_gate_ctrl) {
fe->ops.i2c_gate_ctrl(fe, 1);
if (dev->original_set_high_voltage)
res = dev->original_set_high_voltage(fe, arg);
fe->ops.i2c_gate_ctrl(fe, 0);
}
return res;
};

/* ==================================================================
* nxt200x based ATSC cards, helper functions
*/
Expand Down Expand Up @@ -998,14 +1028,27 @@ static int dvb_init(struct saa7134_dev *dev)
dev->dvb.frontend = dvb_attach(tda10086_attach,
&flydvbs, &dev->i2c_adap);
if (dev->dvb.frontend) {
struct dvb_frontend *fe;
if (dvb_attach(tda826x_attach, dev->dvb.frontend,
0x60, &dev->i2c_adap, 0) == NULL)
wprintk("%s: Medion Quadro, no tda826x "
"found !\n", __FUNCTION__);
if (dvb_attach(isl6405_attach, dev->dvb.frontend,
/* Note 10.2. Hac
* up to here. configuration for ctx948 and and one branch
* of md8800 should be identical
*/
/* we need to open the i2c gate (we know it exists) */
fe = dev->dvb.frontend;
fe->ops.i2c_gate_ctrl(fe, 1);
if (dvb_attach(isl6405_attach, fe,
&dev->i2c_adap, 0x08, 0, 0) == NULL)
wprintk("%s: Medion Quadro, no ISL6405 "
"found !\n", __FUNCTION__);
fe->ops.i2c_gate_ctrl(fe, 0);
dev->original_set_voltage = fe->ops.set_voltage;
fe->ops.set_voltage = md8800_set_voltage;
dev->original_set_high_voltage = fe->ops.enable_high_lnb_voltage;
fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage;
}
}
break;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,9 @@ struct saa7134_dev {
#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE)
/* SAA7134_MPEG_DVB only */
struct videobuf_dvb dvb;
int (*original_demod_sleep)(struct dvb_frontend* fe);
int (*original_demod_sleep)(struct dvb_frontend *fe);
int (*original_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage);
int (*original_set_high_voltage)(struct dvb_frontend *fe, long arg);
#endif
};

Expand Down

0 comments on commit ea2f338

Please sign in to comment.