aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-ioctl.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-03-10 15:59:15 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:44:28 -0400
commitd46c17d7aa12e30b612acae35535fcd64f2db3d6 (patch)
treebf26772f7ae285baa938f77eae98d0b337f9af5f /drivers/media/video/ivtv/ivtv-ioctl.c
parenta542fe47fe3f758e47d71640e7ca328c032a13e1 (diff)
V4L/DVB (5410): Add VIDIOC_G/S_PRIORITY support to ivtv.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index 0e8b639de179..6f80941e49ec 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -703,6 +703,21 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
703 if (filp) id = (struct ivtv_open_id *)filp->private_data; 703 if (filp) id = (struct ivtv_open_id *)filp->private_data;
704 704
705 switch (cmd) { 705 switch (cmd) {
706 case VIDIOC_G_PRIORITY:
707 {
708 enum v4l2_priority *p = arg;
709
710 *p = v4l2_prio_max(&itv->prio);
711 break;
712 }
713
714 case VIDIOC_S_PRIORITY:
715 {
716 enum v4l2_priority *prio = arg;
717
718 return v4l2_prio_change(&itv->prio, &id->prio, *prio);
719 }
720
706 case VIDIOC_QUERYCAP:{ 721 case VIDIOC_QUERYCAP:{
707 struct v4l2_capability *vcap = arg; 722 struct v4l2_capability *vcap = arg;
708 723
@@ -1441,9 +1456,29 @@ static int ivtv_v4l2_do_ioctl(struct inode *inode, struct file *filp,
1441{ 1456{
1442 struct ivtv_open_id *id = (struct ivtv_open_id *)filp->private_data; 1457 struct ivtv_open_id *id = (struct ivtv_open_id *)filp->private_data;
1443 struct ivtv *itv = id->itv; 1458 struct ivtv *itv = id->itv;
1459 int ret;
1444 1460
1445 IVTV_DEBUG_IOCTL("v4l2 ioctl 0x%08x\n", cmd); 1461 IVTV_DEBUG_IOCTL("v4l2 ioctl 0x%08x\n", cmd);
1446 1462
1463 /* check priority */
1464 switch (cmd) {
1465 case VIDIOC_S_CTRL:
1466 case VIDIOC_S_STD:
1467 case VIDIOC_S_INPUT:
1468 case VIDIOC_S_OUTPUT:
1469 case VIDIOC_S_TUNER:
1470 case VIDIOC_S_FREQUENCY:
1471 case VIDIOC_S_FMT:
1472 case VIDIOC_S_CROP:
1473 case VIDIOC_S_AUDIO:
1474 case VIDIOC_S_AUDOUT:
1475 case VIDIOC_S_EXT_CTRLS:
1476 case VIDIOC_S_FBUF:
1477 ret = v4l2_prio_check(&itv->prio, &id->prio);
1478 if (ret)
1479 return ret;
1480 }
1481
1447 switch (cmd) { 1482 switch (cmd) {
1448 case VIDIOC_DBG_G_REGISTER: 1483 case VIDIOC_DBG_G_REGISTER:
1449 case VIDIOC_DBG_S_REGISTER: 1484 case VIDIOC_DBG_S_REGISTER:
@@ -1452,6 +1487,8 @@ static int ivtv_v4l2_do_ioctl(struct inode *inode, struct file *filp,
1452 case VIDIOC_INT_RESET: 1487 case VIDIOC_INT_RESET:
1453 return ivtv_internal_ioctls(filp, cmd, arg); 1488 return ivtv_internal_ioctls(filp, cmd, arg);
1454 1489
1490 case VIDIOC_G_PRIORITY:
1491 case VIDIOC_S_PRIORITY:
1455 case VIDIOC_QUERYCAP: 1492 case VIDIOC_QUERYCAP:
1456 case VIDIOC_ENUMINPUT: 1493 case VIDIOC_ENUMINPUT:
1457 case VIDIOC_G_INPUT: 1494 case VIDIOC_G_INPUT: