aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authoristvan_v@mailbox.hu <istvan_v@mailbox.hu>2011-06-07 12:12:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:53:04 -0400
commitc21973e8aa930fe8a56ed4939ed9b6d640a6b158 (patch)
tree37f7341e6563bc26b292daec86b2c75105ada67b /drivers/media/video/cx88/cx88-dvb.c
parent0db15d525d2d342de8e983c218198d5708a32004 (diff)
[media] cx88: added XC4000 tuner callback and DVB attach functions
Added functions for XC4000 tuner reset and attaching DVB frontend. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index c69df7ebb6a..f0fbff499f0 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -41,6 +41,7 @@
41#include "or51132.h" 41#include "or51132.h"
42#include "lgdt330x.h" 42#include "lgdt330x.h"
43#include "s5h1409.h" 43#include "s5h1409.h"
44#include "xc4000.h"
44#include "xc5000.h" 45#include "xc5000.h"
45#include "nxt200x.h" 46#include "nxt200x.h"
46#include "cx24123.h" 47#include "cx24123.h"
@@ -605,6 +606,39 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
605 return 0; 606 return 0;
606} 607}
607 608
609static int attach_xc4000(struct cx8802_dev *dev, struct xc4000_config *cfg)
610{
611 struct dvb_frontend *fe;
612 struct videobuf_dvb_frontend *fe0 = NULL;
613
614 /* Get the first frontend */
615 fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1);
616 if (!fe0)
617 return -EINVAL;
618
619 if (!fe0->dvb.frontend) {
620 printk(KERN_ERR "%s/2: dvb frontend not attached. "
621 "Can't attach xc4000\n",
622 dev->core->name);
623 return -EINVAL;
624 }
625
626 fe = dvb_attach(xc4000_attach, fe0->dvb.frontend, &dev->core->i2c_adap,
627 cfg);
628 if (!fe) {
629 printk(KERN_ERR "%s/2: xc4000 attach failed\n",
630 dev->core->name);
631 dvb_frontend_detach(fe0->dvb.frontend);
632 dvb_unregister_frontend(fe0->dvb.frontend);
633 fe0->dvb.frontend = NULL;
634 return -EINVAL;
635 }
636
637 printk(KERN_INFO "%s/2: xc4000 attached\n", dev->core->name);
638
639 return 0;
640}
641
608static int cx24116_set_ts_param(struct dvb_frontend *fe, 642static int cx24116_set_ts_param(struct dvb_frontend *fe,
609 int is_punctured) 643 int is_punctured)
610{ 644{