aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-12-15 08:40:23 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-02-14 10:45:56 -0500
commit6e82a6a2a0e895b787f22d28311232cc94fda4b9 (patch)
tree8b002b1d946d7a5d525ed8f0b84499f1650a2301 /drivers
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')
-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)
1625 return ivtv_yuv_prep_frame(itv, args); 1625 return ivtv_yuv_prep_frame(itv, args);
1626 } 1626 }
1627 1627
1628 case IVTV_IOC_PASSTHROUGH_MODE:
1629 IVTV_DEBUG_IOCTL("IVTV_IOC_PASSTHROUGH_MODE\n");
1630 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
1631 return -EINVAL;
1632 return ivtv_passthrough_mode(itv, *(int *)arg != 0);
1633
1628 case VIDEO_GET_PTS: { 1634 case VIDEO_GET_PTS: {
1629 s64 *pts = arg; 1635 s64 *pts = arg;
1630 s64 frame; 1636 s64 frame;
@@ -1786,6 +1792,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
1786 1792
1787 if (!valid_prio) { 1793 if (!valid_prio) {
1788 switch (cmd) { 1794 switch (cmd) {
1795 case IVTV_IOC_PASSTHROUGH_MODE:
1789 case VIDEO_PLAY: 1796 case VIDEO_PLAY:
1790 case VIDEO_STOP: 1797 case VIDEO_STOP:
1791 case VIDEO_FREEZE: 1798 case VIDEO_FREEZE:
@@ -1811,6 +1818,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
1811 } 1818 }
1812 1819
1813 case IVTV_IOC_DMA_FRAME: 1820 case IVTV_IOC_DMA_FRAME:
1821 case IVTV_IOC_PASSTHROUGH_MODE:
1814 case VIDEO_GET_PTS: 1822 case VIDEO_GET_PTS:
1815 case VIDEO_GET_FRAME_COUNT: 1823 case VIDEO_GET_FRAME_COUNT:
1816 case VIDEO_GET_EVENT: 1824 case VIDEO_GET_EVENT: