summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-18 20:56:47 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-18 20:56:47 -0200
commit7bd18cc4f52f6672342a79a936a32a4df73ae3c5 (patch)
tree5d721acda88196e7ff2bbe75d1f5e0586a1bd8fb /linux/drivers/media/video/em28xx
parent7c3206d14cea8962f79628f11cd3f582f2b9644d (diff)
downloadmediapointer-dvb-s2-7bd18cc4f52f6672342a79a936a32a4df73ae3c5.tar.gz
mediapointer-dvb-s2-7bd18cc4f52f6672342a79a936a32a4df73ae3c5.tar.bz2
Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG
From: Mauro Carvalho Chehab <mchehab@infradead.org> Currently, the only tuner-specific device that allows special configurations is tda9887. However, tea5767 also may require some special configurations (for example, to specify a different Xtal freq). This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl (TUNER_SET_CONFIG). The newer one allows specifying what tuner is appliable to a configuration set, and allows an arbitrary configuration struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c8
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c8
2 files changed, 7 insertions, 9 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index ca302b535..5d102ec8c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -430,6 +430,8 @@ static int attach_inform(struct i2c_client *client)
case 0x43:
case 0x4b:
{
+ struct v4l2_priv_tun_config tda9887_cfg;
+
struct tuner_setup tun_setup;
tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
@@ -437,7 +439,11 @@ static int attach_inform(struct i2c_client *client)
tun_setup.addr = client->addr;
em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
- em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf);
+
+ tda9887_cfg.tuner = TUNER_TDA9887;
+ tda9887_cfg.priv = &dev->tda9887_conf;
+ em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG,
+ &tda9887_cfg);
break;
}
case 0x42:
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 45bbefeff..533c2a996 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -205,14 +205,6 @@ static void em28xx_config_i2c(struct em28xx *dev)
f.frequency = 9076; /* FIXME:remove magic number */
dev->ctl_freq = f.frequency;
em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
-
- /* configure tda9887 */
-
-#if 0
- em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf);
-#endif
-
-/* em28xx_i2c_call_clients(dev,VIDIOC_S_STD,&dev->tvnorm->id); */
}
/*