Camera : Removed the conditional issue of the CAMERA_EXIT ioctl in HAL release().
This ioctl is needed to unblock the config thread when its release is about to be invoked from HAL.
CRs-Fixed: 237613
Change-Id: I5d085f8bbba35647d09483e41f48a98f2784b8e7
diff --git a/QualcommCameraHardware.cpp b/QualcommCameraHardware.cpp
index 3376e18..48d8ba1 100644
--- a/QualcommCameraHardware.cpp
+++ b/QualcommCameraHardware.cpp
@@ -2409,20 +2409,15 @@
LINK_jpeg_encoder_join();
deinitRaw();
deinitRawSnapshot();
- {
- Mutex::Autolock l(&mCamframeTimeoutLock);
- if(!camframe_timeout_flag) {
+
+ ctrlCmd.timeout_ms = 5000;
+ ctrlCmd.length = 0;
+ ctrlCmd.type = (uint16_t)CAMERA_EXIT;
+ ctrlCmd.resp_fd = mCameraControlFd; // FIXME: this will be put in by the kernel
+ if (ioctl(mCameraControlFd, MSM_CAM_IOCTL_CTRL_COMMAND, &ctrlCmd) < 0)
+ LOGE("ioctl CAMERA_EXIT fd %d error %s",
+ mCameraControlFd, strerror(errno));
- ctrlCmd.timeout_ms = 5000;
- ctrlCmd.length = 0;
- ctrlCmd.type = (uint16_t)CAMERA_EXIT;
- ctrlCmd.resp_fd = mCameraControlFd; // FIXME: this will be put in by the kernel
- if (ioctl(mCameraControlFd, MSM_CAM_IOCTL_CTRL_COMMAND, &ctrlCmd) < 0)
- LOGE("ioctl CAMERA_EXIT fd %d error %s",
- mCameraControlFd, strerror(errno));
-
- }
- }
LINK_release_cam_conf_thread();
close(mCameraControlFd);
mCameraControlFd = -1;