Ejemplo n.º 1
0
static int fimc_streamon(struct file *filp, void *fh, enum v4l2_buf_type i)
{
	struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
	int ret = -1;

#ifdef CONFIG_SLP_DMABUF
	if (V4L2_TYPE_IS_OUTPUT(i)) {
		ret = fimc_streamon_output(fh);
	} else if (i == V4L2_BUF_TYPE_VIDEO_CAPTURE
		|| i == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
		ret = fimc_streamon_capture(ctrl);
	} else {
		fimc_err("V4L2_BUF_TYPE_VIDEO_CAPTURE and "
			"V4L2_BUF_TYPE_VIDEO_OUTPUT are only supported\n");
		ret = -EINVAL;
	}
#else
	if (i == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
		ret = fimc_streamon_capture(ctrl);
	} else if (i == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
		ret = fimc_streamon_output(fh);
	} else {
		fimc_err("V4L2_BUF_TYPE_VIDEO_CAPTURE and "
			"V4L2_BUF_TYPE_VIDEO_OUTPUT are only supported\n");
		ret = -EINVAL;
	}
#endif

	return ret;
}
Ejemplo n.º 2
0
static int fimc_streamon(struct file *filp, void *fh, enum v4l2_buf_type i)
{
	struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
	int ret = -1;

	if (i == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
		ret = fimc_streamon_capture(ctrl);
	} else if (i == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
		ret = fimc_streamon_output(fh);
	} else {
		fimc_err("V4L2_BUF_TYPE_VIDEO_CAPTURE and "
			"V4L2_BUF_TYPE_VIDEO_OUTPUT are only supported\n");
		ret = -EINVAL;
	}

	return ret;
}
Ejemplo n.º 3
0
static int fimc_streamon(struct file *filp, void *fh, enum v4l2_buf_type i)
{
	struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
	struct s3c_platform_fimc *pdata;
	int ret = -1;

	pdata = to_fimc_plat(ctrl->dev);

	if (i == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
		if (pdata->clk_on)
			pdata->clk_on(to_platform_device(ctrl->dev), ctrl->clk);
		ret = fimc_streamon_capture(ctrl);
	} else if (i == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
		if (pdata->clk_on)
			pdata->clk_on(to_platform_device(ctrl->dev), ctrl->clk);
		ret = fimc_streamon_output(fh);
	} else {
		fimc_err("V4L2_BUF_TYPE_VIDEO_CAPTURE and "
			"V4L2_BUF_TYPE_VIDEO_OUTPUT are only supported\n");
		ret = -EINVAL;
	}

	return ret;
}