diff options
-rw-r--r-- | libcamera2/ExynosCamera2.cpp | 17 | ||||
-rw-r--r-- | libcamera2/ExynosCameraHWInterface2.cpp | 3 | ||||
-rw-r--r-- | libhwc/hwc.cpp | 6 |
3 files changed, 21 insertions, 5 deletions
diff --git a/libcamera2/ExynosCamera2.cpp b/libcamera2/ExynosCamera2.cpp index f3bab00..b57c477 100644 --- a/libcamera2/ExynosCamera2.cpp +++ b/libcamera2/ExynosCamera2.cpp @@ -393,7 +393,7 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, // android.info - int32_t hardwareLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL; + int32_t hardwareLevel = ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED; ADD_OR_SIZE(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL, &hardwareLevel, 1); @@ -425,6 +425,11 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, ANDROID_LENS_FACING_FRONT : ANDROID_LENS_FACING_BACK; ADD_OR_SIZE(ANDROID_LENS_FACING, &lensFacing, 1); + // android.request + static const int32_t maxNumOutputStreams[] = {1, 3, 1}; + ADD_OR_SIZE(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, maxNumOutputStreams, + sizeof(maxNumOutputStreams)/sizeof(int32_t)); + // android.sensor ADD_OR_SIZE(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, Sensor::kExposureTimeRange, 2); @@ -449,7 +454,9 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, m_curCameraInfo->sensorW, m_curCameraInfo->sensorH }; ADD_OR_SIZE(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, pixelArraySize, 2); - ADD_OR_SIZE(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, pixelArraySize,2); + + int32_t activeArraySize[4] = { 0, 0, pixelArraySize[0], pixelArraySize[1]}; + ADD_OR_SIZE(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, activeArraySize,4); ADD_OR_SIZE(ANDROID_SENSOR_INFO_WHITE_LEVEL, &Sensor::kMaxRawValue, 1); @@ -461,6 +468,10 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, ADD_OR_SIZE(ANDROID_SENSOR_BLACK_LEVEL_PATTERN, blackLevelPattern, sizeof(blackLevelPattern)/sizeof(int32_t)); + static const int32_t orientation[1] = {0}; + ADD_OR_SIZE(ANDROID_SENSOR_ORIENTATION, + orientation, 1); + //TODO: sensor color calibration fields // android.flash @@ -715,6 +726,8 @@ status_t ExynosCamera2::constructDefaultRequest( /** android.sensor */ + static const int64_t defaultExposureTime = 8000000LL; // 1/125 s + ADD_OR_SIZE(ANDROID_SENSOR_EXPOSURE_TIME, &defaultExposureTime, 1); static const int64_t frameDuration = 33333333L; // 1/30 s ADD_OR_SIZE(ANDROID_SENSOR_FRAME_DURATION, &frameDuration, 1); diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp index 6c0739b..437c45b 100644 --- a/libcamera2/ExynosCameraHWInterface2.cpp +++ b/libcamera2/ExynosCameraHWInterface2.cpp @@ -2415,6 +2415,7 @@ int ExynosCameraHWInterface2::setNotifyCallback(camera2_notify_callback notify_c int ExynosCameraHWInterface2::getMetadataVendorTagOps(vendor_tag_query_ops_t **ops) { ALOGV("DEBUG(%s):", __FUNCTION__); + *ops = NULL; return 0; } @@ -6406,7 +6407,7 @@ static int HAL2_camera_device_open(const struct hw_module_t* module, Mutex::Autolock lock(g_camera_mutex); if (g_camera_vaild) { ALOGE("ERR(%s): Can't open, other camera is in use", __FUNCTION__); - return -EBUSY; + return -EUSERS; } g_camera_vaild = false; ALOGD("\n\n>>> I'm Samsung's CameraHAL_2(ID:%d) <<<\n\n", cameraId); diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp index 0e1477f..546b047 100644 --- a/libhwc/hwc.cpp +++ b/libhwc/hwc.cpp @@ -274,6 +274,8 @@ static enum s3c_fb_pixel_format exynos5_format_to_s3c_format(int format) return S3C_FB_PIXEL_FORMAT_RGBA_8888; case HAL_PIXEL_FORMAT_RGBX_8888: return S3C_FB_PIXEL_FORMAT_RGBX_8888; + case HAL_PIXEL_FORMAT_RGB_565: + return S3C_FB_PIXEL_FORMAT_RGB_565; case HAL_PIXEL_FORMAT_BGRA_8888: return S3C_FB_PIXEL_FORMAT_BGRA_8888; default: @@ -399,11 +401,11 @@ static bool exynos5_supports_gscaler(hwc_layer_1_t &layer, int format, dst_crop_w_aligned(dest_w) && handle->stride <= max_w && handle->stride % GSC_W_ALIGNMENT == 0 && - src_w <= dest_w * max_downscale && + src_w < dest_w * max_downscale && dest_w <= src_w * max_upscale && handle->vstride <= max_h && handle->vstride % GSC_H_ALIGNMENT == 0 && - src_h <= dest_h * max_downscale && + src_h < dest_h * max_downscale && dest_h <= src_h * max_upscale && // per 46.2 (!rot90or270 || layer.sourceCrop.top % 2 == 0) && |