/*
- * Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
int prp_vf_sdc_deselect(void *private)
{
cam_data *cam;
- int err = 0;
- err = prpvf_stop(private);
if (private) {
cam = (cam_data *) private;
cam->vf_enable_csi = NULL;
cam->vf_disable_csi = NULL;
}
- return err;
+ return 0;
}
/*!
/*
- * Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
int prp_vf_sdc_deselect_bg(void *private)
{
cam_data *cam = (cam_data *) private;
- int err = 0;
- err = prpvf_stop(private);
if (cam) {
cam->vf_start_sdc = NULL;
cam->vf_enable_csi = NULL;
cam->vf_disable_csi = NULL;
}
- return err;
+ return 0;
}
/*!
if (cam->capture_on == false)
return 0;
- if (cam->enc_disable)
- err = cam->enc_disable(cam);
- if (cam->enc_disable_csi) {
- err = cam->enc_disable_csi(cam);
- if (err != 0)
- return err;
+ if (strcmp(mxc_capture_inputs[cam->current_input].name,
+ "CSI MEM") == 0) {
+ if (cam->enc_disable_csi) {
+ err = cam->enc_disable_csi(cam);
+ if (err != 0)
+ return err;
+ }
+ if (cam->enc_disable) {
+ err = cam->enc_disable(cam);
+ if (err != 0)
+ return err;
+ }
+ } else if (strcmp(mxc_capture_inputs[cam->current_input].name,
+ "CSI IC MEM") == 0) {
+ if (cam->enc_disable) {
+ err = cam->enc_disable(cam);
+ if (err != 0)
+ return err;
+ }
+ if (cam->enc_disable_csi) {
+ err = cam->enc_disable_csi(cam);
+ if (err != 0)
+ return err;
+ }
}
mxc_free_frames(cam);
if (err != 0)
return err;
- err = cam->vf_start_sdc(cam);
- if (err != 0)
- return err;
+ if (cam->vf_start_sdc) {
+ err = cam->vf_start_sdc(cam);
+ if (err != 0)
+ return err;
+ }
if (cam->vf_enable_csi)
err = cam->vf_enable_csi(cam);
{
int err = 0;
- pr_debug("MVC: stop preview\n");
-
- if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY)
- err = prp_vf_sdc_deselect(cam);
- else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_PRIMARY)
- err = prp_vf_sdc_deselect_bg(cam);
+ if (cam->vf_stop_sdc) {
+ err = cam->vf_stop_sdc(cam);
+ if (err != 0)
+ return err;
+ }
if (cam->vf_disable_csi) {
err = cam->vf_disable_csi(cam);
return err;
}
+ if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_OVERLAY)
+ err = prp_vf_sdc_deselect(cam);
+ else if (cam->v4l2_fb.flags == V4L2_FBUF_FLAG_PRIMARY)
+ err = prp_vf_sdc_deselect_bg(cam);
+
return err;
}
}
/* for the case somebody hit the ctrl C */
- if (cam->overlay_pid == current->pid) {
+ if (cam->overlay_pid == current->pid && cam->overlay_on) {
err = stop_preview(cam);
cam->overlay_on = false;
}