diff options
author | Greg Hackmann <ghackmann@google.com> | 2012-09-26 14:05:35 -0700 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2012-09-26 16:02:28 -0700 |
commit | db7d80d7a4d9ef6c8fbca602a78531f82f72f0a2 (patch) | |
tree | a55e531b60d96ebe8f8b16e1a5b371c96f47e806 /original-kernel-headers/linux | |
parent | 105be0b2aac13c94567036612a9556aae34c1590 (diff) | |
download | exynos5-db7d80d7a4d9ef6c8fbca602a78531f82f72f0a2.tar.gz |
clean kernel headers
Change-Id: I51c0119e9c743e21f571a743327fe299496ece81
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'original-kernel-headers/linux')
-rw-r--r-- | original-kernel-headers/linux/fimc-is-metadata.h | 980 | ||||
-rw-r--r-- | original-kernel-headers/linux/media.h | 132 | ||||
-rw-r--r-- | original-kernel-headers/linux/v4l2-mediabus.h | 116 | ||||
-rw-r--r-- | original-kernel-headers/linux/v4l2-subdev.h | 141 | ||||
-rw-r--r-- | original-kernel-headers/linux/videodev2_exynos_media.h | 233 |
5 files changed, 1602 insertions, 0 deletions
diff --git a/original-kernel-headers/linux/fimc-is-metadata.h b/original-kernel-headers/linux/fimc-is-metadata.h new file mode 100644 index 0000000..ce1a1af --- /dev/null +++ b/original-kernel-headers/linux/fimc-is-metadata.h @@ -0,0 +1,980 @@ +/* + * Samsung Exynos5 SoC series Camera API 2.0 HAL + * + * Internal Metadata (controls/dynamic metadata and static metadata) + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd + * Contact: Sungjoong Kang, <sj3.kang@samsung.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/*2012.04.18 Version 0.1 Initial Release*/ +/*2012.04.23 Version 0.2 Added static metadata (draft)*/ +/*2012.07.04 Version 0.3 Applied google's undocumented changes (draft)*/ +/*2012.07.11 Version 0.4 Added FD parameters */ +/*2012.07.27 Version 0.5 Modified HSB control and DM */ + + +#ifndef FIMC_IS_METADATA_H_ +#define FIMC_IS_METADATA_H_ + +struct rational { + uint32_t num; + uint32_t den; +}; + +#define CAMERA2_MAX_AVAILABLE_MODE 21 +#define CAMERA2_MAX_FACES 16 + +#define CAMERA2_FACE_DETECTION_THRESHOLD 35 + +/* + *controls/dynamic metadata +*/ + +/* android.request */ + +enum metadata_mode { + METADATA_MODE_NONE, + METADATA_MODE_FULL +}; + +struct camera2_request_ctl { + uint32_t id; + enum metadata_mode metadataMode; + uint8_t outputStreams[16]; + uint32_t frameCount; +}; + +struct camera2_request_dm { + uint32_t id; + enum metadata_mode metadataMode; + uint32_t frameCount; +}; + + + +/* android.lens */ + +enum optical_stabilization_mode { + OPTICAL_STABILIZATION_MODE_OFF, + OPTICAL_STABILIZATION_MODE_ON +}; + +enum lens_facing { + LENS_FACING_BACK, + LENS_FACING_FRONT +}; + +struct camera2_lens_ctl { + uint32_t focusDistance; + float aperture; + float focalLength; + float filterDensity; + enum optical_stabilization_mode opticalStabilizationMode; + +}; + +struct camera2_lens_dm { + uint32_t focusDistance; + float aperture; + float focalLength; + float filterDensity; + enum optical_stabilization_mode opticalStabilizationMode; + float focusRange[2]; +}; + +struct camera2_lens_sm { + float minimumFocusDistance; + float hyperfocalDistance; + float availableFocalLength[2]; + float availableApertures; + /*assuming 1 aperture*/ + float availableFilterDensities; + /*assuming 1 ND filter value*/ + enum optical_stabilization_mode availableOpticalStabilization; + /*assuming 1*/ + uint32_t shadingMapSize; + float shadingMap[3][40][30]; + uint32_t geometricCorrectionMapSize; + float geometricCorrectionMap[2][3][40][30]; + enum lens_facing facing; + float position[2]; +}; + +/* android.sensor */ + +enum sensor_colorfilterarrangement { + SENSOR_COLORFILTERARRANGEMENT_RGGB, + SENSOR_COLORFILTERARRANGEMENT_GRBG, + SENSOR_COLORFILTERARRANGEMENT_GBRG, + SENSOR_COLORFILTERARRANGEMENT_BGGR, + SENSOR_COLORFILTERARRANGEMENT_RGB +}; + +enum sensor_ref_illuminant { + SENSOR_ILLUMINANT_DAYLIGHT = 1, + SENSOR_ILLUMINANT_FLUORESCENT = 2, + SENSOR_ILLUMINANT_TUNGSTEN = 3, + SENSOR_ILLUMINANT_FLASH = 4, + SENSOR_ILLUMINANT_FINE_WEATHER = 9, + SENSOR_ILLUMINANT_CLOUDY_WEATHER = 10, + SENSOR_ILLUMINANT_SHADE = 11, + SENSOR_ILLUMINANT_DAYLIGHT_FLUORESCENT = 12, + SENSOR_ILLUMINANT_DAY_WHITE_FLUORESCENT = 13, + SENSOR_ILLUMINANT_COOL_WHITE_FLUORESCENT = 14, + SENSOR_ILLUMINANT_WHITE_FLUORESCENT = 15, + SENSOR_ILLUMINANT_STANDARD_A = 17, + SENSOR_ILLUMINANT_STANDARD_B = 18, + SENSOR_ILLUMINANT_STANDARD_C = 19, + SENSOR_ILLUMINANT_D55 = 20, + SENSOR_ILLUMINANT_D65 = 21, + SENSOR_ILLUMINANT_D75 = 22, + SENSOR_ILLUMINANT_D50 = 23, + SENSOR_ILLUMINANT_ISO_STUDIO_TUNGSTEN = 24 +}; + +struct camera2_sensor_ctl { + /* unit : nano */ + uint64_t exposureTime; + /* unit : nano(It's min frame duration */ + uint64_t frameDuration; + /* unit : percent(need to change ISO value?) */ + uint32_t sensitivity; +}; + +struct camera2_sensor_dm { + uint64_t exposureTime; + uint64_t frameDuration; + uint32_t sensitivity; + uint64_t timeStamp; +}; + +struct camera2_sensor_sm { + uint32_t exposureTimeRange[2]; + uint32_t maxFrameDuration; + /* list of available sensitivities. */ + uint32_t availableSensitivities[10]; + enum sensor_colorfilterarrangement colorFilterArrangement; + float physicalSize[2]; + uint32_t pixelArraySize[2]; + uint32_t activeArraySize[4]; + uint32_t whiteLevel; + uint32_t blackLevelPattern[4]; + struct rational colorTransform1[9]; + struct rational colorTransform2[9]; + enum sensor_ref_illuminant referenceIlluminant1; + enum sensor_ref_illuminant referenceIlluminant2; + struct rational forwardMatrix1[9]; + struct rational forwardMatrix2[9]; + struct rational calibrationTransform1[9]; + struct rational calibrationTransform2[9]; + struct rational baseGainFactor; + uint32_t maxAnalogSensitivity; + float noiseModelCoefficients[2]; + uint32_t orientation; +}; + + + +/* android.flash */ + +enum flash_mode { + CAM2_FLASH_MODE_NOP = 0, + CAM2_FLASH_MODE_OFF = 1, + CAM2_FLASH_MODE_SINGLE, + CAM2_FLASH_MODE_TORCH, + CAM2_FLASH_MODE_BEST +}; + +struct camera2_flash_ctl { + enum flash_mode flashMode; + uint32_t firingPower; + uint64_t firingTime; +}; + +struct camera2_flash_dm { + enum flash_mode flashMode; + /*10 is max power*/ + uint32_t firingPower; + /*unit : microseconds*/ + uint64_t firingTime; + /*1 : stable, 0 : unstable*/ + uint32_t firingStable; + /*1 : flash required, 2 : flash not required */ + uint32_t decision; +}; + +struct camera2_flash_sm { + uint32_t available; + uint64_t chargeDuration; +}; + + +/* android.hotpixel */ + +enum processing_mode { + PROCESSING_MODE_OFF = 1, + PROCESSING_MODE_FAST, + PROCESSING_MODE_HIGH_QUALITY +}; + + +struct camera2_hotpixel_ctl { + enum processing_mode mode; +}; + +struct camera2_hotpixel_dm { + enum processing_mode mode; +}; + + + +/* android.demosaic */ + +struct camera2_demosaic_ctl { + enum processing_mode mode; +}; + +struct camera2_demosaic_dm { + enum processing_mode mode; +}; + + + +/* android.noiseReduction */ + +struct camera2_noisereduction_ctl { + enum processing_mode mode; + uint32_t strength; +}; + +struct camera2_noisereduction_dm { + enum processing_mode mode; + uint32_t strength; +}; + + + +/* android.shading */ + +struct camera2_shading_ctl { + enum processing_mode mode; +}; + +struct camera2_shading_dm { + enum processing_mode mode; +}; + + + +/* android.geometric */ + +struct camera2_geometric_ctl { + enum processing_mode mode; +}; + +struct camera2_geometric_dm { + enum processing_mode mode; +}; + + + +/* android.colorCorrection */ + +enum colorcorrection_mode { + COLORCORRECTION_MODE_FAST = 1, + COLORCORRECTION_MODE_HIGH_QUALITY, + COLORCORRECTION_MODE_TRANSFORM_MATRIX, + COLORCORRECTION_MODE_EFFECT_MONO, + COLORCORRECTION_MODE_EFFECT_NEGATIVE, + COLORCORRECTION_MODE_EFFECT_SOLARIZE, + COLORCORRECTION_MODE_EFFECT_SEPIA, + COLORCORRECTION_MODE_EFFECT_POSTERIZE, + COLORCORRECTION_MODE_EFFECT_WHITEBOARD, + COLORCORRECTION_MODE_EFFECT_BLACKBOARD, + COLORCORRECTION_MODE_EFFECT_AQUA +}; + + +struct camera2_colorcorrection_ctl { + enum colorcorrection_mode mode; + float transform[9]; + uint32_t hue; + uint32_t saturation; + uint32_t brightness; +}; + +struct camera2_colorcorrection_dm { + enum colorcorrection_mode mode; + float transform[9]; + uint32_t hue; + uint32_t saturation; + uint32_t brightness; +}; + +struct camera2_colorcorrection_sm { + /*assuming 10 supported modes*/ + uint8_t availableModes[CAMERA2_MAX_AVAILABLE_MODE]; + uint32_t hueRange[2]; + uint32_t saturationRange[2]; + uint32_t brightnessRange[2]; +}; + + +/* android.tonemap */ + +enum tonemap_mode { + TONEMAP_MODE_FAST = 1, + TONEMAP_MODE_HIGH_QUALITY, + TONEMAP_MODE_CONTRAST_CURVE +}; + +struct camera2_tonemap_ctl { + enum tonemap_mode mode; + /* assuming maxCurvePoints = 64 */ + float curveRed[64]; + float curveGreen[64]; + float curveBlue[64]; +}; + +struct camera2_tonemap_dm { + enum tonemap_mode mode; + /* assuming maxCurvePoints = 64 */ + float curveRed[64]; + float curveGreen[64]; + float curveBlue[64]; +}; + +struct camera2_tonemap_sm { + uint32_t maxCurvePoints; +}; + +/* android.edge */ + +struct camera2_edge_ctl { + enum processing_mode mode; + uint32_t strength; +}; + +struct camera2_edge_dm { + enum processing_mode mode; + uint32_t strength; +}; + + + +/* android.scaler */ + +enum scaler_availableformats { + SCALER_FORMAT_BAYER_RAW, + SCALER_FORMAT_YV12, + SCALER_FORMAT_NV21, + SCALER_FORMAT_JPEG, + SCALER_FORMAT_UNKNOWN +}; + +struct camera2_scaler_ctl { + uint32_t cropRegion[3]; +}; + +struct camera2_scaler_dm { + uint32_t cropRegion[3]; +}; + +struct camera2_scaler_sm { + enum scaler_availableformats availableFormats[4]; + /*assuming # of availableFormats = 4*/ + uint32_t availableRawSizes; + uint64_t availableRawMinDurations; + /* needs check */ + uint32_t availableProcessedSizes[8]; + uint64_t availableProcessedMinDurations[8]; + uint32_t availableJpegSizes[8][2]; + uint64_t availableJpegMinDurations[8]; + uint32_t availableMaxDigitalZoom[8]; +}; + +/* android.jpeg */ +struct camera2_jpeg_ctl { + uint32_t quality; + uint32_t thumbnailSize[2]; + uint32_t thumbnailQuality; + double gpsCoordinates[3]; + uint32_t gpsProcessingMethod; + uint64_t gpsTimestamp; + uint32_t orientation; +}; + +struct camera2_jpeg_dm { + uint32_t quality; + uint32_t thumbnailSize[2]; + uint32_t thumbnailQuality; + double gpsCoordinates[3]; + uint32_t gpsProcessingMethod; + uint64_t gpsTimestamp; + uint32_t orientation; +}; + +struct camera2_jpeg_sm { + uint32_t availableThumbnailSizes[8][2]; + uint32_t maxSize; + /*assuming supported size=8*/ +}; + + + +/* android.statistics */ + +enum facedetect_mode { + FACEDETECT_MODE_OFF = 1, + FACEDETECT_MODE_SIMPLE, + FACEDETECT_MODE_FULL +}; + +enum stats_mode { + STATS_MODE_OFF = 1, + STATS_MODE_ON +}; + +struct camera2_stats_ctl { + enum facedetect_mode faceDetectMode; + enum stats_mode histogramMode; + enum stats_mode sharpnessMapMode; +}; + + +struct camera2_stats_dm { + enum facedetect_mode faceDetectMode; + uint32_t faceRectangles[CAMERA2_MAX_FACES][4]; + uint8_t faceScores[CAMERA2_MAX_FACES]; + uint32_t faceLandmarks[CAMERA2_MAX_FACES][6]; + uint32_t faceIds[CAMERA2_MAX_FACES]; +/* PAYTON_CHECK_20120712 : histogram_mode -> stats_mode */ + enum stats_mode histogramMode; +/* [hj529.kim, 2012/07/19] androd.statistics.histogram */ + uint32_t histogram[3 * 256]; +/* PAYTON_CHECK_20120712 : sharpnessmap_mode -> stats_mode */ + enum stats_mode sharpnessMapMode; + /*sharpnessMap*/ +}; + + +struct camera2_stats_sm { + uint8_t availableFaceDetectModes[CAMERA2_MAX_AVAILABLE_MODE]; + /*assuming supported modes = 3;*/ + uint32_t maxFaceCount; + uint32_t histogramBucketCount; + uint32_t maxHistogramCount; + uint32_t sharpnessMapSize[2]; + uint32_t maxSharpnessMapValue; +}; + +/* android.control */ + +enum aa_capture_intent { + AA_CAPTURE_INTENT_CUSTOM = 0, + AA_CAPTURE_INTENT_PREVIEW, + AA_CAPTURE_INTENT_STILL_CAPTURE, + AA_CAPTURE_INTENT_VIDEO_RECORD, + AA_CAPTURE_INTENT_VIDEO_SNAPSHOT, + AA_CAPTURE_INTENT_ZERO_SHUTTER_LAG +}; + +enum aa_mode { + AA_CONTROL_NONE = 0, + AA_CONTROL_OFF, + AA_CONTROL_AUTO, + AA_CONTROL_USE_SCENE_MODE +}; + +enum aa_scene_mode { + AA_SCENE_MODE_UNSUPPORTED = 1, + AA_SCENE_MODE_FACE_PRIORITY, + AA_SCENE_MODE_ACTION, + AA_SCENE_MODE_PORTRAIT, + AA_SCENE_MODE_LANDSCAPE, + AA_SCENE_MODE_NIGHT, + AA_SCENE_MODE_NIGHT_PORTRAIT, + AA_SCENE_MODE_THEATRE, + AA_SCENE_MODE_BEACH, + AA_SCENE_MODE_SNOW, + AA_SCENE_MODE_SUNSET, + AA_SCENE_MODE_STEADYPHOTO, + AA_SCENE_MODE_FIREWORKS, + AA_SCENE_MODE_SPORTS, + AA_SCENE_MODE_PARTY, + AA_SCENE_MODE_CANDLELIGHT, + AA_SCENE_MODE_BARCODE, + AA_SCENE_MODE_NIGHT_CAPTURE, /* part of night mode */ + AA_SCENE_MODE_MAX +}; + +enum aa_effect_mode { + AA_EFFECT_OFF = 1, + AA_EFFECT_MONO, + AA_EFFECT_NEGATIVE, + AA_EFFECT_SOLARIZE, + AA_EFFECT_SEPIA, + AA_EFFECT_POSTERIZE, + AA_EFFECT_WHITEBOARD, + AA_EFFECT_BLACKBOARD, + AA_EFFECT_AQUA +}; + +enum aa_aemode { + AA_AEMODE_OFF = 1, + AA_AEMODE_LOCKED, + AA_AEMODE_ON, + AA_AEMODE_ON_AUTO_FLASH, + AA_AEMODE_ON_ALWAYS_FLASH, + AA_AEMODE_ON_AUTO_FLASH_REDEYE +}; + +enum aa_ae_flashmode { + AA_FLASHMODE_NOP = 0, + /*all flash control stop*/ + AA_FLASHMODE_OFF = 1, + /*internal 3A can control flash*/ + AA_FLASHMODE_ON, + /*internal 3A can do auto flash algorithm*/ + AA_FLASHMODE_AUTO, + /*internal 3A can fire flash by auto result*/ + AA_FLASHMODE_CAPTURE, + /*internal 3A can control flash*/ + AA_FLASHMODE_ON_ALWAYS +}; + +enum aa_ae_antibanding_mode { + AA_AE_ANTIBANDING_OFF = 1, + AA_AE_ANTIBANDING_50HZ, + AA_AE_ANTIBANDING_60HZ, + AA_AE_ANTIBANDING_AUTO +}; + +enum aa_awbmode { + AA_AWBMODE_OFF = 1, + AA_AWBMODE_LOCKED, + AA_AWBMODE_WB_AUTO, + AA_AWBMODE_WB_INCANDESCENT, + AA_AWBMODE_WB_FLUORESCENT, + AA_AWBMODE_WB_WARM_FLUORESCENT, + AA_AWBMODE_WB_DAYLIGHT, + AA_AWBMODE_WB_CLOUDY_DAYLIGHT, + AA_AWBMODE_WB_TWILIGHT, + AA_AWBMODE_WB_SHADE +}; + +enum aa_afmode { + NO_CHANGE = 0, + AA_AFMODE_OFF = 1, + AA_AFMODE_AUTO, + AA_AFMODE_MACRO, + AA_AFMODE_CONTINUOUS_VIDEO, + AA_AFMODE_CONTINUOUS_PICTURE, + AA_AFMODE_INFINITY, + AA_AFMODE_AUTO_FACE, + AA_AFMODE_CONTINUOUS_VIDEO_FACE, + AA_AFMODE_CONTINUOUS_PICTURE_FACE, + AA_AFMODE_MANUAL, + AA_AFMODE_EDOF +}; + +enum aa_afstate { + AA_AFSTATE_INACTIVE = 1, + AA_AFSTATE_PASSIVE_SCAN, + AA_AFSTATE_ACTIVE_SCAN, + AA_AFSTATE_AF_ACQUIRED_FOCUS, + AA_AFSTATE_AF_FAILED_FOCUS +}; + +enum ae_state { + AE_STATE_INACTIVE = 1, + AE_STATE_SEARCHING, + AE_STATE_CONVERGED, + AE_STATE_LOCKED, + AE_STATE_FLASH_REQUIRED, + AE_STATE_PRECAPTURE +}; + +enum awb_state { + AWB_STATE_INACTIVE = 1, + AWB_STATE_SEARCHING, + AWB_STATE_CONVERGED, + AWB_STATE_LOCKED +}; + +enum aa_isomode { + AA_ISOMODE_AUTO = 1, + AA_ISOMODE_MANUAL, +}; + +enum ae_lockmode { + AEMODE_LOCK_OFF = 0, + AEMODE_LOCK_ON, +}; + +enum awb_lockmode { + AWBMODE_LOCK_OFF = 0, + AWBMODE_LOCK_ON, +}; + +struct camera2_aa_ctl { + enum aa_capture_intent captureIntent; + enum aa_mode mode; + enum aa_scene_mode sceneMode; + uint32_t videoStabilizationMode; + enum aa_aemode aeMode; + uint32_t aeRegions[5]; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region.*/ + int32_t aeExpCompensation; + uint32_t aeTargetFpsRange[2]; + enum aa_ae_antibanding_mode aeAntibandingMode; + enum aa_ae_flashmode aeflashMode; + enum aa_awbmode awbMode; + uint32_t awbRegions[5]; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region.*/ + enum aa_afmode afMode; + uint32_t afRegions[5]; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region.*/ + uint32_t afTrigger; + enum aa_isomode isoMode; + uint32_t isoValue; + +}; + +struct camera2_aa_dm { + enum aa_mode mode; + enum aa_effect_mode effectMode; + enum aa_scene_mode sceneMode; + uint32_t videoStabilizationMode; + enum aa_aemode aeMode; + /*needs check*/ + uint32_t aeRegions[5]; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region.*/ + enum ae_state aeState; + enum aa_ae_flashmode aeflashMode; + /*needs check*/ + enum aa_awbmode awbMode; + uint32_t awbRegions[5]; + enum awb_state awbState; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region.*/ + enum aa_afmode afMode; + uint32_t afRegions[5]; + /*5 per region(x1,y1,x2,y2,weight). currently assuming 1 region*/ + enum aa_afstate afState; + enum aa_isomode isoMode; + uint32_t isoValue; +}; + +struct camera2_aa_sm { + uint8_t availableSceneModes[CAMERA2_MAX_AVAILABLE_MODE]; + uint8_t availableEffects[CAMERA2_MAX_AVAILABLE_MODE]; + /*assuming # of available scene modes = 10*/ + uint32_t maxRegions; + uint8_t aeAvailableModes[CAMERA2_MAX_AVAILABLE_MODE]; + /*assuming # of available ae modes = 8*/ + struct rational aeCompensationStep; + int32_t aeCompensationRange[2]; + uint32_t aeAvailableTargetFpsRanges[CAMERA2_MAX_AVAILABLE_MODE][2]; + uint8_t aeAvailableAntibandingModes[CAMERA2_MAX_AVAILABLE_MODE]; + uint8_t awbAvailableModes[CAMERA2_MAX_AVAILABLE_MODE]; + /*assuming # of awbAvailableModes = 10*/ + uint8_t afAvailableModes[CAMERA2_MAX_AVAILABLE_MODE]; + /*assuming # of afAvailableModes = 4*/ + uint8_t availableVideoStabilizationModes[4]; + /*assuming # of availableVideoStabilizationModes = 4*/ + uint32_t isoRange[2]; +}; + +struct camera2_lens_usm { + /** Frame delay between sending command and applying frame data */ + uint32_t focusDistanceFrameDelay; +}; + +struct camera2_sensor_usm { + /** Frame delay between sending command and applying frame data */ + uint32_t exposureTimeFrameDelay; + uint32_t frameDurationFrameDelay; + uint32_t sensitivityFrameDelay; +}; + +struct camera2_flash_usm { + /** Frame delay between sending command and applying frame data */ + uint32_t flashModeFrameDelay; + uint32_t firingPowerFrameDelay; + uint64_t firingTimeFrameDelay; +}; + +struct camera2_ctl { + struct camera2_request_ctl request; + struct camera2_lens_ctl lens; + struct camera2_sensor_ctl sensor; + struct camera2_flash_ctl flash; + struct camera2_hotpixel_ctl hotpixel; + struct camera2_demosaic_ctl demosaic; + struct camera2_noisereduction_ctl noise; + struct camera2_shading_ctl shading; + struct camera2_geometric_ctl geometric; + struct camera2_colorcorrection_ctl color; + struct camera2_tonemap_ctl tonemap; + struct camera2_edge_ctl edge; + struct camera2_scaler_ctl scaler; + struct camera2_jpeg_ctl jpeg; + struct camera2_stats_ctl stats; + struct camera2_aa_ctl aa; +}; + +struct camera2_dm { + struct camera2_request_dm request; + struct camera2_lens_dm lens; + struct camera2_sensor_dm sensor; + struct camera2_flash_dm flash; + struct camera2_hotpixel_dm hotpixel; + struct camera2_demosaic_dm demosaic; + struct camera2_noisereduction_dm noise; + struct camera2_shading_dm shading; + struct camera2_geometric_dm geometric; + struct camera2_colorcorrection_dm color; + struct camera2_tonemap_dm tonemap; + struct camera2_edge_dm edge; + struct camera2_scaler_dm scaler; + struct camera2_jpeg_dm jpeg; + struct camera2_stats_dm stats; + struct camera2_aa_dm aa; +}; + +struct camera2_sm { + struct camera2_lens_sm lens; + struct camera2_sensor_sm sensor; + struct camera2_flash_sm flash; + struct camera2_colorcorrection_sm color; + struct camera2_tonemap_sm tonemap; + struct camera2_scaler_sm scaler; + struct camera2_jpeg_sm jpeg; + struct camera2_stats_sm stats; + struct camera2_aa_sm aa; + + /** User-defined(ispfw specific) static metadata. */ + struct camera2_lens_usm lensUd; + struct camera2_sensor_usm sensorUd; + struct camera2_flash_usm flashUd; +}; + +/** \brief + User-defined control for lens. +*/ +struct camera2_lens_uctl { + struct camera2_lens_ctl ctl; + + /** It depends by af algorithm(normally 255 or 1023) */ + uint32_t maxPos; + /** Some actuator support slew rate control. */ + uint32_t slewRate; +}; + +/** \brief + User-defined metadata for lens. +*/ +struct camera2_lens_udm { + /** It depends by af algorithm(normally 255 or 1023) */ + uint32_t maxPos; + /** Some actuator support slew rate control. */ + uint32_t slewRate; +}; + +/** \brief + User-defined control for sensor. +*/ +struct camera2_sensor_uctl { + struct camera2_sensor_ctl ctl; + /** Dynamic frame duration. + This feature is decided to max. value between + 'sensor.exposureTime'+alpha and 'sensor.frameDuration'. + */ + uint64_t dynamicFrameDuration; +}; + +struct camera2_scaler_uctl { + /** \brief + target address for next frame. + \remarks + [0] invalid address, stop + [others] valid address + */ + uint32_t sccTargetAddress[4]; + uint32_t scpTargetAddress[4]; +}; + +struct camera2_flash_uctl { + struct camera2_flash_ctl ctl; +}; + +/** \brief + User-defined control area. + \remarks + sensor, lens, flash category is empty value. + It should be filled by a5 for SET_CAM_CONTROL command. + Other category is filled already from host. +*/ +struct camera2_uctl { + /** \brief + Set sensor, lens, flash control for next frame. + \remarks + This flag can be combined. + [0 bit] lens + [1 bit] sensor + [2 bit] flash + */ + uint32_t uUpdateBitMap; + + /** For debugging */ + uint32_t uFrameNumber; + + /** ispfw specific control(user-defined) of lens. */ + struct camera2_lens_uctl lensUd; + /** ispfw specific control(user-defined) of sensor. */ + struct camera2_sensor_uctl sensorUd; + /** ispfw specific control(user-defined) of flash. */ + struct camera2_flash_uctl flashUd; + + struct camera2_scaler_uctl scalerUd; +}; + +struct camera2_udm { + struct camera2_lens_udm lens; +}; + +struct camera2_shot { + /*google standard area*/ + struct camera2_ctl ctl; + struct camera2_dm dm; + /*user defined area*/ + struct camera2_uctl uctl; + struct camera2_udm udm; + /*magic : 23456789*/ + uint32_t magicNumber; +}; + +/** \brief + Structure for interfacing between HAL and driver. +*/ +struct camera2_shot_ext { + /** \brief + setfile change + \remarks + [x] mode for setfile + */ + uint32_t setfile; + + /** \brief + stream control + \remarks + [0] disable stream out + [1] enable stream out + */ + uint32_t request_sensor; + uint32_t request_scc; + uint32_t request_scp; + + /** \brief + post processing control(DRC) + \remarks + [0] bypass off + [1] bypass on + */ + uint32_t drc_bypass; + + /** \brief + post processing control(DIS) + \remarks + [0] bypass off + [1] bypass on + */ + uint32_t dis_bypass; + + /** \brief + post processing control(3DNR) + \remarks + [0] bypass off + [1] bypass on + */ + uint32_t dnr_bypass; + + /** \brief + post processing control(FD) + \remarks + [0] bypass off + [1] bypass on + */ + uint32_t fd_bypass; + + /* reserved for future */ + uint32_t reserved[20]; + + /** \brief + processing time debugging + \remarks + taken time(unit : struct timeval) + [0][x] flite start + [1][x] flite end + [2][x] DRV Shot + [3][x] DRV Shot done + [4][x] DRV Meta done + */ + uint32_t timeZone[10][2]; + + struct camera2_shot shot; + uint8_t gpsProcessingMethod[32]; + uint8_t isReprocessing; + uint8_t reprocessInput; + enum ae_lockmode ae_lock; // this field is used in cameraHAL only + enum awb_lockmode awb_lock; // this field is used in cameraHAL only +}; + +/** \brief + stream structure for scaler. +*/ +struct camera2_stream { + /** \brief + this address for verifying conincidence of index and address + \remarks + [X] kernel virtual address for this buffer + */ + uint32_t address; + + /** \brief + this frame count is from FLITE through dm.request.fcount, + this count increases every frame end. initial value is 1. + \remarks + [X] frame count + */ + uint32_t fcount; + + /** \brief + this request count is from HAL through ctl.request.fcount, + this count is the unique. + \remarks + [X] request count + */ + uint32_t rcount; + + /** \brief + frame index of isp framemgr. + this value is for driver internal debugging + \remarks + [X] frame index + */ + uint32_t findex; +}; + +#define CAM_LENS_CMD (0x1 << 0x0) +#define CAM_SENSOR_CMD (0x1 << 0x1) +#define CAM_FLASH_CMD (0x1 << 0x2) + + +#endif + diff --git a/original-kernel-headers/linux/media.h b/original-kernel-headers/linux/media.h new file mode 100644 index 0000000..0ef8833 --- /dev/null +++ b/original-kernel-headers/linux/media.h @@ -0,0 +1,132 @@ +/* + * Multimedia device API + * + * Copyright (C) 2010 Nokia Corporation + * + * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> + * Sakari Ailus <sakari.ailus@iki.fi> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LINUX_MEDIA_H +#define __LINUX_MEDIA_H + +#include <linux/ioctl.h> +#include <linux/types.h> +#include <linux/version.h> + +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) + +struct media_device_info { + char driver[16]; + char model[32]; + char serial[40]; + char bus_info[32]; + __u32 media_version; + __u32 hw_revision; + __u32 driver_version; + __u32 reserved[31]; +}; + +#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) + +#define MEDIA_ENT_TYPE_SHIFT 16 +#define MEDIA_ENT_TYPE_MASK 0x00ff0000 +#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff + +#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT) +#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) +#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) +#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) +#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) + +#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) +#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) +#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) +#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) + +#define MEDIA_ENT_FL_DEFAULT (1 << 0) + +struct media_entity_desc { + __u32 id; + char name[32]; + __u32 type; + __u32 revision; + __u32 flags; + __u32 group_id; + __u16 pads; + __u16 links; + + __u32 reserved[4]; + + union { + /* Node specifications */ + struct { + __u32 major; + __u32 minor; + } v4l; + struct { + __u32 major; + __u32 minor; + } fb; + struct { + __u32 card; + __u32 device; + __u32 subdevice; + } alsa; + int dvb; + + /* Sub-device specifications */ + /* Nothing needed yet */ + __u8 raw[184]; + }; +}; + +#define MEDIA_PAD_FL_SINK (1 << 0) +#define MEDIA_PAD_FL_SOURCE (1 << 1) + +struct media_pad_desc { + __u32 entity; /* entity ID */ + __u16 index; /* pad index */ + __u32 flags; /* pad flags */ + __u32 reserved[2]; +}; + +#define MEDIA_LNK_FL_ENABLED (1 << 0) +#define MEDIA_LNK_FL_IMMUTABLE (1 << 1) +#define MEDIA_LNK_FL_DYNAMIC (1 << 2) + +struct media_link_desc { + struct media_pad_desc source; + struct media_pad_desc sink; + __u32 flags; + __u32 reserved[2]; +}; + +struct media_links_enum { + __u32 entity; + /* Should have enough room for pads elements */ + struct media_pad_desc __user *pads; + /* Should have enough room for links elements */ + struct media_link_desc __user *links; + __u32 reserved[4]; +}; + +#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) +#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) +#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) +#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) + +#endif /* __LINUX_MEDIA_H */ diff --git a/original-kernel-headers/linux/v4l2-mediabus.h b/original-kernel-headers/linux/v4l2-mediabus.h new file mode 100644 index 0000000..1a13cf3 --- /dev/null +++ b/original-kernel-headers/linux/v4l2-mediabus.h @@ -0,0 +1,116 @@ +/* + * Media Bus API header + * + * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __LINUX_V4L2_MEDIABUS_H +#define __LINUX_V4L2_MEDIABUS_H + +#include <linux/types.h> +#include <linux/videodev2.h> + +/* + * These pixel codes uniquely identify data formats on the media bus. Mostly + * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is + * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the + * data format is fixed. Additionally, "2X8" means that one pixel is transferred + * in two 8-bit samples, "BE" or "LE" specify in which order those samples are + * transferred over the bus: "LE" means that the least significant bits are + * transferred first, "BE" means that the most significant bits are transferred + * first, and "PADHI" and "PADLO" define which bits - low or high, in the + * incomplete high byte, are filled with padding bits. + * + * The pixel codes are grouped by type, bus_width, bits per component, samples + * per pixel and order of subsamples. Numerical values are sorted using generic + * numerical sort order (8 thus comes before 10). + * + * As their value can't change when a new pixel code is inserted in the + * enumeration, the pixel codes are explicitly given a numerical value. The next + * free values for each category are listed below, update them when inserting + * new pixel codes. + */ +enum v4l2_mbus_pixelcode { + V4L2_MBUS_FMT_FIXED = 0x0001, + + /* RGB - next is 0x1009 */ + V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, + V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, + V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, + V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004, + V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005, + V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, + V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, + V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, + V4L2_MBUS_FMT_XRGB8888_4X8_LE = 0x1009, + + /* YUV (including grey) - next is 0x2014 */ + V4L2_MBUS_FMT_Y8_1X8 = 0x2001, + V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, + V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, + V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004, + V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005, + V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006, + V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007, + V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, + V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, + V4L2_MBUS_FMT_Y10_1X10 = 0x200a, + V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, + V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, + V4L2_MBUS_FMT_Y12_1X12 = 0x2013, + V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, + V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, + V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, + V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, + V4L2_MBUS_FMT_YUV8_1X24 = 0x2014, + V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, + V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, + + /* Bayer - next is 0x3015 */ + V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, + V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013, + V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, + V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014, + V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, + V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, + V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, + V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005, + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006, + V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007, + V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e, + V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a, + V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f, + V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008, + V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, + V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, + V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, + + /* JPEG compressed formats - next is 0x4002 */ + V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, +}; + +/** + * struct v4l2_mbus_framefmt - frame format on the media bus + * @width: frame width + * @height: frame height + * @code: data format code (from enum v4l2_mbus_pixelcode) + * @field: used interlacing type (from enum v4l2_field) + * @colorspace: colorspace of the data (from enum v4l2_colorspace) + */ +struct v4l2_mbus_framefmt { + __u32 width; + __u32 height; + __u32 code; + __u32 field; + __u32 colorspace; + __u32 reserved[7]; +}; + +#endif diff --git a/original-kernel-headers/linux/v4l2-subdev.h b/original-kernel-headers/linux/v4l2-subdev.h new file mode 100644 index 0000000..f5dd9a1 --- /dev/null +++ b/original-kernel-headers/linux/v4l2-subdev.h @@ -0,0 +1,141 @@ +/* + * V4L2 subdev userspace API + * + * Copyright (C) 2010 Nokia Corporation + * + * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> + * Sakari Ailus <sakari.ailus@iki.fi> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LINUX_V4L2_SUBDEV_H +#define __LINUX_V4L2_SUBDEV_H + +#include <linux/ioctl.h> +#include <linux/types.h> +#include "v4l2-mediabus.h" + +/** + * enum v4l2_subdev_format_whence - Media bus format type + * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only + * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device + */ +enum v4l2_subdev_format_whence { + V4L2_SUBDEV_FORMAT_TRY = 0, + V4L2_SUBDEV_FORMAT_ACTIVE = 1, +}; + +/** + * struct v4l2_subdev_format - Pad-level media bus format + * @which: format type (from enum v4l2_subdev_format_whence) + * @pad: pad number, as reported by the media API + * @format: media bus format (format code and frame size) + */ +struct v4l2_subdev_format { + __u32 which; + __u32 pad; + struct v4l2_mbus_framefmt format; + __u32 reserved[8]; +}; + +/** + * struct v4l2_subdev_crop - Pad-level crop settings + * @which: format type (from enum v4l2_subdev_format_whence) + * @pad: pad number, as reported by the media API + * @rect: pad crop rectangle boundaries + */ +struct v4l2_subdev_crop { + __u32 which; + __u32 pad; + struct v4l2_rect rect; + __u32 reserved[8]; +}; + +/** + * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration + * @pad: pad number, as reported by the media API + * @index: format index during enumeration + * @code: format code (from enum v4l2_mbus_pixelcode) + */ +struct v4l2_subdev_mbus_code_enum { + __u32 pad; + __u32 index; + __u32 code; + __u32 reserved[9]; +}; + +/** + * struct v4l2_subdev_frame_size_enum - Media bus format enumeration + * @pad: pad number, as reported by the media API + * @index: format index during enumeration + * @code: format code (from enum v4l2_mbus_pixelcode) + */ +struct v4l2_subdev_frame_size_enum { + __u32 index; + __u32 pad; + __u32 code; + __u32 min_width; + __u32 max_width; + __u32 min_height; + __u32 max_height; + __u32 reserved[9]; +}; + +/** + * struct v4l2_subdev_frame_interval - Pad-level frame rate + * @pad: pad number, as reported by the media API + * @interval: frame interval in seconds + */ +struct v4l2_subdev_frame_interval { + __u32 pad; + struct v4l2_fract interval; + __u32 reserved[9]; +}; + +/** + * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration + * @pad: pad number, as reported by the media API + * @index: frame interval index during enumeration + * @code: format code (from enum v4l2_mbus_pixelcode) + * @width: frame width in pixels + * @height: frame height in pixels + * @interval: frame interval in seconds + */ +struct v4l2_subdev_frame_interval_enum { + __u32 index; + __u32 pad; + __u32 code; + __u32 width; + __u32 height; + struct v4l2_fract interval; + __u32 reserved[9]; +}; + +#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) +#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) +#define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ + _IOWR('V', 21, struct v4l2_subdev_frame_interval) +#define VIDIOC_SUBDEV_S_FRAME_INTERVAL \ + _IOWR('V', 22, struct v4l2_subdev_frame_interval) +#define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ + _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) +#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ + _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) +#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ + _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) +#define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) +#define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) + +#endif diff --git a/original-kernel-headers/linux/videodev2_exynos_media.h b/original-kernel-headers/linux/videodev2_exynos_media.h new file mode 100644 index 0000000..89b2598 --- /dev/null +++ b/original-kernel-headers/linux/videodev2_exynos_media.h @@ -0,0 +1,233 @@ +/* + * Video for Linux Two header file for Exynos + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * This header file contains several v4l2 APIs to be proposed to v4l2 + * community and until being accepted, will be used restrictly for Exynos. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __LINUX_VIDEODEV2_EXYNOS_MEDIA_H +#define __LINUX_VIDEODEV2_EXYNOS_MEDIA_H + +/* Pixel format FOURCC depth Description */ + +/* two planes -- one Y, one Cr + Cb interleaved */ +#define V4L2_PIX_FMT_YUV444_2P v4l2_fourcc('Y', 'U', '2', 'P') /* 24 Y/CbCr */ +#define V4L2_PIX_FMT_YVU444_2P v4l2_fourcc('Y', 'V', '2', 'P') /* 24 Y/CrCb */ + +/* three planes -- one Y, one Cr, one Cb */ +#define V4L2_PIX_FMT_YUV444_3P v4l2_fourcc('Y', 'U', '3', 'P') /* 24 Y/Cb/Cr */ + +/* two non contiguous planes - one Y, one Cr + Cb interleaved */ +/* 21 Y/CrCb 4:2:0 */ +#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') +/* 12 Y/CbCr 4:2:0 16x16 macroblocks */ +#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') + +/* three non contiguous planes - Y, Cb, Cr */ +/* 12 YVU420 planar */ +#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'V', 'U', 'M') + +/* compressed formats */ +#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */ +#define V4L2_PIX_FMT_FIMV v4l2_fourcc('F', 'I', 'M', 'V') /* FIMV */ +#define V4L2_PIX_FMT_FIMV1 v4l2_fourcc('F', 'I', 'M', '1') /* FIMV1 */ +#define V4L2_PIX_FMT_FIMV2 v4l2_fourcc('F', 'I', 'M', '2') /* FIMV2 */ +#define V4L2_PIX_FMT_FIMV3 v4l2_fourcc('F', 'I', 'M', '3') /* FIMV3 */ +#define V4L2_PIX_FMT_FIMV4 v4l2_fourcc('F', 'I', 'M', '4') /* FIMV4 */ +#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ + +/* yuv444 of JFIF JPEG */ +#define V4L2_PIX_FMT_JPEG_444 v4l2_fourcc('J', 'P', 'G', '4') +/* yuv422 of JFIF JPEG */ +#define V4L2_PIX_FMT_JPEG_422 v4l2_fourcc('J', 'P', 'G', '2') +/* yuv420 of JFIF JPEG */ +#define V4L2_PIX_FMT_JPEG_420 v4l2_fourcc('J', 'P', 'G', '0') +/* grey of JFIF JPEG */ +#define V4L2_PIX_FMT_JPEG_GRAY v4l2_fourcc('J', 'P', 'G', 'G') + +/* + * C O N T R O L S + */ +/* CID base for Exynos controls (USER_CLASS) */ +#define V4L2_CID_EXYNOS_BASE (V4L2_CTRL_CLASS_USER | 0x2000) + +/* for rgb alpha function */ +#define V4L2_CID_GLOBAL_ALPHA (V4L2_CID_EXYNOS_BASE + 1) + +/* cacheable configuration */ +#define V4L2_CID_CACHEABLE (V4L2_CID_EXYNOS_BASE + 10) + +/* jpeg captured size */ +#define V4L2_CID_CAM_JPEG_MEMSIZE (V4L2_CID_EXYNOS_BASE + 20) +#define V4L2_CID_CAM_JPEG_ENCODEDSIZE (V4L2_CID_EXYNOS_BASE + 21) + +#define V4L2_CID_SET_SHAREABLE (V4L2_CID_EXYNOS_BASE + 40) + +/* TV configuration */ +#define V4L2_CID_TV_LAYER_BLEND_ENABLE (V4L2_CID_EXYNOS_BASE + 50) +#define V4L2_CID_TV_LAYER_BLEND_ALPHA (V4L2_CID_EXYNOS_BASE + 51) +#define V4L2_CID_TV_PIXEL_BLEND_ENABLE (V4L2_CID_EXYNOS_BASE + 52) +#define V4L2_CID_TV_CHROMA_ENABLE (V4L2_CID_EXYNOS_BASE + 53) +#define V4L2_CID_TV_CHROMA_VALUE (V4L2_CID_EXYNOS_BASE + 54) +#define V4L2_CID_TV_HPD_STATUS (V4L2_CID_EXYNOS_BASE + 55) +#define V4L2_CID_TV_LAYER_PRIO (V4L2_CID_EXYNOS_BASE + 56) +#define V4L2_CID_TV_SET_DVI_MODE (V4L2_CID_EXYNOS_BASE + 57) +#define V4L2_CID_TV_GET_DVI_MODE (V4L2_CID_EXYNOS_BASE + 58) +#define V4L2_CID_TV_SET_ASPECT_RATIO (V4L2_CID_EXYNOS_BASE + 59) +#define V4L2_CID_TV_MAX_AUDIO_CHANNELS (V4L2_CID_EXYNOS_BASE + 60) +#define V4L2_CID_TV_ENABLE_HDMI_AUDIO (V4L2_CID_EXYNOS_BASE + 61) + +/* for color space conversion equation selection */ +#define V4L2_CID_CSC_EQ_MODE (V4L2_CID_EXYNOS_BASE + 100) +#define V4L2_CID_CSC_EQ (V4L2_CID_EXYNOS_BASE + 101) +#define V4L2_CID_CSC_RANGE (V4L2_CID_EXYNOS_BASE + 102) + +#define V4L2_CID_CONTENT_PROTECTION (V4L2_CID_EXYNOS_BASE + 201) + +/* CID base for MFC controls (MPEG_CLASS) */ +#define V4L2_CID_MPEG_MFC_BASE (V4L2_CTRL_CLASS_MPEG | 0x2000) + +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_AVAIL \ + (V4L2_CID_MPEG_MFC_BASE + 1) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRGMENT_ID \ + (V4L2_CID_MPEG_MFC_BASE + 2) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_INFO \ + (V4L2_CID_MPEG_MFC_BASE + 3) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_GRID_POS \ + (V4L2_CID_MPEG_MFC_BASE + 4) + +#define V4L2_CID_MPEG_MFC51_VIDEO_PACKED_PB \ + (V4L2_CID_MPEG_MFC_BASE + 5) +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TAG \ + (V4L2_CID_MPEG_MFC_BASE + 6) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_ENABLE \ + (V4L2_CID_MPEG_MFC_BASE + 7) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_LUMA \ + (V4L2_CID_MPEG_MFC_BASE + 8) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_CHROMA \ + (V4L2_CID_MPEG_MFC_BASE + 9) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_LUMA_BOT \ + (V4L2_CID_MPEG_MFC_BASE + 10) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_DATA_CHROMA_BOT \ + (V4L2_CID_MPEG_MFC_BASE + 11) +#define V4L2_CID_MPEG_MFC51_VIDEO_CRC_GENERATED \ + (V4L2_CID_MPEG_MFC_BASE + 12) +#define V4L2_CID_MPEG_MFC51_VIDEO_CHECK_STATE \ + (V4L2_CID_MPEG_MFC_BASE + 13) +#define V4L2_CID_MPEG_MFC51_VIDEO_DISPLAY_STATUS \ + (V4L2_CID_MPEG_MFC_BASE + 14) + +#define V4L2_CID_MPEG_MFC51_VIDEO_LUMA_ADDR \ + (V4L2_CID_MPEG_MFC_BASE + 15) +#define V4L2_CID_MPEG_MFC51_VIDEO_CHROMA_ADDR \ + (V4L2_CID_MPEG_MFC_BASE + 16) + +#define V4L2_CID_MPEG_MFC51_VIDEO_STREAM_SIZE \ + (V4L2_CID_MPEG_MFC_BASE + 17) +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_COUNT \ + (V4L2_CID_MPEG_MFC_BASE + 18) +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_TYPE \ + (V4L2_CID_MPEG_MFC_BASE + 19) +enum v4l2_mpeg_mfc51_video_frame_type { + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_NOT_CODED = 0, + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_I_FRAME = 1, + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_P_FRAME = 2, + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_B_FRAME = 3, + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_SKIPPED = 4, + V4L2_MPEG_MFC51_VIDEO_FRAME_TYPE_OTHERS = 5, +}; + +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_INTERLACE \ + (V4L2_CID_MPEG_MFC_BASE + 20) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_RC_FRAME_RATE \ + (V4L2_CID_MPEG_MFC_BASE + 21) +#define V4L2_CID_MPEG_MFC51_VIDEO_MPEG4_VOP_TIME_RES \ + (V4L2_CID_MPEG_MFC_BASE + 22) +#define V4L2_CID_MPEG_MFC51_VIDEO_MPEG4_VOP_FRM_DELTA \ + (V4L2_CID_MPEG_MFC_BASE + 23) +#define V4L2_CID_MPEG_MFC51_VIDEO_H263_RC_FRAME_RATE \ + (V4L2_CID_MPEG_MFC_BASE + 24) + +#define V4L2_CID_MPEG_MFC6X_VIDEO_FRAME_DELTA \ + (V4L2_CID_MPEG_MFC_BASE + 25) + +#define V4L2_CID_MPEG_MFC51_VIDEO_I_PERIOD_CH V4L2_CID_MPEG_VIDEO_GOP_SIZE +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_RATE_CH \ + V4L2_CID_MPEG_MFC51_VIDEO_H264_RC_FRAME_RATE +#define V4L2_CID_MPEG_MFC51_VIDEO_BIT_RATE_CH V4L2_CID_MPEG_VIDEO_BITRATE + +/* new entry for enum v4l2_mpeg_video_mpeg4_level */ +#define V4L2_MPEG_VIDEO_MPEG4_LEVEL_6 8 + +/* proposed CIDs, based on 3.3-rc3 */ +#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_MFC_BASE + 26) + +#define V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_S_B \ + V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY + +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING \ + (V4L2_CID_MPEG_MFC_BASE + 27) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 \ + (V4L2_CID_MPEG_MFC_BASE + 28) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE \ + (V4L2_CID_MPEG_MFC_BASE + 29) +enum v4l2_mpeg_video_h264_sei_fp_arrangement_type { + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_CHEKERBOARD = 0, + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_COLUMN = 1, + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_ROW = 2, + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_SIDE_BY_SIDE = 3, + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_TOP_BOTTOM = 4, + V4L2_MPEG_VIDEO_H264_SEI_FP_TYPE_TEMPORAL = 5, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO \ + (V4L2_CID_MPEG_MFC_BASE + 30) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE \ + (V4L2_CID_MPEG_MFC_BASE + 31) +enum v4l2_mpeg_video_h264_fmo_map_type { + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP \ + (V4L2_CID_MPEG_MFC_BASE + 32) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION \ + (V4L2_CID_MPEG_MFC_BASE + 33) +enum v4l2_mpeg_video_h264_fmo_change_dir { + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0, + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE \ + (V4L2_CID_MPEG_MFC_BASE + 34) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH \ + (V4L2_CID_MPEG_MFC_BASE + 35) +#define V4L2_CID_MPEG_VIDEO_H264_ASO \ + (V4L2_CID_MPEG_MFC_BASE + 36) +#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER \ + (V4L2_CID_MPEG_MFC_BASE + 37) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING \ + (V4L2_CID_MPEG_MFC_BASE + 38) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE \ + (V4L2_CID_MPEG_MFC_BASE + 39) +enum v4l2_mpeg_video_h264_hierarchical_coding_type { + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0, + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1, +}; +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER \ + (V4L2_CID_MPEG_MFC_BASE + 40) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP \ + (V4L2_CID_MPEG_MFC_BASE + 41) + +#define V4L2_CID_MPEG_VIDEO_H264_MVC_VIEW_ID \ + (V4L2_CID_MPEG_MFC_BASE + 42) +#endif /* __LINUX_VIDEODEV2_EXYNOS_MEDIA_H */ |