gsteamer uses S_FMT ioctl to set the resolution instead of using
S_PARM ioctl. The S_PARM ioctl depends on the capture mode which is
not in the common way.
This patch uses a common method to set the picture resulotion.
Signed-off-by: Robby Cai <robby.cai@nxp.com>
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *fmt)
{
- /* TODO */
- return 0;
+ struct mxc_mipi_csi2_dev *csi2dev = sd_to_mxc_mipi_csi2_dev(sd);
+ struct v4l2_subdev *sensor_sd = csi2dev->sensor_sd;
+
+ if (fmt->pad)
+ return -EINVAL;
+
+ return v4l2_subdev_call(sensor_sd, pad, set_fmt, NULL, fmt);
}
static int mipi_csis_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a)