diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-11-02 12:23:14 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2007-11-02 12:23:14 -0200 |
commit | 5fc082034aea45c93d3fd729284e1baa8987ca02 (patch) | |
tree | b0e85d69b0773b13d0c385cc9769d3047de80901 /linux/drivers/staging | |
parent | 941076a614d523b4e4b0ca5440da8c0f2011c258 (diff) | |
download | mediapointer-dvb-s2-5fc082034aea45c93d3fd729284e1baa8987ca02.tar.gz mediapointer-dvb-s2-5fc082034aea45c93d3fd729284e1baa8987ca02.tar.bz2 |
tm6000: Avoid sending xc3028 setups for other tuners
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/staging')
-rw-r--r-- | linux/drivers/staging/tm6000/tm6000-cards.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-cards.c b/linux/drivers/staging/tm6000/tm6000-cards.c index 5879c2537..5881ea6ea 100644 --- a/linux/drivers/staging/tm6000/tm6000-cards.c +++ b/linux/drivers/staging/tm6000/tm6000-cards.c @@ -179,15 +179,19 @@ static void tm6000_config_tuner (struct tm6000_core *dev) memset (&ctl,0,sizeof(ctl)); - ctl.fname = "tm6000-xc3028.fw"; - ctl.type = XC2028_FIRM_MTS; + request_module ("tuner"); + + if (dev->tuner_type == TUNER_XC2028) { + ctl.fname = "tm6000-xc3028.fw"; + ctl.type = XC2028_FIRM_MTS; - xc2028_cfg.tuner = TUNER_XC2028; - xc2028_cfg.priv = &ctl; + xc2028_cfg.tuner = TUNER_XC2028; + xc2028_cfg.priv = &ctl; -printk("Setting firmware parameters for tm6000\n"); + printk(KERN_INFO "Setting firmware parameters for xc2028\n"); - tm6000_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg); + tm6000_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg); + } } static int tm6000_init_dev(struct tm6000_core *dev) @@ -223,24 +227,24 @@ static int tm6000_init_dev(struct tm6000_core *dev) if (rc<0) goto err; - /* Request tuner */ - request_module ("tuner"); + /* Default values for STD and resolutions */ + dev->width = 720; + dev->height = 480; + dev->norm = V4L2_STD_PAL_M; + /* Configure tuner */ tm6000_config_tuner (dev); -#if 1 -// norm=V4L2_STD_NTSC_M; - dev->norm=V4L2_STD_PAL_M; + /* Set video standard */ tm6000_i2c_call_clients(dev, VIDIOC_S_STD, &dev->norm); - /* configure tuner */ + /* Set tuner frequency - also loads firmware on xc2028/xc3028 */ f.tuner = 0; f.type = V4L2_TUNER_ANALOG_TV; f.frequency = 3092; /* 193.25 MHz */ dev->freq = f.frequency; - tm6000_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f); -#endif + if(dev->caps.has_dvb) { dev->dvb = kzalloc(sizeof(*(dev->dvb)), GFP_KERNEL); if(!dev->dvb) { |