aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-09-06 05:34:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:58 -0400
commit9afb7377ef16a73d1ae7b089aa853e00a3facea8 (patch)
tree4b5935da7097240c194b5899e0bcd08388353c43 /drivers/media/video/saa7134/saa7134-empress.c
parentac2b97b13e5627127b8e29dc0e1e1d7be03eaae4 (diff)
V4L/DVB (8917): saa7134-empress: fix changing the capture standard for non-tuner inputs
When changing the standard the saa6752hs was not updated unless the input was the TV tuner. The saa6752hs should be updated regardless of the input. In addition the S_STD and G_STD ioctls for the mpeg video device didn't do anything. This is now fixed: they behave just like S_STD and G_STD on the video0 device. 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-empress.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 946edf64dc28..9a8766a78a0c 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -303,15 +303,6 @@ static int empress_streamoff(struct file *file, void *priv,
303 return videobuf_streamoff(&dev->empress_tsq); 303 return videobuf_streamoff(&dev->empress_tsq);
304} 304}
305 305
306static int saa7134_i2c_call_saa6752(struct saa7134_dev *dev,
307 unsigned int cmd, void *arg)
308{
309 if (dev->mpeg_i2c_client == NULL)
310 return -EINVAL;
311 return dev->mpeg_i2c_client->driver->command(dev->mpeg_i2c_client,
312 cmd, arg);
313}
314
315static int empress_s_ext_ctrls(struct file *file, void *priv, 306static int empress_s_ext_ctrls(struct file *file, void *priv,
316 struct v4l2_ext_controls *ctrls) 307 struct v4l2_ext_controls *ctrls)
317{ 308{
@@ -431,6 +422,20 @@ static int empress_g_chip_ident(struct file *file, void *fh,
431 return -EINVAL; 422 return -EINVAL;
432} 423}
433 424
425static int empress_s_std(struct file *file, void *priv, v4l2_std_id *id)
426{
427 struct saa7134_dev *dev = file->private_data;
428
429 return saa7134_s_std_internal(dev, NULL, id);
430}
431
432static int empress_g_std(struct file *file, void *priv, v4l2_std_id *id)
433{
434 struct saa7134_dev *dev = file->private_data;
435
436 *id = dev->tvnorm->id;
437 return 0;
438}
434 439
435static const struct file_operations ts_fops = 440static const struct file_operations ts_fops =
436{ 441{
@@ -465,6 +470,8 @@ static const struct v4l2_ioctl_ops ts_ioctl_ops = {
465 .vidioc_g_ctrl = empress_g_ctrl, 470 .vidioc_g_ctrl = empress_g_ctrl,
466 .vidioc_s_ctrl = empress_s_ctrl, 471 .vidioc_s_ctrl = empress_s_ctrl,
467 .vidioc_g_chip_ident = empress_g_chip_ident, 472 .vidioc_g_chip_ident = empress_g_chip_ident,
473 .vidioc_s_std = empress_s_std,
474 .vidioc_g_std = empress_g_std,
468}; 475};
469 476
470/* ----------------------------------------------------------- */ 477/* ----------------------------------------------------------- */