static int s3c_fimc_v4l2_s_parm(struct file *filp, void *fh,
                                struct v4l2_streamparm *a)
{
    struct s3c_fimc_control *ctrl = (struct s3c_fimc_control *) fh;

    if (a->parm.capture.capturemode == V4L2_MODE_HIGHQUALITY) {
//		info("changing to max resolution\n");
        s3c_fimc_change_resolution(ctrl, CAM_RES_MAX);
    } else {
//		info("changing to default resolution\n");
        s3c_fimc_change_resolution(ctrl, CAM_RES_DEFAULT);
    }

    s3c_fimc_restart_dma(ctrl);

    return 0;
}
Ejemplo n.º 2
0
void s3c_fimc_init_camera(struct s3c_fimc_control *ctrl)
{
	//printk("[CAM]s3c_fimc_init_camera");	
	struct s3c_fimc_camera *cam = ctrl->in_cam;
	
	if (cam && cam->id != S3C_FIMC_TPID && !cam->initialized) {
		//printk("[CAM]I2C_CAM_INIT.\n");
		s3c_fimc_i2c_command(ctrl, I2C_CAM_INIT, 0);
		s3c_fimc_change_resolution(ctrl, CAM_RES_DEFAULT);
		cam->initialized = 1;
	}
}