add(media): add mipi switch and sensor sc202cs. [MIPI_SWITCH][CAMERA_V1.2]
This commit is contained in:
@@ -2584,6 +2584,10 @@ static int __vin_s_input(struct vin_core *vinc, unsigned int i)
|
||||
vinc->exp_gain.exp_val = info->exp;
|
||||
vinc->exp_gain.gain_val = info->gain;
|
||||
vinc->stream_idx = info->stream_seq + 2;
|
||||
/*check link of isp and mipi-vc when mipi-vc enable*/
|
||||
if ((vinc->csi_ch != 0xff) && (vinc->csi_ch & 0x10)) {
|
||||
info->isp_id[vinc->csi_ch & 0xf] = vinc->isp_sel;
|
||||
}
|
||||
}
|
||||
|
||||
if (cap->pipe.sd[VIN_IND_MIPI] != NULL) {
|
||||
@@ -4309,8 +4313,28 @@ int sensor_flip_option(struct vin_vid_cap *cap, struct v4l2_control c)
|
||||
int input_seq;
|
||||
int sensor_fmt_code;
|
||||
int ret, i;
|
||||
struct sensor_vc_flip sensor_set_flip;
|
||||
|
||||
/*It need sent isp_id to sensor when enable mipi-vc, so filp cmd
|
||||
* need to sent by v4l2_subdev_call not v4l2_s_ctrl*/
|
||||
if ((cap->vinc->csi_ch != 0xff) && (cap->vinc->csi_ch & 0x10)) {
|
||||
sensor_set_flip.isp_id = cap->vinc->isp_sel;
|
||||
sensor_set_flip.value = c.value;
|
||||
switch (c.id) {
|
||||
case V4L2_CID_VFLIP:
|
||||
ret = v4l2_subdev_call(sensor, core,
|
||||
ioctl, SET_VFLIP, &sensor_set_flip);
|
||||
break;
|
||||
case V4L2_CID_HFLIP:
|
||||
ret = v4l2_subdev_call(sensor, core,
|
||||
ioctl, SET_HFLIP, &sensor_set_flip);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/*not mipi-vc mode*/
|
||||
ret = v4l2_s_ctrl(NULL, sensor->ctrl_handler, &c);
|
||||
}
|
||||
|
||||
ret = v4l2_s_ctrl(NULL, sensor->ctrl_handler, &c);
|
||||
ret = v4l2_subdev_call(sensor, core, ioctl, VIDIOC_VIN_GET_SENSOR_CODE, &sensor_fmt_code);
|
||||
if (ret < 0) {
|
||||
vin_err("get sensor mbus code fail");
|
||||
|
||||
Reference in New Issue
Block a user