diff options
Diffstat (limited to 'camera')
-rwxr-xr-x | camera/Android.mk | 4 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapabilities.cpp | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/camera/Android.mk b/camera/Android.mk index ccbbfbe..5f78a9d 100755 --- a/camera/Android.mk +++ b/camera/Android.mk @@ -60,6 +60,10 @@ ifeq ($(BOARD_VENDOR),motorola-omap4) CAMERAHAL_CFLAGS += -DMOTOROLA_CAMERA endif +ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),piranha) + CAMERAHAL_CFLAGS += -DCAMERAHAL_PIRANHA +endif + CAMERAHAL_CFLAGS += -DLOG_TAG=\"CameraHal\" TI_CAMERAHAL_COMMON_INCLUDES := \ diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp index 63bd4c2..72a2380 100644 --- a/camera/OMXCameraAdapter/OMXCapabilities.cpp +++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp @@ -2469,6 +2469,25 @@ status_t OMXCameraAdapter::getCaps(const int sensorId, CameraProperties::Propert CAMHAL_LOGDA("OMX capability query success"); } +#ifdef CAMERAHAL_PIRANHA + char hwrotation[PROPERTY_VALUE_MAX]; + if (property_get("ro.sf.hwrotation", hwrotation, 0) > 0) { + if (caps->tSenMounting.nSenId == 306) { // front camera + caps->tSenMounting.nRotation = atoi(hwrotation); + } else { // back camera + caps->tSenMounting.nRotation = 360 - atoi(hwrotation); + } + } + // missing camera caps + if (caps->tSenMounting.nSenId == 306) { + caps->tPreviewResRange.nWidthMax = 640; + caps->tPreviewResRange.nHeightMax = 480; + caps->nFocalLength = 130; + } else { + caps->nFocalLength = 279; + } +#endif + #ifdef CAMERAHAL_DEBUG _dumpOmxTiCap(sensorId, *caps); #endif |