1 /* 2 * Video for Linux Two header file for samsung 3 * 4 * Copyright (C) 2009, Samsung Electronics 5 * 6 * This header file contains several v4l2 APIs to be proposed to v4l2 7 * community and until bein accepted, will be used restrictly in Samsung's 8 * camera interface driver FIMC. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * Alternatively, Licensed under the Apache License, Version 2.0 (the "License"); 16 * you may not use this file except in compliance with the License. 17 * You may obtain a copy of the License at 18 * 19 * http://www.apache.org/licenses/LICENSE-2.0 20 * 21 * Unless required by applicable law or agreed to in writing, software 22 * distributed under the License is distributed on an "AS IS" BASIS, 23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 * See the License for the specific language governing permissions and 25 * limitations under the License. 26 */ 27 28 #ifndef __LINUX_VIDEODEV2_SAMSUNG_H 29 #define __LINUX_VIDEODEV2_SAMSUNG_H 30 31 /* Values for 'capabilities' field */ 32 /* Object detection device */ 33 #define V4L2_CAP_OBJ_RECOGNITION 0x10000000 34 /* strobe control */ 35 #define V4L2_CAP_STROBE 0x20000000 36 37 #define V4L2_CID_FOCUS_MODE (V4L2_CID_CAMERA_CLASS_BASE + 17) 38 /* Focus Methods */ 39 enum v4l2_focus_mode { 40 V4L2_FOCUS_MODE_AUTO = 0, 41 V4L2_FOCUS_MODE_MACRO = 1, 42 V4L2_FOCUS_MODE_MANUAL = 2, 43 V4L2_FOCUS_MODE_LASTP = 2, 44 }; 45 46 #define V4L2_CID_ZOOM_MODE (V4L2_CID_CAMERA_CLASS_BASE + 18) 47 /* Zoom Methods */ 48 enum v4l2_zoom_mode { 49 V4L2_ZOOM_MODE_CONTINUOUS = 0, 50 V4L2_ZOOM_MODE_OPTICAL = 1, 51 V4L2_ZOOM_MODE_DIGITAL = 2, 52 V4L2_ZOOM_MODE_LASTP = 2, 53 }; 54 55 /* Exposure Methods */ 56 #define V4L2_CID_PHOTOMETRY (V4L2_CID_CAMERA_CLASS_BASE + 19) 57 enum v4l2_photometry_mode { 58 V4L2_PHOTOMETRY_MULTISEG = 0, /*Multi Segment */ 59 V4L2_PHOTOMETRY_CWA = 1, /*Centre Weighted Average */ 60 V4L2_PHOTOMETRY_SPOT = 2, 61 V4L2_PHOTOMETRY_AFSPOT = 3, /*Spot metering on focused point */ 62 V4L2_PHOTOMETRY_LASTP = V4L2_PHOTOMETRY_AFSPOT, 63 }; 64 65 /* Manual exposure control items menu type: iris, shutter, iso */ 66 #define V4L2_CID_CAM_APERTURE (V4L2_CID_CAMERA_CLASS_BASE + 20) 67 #define V4L2_CID_CAM_SHUTTER (V4L2_CID_CAMERA_CLASS_BASE + 21) 68 #define V4L2_CID_CAM_ISO (V4L2_CID_CAMERA_CLASS_BASE + 22) 69 70 /* Following CIDs are menu type */ 71 #define V4L2_CID_SCENEMODE (V4L2_CID_CAMERA_CLASS_BASE + 23) 72 #define V4L2_CID_CAM_STABILIZE (V4L2_CID_CAMERA_CLASS_BASE + 24) 73 #define V4L2_CID_CAM_MULTISHOT (V4L2_CID_CAMERA_CLASS_BASE + 25) 74 75 /* Control dynamic range */ 76 #define V4L2_CID_CAM_DR (V4L2_CID_CAMERA_CLASS_BASE + 26) 77 78 /* White balance preset control */ 79 #define V4L2_CID_WHITE_BALANCE_PRESET (V4L2_CID_CAMERA_CLASS_BASE + 27) 80 81 /* CID extensions */ 82 #define V4L2_CID_ROTATION (V4L2_CID_PRIVATE_BASE + 0) 83 #define V4L2_CID_PADDR_Y (V4L2_CID_PRIVATE_BASE + 1) 84 #define V4L2_CID_PADDR_CB (V4L2_CID_PRIVATE_BASE + 2) 85 #define V4L2_CID_PADDR_CR (V4L2_CID_PRIVATE_BASE + 3) 86 #define V4L2_CID_PADDR_CBCR (V4L2_CID_PRIVATE_BASE + 4) 87 #define V4L2_CID_OVERLAY_AUTO (V4L2_CID_PRIVATE_BASE + 5) 88 #define V4L2_CID_OVERLAY_VADDR0 (V4L2_CID_PRIVATE_BASE + 6) 89 #define V4L2_CID_OVERLAY_VADDR1 (V4L2_CID_PRIVATE_BASE + 7) 90 #define V4L2_CID_OVERLAY_VADDR2 (V4L2_CID_PRIVATE_BASE + 8) 91 #define V4L2_CID_OVLY_MODE (V4L2_CID_PRIVATE_BASE + 9) 92 #define V4L2_CID_DST_INFO (V4L2_CID_PRIVATE_BASE + 10) 93 #define V4L2_CID_IMAGE_EFFECT_FN (V4L2_CID_PRIVATE_BASE + 16) 94 #define V4L2_CID_IMAGE_EFFECT_APPLY (V4L2_CID_PRIVATE_BASE + 17) 95 #define V4L2_CID_IMAGE_EFFECT_CB (V4L2_CID_PRIVATE_BASE + 18) 96 #define V4L2_CID_IMAGE_EFFECT_CR (V4L2_CID_PRIVATE_BASE + 19) 97 #define V4L2_CID_RESERVED_MEM_BASE_ADDR (V4L2_CID_PRIVATE_BASE + 20) 98 #define V4L2_CID_FIMC_VERSION (V4L2_CID_PRIVATE_BASE + 21) 99 100 #define V4L2_CID_STREAM_PAUSE (V4L2_CID_PRIVATE_BASE + 53) 101 102 /* CID Extensions for camera sensor operations */ 103 #define V4L2_CID_CAM_PREVIEW_ONOFF (V4L2_CID_PRIVATE_BASE + 64) 104 #define V4L2_CID_CAM_CAPTURE (V4L2_CID_PRIVATE_BASE + 65) 105 #define V4L2_CID_CAM_JPEG_MEMSIZE (V4L2_CID_PRIVATE_BASE + 66) 106 107 #define V4L2_CID_CAM_DATE_INFO_YEAR (V4L2_CID_PRIVATE_BASE + 14) 108 #define V4L2_CID_CAM_DATE_INFO_MONTH (V4L2_CID_PRIVATE_BASE + 15) 109 #define V4L2_CID_CAM_DATE_INFO_DATE (V4L2_CID_PRIVATE_BASE + 22) 110 #define V4L2_CID_CAM_SENSOR_VER (V4L2_CID_PRIVATE_BASE + 23) 111 #define V4L2_CID_CAM_FW_MINOR_VER (V4L2_CID_PRIVATE_BASE + 24) 112 #define V4L2_CID_CAM_FW_MAJOR_VER (V4L2_CID_PRIVATE_BASE + 25) 113 #define V4L2_CID_CAM_PRM_MINOR_VER (V4L2_CID_PRIVATE_BASE + 26) 114 #define V4L2_CID_CAM_PRM_MAJOR_VER (V4L2_CID_PRIVATE_BASE + 27) 115 #define V4L2_CID_CAM_FW_VER (V4L2_CID_PRIVATE_BASE + 28) 116 #define V4L2_CID_CAM_SET_FW_ADDR (V4L2_CID_PRIVATE_BASE + 29) 117 #define V4L2_CID_CAM_SET_FW_SIZE (V4L2_CID_PRIVATE_BASE + 30) 118 #define V4L2_CID_CAM_UPDATE_FW (V4L2_CID_PRIVATE_BASE + 31) 119 #define V4L2_CID_CAM_JPEG_MAIN_SIZE (V4L2_CID_PRIVATE_BASE + 32) 120 #define V4L2_CID_CAM_JPEG_MAIN_OFFSET (V4L2_CID_PRIVATE_BASE + 33) 121 #define V4L2_CID_CAM_JPEG_THUMB_SIZE (V4L2_CID_PRIVATE_BASE + 34) 122 #define V4L2_CID_CAM_JPEG_THUMB_OFFSET (V4L2_CID_PRIVATE_BASE + 35) 123 #define V4L2_CID_CAM_JPEG_POSTVIEW_OFFSET (V4L2_CID_PRIVATE_BASE + 36) 124 #define V4L2_CID_CAM_JPEG_QUALITY (V4L2_CID_PRIVATE_BASE + 37) 125 #define V4L2_CID_CAM_SENSOR_MAKER (V4L2_CID_PRIVATE_BASE + 38) 126 #define V4L2_CID_CAM_SENSOR_OPTICAL (V4L2_CID_PRIVATE_BASE + 39) 127 #define V4L2_CID_CAM_AF_VER_LOW (V4L2_CID_PRIVATE_BASE + 40) 128 #define V4L2_CID_CAM_AF_VER_HIGH (V4L2_CID_PRIVATE_BASE + 41) 129 #define V4L2_CID_CAM_GAMMA_RG_LOW (V4L2_CID_PRIVATE_BASE + 42) 130 #define V4L2_CID_CAM_GAMMA_RG_HIGH (V4L2_CID_PRIVATE_BASE + 43) 131 #define V4L2_CID_CAM_GAMMA_BG_LOW (V4L2_CID_PRIVATE_BASE + 44) 132 #define V4L2_CID_CAM_GAMMA_BG_HIGH (V4L2_CID_PRIVATE_BASE + 45) 133 #define V4L2_CID_CAM_DUMP_FW (V4L2_CID_PRIVATE_BASE + 46) 134 #define V4L2_CID_CAM_GET_DUMP_SIZE (V4L2_CID_PRIVATE_BASE + 47) 135 #define V4L2_CID_CAMERA_VT_MODE (V4L2_CID_PRIVATE_BASE + 48) 136 #define V4L2_CID_CAMERA_VGA_BLUR (V4L2_CID_PRIVATE_BASE + 49) 137 #define V4L2_CID_CAMERA_CAPTURE (V4L2_CID_PRIVATE_BASE + 50) 138 139 #define V4L2_CID_MAIN_SW_DATE_INFO_YEAR (V4L2_CID_PRIVATE_BASE + 54) 140 #define V4L2_CID_MAIN_SW_DATE_INFO_MONTH (V4L2_CID_PRIVATE_BASE + 55) 141 #define V4L2_CID_MAIN_SW_DATE_INFO_DATE (V4L2_CID_PRIVATE_BASE + 56) 142 #define V4L2_CID_MAIN_SW_FW_MINOR_VER (V4L2_CID_PRIVATE_BASE + 57) 143 #define V4L2_CID_MAIN_SW_FW_MAJOR_VER (V4L2_CID_PRIVATE_BASE + 58) 144 #define V4L2_CID_MAIN_SW_PRM_MINOR_VER (V4L2_CID_PRIVATE_BASE + 59) 145 #define V4L2_CID_MAIN_SW_PRM_MAJOR_VER (V4L2_CID_PRIVATE_BASE + 60) 146 147 enum v4l2_blur { 148 BLUR_LEVEL_0 = 0, 149 BLUR_LEVEL_1, 150 BLUR_LEVEL_2, 151 BLUR_LEVEL_3, 152 BLUR_LEVEL_MAX, 153 }; 154 155 #define V4L2_CID_CAMERA_SCENE_MODE (V4L2_CID_PRIVATE_BASE + 70) 156 enum v4l2_scene_mode { 157 SCENE_MODE_BASE, 158 SCENE_MODE_NONE, 159 SCENE_MODE_PORTRAIT, 160 SCENE_MODE_NIGHTSHOT, 161 SCENE_MODE_BACK_LIGHT, 162 SCENE_MODE_LANDSCAPE, 163 SCENE_MODE_SPORTS, 164 SCENE_MODE_PARTY_INDOOR, 165 SCENE_MODE_BEACH_SNOW, 166 SCENE_MODE_SUNSET, 167 SCENE_MODE_DUST_DAWN, 168 SCENE_MODE_FALL_COLOR, 169 SCENE_MODE_FIREWORKS, 170 SCENE_MODE_TEXT, 171 SCENE_MODE_CANDLE_LIGHT, 172 SCENE_MODE_MAX, 173 }; 174 175 #define V4L2_CID_CAMERA_FLASH_MODE (V4L2_CID_PRIVATE_BASE + 71) 176 enum v4l2_flash_mode { 177 FLASH_MODE_BASE, 178 FLASH_MODE_OFF, 179 FLASH_MODE_AUTO, 180 FLASH_MODE_ON, 181 FLASH_MODE_TORCH, 182 FLASH_MODE_MAX, 183 }; 184 185 #define V4L2_CID_CAMERA_BRIGHTNESS (V4L2_CID_PRIVATE_BASE + 72) 186 enum v4l2_ev_mode { 187 EV_MINUS_4 = 0, 188 EV_MINUS_3, 189 EV_MINUS_2, 190 EV_MINUS_1, 191 EV_DEFAULT, 192 EV_PLUS_1, 193 EV_PLUS_2, 194 EV_PLUS_3, 195 EV_PLUS_4, 196 EV_MAX, 197 }; 198 199 #define V4L2_CID_CAMERA_WHITE_BALANCE (V4L2_CID_PRIVATE_BASE + 73) 200 enum v4l2_wb_mode { 201 WHITE_BALANCE_BASE = 0, 202 WHITE_BALANCE_AUTO, 203 WHITE_BALANCE_SUNNY, 204 WHITE_BALANCE_CLOUDY, 205 WHITE_BALANCE_TUNGSTEN, 206 WHITE_BALANCE_FLUORESCENT, 207 WHITE_BALANCE_MAX, 208 }; 209 210 #define V4L2_CID_CAMERA_EFFECT (V4L2_CID_PRIVATE_BASE + 74) 211 enum v4l2_effect_mode { 212 IMAGE_EFFECT_BASE = 0, 213 IMAGE_EFFECT_NONE, 214 IMAGE_EFFECT_BNW, 215 IMAGE_EFFECT_SEPIA, 216 IMAGE_EFFECT_AQUA, 217 IMAGE_EFFECT_ANTIQUE, 218 IMAGE_EFFECT_NEGATIVE, 219 IMAGE_EFFECT_SHARPEN, 220 IMAGE_EFFECT_MAX, 221 }; 222 223 #define V4L2_CID_CAMERA_ISO (V4L2_CID_PRIVATE_BASE + 75) 224 enum v4l2_iso_mode { 225 ISO_AUTO = 0, 226 ISO_50, 227 ISO_100, 228 ISO_200, 229 ISO_400, 230 ISO_800, 231 ISO_1600, 232 ISO_SPORTS, 233 ISO_NIGHT, 234 ISO_MOVIE, 235 ISO_MAX, 236 }; 237 238 #define V4L2_CID_CAMERA_METERING (V4L2_CID_PRIVATE_BASE + 76) 239 enum v4l2_metering_mode { 240 METERING_BASE = 0, 241 METERING_MATRIX, 242 METERING_CENTER, 243 METERING_SPOT, 244 METERING_MAX, 245 }; 246 247 #define V4L2_CID_CAMERA_CONTRAST (V4L2_CID_PRIVATE_BASE + 77) 248 enum v4l2_contrast_mode { 249 CONTRAST_MINUS_2 = 0, 250 CONTRAST_MINUS_1, 251 CONTRAST_DEFAULT, 252 CONTRAST_PLUS_1, 253 CONTRAST_PLUS_2, 254 CONTRAST_MAX, 255 }; 256 257 #define V4L2_CID_CAMERA_SATURATION (V4L2_CID_PRIVATE_BASE + 78) 258 enum v4l2_saturation_mode { 259 SATURATION_MINUS_2 = 0, 260 SATURATION_MINUS_1, 261 SATURATION_DEFAULT, 262 SATURATION_PLUS_1, 263 SATURATION_PLUS_2, 264 SATURATION_MAX, 265 }; 266 267 #define V4L2_CID_CAMERA_SHARPNESS (V4L2_CID_PRIVATE_BASE + 79) 268 enum v4l2_sharpness_mode { 269 SHARPNESS_MINUS_2 = 0, 270 SHARPNESS_MINUS_1, 271 SHARPNESS_DEFAULT, 272 SHARPNESS_PLUS_1, 273 SHARPNESS_PLUS_2, 274 SHARPNESS_MAX, 275 }; 276 277 #define V4L2_CID_CAMERA_WDR (V4L2_CID_PRIVATE_BASE + 80) 278 enum v4l2_wdr_mode { 279 WDR_OFF, 280 WDR_ON, 281 WDR_MAX, 282 }; 283 284 #define V4L2_CID_CAMERA_ANTI_SHAKE (V4L2_CID_PRIVATE_BASE + 81) 285 enum v4l2_anti_shake_mode { 286 ANTI_SHAKE_OFF, 287 ANTI_SHAKE_STILL_ON, 288 ANTI_SHAKE_MOVIE_ON, 289 ANTI_SHAKE_MAX, 290 }; 291 292 #define V4L2_CID_CAMERA_TOUCH_AF_START_STOP (V4L2_CID_PRIVATE_BASE + 82) 293 enum v4l2_touch_af { 294 TOUCH_AF_STOP = 0, 295 TOUCH_AF_START, 296 TOUCH_AF_MAX, 297 }; 298 299 #define V4L2_CID_CAMERA_SMART_AUTO (V4L2_CID_PRIVATE_BASE + 83) 300 enum v4l2_smart_auto { 301 SMART_AUTO_OFF = 0, 302 SMART_AUTO_ON, 303 SMART_AUTO_MAX, 304 }; 305 306 #define V4L2_CID_CAMERA_VINTAGE_MODE (V4L2_CID_PRIVATE_BASE + 84) 307 enum v4l2_vintage_mode { 308 VINTAGE_MODE_BASE, 309 VINTAGE_MODE_OFF, 310 VINTAGE_MODE_NORMAL, 311 VINTAGE_MODE_WARM, 312 VINTAGE_MODE_COOL, 313 VINTAGE_MODE_BNW, 314 VINTAGE_MODE_MAX, 315 }; 316 317 #define V4L2_CID_CAMERA_JPEG_QUALITY (V4L2_CID_PRIVATE_BASE + 85) 318 #define V4L2_CID_CAMERA_GPS_LATITUDE (V4L2_CID_CAMERA_CLASS_BASE + 30) 319 #define V4L2_CID_CAMERA_GPS_LONGITUDE (V4L2_CID_CAMERA_CLASS_BASE + 31) 320 #define V4L2_CID_CAMERA_GPS_TIMESTAMP (V4L2_CID_CAMERA_CLASS_BASE + 32) 321 #define V4L2_CID_CAMERA_GPS_ALTITUDE (V4L2_CID_CAMERA_CLASS_BASE + 33) 322 #define V4L2_CID_CAMERA_EXIF_TIME_INFO (V4L2_CID_CAMERA_CLASS_BASE + 34) 323 #define V4L2_CID_CAMERA_ZOOM (V4L2_CID_PRIVATE_BASE + 90) 324 enum v4l2_zoom_level { 325 ZOOM_LEVEL_0 = 0, 326 ZOOM_LEVEL_1, 327 ZOOM_LEVEL_2, 328 ZOOM_LEVEL_3, 329 ZOOM_LEVEL_4, 330 ZOOM_LEVEL_5, 331 ZOOM_LEVEL_6, 332 ZOOM_LEVEL_7, 333 ZOOM_LEVEL_8, 334 ZOOM_LEVEL_9, 335 ZOOM_LEVEL_10, 336 ZOOM_LEVEL_11, 337 ZOOM_LEVEL_12, 338 ZOOM_LEVEL_MAX, 339 }; 340 341 #define V4L2_CID_CAMERA_FACE_DETECTION (V4L2_CID_PRIVATE_BASE + 91) 342 enum v4l2_face_detection { 343 FACE_DETECTION_OFF = 0, 344 FACE_DETECTION_ON, 345 FACE_DETECTION_NOLINE, 346 FACE_DETECTION_ON_BEAUTY, 347 FACE_DETECTION_MAX, 348 }; 349 350 #define V4L2_CID_CAMERA_SMART_AUTO_STATUS (V4L2_CID_PRIVATE_BASE + 92) 351 enum v4l2_smart_auto_status { 352 SMART_AUTO_STATUS_AUTO = 0, 353 SMART_AUTO_STATUS_LANDSCAPE, 354 SMART_AUTO_STATUS_PORTRAIT, 355 SMART_AUTO_STATUS_MACRO, 356 SMART_AUTO_STATUS_NIGHT, 357 SMART_AUTO_STATUS_PORTRAIT_NIGHT, 358 SMART_AUTO_STATUS_BACKLIT, 359 SMART_AUTO_STATUS_PORTRAIT_BACKLIT, 360 SMART_AUTO_STATUS_ANTISHAKE, 361 SMART_AUTO_STATUS_PORTRAIT_ANTISHAKE, 362 SMART_AUTO_STATUS_MAX, 363 }; 364 365 #define V4L2_CID_CAMERA_SET_AUTO_FOCUS (V4L2_CID_PRIVATE_BASE + 93) 366 enum v4l2_auto_focus { 367 AUTO_FOCUS_OFF = 0, 368 AUTO_FOCUS_ON, 369 AUTO_FOCUS_MAX, 370 }; 371 372 #define V4L2_CID_CAMERA_BEAUTY_SHOT (V4L2_CID_PRIVATE_BASE + 94) 373 enum v4l2_beauty_shot { 374 BEAUTY_SHOT_OFF = 0, 375 BEAUTY_SHOT_ON, 376 BEAUTY_SHOT_MAX, 377 }; 378 379 #define V4L2_CID_CAMERA_AEAWB_LOCK_UNLOCK (V4L2_CID_PRIVATE_BASE + 95) 380 enum v4l2_ae_awb_lockunlock { 381 AE_UNLOCK_AWB_UNLOCK = 0, 382 AE_LOCK_AWB_UNLOCK, 383 AE_UNLOCK_AWB_LOCK, 384 AE_LOCK_AWB_LOCK, 385 AE_AWB_MAX 386 }; 387 388 #define V4L2_CID_CAMERA_FACEDETECT_LOCKUNLOCK (V4L2_CID_PRIVATE_BASE + 96) 389 enum v4l2_face_lock { 390 FACE_LOCK_OFF = 0, 391 FACE_LOCK_ON, 392 FIRST_FACE_TRACKING, 393 FACE_LOCK_MAX, 394 }; 395 396 #define V4L2_CID_CAMERA_OBJECT_POSITION_X (V4L2_CID_PRIVATE_BASE + 97) 397 #define V4L2_CID_CAMERA_OBJECT_POSITION_Y (V4L2_CID_PRIVATE_BASE + 98) 398 #define V4L2_CID_CAMERA_FOCUS_MODE (V4L2_CID_PRIVATE_BASE + 99) 399 enum v4l2_focusmode { 400 FOCUS_MODE_AUTO = 0, 401 FOCUS_MODE_MACRO, 402 FOCUS_MODE_FACEDETECT, 403 FOCUS_MODE_AUTO_DEFAULT, 404 FOCUS_MODE_MACRO_DEFAULT, 405 FOCUS_MODE_FACEDETECT_DEFAULT, 406 FOCUS_MODE_INFINITY, 407 FOCUS_MODE_MAX, 408 }; 409 410 #define V4L2_CID_CAMERA_OBJ_TRACKING_STATUS (V4L2_CID_PRIVATE_BASE + 100) 411 enum v4l2_obj_tracking_status { 412 OBJECT_TRACKING_STATUS_BASE, 413 OBJECT_TRACKING_STATUS_PROGRESSING, 414 OBJECT_TRACKING_STATUS_SUCCESS, 415 OBJECT_TRACKING_STATUS_FAIL, 416 OBJECT_TRACKING_STATUS_MISSING, 417 OBJECT_TRACKING_STATUS_MAX, 418 }; 419 420 #define V4L2_CID_CAMERA_OBJ_TRACKING_START_STOP (V4L2_CID_PRIVATE_BASE + 101) 421 enum v4l2_ot_start_stop { 422 OT_STOP = 0, 423 OT_START, 424 OT_MAX, 425 }; 426 427 #define V4L2_CID_CAMERA_CAF_START_STOP (V4L2_CID_PRIVATE_BASE + 102) 428 enum v4l2_caf_start_stop { 429 CAF_STOP = 0, 430 CAF_START, 431 CAF_MAX, 432 }; 433 434 #define V4L2_CID_CAMERA_AUTO_FOCUS_RESULT (V4L2_CID_PRIVATE_BASE + 103) 435 #define V4L2_CID_CAMERA_FRAME_RATE (V4L2_CID_PRIVATE_BASE + 104) 436 enum v4l2_frame_rate { 437 FRAME_RATE_AUTO = 0, 438 FRAME_RATE_7 = 7, 439 FRAME_RATE_15 = 15, 440 FRAME_RATE_30 = 30, 441 FRAME_RATE_60 = 60, 442 FRAME_RATE_120 = 120, 443 FRAME_RATE_MAX 444 }; 445 446 #define V4L2_CID_CAMERA_ANTI_BANDING (V4L2_CID_PRIVATE_BASE + 105) 447 enum v4l2_anti_banding { 448 ANTI_BANDING_AUTO = 0, 449 ANTI_BANDING_50HZ = 1, 450 ANTI_BANDING_60HZ = 2, 451 ANTI_BANDING_OFF = 3, 452 }; 453 454 #define V4L2_CID_CAMERA_SET_GAMMA (V4L2_CID_PRIVATE_BASE + 106) 455 enum v4l2_gamma_mode { 456 GAMMA_OFF = 0, 457 GAMMA_ON = 1, 458 GAMMA_MAX, 459 }; 460 461 #define V4L2_CID_CAMERA_SET_SLOW_AE (V4L2_CID_PRIVATE_BASE + 107) 462 enum v4l2_slow_ae_mode { 463 SLOW_AE_OFF, 464 SLOW_AE_ON, 465 SLOW_AE_MAX, 466 }; 467 468 #define V4L2_CID_CAMERA_BATCH_REFLECTION (V4L2_CID_PRIVATE_BASE + 108) 469 #define V4L2_CID_CAMERA_EXIF_ORIENTATION (V4L2_CID_PRIVATE_BASE + 109) 470 471 #define V4L2_CID_CAMERA_RESET (V4L2_CID_PRIVATE_BASE + 111) 472 #define V4L2_CID_CAMERA_CHECK_DATALINE (V4L2_CID_PRIVATE_BASE + 112) 473 #define V4L2_CID_CAMERA_CHECK_DATALINE_STOP (V4L2_CID_PRIVATE_BASE + 113) 474 #define V4L2_CID_CAMERA_GET_ISO (V4L2_CID_PRIVATE_BASE + 114) 475 #define V4L2_CID_CAMERA_GET_SHT_TIME (V4L2_CID_PRIVATE_BASE + 115) 476 #define V4L2_CID_CAMERA_SENSOR_MODE (V4L2_CID_PRIVATE_BASE + 116) 477 #define V4L2_CID_ESD_INT (V4L2_CID_PRIVATE_BASE + 117) 478 #define V4L2_CID_CAMERA_GET_FLASH_ONOFF (V4L2_CID_PRIVATE_BASE + 118) 479 480 /* Pixel format FOURCC depth Description */ 481 /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ 482 #define V4L2_PIX_FMT_NV12T v4l2_fourcc('T', 'V', '1', '2') 483 484 /* 485 * * V4L2 extention for digital camera 486 * */ 487 /* Strobe flash light */ 488 enum v4l2_strobe_control { 489 /* turn off the flash light */ 490 V4L2_STROBE_CONTROL_OFF = 0, 491 /* turn on the flash light */ 492 V4L2_STROBE_CONTROL_ON = 1, 493 /* act guide light before splash */ 494 V4L2_STROBE_CONTROL_AFGUIDE = 2, 495 /* charge the flash light */ 496 V4L2_STROBE_CONTROL_CHARGE = 3, 497 }; 498 499 enum v4l2_strobe_conf { 500 V4L2_STROBE_OFF = 0, /* Always off */ 501 V4L2_STROBE_ON = 1, /* Always splashes */ 502 /* Auto control presets */ 503 V4L2_STROBE_AUTO = 2, 504 V4L2_STROBE_REDEYE_REDUCTION = 3, 505 V4L2_STROBE_SLOW_SYNC = 4, 506 V4L2_STROBE_FRONT_CURTAIN = 5, 507 V4L2_STROBE_REAR_CURTAIN = 6, 508 /* Extra manual control presets */ 509 /* keep turned on until turning off */ 510 V4L2_STROBE_PERMANENT = 7, 511 V4L2_STROBE_EXTERNAL = 8, 512 }; 513 514 enum v4l2_strobe_status { 515 V4L2_STROBE_STATUS_OFF = 0, 516 /* while processing configurations */ 517 V4L2_STROBE_STATUS_BUSY = 1, 518 V4L2_STROBE_STATUS_ERR = 2, 519 V4L2_STROBE_STATUS_CHARGING = 3, 520 V4L2_STROBE_STATUS_CHARGED = 4, 521 }; 522 523 /* capabilities field */ 524 /* No strobe supported */ 525 #define V4L2_STROBE_CAP_NONE 0x0000 526 /* Always flash off mode */ 527 #define V4L2_STROBE_CAP_OFF 0x0001 528 /* Always use flash light mode */ 529 #define V4L2_STROBE_CAP_ON 0x0002 530 /* Flashlight works automatic */ 531 #define V4L2_STROBE_CAP_AUTO 0x0004 532 /* Red-eye reduction */ 533 #define V4L2_STROBE_CAP_REDEYE 0x0008 534 /* Slow sync */ 535 #define V4L2_STROBE_CAP_SLOWSYNC 0x0010 536 /* Front curtain */ 537 #define V4L2_STROBE_CAP_FRONT_CURTAIN 0x0020 538 /* Rear curtain */ 539 #define V4L2_STROBE_CAP_REAR_CURTAIN 0x0040 540 /* keep turned on until turning off */ 541 #define V4L2_STROBE_CAP_PERMANENT 0x0080 542 /* use external strobe */ 543 #define V4L2_STROBE_CAP_EXTERNAL 0x0100 544 545 /* Set mode and Get status */ 546 struct v4l2_strobe { 547 /* off/on/charge:0/1/2 */ 548 enum v4l2_strobe_control control; 549 /* supported strobe capabilities */ 550 __u32 capabilities; 551 enum v4l2_strobe_conf mode; 552 enum v4l2_strobe_status status; /* read only */ 553 /* default is 0 and range of value varies from each models */ 554 __u32 flash_ev; 555 __u32 reserved[4]; 556 }; 557 558 #define VIDIOC_S_STROBE _IOWR('V', 83, struct v4l2_strobe) 559 #define VIDIOC_G_STROBE _IOR('V', 84, struct v4l2_strobe) 560 561 /* Object recognition and collateral actions */ 562 enum v4l2_recog_mode { 563 V4L2_RECOGNITION_MODE_OFF = 0, 564 V4L2_RECOGNITION_MODE_ON = 1, 565 V4L2_RECOGNITION_MODE_LOCK = 2, 566 }; 567 568 enum v4l2_recog_action { 569 V4L2_RECOGNITION_ACTION_NONE = 0, /* only recognition */ 570 V4L2_RECOGNITION_ACTION_BLINK = 1, /* Capture on blinking */ 571 V4L2_RECOGNITION_ACTION_SMILE = 2, /* Capture on smiling */ 572 }; 573 574 enum v4l2_recog_pattern { 575 V4L2_RECOG_PATTERN_FACE = 0, /* Face */ 576 V4L2_RECOG_PATTERN_HUMAN = 1, /* Human */ 577 V4L2_RECOG_PATTERN_CHAR = 2, /* Character */ 578 }; 579 580 struct v4l2_recog_rect { 581 enum v4l2_recog_pattern p; /* detected pattern */ 582 struct v4l2_rect o; /* detected area */ 583 __u32 reserved[4]; 584 }; 585 586 struct v4l2_recog_data { 587 __u8 detect_cnt; /* detected object counter */ 588 struct v4l2_rect o; /* detected area */ 589 __u32 reserved[4]; 590 }; 591 592 struct v4l2_recognition { 593 enum v4l2_recog_mode mode; 594 595 /* Which pattern to detect */ 596 enum v4l2_recog_pattern pattern; 597 598 /* How many object to detect */ 599 __u8 obj_num; 600 601 /* select detected object */ 602 __u32 detect_idx; 603 604 /* read only :Get object coordination */ 605 struct v4l2_recog_data data; 606 607 enum v4l2_recog_action action; 608 __u32 reserved[4]; 609 }; 610 611 #define VIDIOC_S_RECOGNITION _IOWR('V', 85, struct v4l2_recognition) 612 #define VIDIOC_G_RECOGNITION _IOR('V', 86, struct v4l2_recognition) 613 614 /* We use this struct as the v4l2_streamparm raw_data for 615 * VIDIOC_G_PARM and VIDIOC_S_PARM 616 */ 617 struct sec_cam_parm { 618 struct v4l2_captureparm capture; 619 int contrast; 620 int effects; 621 int brightness; 622 int flash_mode; 623 int focus_mode; 624 int iso; 625 int metering; 626 int saturation; 627 int scene_mode; 628 int sharpness; 629 int white_balance; 630 }; 631 632 #endif /* __LINUX_VIDEODEV2_SAMSUNG_H */ 633