summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDaniel Levin <dendy@ti.com>2012-08-22 14:35:44 +0300
committerDaniel Levin <dendy@ti.com>2012-10-10 18:55:48 +0300
commit11b978d6aeb69edeca9e86fc4172a6c44c5ef5d6 (patch)
tree1917ad7ec012662930a181a4e524c2d3cf2053ad /camera
parentf41b6103b9dd7f89d07787ba087fc6ff8e4ce511 (diff)
downloadhardware_ti_omap4-11b978d6aeb69edeca9e86fc4172a6c44c5ef5d6.zip
hardware_ti_omap4-11b978d6aeb69edeca9e86fc4172a6c44c5ef5d6.tar.gz
hardware_ti_omap4-11b978d6aeb69edeca9e86fc4172a6c44c5ef5d6.tar.bz2
CameraHal: OMX: Reset component buffer alloc
Need to reset ComponentBufferAllocation to default when we deinitialize internal buffers in case where subsequent capture or reprocess will be using default buffers. Change-Id: I036908b8cf01d20329a9bfe9a653906f4483aa27 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com> Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/OMXCameraAdapter/OMXCapture.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp
index 000960c..83e9703 100644
--- a/camera/OMXCameraAdapter/OMXCapture.cpp
+++ b/camera/OMXCameraAdapter/OMXCapture.cpp
@@ -1667,6 +1667,20 @@ status_t OMXCameraAdapter::deinitInternalBuffers(OMX_U32 portIndex)
return -EINVAL;
}
+ OMX_TI_PARAM_COMPONENTBUFALLOCTYPE bufferalloc;
+ OMX_INIT_STRUCT_PTR (&bufferalloc, OMX_TI_PARAM_COMPONENTBUFALLOCTYPE);
+ bufferalloc.nPortIndex = portIndex;
+ bufferalloc.eBufType = OMX_TI_BufferTypeDefault;
+ bufferalloc.nAllocWidth = 1;
+ bufferalloc.nAllocLines = 1;
+ eError = OMX_SetParameter(mCameraAdapterParameters.mHandleComp,
+ (OMX_INDEXTYPE) OMX_TI_IndexParamComponentBufferAllocation,
+ &bufferalloc);
+ if (eError!=OMX_ErrorNone) {
+ CAMHAL_LOGEB("OMX_SetParameter - %x", eError);
+ return -EINVAL;
+ }
+
return Utils::ErrorUtils::omxToAndroidError(eError);
}