summaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-01-05 16:50:14 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 19:05:05 -0200
commit27c685a4b09b5e391023d769cddb97e4fcb3b9e1 (patch)
treeaf296caf5de933e90f7c82170f0cc2e57dd062f0 /drivers/media/video
parentdfc1c08aab447d49230dacb390d3f2263584d28f (diff)
V4L/DVB (7042): xc5000: Tuner analog support
From Zhang: This an updated patch that adds analog support for the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i card (patches to follow). Patch commited as-is, cleanup to follow ... Steve. Signed-off-by: Chaogui Zhang <czhang1974@gmail.com> Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/tuner-core.c20
-rw-r--r--drivers/media/video/tuner-types.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 35976e6cb1b8..16cdeeafeb6c 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -27,6 +27,7 @@
#include "tuner-xc2028.h"
#include "tuner-simple.h"
#include "tda9887.h"
+#include "xc5000.h"
#define UNSET (-1U)
@@ -329,6 +330,8 @@ static void attach_tda829x(struct tuner *t)
tda829x_attach(&t->fe, t->i2c->adapter, t->i2c->addr, &cfg);
}
+static struct xc5000_config xc5000_cfg;
+
static void set_type(struct i2c_client *c, unsigned int type,
unsigned int new_mode_mask, unsigned int new_config,
int (*tuner_callback) (void *dev, int command,int arg))
@@ -428,6 +431,23 @@ static void set_type(struct i2c_client *c, unsigned int type,
case TUNER_TDA9887:
tda9887_attach(&t->fe, t->i2c->adapter, t->i2c->addr);
break;
+ case TUNER_XC5000:
+ xc5000_cfg.i2c_address = t->i2c->addr;
+ xc5000_cfg.if_khz = 5380;
+ xc5000_cfg.video_dev = c->adapter->algo_data;
+ xc5000_cfg.tuner_callback = t->tuner_callback;
+ if (!xc5000_attach(&t->fe, t->i2c->adapter, &xc5000_cfg)) {
+ t->type = TUNER_ABSENT;
+ t->mode_mask = T_UNINITIALIZED;
+ return;
+ }
+ {
+ struct dvb_tuner_ops *xc_tuner_ops;
+ xc_tuner_ops = &t->fe.ops.tuner_ops;
+ if(xc_tuner_ops->init != NULL)
+ xc_tuner_ops->init(&t->fe);
+ }
+ break;
default:
attach_simple_tuner(t);
break;
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c
index e2cd05a05802..883047f9c28c 100644
--- a/drivers/media/video/tuner-types.c
+++ b/drivers/media/video/tuner-types.c
@@ -1475,6 +1475,10 @@ struct tunertype tuners[] = {
.name = "Philips TEA5761 FM Radio",
/* see tea5767.c for details */
},
+ [TUNER_XC5000] = { /* Xceive 5000 */
+ .name = "Xceive 5000 tuner",
+ /* see xc5000.c for details */
+ },
};
unsigned const int tuner_count = ARRAY_SIZE(tuners);