]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7204): remove V4L2_CID_SHARPNESS from meye.h and report private control...
authorBrandon Philips <brandon@ifup.org>
Tue, 22 Apr 2008 17:42:06 +0000 (14:42 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:43 +0000 (14:07 -0300)
- Continue to support the V4L2_CID_PRIVATE_BASE + 1 control in the ABI
 - Report the same control as V4L2_CID_SHARPNESS
 - Report the private control disabled via QUERYCTRL

Signed-off-by: Brandon Philips <bphilips@suse.de>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/meye.c
include/linux/meye.h

index a079e7222cc913696474b87c6db057280802b44f..caa9a7ac6184180a57b297ed510e63a43f3f8ede 100644 (file)
@@ -1239,6 +1239,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                        c->default_value = 48;
                        c->flags = 0;
                        break;
+               case V4L2_CID_MEYE_SHARPNESS:
                case V4L2_CID_SHARPNESS:
                        c->type = V4L2_CTRL_TYPE_INTEGER;
                        strcpy(c->name, "Sharpness");
@@ -1246,7 +1247,12 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                        c->maximum = 63;
                        c->step = 1;
                        c->default_value = 32;
-                       c->flags = 0;
+
+                       /* Continue to report legacy private SHARPNESS ctrl but
+                        * say it is disabled in preference to ctrl in the spec
+                        */
+                       c->flags = (c->id == V4L2_CID_SHARPNESS) ? 0 :
+                                                       V4L2_CTRL_FLAG_DISABLED;
                        break;
                case V4L2_CID_PICTURE:
                        c->type = V4L2_CTRL_TYPE_INTEGER;
@@ -1312,6 +1318,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                        meye.params.agc = c->value;
                        break;
                case V4L2_CID_SHARPNESS:
+               case V4L2_CID_MEYE_SHARPNESS:
                        sony_pic_camera_command(
                                SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
                        meye.params.sharpness = c->value;
@@ -1356,6 +1363,7 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
                        c->value = meye.params.agc;
                        break;
                case V4L2_CID_SHARPNESS:
+               case V4L2_CID_MEYE_SHARPNESS:
                        c->value = meye.params.sharpness;
                        break;
                case V4L2_CID_PICTURE:
index 39fd9c8ddd4b27b2adcf14659e5b4477a3ba8194..12010ace1f04abd1d556cdb3b9e4935a0d697af7 100644 (file)
@@ -58,7 +58,7 @@ struct meye_params {
 
 /* V4L2 private controls */
 #define V4L2_CID_AGC           V4L2_CID_PRIVATE_BASE
-#define V4L2_CID_SHARPNESS     (V4L2_CID_PRIVATE_BASE + 1)
+#define V4L2_CID_MEYE_SHARPNESS        (V4L2_CID_PRIVATE_BASE + 1)
 #define V4L2_CID_PICTURE       (V4L2_CID_PRIVATE_BASE + 2)
 #define V4L2_CID_JPEGQUAL      (V4L2_CID_PRIVATE_BASE + 3)
 #define V4L2_CID_FRAMERATE     (V4L2_CID_PRIVATE_BASE + 4)