media: stm32-dcmi: add g/s_parm framerate support
Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
e0019f7101
commit
aebd90aa32
|
@ -1164,6 +1164,22 @@ static int dcmi_enum_framesizes(struct file *file, void *fh,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int dcmi_g_parm(struct file *file, void *priv,
|
||||
struct v4l2_streamparm *p)
|
||||
{
|
||||
struct stm32_dcmi *dcmi = video_drvdata(file);
|
||||
|
||||
return v4l2_g_parm_cap(video_devdata(file), dcmi->entity.subdev, p);
|
||||
}
|
||||
|
||||
static int dcmi_s_parm(struct file *file, void *priv,
|
||||
struct v4l2_streamparm *p)
|
||||
{
|
||||
struct stm32_dcmi *dcmi = video_drvdata(file);
|
||||
|
||||
return v4l2_s_parm_cap(video_devdata(file), dcmi->entity.subdev, p);
|
||||
}
|
||||
|
||||
static int dcmi_enum_frameintervals(struct file *file, void *fh,
|
||||
struct v4l2_frmivalenum *fival)
|
||||
{
|
||||
|
@ -1266,6 +1282,9 @@ static const struct v4l2_ioctl_ops dcmi_ioctl_ops = {
|
|||
.vidioc_g_input = dcmi_g_input,
|
||||
.vidioc_s_input = dcmi_s_input,
|
||||
|
||||
.vidioc_g_parm = dcmi_g_parm,
|
||||
.vidioc_s_parm = dcmi_s_parm,
|
||||
|
||||
.vidioc_enum_framesizes = dcmi_enum_framesizes,
|
||||
.vidioc_enum_frameintervals = dcmi_enum_frameintervals,
|
||||
|
||||
|
|
Loading…
Reference in New Issue