|
@@ -185,6 +185,9 @@ static int cam_sensor_handle_res_info(struct cam_sensor_res_info *res_info,
|
|
if (res_info->valid_param_mask & CAM_SENSOR_FEATURE_MASK)
|
|
if (res_info->valid_param_mask & CAM_SENSOR_FEATURE_MASK)
|
|
s_ctrl->sensor_res[idx].feature_mask =
|
|
s_ctrl->sensor_res[idx].feature_mask =
|
|
res_info->params[0];
|
|
res_info->params[0];
|
|
|
|
+
|
|
|
|
+ if (res_info->valid_param_mask & CAM_SENSOR_NUM_BATCHED_FRAMES)
|
|
|
|
+ s_ctrl->num_batched_frames = res_info->params[1];
|
|
}
|
|
}
|
|
|
|
|
|
s_ctrl->is_res_info_updated = true;
|
|
s_ctrl->is_res_info_updated = true;
|
|
@@ -1265,6 +1268,7 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl,
|
|
s_ctrl->is_stopped_by_user = false;
|
|
s_ctrl->is_stopped_by_user = false;
|
|
s_ctrl->last_updated_req = 0;
|
|
s_ctrl->last_updated_req = 0;
|
|
s_ctrl->last_applied_req = 0;
|
|
s_ctrl->last_applied_req = 0;
|
|
|
|
+ s_ctrl->num_batched_frames = 0;
|
|
memset(s_ctrl->sensor_res, 0, sizeof(s_ctrl->sensor_res));
|
|
memset(s_ctrl->sensor_res, 0, sizeof(s_ctrl->sensor_res));
|
|
CAM_INFO(CAM_SENSOR,
|
|
CAM_INFO(CAM_SENSOR,
|
|
"CAM_ACQUIRE_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x",
|
|
"CAM_ACQUIRE_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x",
|
|
@@ -1394,11 +1398,12 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl,
|
|
CAM_CONVERT_TIMESTAMP_FORMAT(ts, hrs, min, sec, ms);
|
|
CAM_CONVERT_TIMESTAMP_FORMAT(ts, hrs, min, sec, ms);
|
|
|
|
|
|
CAM_INFO(CAM_SENSOR,
|
|
CAM_INFO(CAM_SENSOR,
|
|
- "%llu:%llu:%llu.%llu CAM_START_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x",
|
|
|
|
|
|
+ "%llu:%llu:%llu.%llu CAM_START_DEV Success for %s sensor_id:0x%x,sensor_slave_addr:0x%x num_batched_frames:%d",
|
|
hrs, min, sec, ms,
|
|
hrs, min, sec, ms,
|
|
s_ctrl->sensor_name,
|
|
s_ctrl->sensor_name,
|
|
s_ctrl->sensordata->slave_info.sensor_id,
|
|
s_ctrl->sensordata->slave_info.sensor_id,
|
|
- s_ctrl->sensordata->slave_info.sensor_slave_addr);
|
|
|
|
|
|
+ s_ctrl->sensordata->slave_info.sensor_slave_addr,
|
|
|
|
+ s_ctrl->num_batched_frames);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case CAM_STOP_DEV: {
|
|
case CAM_STOP_DEV: {
|
|
@@ -1558,7 +1563,10 @@ int cam_sensor_publish_dev_info(struct cam_req_mgr_device_info *info)
|
|
|
|
|
|
info->dev_id = CAM_REQ_MGR_DEVICE_SENSOR;
|
|
info->dev_id = CAM_REQ_MGR_DEVICE_SENSOR;
|
|
strlcpy(info->name, CAM_SENSOR_NAME, sizeof(info->name));
|
|
strlcpy(info->name, CAM_SENSOR_NAME, sizeof(info->name));
|
|
- if (s_ctrl->pipeline_delay >= 1 && s_ctrl->pipeline_delay <= 3) {
|
|
|
|
|
|
+ if (s_ctrl->num_batched_frames >= 2) {
|
|
|
|
+ info->p_delay = 1;
|
|
|
|
+ info->m_delay = s_ctrl->modeswitch_delay;
|
|
|
|
+ } else if (s_ctrl->pipeline_delay >= 1 && s_ctrl->pipeline_delay <= 3) {
|
|
info->p_delay = s_ctrl->pipeline_delay;
|
|
info->p_delay = s_ctrl->pipeline_delay;
|
|
info->m_delay = s_ctrl->modeswitch_delay;
|
|
info->m_delay = s_ctrl->modeswitch_delay;
|
|
} else {
|
|
} else {
|
|
@@ -1567,6 +1575,9 @@ int cam_sensor_publish_dev_info(struct cam_req_mgr_device_info *info)
|
|
}
|
|
}
|
|
info->trigger = CAM_TRIGGER_POINT_SOF;
|
|
info->trigger = CAM_TRIGGER_POINT_SOF;
|
|
|
|
|
|
|
|
+ CAM_DBG(CAM_REQ, "num batched frames %d p_delay is %d",
|
|
|
|
+ s_ctrl->num_batched_frames, info->p_delay);
|
|
|
|
+
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|