summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-12-21 21:33:36 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 19:04:15 -0200
commit0e614cd1a5a09b36a3b6d0fff8a08a97800d3cce (patch)
treeae5eb3832437a256976353302e57313579f580c3 /drivers/media/video/ivtv/ivtv-driver.c
parent3f51451b516eeb19d3c1ea311ee8845fc80b5135 (diff)
V4L/DVB (6896): ivtv: add XC2028 support for Club3D cards
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 2765624b230f..0cb832a21357 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -59,6 +59,7 @@
#include <media/tveeprom.h>
#include <media/saa7115.h>
#include <media/v4l2-chip-ident.h>
+#include "tuner-xc2028.h"
/* var to keep track of the number of array elements in use */
int ivtv_cards_active = 0;
@@ -844,11 +845,6 @@ static void ivtv_load_and_init_modules(struct ivtv *itv)
unsigned i;
/* load modules */
- if ((hw & IVTV_HW_TUNER) && itv->options.tuner == TUNER_XC2028) {
- IVTV_INFO("Xceive tuner not yet supported, only composite\n");
- IVTV_INFO("and S-Video inputs will be available\n");
- hw &= ~IVTV_HW_TUNER;
- }
#ifndef CONFIG_VIDEO_TUNER
hw = ivtv_request_module(itv, hw, "tuner", IVTV_HW_TUNER);
#endif
@@ -1150,7 +1146,20 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
setup.addr = ADDR_UNSET;
setup.type = itv->options.tuner;
setup.mode_mask = T_ANALOG_TV; /* matches TV tuners */
+ setup.tuner_callback = (setup.type == TUNER_XC2028) ?
+ ivtv_reset_tuner_gpio : NULL;
ivtv_call_i2c_clients(itv, TUNER_SET_TYPE_ADDR, &setup);
+ if (setup.type == TUNER_XC2028) {
+ static struct xc2028_ctrl ctrl = {
+ .fname = XC2028_DEFAULT_FIRMWARE,
+ .max_len = 64,
+ };
+ struct v4l2_priv_tun_config cfg = {
+ .tuner = itv->options.tuner,
+ .priv = &ctrl,
+ };
+ ivtv_call_i2c_clients(itv, TUNER_SET_CONFIG, &cfg);
+ }
}
/* The tuner is fixed to the standard. The other inputs (e.g. S-Video)