diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-08 12:43:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 09:36:48 -0200 |
commit | e281db5862743dbe1dab7f8fb423e699537036ee (patch) | |
tree | ef1e74bc538cd820d5ae2f64728a7388f7666a69 /drivers/media/video/saa7134/saa7134-empress.c | |
parent | 1e55126666944c83bf98243564e25302f363e2a4 (diff) | |
download | linux-stable-e281db5862743dbe1dab7f8fb423e699537036ee.tar.gz linux-stable-e281db5862743dbe1dab7f8fb423e699537036ee.tar.bz2 linux-stable-e281db5862743dbe1dab7f8fb423e699537036ee.zip |
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.c | 22 |
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 @@ #include <media/saa6752hs.h> #include <media/v4l2-common.h> +#include <media/v4l2-chip-ident.h> /* ------------------------------------------------------------------ */ @@ -403,6 +404,25 @@ static int empress_querymenu(struct file *file, void *priv, return saa7134_i2c_call_saa6752(dev, VIDIOC_QUERYMENU, c); } +static int empress_g_chip_ident(struct file *file, void *fh, + struct v4l2_chip_ident *chip) +{ + struct saa7134_dev *dev = file->private_data; + + chip->ident = V4L2_IDENT_NONE; + chip->revision = 0; + if (dev->mpeg_i2c_client == NULL) + return -EINVAL; + if (chip->match_type == V4L2_CHIP_MATCH_I2C_DRIVER && + chip->match_chip == I2C_DRIVERID_SAA6752HS) + return saa7134_i2c_call_saa6752(dev, VIDIOC_G_CHIP_IDENT, chip); + if (chip->match_type == V4L2_CHIP_MATCH_I2C_ADDR && + chip->match_chip == dev->mpeg_i2c_client->addr) + return saa7134_i2c_call_saa6752(dev, VIDIOC_G_CHIP_IDENT, chip); + return -EINVAL; +} + + static const struct file_operations ts_fops = { .owner = THIS_MODULE, @@ -431,11 +451,11 @@ static const struct v4l2_ioctl_ops ts_ioctl_ops = { .vidioc_enum_input = empress_enum_input, .vidioc_g_input = empress_g_input, .vidioc_s_input = empress_s_input, - .vidioc_queryctrl = empress_queryctrl, .vidioc_querymenu = empress_querymenu, .vidioc_g_ctrl = empress_g_ctrl, .vidioc_s_ctrl = empress_s_ctrl, + .vidioc_g_chip_ident = empress_g_chip_ident, }; /* ----------------------------------------------------------- */ |