aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-17 10:17:14 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:22 -0400
commitfac6986c4777ae85fa2108ea25fee98de2c1f7b2 (patch)
tree477119cf15d50bcc548ddd6e6ba15eb69e311d23 /drivers/media/video/saa7134/saa7134-video.c
parent5b73e98c83fc5087f591c9b12ee546b97e9283d4 (diff)
V4L/DVB (10247): saa7134: convert to the new v4l2 framework.
Register v4l2_device and switch to v4l2_subdev to access the i2c modules. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index a1f7e351f572..193b07d83d1e 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -627,10 +627,10 @@ void saa7134_set_tvnorm_hw(struct saa7134_dev *dev)
627 saa7134_set_decoder(dev); 627 saa7134_set_decoder(dev);
628 628
629 if (card_in(dev, dev->ctl_input).tv) 629 if (card_in(dev, dev->ctl_input).tv)
630 saa7134_i2c_call_clients(dev, VIDIOC_S_STD, &dev->tvnorm->id); 630 saa_call_all(dev, tuner, s_std, dev->tvnorm->id);
631 /* Set the correct norm for the saa6752hs. This function 631 /* Set the correct norm for the saa6752hs. This function
632 does nothing if there is no saa6752hs. */ 632 does nothing if there is no saa6752hs. */
633 saa7134_i2c_call_saa6752(dev, VIDIOC_S_STD, &dev->tvnorm->id); 633 saa_call_empress(dev, tuner, s_std, dev->tvnorm->id);
634} 634}
635 635
636static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) 636static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale)
@@ -1266,8 +1266,7 @@ int saa7134_s_ctrl_internal(struct saa7134_dev *dev, struct saa7134_fh *fh, str
1266 else 1266 else
1267 dev->tda9887_conf &= ~TDA9887_AUTOMUTE; 1267 dev->tda9887_conf &= ~TDA9887_AUTOMUTE;
1268 1268
1269 saa7134_i2c_call_clients(dev, TUNER_SET_CONFIG, 1269 saa_call_all(dev, tuner, s_config, &tda9887_cfg);
1270 &tda9887_cfg);
1271 } 1270 }
1272 break; 1271 break;
1273 } 1272 }
@@ -1387,7 +1386,7 @@ static int video_open(struct file *file)
1387 if (fh->radio) { 1386 if (fh->radio) {
1388 /* switch to radio mode */ 1387 /* switch to radio mode */
1389 saa7134_tvaudio_setinput(dev,&card(dev).radio); 1388 saa7134_tvaudio_setinput(dev,&card(dev).radio);
1390 saa7134_i2c_call_clients(dev,AUDC_SET_RADIO, NULL); 1389 saa_call_all(dev, tuner, s_radio);
1391 } else { 1390 } else {
1392 /* switch to video/vbi mode */ 1391 /* switch to video/vbi mode */
1393 video_mux(dev,dev->ctl_input); 1392 video_mux(dev,dev->ctl_input);
@@ -1498,7 +1497,7 @@ static int video_release(struct file *file)
1498 saa_andorb(SAA7134_OFMT_DATA_A, 0x1f, 0); 1497 saa_andorb(SAA7134_OFMT_DATA_A, 0x1f, 0);
1499 saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0); 1498 saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
1500 1499
1501 saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL); 1500 saa_call_all(dev, core, s_standby, 0);
1502 1501
1503 /* free stuff */ 1502 /* free stuff */
1504 videobuf_mmap_free(&fh->cap); 1503 videobuf_mmap_free(&fh->cap);
@@ -2041,7 +2040,7 @@ static int saa7134_s_frequency(struct file *file, void *priv,
2041 mutex_lock(&dev->lock); 2040 mutex_lock(&dev->lock);
2042 dev->ctl_freq = f->frequency; 2041 dev->ctl_freq = f->frequency;
2043 2042
2044 saa7134_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, f); 2043 saa_call_all(dev, tuner, s_frequency, f);
2045 2044
2046 saa7134_tvaudio_do_scan(dev); 2045 saa7134_tvaudio_do_scan(dev);
2047 mutex_unlock(&dev->lock); 2046 mutex_unlock(&dev->lock);
@@ -2299,7 +2298,7 @@ static int radio_g_tuner(struct file *file, void *priv,
2299 strcpy(t->name, "Radio"); 2298 strcpy(t->name, "Radio");
2300 t->type = V4L2_TUNER_RADIO; 2299 t->type = V4L2_TUNER_RADIO;
2301 2300
2302 saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t); 2301 saa_call_all(dev, tuner, g_tuner, t);
2303 if (dev->input->amux == TV) { 2302 if (dev->input->amux == TV) {
2304 t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11); 2303 t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11);
2305 t->rxsubchans = (saa_readb(0x529) & 0x08) ? 2304 t->rxsubchans = (saa_readb(0x529) & 0x08) ?
@@ -2316,7 +2315,7 @@ static int radio_s_tuner(struct file *file, void *priv,
2316 if (0 != t->index) 2315 if (0 != t->index)
2317 return -EINVAL; 2316 return -EINVAL;
2318 2317
2319 saa7134_i2c_call_clients(dev, VIDIOC_S_TUNER, t); 2318 saa_call_all(dev, tuner, s_tuner, t);
2320 return 0; 2319 return 0;
2321} 2320}
2322 2321