提交 f35b9e80 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

V4L/DVB (12165): cx23885: override set_frontend to allow rf input path switching on the HVR1275

Use separate RF input spigots for Antennae and Cable.
Reviewed-by: NSteven Toth <stoth@kernellabs.com>
Signed-off-by: NMichael Krufky <mkrufky@kernellabs.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 509dd025
......@@ -463,6 +463,30 @@ static struct xc5000_config mygica_x8506_xc5000_config = {
.if_khz = 5380,
};
static int cx23885_dvb_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *param)
{
struct cx23885_tsport *port = fe->dvb->priv;
struct cx23885_dev *dev = port->dev;
switch (dev->board) {
case CX23885_BOARD_HAUPPAUGE_HVR1275:
switch (param->u.vsb.modulation) {
case VSB_8:
cx23885_gpio_clear(dev, GPIO_5);
break;
case QAM_64:
case QAM_256:
default:
cx23885_gpio_set(dev, GPIO_5);
break;
}
break;
}
return (port->set_frontend_save) ?
port->set_frontend_save(fe, param) : -ENODEV;
}
static int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
......@@ -502,6 +526,11 @@ static int dvb_register(struct cx23885_tsport *port)
0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_hvr127x_config);
}
/* define bridge override to set_frontend */
port->set_frontend_save = fe0->dvb.frontend->ops.set_frontend;
fe0->dvb.frontend->ops.set_frontend = cx23885_dvb_set_frontend;
break;
case CX23885_BOARD_HAUPPAUGE_HVR1255:
i2c_bus = &dev->i2c_bus[0];
......
......@@ -288,6 +288,8 @@ struct cx23885_tsport {
/* Allow a single tsport to have multiple frontends */
u32 num_frontends;
void *port_priv;
int (*set_frontend_save) (struct dvb_frontend *,
struct dvb_frontend_parameters *);
};
struct cx23885_dev {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册