QCamera2: Increase camera daemon start timeout

Issue:
Camera is not launching for the first time as camera
daemon is not up.

Fix:
Increase camera daemon start timeout

Change-Id: I2dd8ae904145ad5c067b27014cdb95c28084accf
This commit is contained in:
Santhosh Kumar Thimmanna Bhattar 2017-09-26 14:19:09 +05:30 committed by Isaac Chen
parent 2a96f575f2
commit d383bd95ab

View file

@ -40,6 +40,8 @@
#define IOCTL_H <SYSTEM_HEADER_PREFIX/ioctl.h>
#include IOCTL_H
#define EXTRA_ENTRY 6
// Camera dependencies
#include "mm_camera_dbg.h"
#include "mm_camera_interface.h"
@ -1784,7 +1786,7 @@ uint8_t get_num_of_cameras()
cfg.cfg.setting = NULL;
if (ioctl(sd_fd, VIDIOC_MSM_SENSOR_INIT_CFG, &cfg) < 0) {
LOGI("failed...Camera Daemon may not up so try again");
for(i = 0; i < MM_CAMERA_EVT_ENTRY_MAX; i++) {
for(i = 0; i < (MM_CAMERA_EVT_ENTRY_MAX + EXTRA_ENTRY); i++) {
if (ioctl(sd_fd, VIDIOC_MSM_SENSOR_INIT_CFG, &cfg) < 0) {
LOGI("failed...Camera Daemon may not up so try again");
continue;
@ -1838,7 +1840,7 @@ uint8_t get_num_of_cameras()
if(entity.type == MEDIA_ENT_T_DEVNODE_V4L && entity.group_id == QCAMERA_VNODE_GROUP_ID) {
strlcpy(g_cam_ctrl.video_dev_name[num_cameras],
entity.name, sizeof(entity.name));
LOGI("dev_info[id=%d,name='%s']\n",
LOGE("dev_info[id=%d,name='%s']\n",
(int)num_cameras, g_cam_ctrl.video_dev_name[num_cameras]);
num_cameras++;
break;
@ -1853,7 +1855,7 @@ uint8_t get_num_of_cameras()
sort_camera_info(g_cam_ctrl.num_cam);
/* unlock the mutex */
pthread_mutex_unlock(&g_intf_lock);
LOGI("num_cameras=%d\n", (int)g_cam_ctrl.num_cam);
LOGE("num_cameras=%d\n", (int)g_cam_ctrl.num_cam);
return(uint8_t)g_cam_ctrl.num_cam;
}