aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-417.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-29 05:53:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:48 -0400
commit0d5a19f15837de69f864b2a43a93f119224d778c (patch)
tree952be3a127bdf863a7163f552e243020a44f64b1 /drivers/media/video/cx23885/cx23885-417.c
parentd35ed62704bc1d44dd4746a242e8c09f2a48fc40 (diff)
V4L/DVB (11297): cx23885: convert to v4l2_subdev.
Convert this driver to v4l2_subdev. Note that currently the only card with analog support in this driver is the HVR-1800. The analog tuner support in this driver is limited to what is needed for this board. When analog support is added for other cards, then the tuner load code will probably have to be expanded to take care of those boards. For example, there is currently no support for either radio tuners or tda9887 demods. I'd like to thank Steven Toth for testing this on his HVR-1800. Tested-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 9e57c33b5496..6f5df90af93e 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -1251,8 +1251,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
1251 if (0 != t->index) 1251 if (0 != t->index)
1252 return -EINVAL; 1252 return -EINVAL;
1253 strcpy(t->name, "Television"); 1253 strcpy(t->name, "Television");
1254 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_G_TUNER, t); 1254 call_all(dev, tuner, g_tuner, t);
1255 cx23885_call_i2c_clients(&dev->i2c_bus[1], VIDIOC_G_TUNER, t);
1256 1255
1257 dprintk(1, "VIDIOC_G_TUNER: tuner type %d\n", t->type); 1256 dprintk(1, "VIDIOC_G_TUNER: tuner type %d\n", t->type);
1258 1257
@@ -1269,7 +1268,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
1269 return -EINVAL; 1268 return -EINVAL;
1270 1269
1271 /* Update the A/V core */ 1270 /* Update the A/V core */
1272 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_S_TUNER, t); 1271 call_all(dev, tuner, s_tuner, t);
1273 1272
1274 return 0; 1273 return 0;
1275} 1274}
@@ -1285,8 +1284,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1285 f->type = V4L2_TUNER_ANALOG_TV; 1284 f->type = V4L2_TUNER_ANALOG_TV;
1286 f->frequency = dev->freq; 1285 f->frequency = dev->freq;
1287 1286
1288 /* Assumption that tuner is always on bus 1 */ 1287 call_all(dev, tuner, g_frequency, f);
1289 cx23885_call_i2c_clients(&dev->i2c_bus[1], VIDIOC_G_FREQUENCY, f);
1290 1288
1291 return 0; 1289 return 0;
1292} 1290}
@@ -1313,8 +1311,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1313 return -EINVAL; 1311 return -EINVAL;
1314 dev->freq = f->frequency; 1312 dev->freq = f->frequency;
1315 1313
1316 /* Assumption that tuner is always on bus 1 */ 1314 call_all(dev, tuner, s_frequency, f);
1317 cx23885_call_i2c_clients(&dev->i2c_bus[1], VIDIOC_S_FREQUENCY, f);
1318 1315
1319 cx23885_initialize_codec(dev); 1316 cx23885_initialize_codec(dev);
1320 1317
@@ -1328,7 +1325,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
1328 struct cx23885_dev *dev = fh->dev; 1325 struct cx23885_dev *dev = fh->dev;
1329 1326
1330 /* Update the A/V core */ 1327 /* Update the A/V core */
1331 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_S_CTRL, ctl); 1328 call_all(dev, core, s_ctrl, ctl);
1332 return 0; 1329 return 0;
1333} 1330}
1334 1331
@@ -1524,12 +1521,7 @@ static int vidioc_log_status(struct file *file, void *priv)
1524 printk(KERN_INFO 1521 printk(KERN_INFO
1525 "%s/2: ============ START LOG STATUS ============\n", 1522 "%s/2: ============ START LOG STATUS ============\n",
1526 dev->name); 1523 dev->name);
1527 cx23885_call_i2c_clients(&dev->i2c_bus[0], VIDIOC_LOG_STATUS, 1524 call_all(dev, core, log_status);
1528 NULL);
1529 cx23885_call_i2c_clients(&dev->i2c_bus[1], VIDIOC_LOG_STATUS,
1530 NULL);
1531 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_LOG_STATUS,
1532 NULL);
1533 cx2341x_log_status(&dev->mpeg_params, name); 1525 cx2341x_log_status(&dev->mpeg_params, name);
1534 printk(KERN_INFO 1526 printk(KERN_INFO
1535 "%s/2: ============= END LOG STATUS =============\n", 1527 "%s/2: ============= END LOG STATUS =============\n",