summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-10-20 17:44:23 +0000
committerGerd Knorr <devnull@localhost>2004-10-20 17:44:23 +0000
commitb6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6 (patch)
tree2b92afaa3a49e0128448dd73bbc3099febb15b26 /linux/drivers/media/video/cx88
parent0ccd772fd27e5b6ddb7a5cabe182b5c4128d3dc3 (diff)
downloadmediapointer-dvb-s2-b6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6.tar.gz
mediapointer-dvb-s2-b6e0bc4cf1eebed71e6bd7f67bf1e3e7fc8764c6.tar.bz2
- switch over to "frontend refactored" cvs branch.
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c69
1 files changed, 33 insertions, 36 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 878d7c19d..87c800399 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-dvb.c,v 1.14 2004/10/19 16:02:04 kraxel Exp $
+ * $Id: cx88-dvb.c,v 1.15 2004/10/20 17:44:24 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
@@ -32,6 +32,7 @@
#include "cx88.h"
#include "cx22702.h"
+#include "mt352.h"
MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
@@ -87,59 +88,55 @@ struct videobuf_queue_ops dvb_qops = {
/* ------------------------------------------------------------------ */
-static void dvb_unregister(struct cx8802_dev *dev)
+static int dvico_fusionhdtv_init(struct dvb_frontend* fe)
{
- videobuf_dvb_unregister(&dev->dvb);
- if (dev->fe_handle)
- dev->fe_release(dev->fe_handle);
- dvb_unregister_adapter(dev->dvb.adapter);
- return;
+ printk("FIXME: %s\n",__FUNCTION__);
+ return 0;
}
-static int dvb_register(struct cx8802_dev *dev)
+static int dvico_fusionhdtv_pll_set(struct dvb_frontend* fe,
+ struct dvb_frontend_parameters* params,
+ u8* pllbuf)
{
- int result;
+ printk("FIXME: %s\n",__FUNCTION__);
+ return 0;
+}
+
+struct mt352_config dvico_fusionhdtv = {
+ .demod_address = 42,
+ .demod_init = dvico_fusionhdtv_init,
+ .pll_set = dvico_fusionhdtv_pll_set,
+};
+static int dvb_register(struct cx8802_dev *dev)
+{
/* init struct videobuf_dvb */
dev->dvb.priv = dev;
dev->dvb.name = dev->core->name;
- /* register adapter */
- result = dvb_register_adapter(&dev->dvb.adapter, dev->core->name,
- THIS_MODULE);
- if (result < 0) {
- printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n",
- dev->core->name, result);
- goto fail1;
- }
-
- /* init + register frontend */
+ /* init frontend */
switch (dev->core->board) {
case CX88_BOARD_HAUPPAUGE_DVB_T1:
case CX88_BOARD_CONEXANT_DVB_T1:
- dev->fe_handle = cx22702_create(&dev->core->i2c_adap,
- dev->dvb.adapter,
- dev->core->pll_addr,
- dev->core->pll_type,
- dev->core->demod_addr);
- dev->fe_release = cx22702_destroy;
+ dev->dvb.frontend = cx22702_create(&dev->core->i2c_adap,
+ dev->core->pll_addr,
+ dev->core->pll_type,
+ dev->core->demod_addr);
+ break;
+ case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
+ dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv,
+ &dev->core->i2c_adap);
break;
default:
printk("%s: FIXME: frontend handing not here yet ...\n",
dev->core->name);
break;
}
+ if (NULL == dev->dvb.frontend)
+ return -1;
- /* register everything else */
- result = videobuf_dvb_register(&dev->dvb);
- if (0 != result)
- goto fail2;
- return 0;
-
-fail2:
- dvb_unregister_adapter(dev->dvb.adapter);
-fail1:
- return result;
+ /* register everything */
+ return videobuf_dvb_register(&dev->dvb);
}
/* ----------------------------------------------------------- */
@@ -198,7 +195,7 @@ static void __devexit dvb_remove(struct pci_dev *pci_dev)
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
/* dvb */
- dvb_unregister(dev);
+ videobuf_dvb_unregister(&dev->dvb);
/* common */
cx8802_fini_common(dev);