aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-08-08 11:43:59 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:48 -0400
commite281db5862743dbe1dab7f8fb423e699537036ee (patch)
treeef1e74bc538cd820d5ae2f64728a7388f7666a69 /drivers/media/video/saa7134/saa7134-empress.c
parent1e55126666944c83bf98243564e25302f363e2a4 (diff)
V4L/DVB (8639): saa6752hs: cleanup and add AC-3 support
Cleaned up the saa6752hs i2c driver. Add AC-3 support. Add VIDIOC_CHIP_IDENT support. 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.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 6f423d116fb4..f5a186a13db2 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -29,6 +29,7 @@
29 29
30#include <media/saa6752hs.h> 30#include <media/saa6752hs.h>
31#include <media/v4l2-common.h> 31#include <media/v4l2-common.h>
32#include <media/v4l2-chip-ident.h>
32 33
33/* ------------------------------------------------------------------ */ 34/* ------------------------------------------------------------------ */
34 35
@@ -403,6 +404,25 @@ static int empress_querymenu(struct file *file, void *priv,
403 return saa7134_i2c_call_saa6752(dev, VIDIOC_QUERYMENU, c); 404 return saa7134_i2c_call_saa6752(dev, VIDIOC_QUERYMENU, c);
404} 405}
405 406
407static int empress_g_chip_ident(struct file *file, void *fh,
408 struct v4l2_chip_ident *chip)
409{
410 struct saa7134_dev *dev = file->private_data;
411
412 chip->ident = V4L2_IDENT_NONE;
413 chip->revision = 0;
414 if (dev->mpeg_i2c_client == NULL)
415 return -EINVAL;
416 if (chip->match_type == V4L2_CHIP_MATCH_I2C_DRIVER &&
417 chip->match_chip == I2C_DRIVERID_SAA6752HS)
418 return saa7134_i2c_call_saa6752(dev, VIDIOC_G_CHIP_IDENT, chip);
419 if (chip->match_type == V4L2_CHIP_MATCH_I2C_ADDR &&
420 chip->match_chip == dev->mpeg_i2c_client->addr)
421 return saa7134_i2c_call_saa6752(dev, VIDIOC_G_CHIP_IDENT, chip);
422 return -EINVAL;
423}
424
425
406static const struct file_operations ts_fops = 426static const struct file_operations ts_fops =
407{ 427{
408 .owner = THIS_MODULE, 428 .owner = THIS_MODULE,
@@ -431,11 +451,11 @@ static const struct v4l2_ioctl_ops ts_ioctl_ops = {
431 .vidioc_enum_input = empress_enum_input, 451 .vidioc_enum_input = empress_enum_input,
432 .vidioc_g_input = empress_g_input, 452 .vidioc_g_input = empress_g_input,
433 .vidioc_s_input = empress_s_input, 453 .vidioc_s_input = empress_s_input,
434
435 .vidioc_queryctrl = empress_queryctrl, 454 .vidioc_queryctrl = empress_queryctrl,
436 .vidioc_querymenu = empress_querymenu, 455 .vidioc_querymenu = empress_querymenu,
437 .vidioc_g_ctrl = empress_g_ctrl, 456 .vidioc_g_ctrl = empress_g_ctrl,
438 .vidioc_s_ctrl = empress_s_ctrl, 457 .vidioc_s_ctrl = empress_s_ctrl,
458 .vidioc_g_chip_ident = empress_g_chip_ident,
439}; 459};
440 460
441/* ----------------------------------------------------------- */ 461/* ----------------------------------------------------------- */