V4L/DVB (12807): tm6000: Properly select xc2028 parameters
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 24 Oct 2007 12:22:08 +0000 (09:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:39:52 +0000 (00:39 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-cards.c
drivers/staging/tm6000/tm6000-core.c

index 5544b8a261977a0fd5e80965e338a21c860ed75b..c60863470180d6f861b8f17ca940f890146e965b 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "tm6000.h"
 #include "tm6000-regs.h"
+#include "tuner-xc2028.h"
 
 #define TM6000_BOARD_UNKNOWN                   0
 #define TM5600_BOARD_GENERIC                   1
@@ -156,6 +157,24 @@ struct usb_device_id tm6000_id_table [] = {
        { },
 };
 
+static void tm6000_config_tuner (struct tm6000_core *dev)
+{
+       struct v4l2_priv_tun_config  xc2028_cfg;
+       struct xc2028_ctrl           ctl;
+
+       memset (&ctl,0,sizeof(ctl));
+
+       ctl.fname = "tm6000-xc3028.fw";
+       ctl.type  = XC2028_FIRM_MTS;
+
+       xc2028_cfg.tuner = TUNER_XC2028;
+       xc2028_cfg.priv  = &ctl;
+
+printk("Setting firmware parameters for tm6000\n");
+
+       tm6000_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg);
+}
+
 static int tm6000_init_dev(struct tm6000_core *dev)
 {
        struct v4l2_frequency f;
@@ -191,6 +210,9 @@ static int tm6000_init_dev(struct tm6000_core *dev)
 
        /* Request tuner */
        request_module ("tuner");
+
+       tm6000_config_tuner (dev);
+
 //     norm=V4L2_STD_NTSC_M;
        dev->norm=V4L2_STD_PAL_M;
        tm6000_i2c_call_clients(dev, VIDIOC_S_STD, &dev->norm);
index 8a645fe8e5a31781b1a5ebdadbdb208930be4df9..bef528f2413b5e7214389d1119ca2ac2d6fbc393 100644 (file)
@@ -375,9 +375,9 @@ int tm6000_init (struct tm6000_core *dev)
 
        msleep(50);
 
-       return 0;
-
 #endif /* HACK */
+
+       return 0;
 }
 
 #define tm6000_wrt(dev,req,reg,val, data...)                           \