aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeong-Seok Yang <jseok.yang@samsung.com>2010-09-03 06:43:00 +0900
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:43:54 -0800
commitc442f838e276ee98f635e4205d4d3c6f86325100 (patch)
tree66245f167c2fd5c4c4bd91b246c871d430678aac
parent612180c2d5cf1a52a64d4eb399fbaf1b95edd214 (diff)
downloadkernel_samsung_crespo-c442f838e276ee98f635e4205d4d3c6f86325100.zip
kernel_samsung_crespo-c442f838e276ee98f635e4205d4d3c6f86325100.tar.gz
kernel_samsung_crespo-c442f838e276ee98f635e4205d4d3c6f86325100.tar.bz2
S5PC11X: FIMC: added supporting s_ext_ctrls function.
added supporting s_ext_ctrls function in only capture devices. Signed-off-by: Jeong-Seok Yang <jseok.yang@samsung.com> Change-Id: Ib90fd82104df66a6e57b3177e9ae77c77d83e85f
-rw-r--r--drivers/media/video/samsung/fimc/fimc.h1
-rw-r--r--drivers/media/video/samsung/fimc/fimc_capture.c15
-rw-r--r--drivers/media/video/samsung/fimc/fimc_v4l2.c17
3 files changed, 33 insertions, 0 deletions
diff --git a/drivers/media/video/samsung/fimc/fimc.h b/drivers/media/video/samsung/fimc/fimc.h
index e05d5f5..71872ac 100644
--- a/drivers/media/video/samsung/fimc/fimc.h
+++ b/drivers/media/video/samsung/fimc/fimc.h
@@ -458,6 +458,7 @@ extern int fimc_reqbufs_capture(void *fh, struct v4l2_requestbuffers *b);
extern int fimc_querybuf_capture(void *fh, struct v4l2_buffer *b);
extern int fimc_g_ctrl_capture(void *fh, struct v4l2_control *c);
extern int fimc_s_ctrl_capture(void *fh, struct v4l2_control *c);
+extern int fimc_s_ext_ctrls_capture(void *fh, struct v4l2_ext_controls *c);
extern int fimc_cropcap_capture(void *fh, struct v4l2_cropcap *a);
extern int fimc_g_crop_capture(void *fh, struct v4l2_crop *a);
extern int fimc_s_crop_capture(void *fh, struct v4l2_crop *a);
diff --git a/drivers/media/video/samsung/fimc/fimc_capture.c b/drivers/media/video/samsung/fimc/fimc_capture.c
index 10a54d1..7e6c487 100644
--- a/drivers/media/video/samsung/fimc/fimc_capture.c
+++ b/drivers/media/video/samsung/fimc/fimc_capture.c
@@ -1195,6 +1195,21 @@ int fimc_s_ctrl_capture(void *fh, struct v4l2_control *c)
return ret;
}
+int fimc_s_ext_ctrls_capture(void *fh, struct v4l2_ext_controls *c)
+{
+ struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
+ int ret = 0;
+
+ mutex_lock(&ctrl->v4l2_lock);
+
+ /* try on subdev */
+ ret = subdev_call(ctrl, core, s_ext_ctrls, c);
+
+ mutex_unlock(&ctrl->v4l2_lock);
+
+ return ret;
+}
+
int fimc_cropcap_capture(void *fh, struct v4l2_cropcap *a)
{
struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
diff --git a/drivers/media/video/samsung/fimc/fimc_v4l2.c b/drivers/media/video/samsung/fimc/fimc_v4l2.c
index 5c8aba1..3632ded 100644
--- a/drivers/media/video/samsung/fimc/fimc_v4l2.c
+++ b/drivers/media/video/samsung/fimc/fimc_v4l2.c
@@ -112,6 +112,22 @@ static int fimc_s_ctrl(struct file *filp, void *fh, struct v4l2_control *c)
return ret;
}
+static int fimc_s_ext_ctrls(struct file *filp, void *fh,
+ struct v4l2_ext_controls *c)
+{
+ struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
+ int ret = -1;
+
+ if (ctrl->cap != NULL) {
+ ret = fimc_s_ext_ctrls_capture(fh, c);
+ } else {
+ fimc_err("%s: Invalid case\n", __func__);
+ return -EINVAL;
+ }
+
+ return ret;
+}
+
static int fimc_cropcap(struct file *filp, void *fh, struct v4l2_cropcap *a)
{
struct fimc_control *ctrl = ((struct fimc_prv_data *)fh)->ctrl;
@@ -250,6 +266,7 @@ const struct v4l2_ioctl_ops fimc_v4l2_ops = {
.vidioc_querybuf = fimc_querybuf,
.vidioc_g_ctrl = fimc_g_ctrl,
.vidioc_s_ctrl = fimc_s_ctrl,
+ .vidioc_s_ext_ctrls = fimc_s_ext_ctrls,
.vidioc_cropcap = fimc_cropcap,
.vidioc_g_crop = fimc_g_crop,
.vidioc_s_crop = fimc_s_crop,