]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
V4L/DVB (12104): ivtv/cx18: fix regression: class controls are no longer seen
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 14 Jun 2009 08:20:21 +0000 (05:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 23 Jun 2009 06:14:31 +0000 (03:14 -0300)
A previous change (v4l2-common: remove v4l2_ctrl_query_fill_std) broke
the handling of class controls in VIDIOC_QUERYCTRL. The MPEG class control
was broken for all drivers that use the cx2341x module and the USER class
control was broken for ivtv and cx18.

This change adds back proper class control support.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-controls.c
drivers/media/video/cx2341x.c
drivers/media/video/ivtv/ivtv-controls.c

index 8e35c3aed544a3f9a1e0479b6334fac4363488ba..5136df198338bbbe6855889b84cf0b5486252b2d 100644 (file)
@@ -61,6 +61,8 @@ int cx18_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)
 
        switch (qctrl->id) {
        /* Standard V4L2 controls */
+       case V4L2_CID_USER_CLASS:
+               return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
        case V4L2_CID_BRIGHTNESS:
        case V4L2_CID_HUE:
        case V4L2_CID_SATURATION:
index 8ded52946334e2abcec10d04f776492c91952373..4c8e95853fa3377b2fb53ace6659be808f04cbd2 100644 (file)
@@ -500,6 +500,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params,
        int err;
 
        switch (qctrl->id) {
+       case V4L2_CID_MPEG_CLASS:
+               return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
        case V4L2_CID_MPEG_STREAM_TYPE:
                return v4l2_ctrl_query_fill(qctrl,
                                V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
index 84995bcf4a75a6207ad6beb24191ed23b18809ec..a3b77ed3f08949a58729ea1edda921cb762d0dc7 100644 (file)
@@ -60,6 +60,8 @@ int ivtv_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)
 
        switch (qctrl->id) {
        /* Standard V4L2 controls */
+       case V4L2_CID_USER_CLASS:
+               return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0);
        case V4L2_CID_BRIGHTNESS:
        case V4L2_CID_HUE:
        case V4L2_CID_SATURATION: