@@ -1252,6 +1252,13 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_COLORIMETRY_CLASS: return "Colorimetry Controls";
case V4L2_CID_COLORIMETRY_HDR10_CLL_INFO: return "HDR10 Content Light Info";
case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY: return "HDR10 Mastering Display";
+
+ /* Time of light camera controls */
+ /* Keep the order of the 'case's the same as in v4l2-controls.h! */
+ case V4L2_CID_TOF_CLASS: return "Time of Flight Camera Controls";
+ case V4L2_CID_TOF_PHASE_SEQ: return "TOF Phase Sequence";
+ case V4L2_CID_TOF_FREQ_MOD: return "TOF Frequency Modulation";
+ case V4L2_CID_TOF_TIME_INTEGRATION: return "TOF Time Integration";
default:
return NULL;
}
@@ -1463,6 +1470,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_DETECT_CLASS:
case V4L2_CID_CODEC_STATELESS_CLASS:
case V4L2_CID_COLORIMETRY_CLASS:
+ case V4L2_CID_TOF_CLASS:
*type = V4L2_CTRL_TYPE_CTRL_CLASS;
/* You can neither read nor write these */
*flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY;
@@ -1614,6 +1622,18 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY:
*type = V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY;
break;
+ case V4L2_CID_TOF_PHASE_SEQ:
+ *type = V4L2_CTRL_TYPE_U16;
+ *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
+ break;
+ case V4L2_CID_TOF_FREQ_MOD:
+ *type = V4L2_CTRL_TYPE_U32;
+ *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
+ break;
+ case V4L2_CID_TOF_TIME_INTEGRATION:
+ *type = V4L2_CTRL_TYPE_U16;
+ *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
+ break;
default:
*type = V4L2_CTRL_TYPE_INTEGER;
break;