QCamera3HWI.h revision 9443c6d3cd31da9b89221a4261debfeddafe3b00
1625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang/* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved. 2625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* 3625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* Redistribution and use in source and binary forms, with or without 4625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* modification, are permitted provided that the following conditions are 5625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* met: 6625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* * Redistributions of source code must retain the above copyright 7625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* notice, this list of conditions and the following disclaimer. 8625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* * Redistributions in binary form must reproduce the above 9625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* copyright notice, this list of conditions and the following 10625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* disclaimer in the documentation and/or other materials provided 11625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* with the distribution. 12625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* * Neither the name of The Linux Foundation nor the names of its 13625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* contributors may be used to endorse or promote products derived 14625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* from this software without specific prior written permission. 15625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* 16625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang* 28625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang*/ 29625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 3097e8019457b448a6e2141a49a0f471a467b70dc0Tanmaya Godbole#ifndef __QCAMERA3HARDWAREINTERFACE_H__ 3197e8019457b448a6e2141a49a0f471a467b70dc0Tanmaya Godbole#define __QCAMERA3HARDWAREINTERFACE_H__ 32625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 339de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang#include <pthread.h> 34625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#include <utils/List.h> 351c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole#include <utils/KeyedVector.h> 36625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#include <hardware/camera3.h> 37625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#include <camera/CameraMetadata.h> 3897e8019457b448a6e2141a49a0f471a467b70dc0Tanmaya Godbole#include "QCamera3HALHeader.h" 3966cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru#include "QCamera3Channel.h" 40625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 41625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangextern "C" { 42625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#include <mm_camera_interface.h> 43625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#include <mm_jpeg_interface.h> 44625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang} 45625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 46625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangusing namespace android; 47625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 48625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangnamespace qcamera { 49625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 50625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#ifndef TRUE 51625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#define TRUE 1 52625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#endif 53625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 54625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#ifndef FALSE 55625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#define FALSE 0 56625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#endif 57625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 580e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole/* Time related macros */ 590e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godboletypedef int64_t nsecs_t; 600e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole#define NSEC_PER_SEC 1000000000LL 610e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole#define NSEC_PER_USEC 1000 62e502ddd6da40b9779e0d51e5f312f3d378ebe505Shuzhen Wang#define NSEC_PER_33MSEC 33000000LL 630e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole 64625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangclass QCamera3MetadataChannel; 6566cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguruclass QCamera3PicChannel; 669de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wangclass QCamera3HeapMemory; 6766cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguruclass QCamera3Exif; 68625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 69625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangclass QCamera3HardwareInterface { 70625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangpublic: 71625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang /* static variable and functions accessed by camera service */ 72625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang static camera3_device_ops_t mCameraOps; 739de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static int initialize(const struct camera3_device *, 749de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang const camera3_callback_ops_t *callback_ops); 759de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static int configure_streams(const struct camera3_device *, 769de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang camera3_stream_configuration_t *stream_list); 779de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static int register_stream_buffers(const struct camera3_device *, 789de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang const camera3_stream_buffer_set_t *buffer_set); 799de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static const camera_metadata_t* construct_default_request_settings( 809de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang const struct camera3_device *, int type); 819de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static int process_capture_request(const struct camera3_device *, 829de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang camera3_capture_request_t *request); 839de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang static void get_metadata_vendor_tag_ops(const struct camera3_device *, 849de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang vendor_tag_query_ops_t* ops); 85625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang static void dump(const struct camera3_device *, int fd); 86e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang static int close_camera_device(struct hw_device_t* device); 87625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangpublic: 88625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang QCamera3HardwareInterface(int cameraId); 89625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang virtual ~QCamera3HardwareInterface(); 90625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int openCamera(struct hw_device_t **hw_device); 91625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int getMetadata(int type); 9297e8019457b448a6e2141a49a0f471a467b70dc0Tanmaya Godbole camera_metadata_t* translateCapabilityToMetadata(int type); 93625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 94625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang static int getCamInfo(int cameraId, struct camera_info *info); 95625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang static int initCapabilities(int cameraId); 96625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang static int initStaticMetadata(int cameraId); 97662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static void makeTable(cam_dimension_t* dimTable, uint8_t size, int32_t* sizeTable); 980e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole static void makeFPSTable(cam_fps_range_t* fpsTable, uint8_t size, 99c31ab1ae7cd6b6eb410e71ead51dd36089dc2397Shuzhen Wang int32_t* fpsRangesTable); 1002dd2f652b9cdd9e1d3db1d4157e38756370d7409Shuzhen Wang static void makeOverridesList(cam_scene_mode_overrides_t* overridesTable, uint8_t size, 1019443c6d3cd31da9b89221a4261debfeddafe3b00Mansoor Aftab uint8_t* overridesList, uint8_t* supported_indexes, int camera_id); 10259a548ac1f29a32e40d5de6c3d911469ccdb3f73Shuzhen Wang static void convertToRegions(cam_rect_t rect, int32_t* region, int weight); 10359a548ac1f29a32e40d5de6c3d911469ccdb3f73Shuzhen Wang static void convertFromRegions(cam_area_t* roi, const camera_metadata_t *settings, 10459a548ac1f29a32e40d5de6c3d911469ccdb3f73Shuzhen Wang uint32_t tag); 10571402bc67b7b2729cad7f970d976be15506cfdc7Shuzhen Wang static bool resetIfNeededROI(cam_area_t* roi, const cam_crop_region_t* scalerCropRegion); 10697e8019457b448a6e2141a49a0f471a467b70dc0Tanmaya Godbole static void convertLandmarks(cam_face_detection_info_t face, int32_t* landmarks); 107662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static int32_t getScalarFormat(int32_t format); 1083fa5d84cc454e0a301fe868d2a9aec3bf631f35cShuzhen Wang static int32_t getSensorSensitivity(int32_t iso_mode); 1091c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole static void captureResultCb(mm_camera_super_buf_t *metadata, 110e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang camera3_stream_buffer_t *buffer, uint32_t frame_number, 111e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang void *userdata); 112625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 113625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int initialize(const camera3_callback_ops_t *callback_ops); 114625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int configureStreams(camera3_stream_configuration_t *stream_list); 115625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int registerStreamBuffers(const camera3_stream_buffer_set_t *buffer_set); 11680e50bfee66172f8a924573247aa99ee72bfe24fShuzhen Wang int processCaptureRequest(camera3_capture_request_t *request); 117e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang void getMetadataVendorTagOps(vendor_tag_query_ops_t* ops); 118e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang void dump(int fd); 11980e50bfee66172f8a924573247aa99ee72bfe24fShuzhen Wang 120662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int setFrameParameters(int frame_id, const camera_metadata_t *settings); 12180e50bfee66172f8a924573247aa99ee72bfe24fShuzhen Wang int translateMetadataToParameters(const camera_metadata_t *settings); 1220e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole camera_metadata_t* translateCbMetadataToResultMetadata(metadata_buffer_t *metadata, 12374f6761b0f475069b59e715fcf8753b1664e0bdbMansoor Aftab nsecs_t timestamp, int32_t request_id); 124662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int getJpegSettings(const camera_metadata_t *settings); 125662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int initParameters(); 12633cb7276f6c4d2eda72253d11cd9242e1f82bf7dShuzhen Wang void deinitParameters(); 1279de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang 1281c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole void captureResultCb(mm_camera_super_buf_t *metadata, 129e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang camera3_stream_buffer_t *buffer, uint32_t frame_number); 1309de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang 131662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole typedef struct { 1320e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole uint8_t fwk_name; 1330e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole uint8_t hal_name; 134662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole } QCameraMap; 135662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole 136625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangprivate: 137625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 138625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int openCamera(); 139625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang int closeCamera(); 140662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int AddSetParmEntryToBatch(parm_buffer_t *p_table, 141662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole cam_intf_parm_type_t paramType, 142662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole uint32_t paramLength, 143662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole void *paramValue); 1440e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole static int8_t lookupHalName(const QCameraMap arr[], 145662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int len, int fwk_name); 1460e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole static int8_t lookupFwkName(const QCameraMap arr[], 147662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole int len, int hal_name); 148625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 149e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang int validateCaptureRequest(camera3_capture_request_t *request); 150e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang 151625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangpublic: 152625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 15366cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru bool needOnlineRotation(); 15466cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru void getThumbnailSize(cam_dimension_t &dim); 15566cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru int getJpegQuality(); 15666cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru int getJpegRotation(); 1570a686661965fcbbfabf2d5e3c2768c9582828226Mansoor Aftab int calcMaxJpegSize(); 15866cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru QCamera3Exif *getExifData(); 15966cadfdce2ea19f4707bf2a595b58bd36fbfdf3bApurva Rajguru 160625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wangprivate: 161625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang camera3_device_t mCameraDevice; 162625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang uint8_t mCameraId; 163625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang mm_camera_vtbl_t *mCameraHandle; 164625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang bool mCameraOpened; 165cd500de28de7d527e4d6b1fbbfbe25bdc58829edShuzhen Wang bool mCameraInitialized; 166625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang camera_metadata_t *mDefaultMetadata[CAMERA3_TEMPLATE_COUNT]; 167625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 168625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang const camera3_callback_ops_t *mCallbackOps; 169625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 170625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang camera3_stream_t *mInputStream; 171625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang QCamera3MetadataChannel *mMetadataChannel; 1729de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang 17333cb7276f6c4d2eda72253d11cd9242e1f82bf7dShuzhen Wang //First request yet to be processed after configureStreams 17433cb7276f6c4d2eda72253d11cd9242e1f82bf7dShuzhen Wang bool mFirstRequest; 1759de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang QCamera3HeapMemory *mParamHeap; 1769de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang parm_buffer_t* mParameters; 1779de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang 1781c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole /* Data structure to store pending request */ 1791c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole typedef struct { 1801c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole camera3_stream_t *stream; 1811c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole camera3_stream_buffer_t *buffer; 1821c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole } RequestedBufferInfo; 1831c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole typedef struct { 1841c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole uint32_t frame_number; 1851c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole uint32_t num_buffers; 18674f6761b0f475069b59e715fcf8753b1664e0bdbMansoor Aftab int32_t request_id; 1871c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole List<RequestedBufferInfo> buffers; 1881c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole } PendingRequestInfo; 1891c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole typedef KeyedVector<camera3_stream_t *, uint32_t> PendingBuffersMap; 1901c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole 1911c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole List<PendingRequestInfo> mPendingRequestsList; 1921c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole PendingBuffersMap mPendingBuffersMap; 1939de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang pthread_mutex_t mRequestLock; 1949de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang pthread_cond_t mRequestCond; 1959de643761e1282fb5af14a9249618efa9d8ac8feShuzhen Wang int mPendingRequest; 19674f6761b0f475069b59e715fcf8753b1664e0bdbMansoor Aftab int32_t mCurrentRequestId; 197e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang 198e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang //mutex for serialized access to camera3_device_ops_t functions 199e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang pthread_mutex_t mMutex; 200e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang 201e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang //mutex to protect the critial section for processCaptureResult 202e6ab32d89cf169705236988f0f74309f914c88b7Shuzhen Wang pthread_mutex_t mCaptureResultLock; 2030e03eb09035f20fd3e45ad4b6be5eb84303377deTanmaya Godbole 204662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole jpeg_settings_t* mJpegSettings; 2053fa5d84cc454e0a301fe868d2a9aec3bf631f35cShuzhen Wang metadata_response_t mMetadataResponse; 2061c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole List<stream_info_t*> mStreamInfo; 2071c6fa865f97afe06b8b9d9520390a37dd86f55e1Tanmaya Godbole 208662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap EFFECT_MODES_MAP[]; 209662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap WHITE_BALANCE_MODES_MAP[]; 210662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap SCENE_MODES_MAP[]; 211662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap FOCUS_MODES_MAP[]; 212662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap ANTIBANDING_MODES_MAP[]; 213e9a0b4995192d264f75543f62efa089845456291Shuzhen Wang static const QCameraMap AE_FLASH_MODE_MAP[]; 214662d6f3c8101a94f45f3b0f892817e062a5c0faaTanmaya Godbole static const QCameraMap FLASH_MODES_MAP[]; 215cd500de28de7d527e4d6b1fbbfbe25bdc58829edShuzhen Wang 216cd500de28de7d527e4d6b1fbbfbe25bdc58829edShuzhen Wang static pthread_mutex_t mCameraSessionLock; 217cd500de28de7d527e4d6b1fbbfbe25bdc58829edShuzhen Wang static unsigned int mCameraSessionActive; 218625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang}; 219625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 220625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang}; // namespace qcamera 221625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang 222625515beb9c1347216a2d261930ceb0d85ba1c47Shuzhen Wang#endif /* __QCAMERA2HARDWAREINTERFACE_H__ */ 223