summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2015-08-15 13:22:46 +0200
committerZiyan <jaraidaniel@gmail.com>2015-08-15 21:23:04 +0200
commit395c41ee4968f896496f5bf5a0cb48a1d2665158 (patch)
treef6aa0d8d90b1104bfe47d27f8a9ec71e813cb151
parentafb64fc51d323506f686330d2b1c5474589b6ee3 (diff)
downloadhardware_ti_omap4-395c41ee4968f896496f5bf5a0cb48a1d2665158.zip
hardware_ti_omap4-395c41ee4968f896496f5bf5a0cb48a1d2665158.tar.gz
hardware_ti_omap4-395c41ee4968f896496f5bf5a0cb48a1d2665158.tar.bz2
camera: add support for espresso
Adds support for camera on the Galaxy Tab 2. Change-Id: I8580dac218593b31e789f372ebb1f294d66cd5c3
-rwxr-xr-xcamera/Android.mk4
-rw-r--r--camera/OMXCameraAdapter/OMXCapabilities.cpp19
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