|
@@ -1300,40 +1300,12 @@ static int ov2680_g_parm(struct v4l2_subdev *sd,
|
|
|
if (dev->fmt_idx >= 0 && dev->fmt_idx < N_RES) {
|
|
|
param->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
|
|
|
param->parm.capture.timeperframe.numerator = 1;
|
|
|
- param->parm.capture.capturemode = dev->run_mode;
|
|
|
param->parm.capture.timeperframe.denominator =
|
|
|
ov2680_res[dev->fmt_idx].fps;
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int ov2680_s_parm(struct v4l2_subdev *sd,
|
|
|
- struct v4l2_streamparm *param)
|
|
|
-{
|
|
|
- struct ov2680_device *dev = to_ov2680_sensor(sd);
|
|
|
- struct i2c_client *client = v4l2_get_subdevdata(sd);
|
|
|
- dev->run_mode = param->parm.capture.capturemode;
|
|
|
-
|
|
|
- v4l2_info(client, "\n%s:run_mode :%x\n", __func__, dev->run_mode);
|
|
|
-
|
|
|
- mutex_lock(&dev->input_lock);
|
|
|
- switch (dev->run_mode) {
|
|
|
- case CI_MODE_VIDEO:
|
|
|
- ov2680_res = ov2680_res_video;
|
|
|
- N_RES = N_RES_VIDEO;
|
|
|
- break;
|
|
|
- case CI_MODE_STILL_CAPTURE:
|
|
|
- ov2680_res = ov2680_res_still;
|
|
|
- N_RES = N_RES_STILL;
|
|
|
- break;
|
|
|
- default:
|
|
|
- ov2680_res = ov2680_res_preview;
|
|
|
- N_RES = N_RES_PREVIEW;
|
|
|
- }
|
|
|
- mutex_unlock(&dev->input_lock);
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
static int ov2680_g_frame_interval(struct v4l2_subdev *sd,
|
|
|
struct v4l2_subdev_frame_interval *interval)
|
|
|
{
|
|
@@ -1388,7 +1360,6 @@ static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
|
|
|
static const struct v4l2_subdev_video_ops ov2680_video_ops = {
|
|
|
.s_stream = ov2680_s_stream,
|
|
|
.g_parm = ov2680_g_parm,
|
|
|
- .s_parm = ov2680_s_parm,
|
|
|
.g_frame_interval = ov2680_g_frame_interval,
|
|
|
};
|
|
|
|