summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 2fd4c99c4..56ef3b413 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -320,30 +320,26 @@ static struct cx22702_config hauppauge_hvr1100_config = {
.demod_address = 0x63,
.output_mode = CX22702_SERIAL_OUTPUT,
};
+static struct cx22702_config hauppauge_hvr3000_config = {
+ .demod_address = 0x63,
+ .output_mode = CX22702_SERIAL_OUTPUT,
+};
static int cx88_dvb_bus_ctrl(struct dvb_frontend* fe,
int acquire)
{
struct cx8802_dev *dev= fe->dvb->priv;
struct cx8802_driver *drv = NULL;
- struct cx88_core *core = dev->core;
int ret = 0;
- dprintk(1, "%s(acquire=%d)\n", __FUNCTION__, acquire);
-
- switch (dev->core->board) {
- case CX88_BOARD_HAUPPAUGE_HVR1300:
- drv = cx8802_get_driver(dev, CX88_MPEG_DVB);
- if (drv) {
- if(acquire)
- ret = drv->request_acquire(drv);
- else
- ret = drv->request_release(drv);
- }
- break;
+ drv = cx8802_get_driver(dev, CX88_MPEG_DVB);
+ if (drv) {
+ if(acquire)
+ ret = drv->request_acquire(drv);
+ else
+ ret = drv->request_release(drv);
}
- dprintk(1, "%s(acquire=%d) returns %d\n", __FUNCTION__, acquire, ret);
return ret;
}
@@ -791,7 +787,16 @@ static int dvb_register(struct cx8802_dev *dev)
dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
&dev->core->i2c_adap,
&dvb_pll_fmd1216me);
- dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl;
+ }
+ break;
+ case CX88_BOARD_HAUPPAUGE_HVR3000:
+ dev->dvb.frontend = dvb_attach(cx22702_attach,
+ &hauppauge_hvr3000_config,
+ &dev->core->i2c_adap);
+ if (dev->dvb.frontend != NULL) {
+ dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+ &dev->core->i2c_adap,
+ &dvb_pll_fmd1216me);
}
break;
default:
@@ -808,6 +813,8 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend->ops.info.frequency_min = dev->core->pll_desc->min;
dev->dvb.frontend->ops.info.frequency_max = dev->core->pll_desc->max;
}
+ /* Ensure all frontends negotiate bus access */
+ dev->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl;
/* Put the analog decoder in standby to keep it quiet */
cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL);