Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (7204): remove V4L2_CID_SHARPNESS from meye.h and report private control as DISABLED

- 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>

authored by

Brandon Philips and committed by
Mauro Carvalho Chehab
e723ee00 6d43cec8

+10 -2
+9 -1
drivers/media/video/meye.c
··· 1239 1239 c->default_value = 48; 1240 1240 c->flags = 0; 1241 1241 break; 1242 + case V4L2_CID_MEYE_SHARPNESS: 1242 1243 case V4L2_CID_SHARPNESS: 1243 1244 c->type = V4L2_CTRL_TYPE_INTEGER; 1244 1245 strcpy(c->name, "Sharpness"); ··· 1247 1246 c->maximum = 63; 1248 1247 c->step = 1; 1249 1248 c->default_value = 32; 1250 - c->flags = 0; 1249 + 1250 + /* Continue to report legacy private SHARPNESS ctrl but 1251 + * say it is disabled in preference to ctrl in the spec 1252 + */ 1253 + c->flags = (c->id == V4L2_CID_SHARPNESS) ? 0 : 1254 + V4L2_CTRL_FLAG_DISABLED; 1251 1255 break; 1252 1256 case V4L2_CID_PICTURE: 1253 1257 c->type = V4L2_CTRL_TYPE_INTEGER; ··· 1318 1312 meye.params.agc = c->value; 1319 1313 break; 1320 1314 case V4L2_CID_SHARPNESS: 1315 + case V4L2_CID_MEYE_SHARPNESS: 1321 1316 sony_pic_camera_command( 1322 1317 SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value); 1323 1318 meye.params.sharpness = c->value; ··· 1363 1356 c->value = meye.params.agc; 1364 1357 break; 1365 1358 case V4L2_CID_SHARPNESS: 1359 + case V4L2_CID_MEYE_SHARPNESS: 1366 1360 c->value = meye.params.sharpness; 1367 1361 break; 1368 1362 case V4L2_CID_PICTURE:
+1 -1
include/linux/meye.h
··· 58 58 59 59 /* V4L2 private controls */ 60 60 #define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE 61 - #define V4L2_CID_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1) 61 + #define V4L2_CID_MEYE_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1) 62 62 #define V4L2_CID_PICTURE (V4L2_CID_PRIVATE_BASE + 2) 63 63 #define V4L2_CID_JPEGQUAL (V4L2_CID_PRIVATE_BASE + 3) 64 64 #define V4L2_CID_FRAMERATE (V4L2_CID_PRIVATE_BASE + 4)