diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-08-11 17:47:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:19:17 -0400 |
commit | 6b5a9492ca0c991bab1ac495624e17520e9edf18 (patch) | |
tree | 4ee2bc89d42ceae84989df965ce426932d3a6fbe /drivers/media/video/v4l2-ioctl.c | |
parent | a138ebcf826b9cbf6683e1db25905d7cd89e2dd1 (diff) |
V4L/DVB (12543): v4l: introduce string control support.
The upcoming RDS encoder needs support for string controls. This patch
implements the core implementation.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | drivers/media/video/v4l2-ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index c32e67608ad4..30cc3347ae52 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -513,11 +513,12 @@ static inline void v4l_print_ext_ctrls(unsigned int cmd, | |||
513 | dbgarg(cmd, ""); | 513 | dbgarg(cmd, ""); |
514 | printk(KERN_CONT "class=0x%x", c->ctrl_class); | 514 | printk(KERN_CONT "class=0x%x", c->ctrl_class); |
515 | for (i = 0; i < c->count; i++) { | 515 | for (i = 0; i < c->count; i++) { |
516 | if (show_vals) | 516 | if (show_vals && !c->controls[i].size) |
517 | printk(KERN_CONT " id/val=0x%x/0x%x", | 517 | printk(KERN_CONT " id/val=0x%x/0x%x", |
518 | c->controls[i].id, c->controls[i].value); | 518 | c->controls[i].id, c->controls[i].value); |
519 | else | 519 | else |
520 | printk(KERN_CONT " id=0x%x", c->controls[i].id); | 520 | printk(KERN_CONT " id=0x%x,size=%u", |
521 | c->controls[i].id, c->controls[i].size); | ||
521 | } | 522 | } |
522 | printk(KERN_CONT "\n"); | 523 | printk(KERN_CONT "\n"); |
523 | }; | 524 | }; |
@@ -528,10 +529,9 @@ static inline int check_ext_ctrls(struct v4l2_ext_controls *c, int allow_priv) | |||
528 | 529 | ||
529 | /* zero the reserved fields */ | 530 | /* zero the reserved fields */ |
530 | c->reserved[0] = c->reserved[1] = 0; | 531 | c->reserved[0] = c->reserved[1] = 0; |
531 | for (i = 0; i < c->count; i++) { | 532 | for (i = 0; i < c->count; i++) |
532 | c->controls[i].reserved2[0] = 0; | 533 | c->controls[i].reserved2[0] = 0; |
533 | c->controls[i].reserved2[1] = 0; | 534 | |
534 | } | ||
535 | /* V4L2_CID_PRIVATE_BASE cannot be used as control class | 535 | /* V4L2_CID_PRIVATE_BASE cannot be used as control class |
536 | when using extended controls. | 536 | when using extended controls. |
537 | Only when passed in through VIDIOC_G_CTRL and VIDIOC_S_CTRL | 537 | Only when passed in through VIDIOC_G_CTRL and VIDIOC_S_CTRL |