summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-05 09:25:04 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-05 09:25:04 -0300
commit4bc820a744a300fa8a4fe1adb5f87594f286ea41 (patch)
treeed9ca1205062168996ee1ebae9b5d4b1086564d0 /linux/drivers/media/video/cx23885
parente060bd6ae7ce4dee0f07e3ac5051de35b4908bd0 (diff)
parent6dfa16c1aa732ce5a5c0f0404e70ed2d65675b6b (diff)
downloadmediapointer-dvb-s2-4bc820a744a300fa8a4fe1adb5f87594f286ea41.tar.gz
mediapointer-dvb-s2-4bc820a744a300fa8a4fe1adb5f87594f286ea41.tar.bz2
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-dm646x
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx23885')
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-dvb.c30
-rw-r--r--linux/drivers/media/video/cx23885/cx23885.h4
2 files changed, 34 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c
index 71f196ec5..4bab7c814 100644
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c
@@ -464,6 +464,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;
@@ -503,6 +527,12 @@ static int dvb_register(struct cx23885_tsport *port)
0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_hvr127x_config);
}
+
+ /* FIXME: temporary hack */
+ /* 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];
diff --git a/linux/drivers/media/video/cx23885/cx23885.h b/linux/drivers/media/video/cx23885/cx23885.h
index 2022ed7de..aecaca4b4 100644
--- a/linux/drivers/media/video/cx23885/cx23885.h
+++ b/linux/drivers/media/video/cx23885/cx23885.h
@@ -289,6 +289,10 @@ struct cx23885_tsport {
/* Allow a single tsport to have multiple frontends */
u32 num_frontends;
void *port_priv;
+
+ /* FIXME: temporary hack */
+ int (*set_frontend_save) (struct dvb_frontend *,
+ struct dvb_frontend_parameters *);
};
struct cx23885_dev {