Loading services/camera/libcameraservice/Camera2Client.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,21 @@ status_t Camera2Client::dump(int fd, const Vector<String16>& args) { getCaptureStreamId()); result.appendFormat(" Recording stream ID: %d\n", getRecordingStreamId()); result.append(" Quirks for this camera:\n"); bool haveQuirk = false; if (p.quirks.triggerAfWithAuto) { result.appendFormat(" triggerAfWithAuto\n"); haveQuirk = true; } if (p.quirks.useZslFormat) { result.appendFormat(" useZslFormat\n"); haveQuirk = true; } if (!haveQuirk) { result.appendFormat(" none\n"); } write(fd, result.string(), result.size()); mStreamingProcessor->dump(fd, args); Loading services/camera/libcameraservice/camera2/Parameters.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ status_t Parameters::initialize(const CameraMetadata *info) { res = buildFastInfo(); if (res != OK) return res; res = buildQuirks(); if (res != OK) return res; camera_metadata_ro_entry_t availableProcessedSizes = staticInfo(ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, 2); if (!availableProcessedSizes.count) return NO_INIT; Loading Loading @@ -891,6 +894,21 @@ status_t Parameters::buildFastInfo() { return OK; } status_t Parameters::buildQuirks() { camera_metadata_ro_entry_t entry; entry = info->find(ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO); quirks.triggerAfWithAuto = (entry.count != 0 && entry.data.u8[0] == 1); ALOGV_IF(quirks.triggerAfWithAuto, "Camera %d: Quirk triggerAfWithAuto enabled", cameraId); entry = info->find(ANDROID_QUIRKS_USE_ZSL_FORMAT); quirks.useZslFormat = (entry.count != 0 && entry.data.u8[0] == 1); ALOGV_IF(quirks.useZslFormat, "Camera %d: Quirk useZslFormat enabled", cameraId); return OK; } camera_metadata_ro_entry_t Parameters::staticInfo(uint32_t tag, size_t minCount, size_t maxCount) const { status_t res; Loading services/camera/libcameraservice/camera2/Parameters.h +3 −1 Original line number Diff line number Diff line Loading @@ -195,8 +195,10 @@ struct Parameters { // Sets up default parameters status_t initialize(const CameraMetadata *info); // Build fast device info // Build fast-access device static info from static info status_t buildFastInfo(); // Query for quirks from static info status_t buildQuirks(); // Get entry from camera static characteristics information. min/maxCount // are used for error checking the number of values in the entry. 0 for Loading services/camera/libcameraservice/camera2/ZslProcessor.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -161,9 +161,12 @@ status_t ZslProcessor::updateStream(const Parameters ¶ms) { if (mZslStreamId == NO_STREAM) { // Create stream for HAL production // TODO: Sort out better way to select resolution for ZSL int streamType = params.quirks.useZslFormat ? (int)CAMERA2_HAL_PIXEL_FORMAT_ZSL : (int)HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED; res = device->createStream(mZslWindow, params.fastInfo.arrayWidth, params.fastInfo.arrayHeight, CAMERA2_HAL_PIXEL_FORMAT_ZSL, 0, streamType, 0, &mZslStreamId); if (res != OK) { ALOGE("%s: Camera %d: Can't create output stream for ZSL: " Loading Loading
services/camera/libcameraservice/Camera2Client.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,21 @@ status_t Camera2Client::dump(int fd, const Vector<String16>& args) { getCaptureStreamId()); result.appendFormat(" Recording stream ID: %d\n", getRecordingStreamId()); result.append(" Quirks for this camera:\n"); bool haveQuirk = false; if (p.quirks.triggerAfWithAuto) { result.appendFormat(" triggerAfWithAuto\n"); haveQuirk = true; } if (p.quirks.useZslFormat) { result.appendFormat(" useZslFormat\n"); haveQuirk = true; } if (!haveQuirk) { result.appendFormat(" none\n"); } write(fd, result.string(), result.size()); mStreamingProcessor->dump(fd, args); Loading
services/camera/libcameraservice/camera2/Parameters.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ status_t Parameters::initialize(const CameraMetadata *info) { res = buildFastInfo(); if (res != OK) return res; res = buildQuirks(); if (res != OK) return res; camera_metadata_ro_entry_t availableProcessedSizes = staticInfo(ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, 2); if (!availableProcessedSizes.count) return NO_INIT; Loading Loading @@ -891,6 +894,21 @@ status_t Parameters::buildFastInfo() { return OK; } status_t Parameters::buildQuirks() { camera_metadata_ro_entry_t entry; entry = info->find(ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO); quirks.triggerAfWithAuto = (entry.count != 0 && entry.data.u8[0] == 1); ALOGV_IF(quirks.triggerAfWithAuto, "Camera %d: Quirk triggerAfWithAuto enabled", cameraId); entry = info->find(ANDROID_QUIRKS_USE_ZSL_FORMAT); quirks.useZslFormat = (entry.count != 0 && entry.data.u8[0] == 1); ALOGV_IF(quirks.useZslFormat, "Camera %d: Quirk useZslFormat enabled", cameraId); return OK; } camera_metadata_ro_entry_t Parameters::staticInfo(uint32_t tag, size_t minCount, size_t maxCount) const { status_t res; Loading
services/camera/libcameraservice/camera2/Parameters.h +3 −1 Original line number Diff line number Diff line Loading @@ -195,8 +195,10 @@ struct Parameters { // Sets up default parameters status_t initialize(const CameraMetadata *info); // Build fast device info // Build fast-access device static info from static info status_t buildFastInfo(); // Query for quirks from static info status_t buildQuirks(); // Get entry from camera static characteristics information. min/maxCount // are used for error checking the number of values in the entry. 0 for Loading
services/camera/libcameraservice/camera2/ZslProcessor.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -161,9 +161,12 @@ status_t ZslProcessor::updateStream(const Parameters ¶ms) { if (mZslStreamId == NO_STREAM) { // Create stream for HAL production // TODO: Sort out better way to select resolution for ZSL int streamType = params.quirks.useZslFormat ? (int)CAMERA2_HAL_PIXEL_FORMAT_ZSL : (int)HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED; res = device->createStream(mZslWindow, params.fastInfo.arrayWidth, params.fastInfo.arrayHeight, CAMERA2_HAL_PIXEL_FORMAT_ZSL, 0, streamType, 0, &mZslStreamId); if (res != OK) { ALOGE("%s: Camera %d: Can't create output stream for ZSL: " Loading