Message ID | de44db636f0e3f5bea2357aa6a34531fe0c34f08.1715871189.git.vkh@melexis.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: i2c: mlx7502x ToF camera support | expand |
Hi Volodymyr, Thank you for your patch. On 5/16/24 18:41, Volodymyr Kharuk wrote: > Add V4L2_CID_CAMERA_TRIGGER_MODE as a menu item control to set > trigger mode. Also proposed some standard modes. > Another item is V4L2_CID_CAMERA_TRIGGER as a button to send > trigger in V4L2_TRIGGER_MODE_INTERNAL mode. > > Signed-off-by: Volodymyr Kharuk <vkh@melexis.com> This is very interesting. As I understand this control allows to change what triggers sensor acquisition. May I ask what the different modes do ? We had a discussion previously with Laurent, Sakari and Dave (adding him as cc btw) about a "slave mode" control [1] for the vgxy61, is it something similar to the trigger mode ? [1] https://lore.kernel.org/linux-media/c610a2c9-31b1-1950-00fa-a6b3fd3517a1@foss.st.com/ > --- > include/uapi/linux/v4l2-controls.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > index 99c3f5e99da7..7901f40a1bd8 100644 > --- a/include/uapi/linux/v4l2-controls.h > +++ b/include/uapi/linux/v4l2-controls.h > @@ -1087,6 +1087,14 @@ enum v4l2_auto_focus_range { > > #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) > > +#define V4L2_CID_CAMERA_TRIGGER (V4L2_CID_CAMERA_CLASS_BASE + 37) > +#define V4L2_CID_CAMERA_TRIGGER_MODE (V4L2_CID_CAMERA_CLASS_BASE + 38) > +enum v4l2_trigger_mode { > + V4L2_TRIGGER_MODE_CONTINUOUS = 0, > + V4L2_TRIGGER_MODE_INTERNAL = 1, > + V4L2_TRIGGER_MODE_EXTERNAL = 2, > +}; > + > /* FM Modulator class control IDs */ > > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
Hi Benjamin, Thank you for your question. On Mon, May 20, 2024 at 11:19:39AM +0200, Benjamin Mugnier wrote: > As I understand this control allows to change what triggers sensor > acquisition. > May I ask what the different modes do ? V4L2_TRIGGER_MODE_CONTINUOUS - inner self triggering V4L2_TRIGGER_MODE_INTERNAL - trigger the acquisition by sending i2c command to sensor using V4L2_CID_CAMERA_TRIGGER control V4L2_TRIGGER_MODE_EXTERNAL - trigger the acquisition by sending the pulse. The master of pulse could be another sensor or gpio. > > We had a discussion previously with Laurent, Sakari and Dave (adding him > as cc btw) about a "slave mode" control [1] for the vgxy61, is it > something similar to the trigger mode ? V4L2_TRIGGER_MODE_EXTERNAL mode can be part of "slave mode" control for the vgxy61. > > [1] > https://lore.kernel.org/linux-media/c610a2c9-31b1-1950-00fa-a6b3fd3517a1@foss.st.com/ > > > --- > > include/uapi/linux/v4l2-controls.h | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > > index 99c3f5e99da7..7901f40a1bd8 100644 > > --- a/include/uapi/linux/v4l2-controls.h > > +++ b/include/uapi/linux/v4l2-controls.h > > @@ -1087,6 +1087,14 @@ enum v4l2_auto_focus_range { > > > > #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) > > > > +#define V4L2_CID_CAMERA_TRIGGER (V4L2_CID_CAMERA_CLASS_BASE + 37) > > +#define V4L2_CID_CAMERA_TRIGGER_MODE (V4L2_CID_CAMERA_CLASS_BASE + 38) > > +enum v4l2_trigger_mode { > > + V4L2_TRIGGER_MODE_CONTINUOUS = 0, > > + V4L2_TRIGGER_MODE_INTERNAL = 1, > > + V4L2_TRIGGER_MODE_EXTERNAL = 2, > > +}; > > + > > /* FM Modulator class control IDs */ > > > > #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) > > -- > Regards, > > Benjamin
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 99c3f5e99da7..7901f40a1bd8 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1087,6 +1087,14 @@ enum v4l2_auto_focus_range { #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) +#define V4L2_CID_CAMERA_TRIGGER (V4L2_CID_CAMERA_CLASS_BASE + 37) +#define V4L2_CID_CAMERA_TRIGGER_MODE (V4L2_CID_CAMERA_CLASS_BASE + 38) +enum v4l2_trigger_mode { + V4L2_TRIGGER_MODE_CONTINUOUS = 0, + V4L2_TRIGGER_MODE_INTERNAL = 1, + V4L2_TRIGGER_MODE_EXTERNAL = 2, +}; + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
Add V4L2_CID_CAMERA_TRIGGER_MODE as a menu item control to set trigger mode. Also proposed some standard modes. Another item is V4L2_CID_CAMERA_TRIGGER as a button to send trigger in V4L2_TRIGGER_MODE_INTERNAL mode. Signed-off-by: Volodymyr Kharuk <vkh@melexis.com> --- include/uapi/linux/v4l2-controls.h | 8 ++++++++ 1 file changed, 8 insertions(+)