summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-ioctl.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-12-15 10:40:23 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-02-14 13:45:56 -0200
commit6e82a6a2a0e895b787f22d28311232cc94fda4b9 (patch)
tree8b002b1d946d7a5d525ed8f0b84499f1650a2301 /drivers/media/video/ivtv/ivtv-ioctl.c
parent85eeece773a6f0d2ba00958782995cbe68218256 (diff)
[media] ivtv: add IVTV_IOC_PASSTHROUGH_MODE
With this private ioctl it is possible to use the ivtv decoder without requiring the dvb/video.h and dvb/audio.h headers. Eventually support for those DVB APIs will be dropped from ivtv. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index cd8032693e6d..37ac32b53baf 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1625,6 +1625,12 @@ static int ivtv_decoder_ioctls(struct file *filp, unsigned int cmd, void *arg)
return ivtv_yuv_prep_frame(itv, args);
}
+ case IVTV_IOC_PASSTHROUGH_MODE:
+ IVTV_DEBUG_IOCTL("IVTV_IOC_PASSTHROUGH_MODE\n");
+ if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
+ return -EINVAL;
+ return ivtv_passthrough_mode(itv, *(int *)arg != 0);
+
case VIDEO_GET_PTS: {
s64 *pts = arg;
s64 frame;
@@ -1786,6 +1792,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
if (!valid_prio) {
switch (cmd) {
+ case IVTV_IOC_PASSTHROUGH_MODE:
case VIDEO_PLAY:
case VIDEO_STOP:
case VIDEO_FREEZE:
@@ -1811,6 +1818,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
}
case IVTV_IOC_DMA_FRAME:
+ case IVTV_IOC_PASSTHROUGH_MODE:
case VIDEO_GET_PTS:
case VIDEO_GET_FRAME_COUNT:
case VIDEO_GET_EVENT: