diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-02-28 06:29:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 14:34:30 -0300 |
commit | dd9c471dd37c25127236dd36cd1f55c488228cf1 (patch) | |
tree | fe764c9175e10678a43f94844a9fd76a0f57f20c /drivers/media/video/m5mols/m5mols_controls.c | |
parent | 50d3f93e39d86d57af5df5f06c5b18ffe25ece79 (diff) |
[media] m5mols: Add JPEG compression quality control
Add JPEG compression quality control for snapshot capture.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/m5mols/m5mols_controls.c')
-rw-r--r-- | drivers/media/video/m5mols/m5mols_controls.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/video/m5mols/m5mols_controls.c b/drivers/media/video/m5mols/m5mols_controls.c index ebc3a904b960..1c3b1e0a7bba 100644 --- a/drivers/media/video/m5mols/m5mols_controls.c +++ b/drivers/media/video/m5mols/m5mols_controls.c @@ -492,6 +492,10 @@ static int m5mols_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_IMAGE_STABILIZATION: ret = m5mols_set_stabilization(info, ctrl->val); break; + + case V4L2_CID_JPEG_COMPRESSION_QUALITY: + ret = m5mols_write(sd, CAPP_JPEG_RATIO, ctrl->val); + break; } if (ret == 0 && info->mode != last_mode) @@ -530,8 +534,7 @@ int m5mols_init_controls(struct v4l2_subdev *sd) return ret; zoom_step = is_manufacturer(info, REG_SAMSUNG_OPTICS) ? 31 : 1; - - v4l2_ctrl_handler_init(&info->handle, 6); + v4l2_ctrl_handler_init(&info->handle, 20); info->auto_wb = v4l2_ctrl_new_std_menu(&info->handle, &m5mols_ctrl_ops, V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, @@ -579,6 +582,9 @@ int m5mols_init_controls(struct v4l2_subdev *sd) info->stabilization = v4l2_ctrl_new_std(&info->handle, &m5mols_ctrl_ops, V4L2_CID_IMAGE_STABILIZATION, 0, 1, 1, 0); + info->jpeg_quality = v4l2_ctrl_new_std(&info->handle, &m5mols_ctrl_ops, + V4L2_CID_JPEG_COMPRESSION_QUALITY, 1, 100, 1, 80); + if (info->handle.error) { int ret = info->handle.error; v4l2_err(sd, "Failed to initialize controls: %d\n", ret); |