diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-02-17 11:39:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-01 17:10:30 -0300 |
commit | 15f4bc3b1f42ca73ad073d7390aa34fa358f02a3 (patch) | |
tree | 1c8ce26e608bd8a90765d05f1f7fe463d6a4ca0f /drivers/media/video/s5p-jpeg/jpeg-core.h | |
parent | 275de24dc0076fac25e86e586c9577b8caee28ce (diff) | |
download | talos-obmc-linux-15f4bc3b1f42ca73ad073d7390aa34fa358f02a3.tar.gz talos-obmc-linux-15f4bc3b1f42ca73ad073d7390aa34fa358f02a3.zip |
[media] s5p-jpeg: Add JPEG controls support
This patch replaces VIDIOC_S/G_JPEGCOMP ioctl handlers with
V4L2_CID_JPEG_QUALITY control. Additionally it enables JPEG subsampling
and the restart interval configuration through V4L2_CID_JPEG_SUBSAMPLING
and V4L2_CID_JPEG_RESTART_INTERVAL controls. For the decoder video node
only V4L2_CID_JPEG_SUBSAMPLING is available as a read-only control.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@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/s5p-jpeg/jpeg-core.h')
-rw-r--r-- | drivers/media/video/s5p-jpeg/jpeg-core.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.h b/drivers/media/video/s5p-jpeg/jpeg-core.h index 4dd705fb99d5..38d7367f7a6d 100644 --- a/drivers/media/video/s5p-jpeg/jpeg-core.h +++ b/drivers/media/video/s5p-jpeg/jpeg-core.h @@ -15,6 +15,7 @@ #include <media/v4l2-device.h> #include <media/v4l2-fh.h> +#include <media/v4l2-ctrls.h> #define S5P_JPEG_M2M_NAME "s5p-jpeg" @@ -48,6 +49,7 @@ /** * struct s5p_jpeg - JPEG IP abstraction * @lock: the mutex protecting this structure + * @slock: spinlock protecting the device contexts * @v4l2_dev: v4l2 device for mem2mem mode * @vfd_encoder: video device node for encoder mem2mem mode * @vfd_decoder: video device node for decoder mem2mem mode @@ -61,6 +63,7 @@ */ struct s5p_jpeg { struct mutex lock; + struct spinlock slock; struct v4l2_device v4l2_dev; struct video_device *vfd_encoder; @@ -118,16 +121,20 @@ struct s5p_jpeg_q_data { * @out_q: source (output) queue information * @cap_fmt: destination (capture) queue queue information * @hdr_parsed: set if header has been parsed during decompression + * @ctrl_handler: controls handler */ struct s5p_jpeg_ctx { struct s5p_jpeg *jpeg; unsigned int mode; - unsigned int compr_quality; + unsigned short compr_quality; + unsigned short restart_interval; + unsigned short subsampling; struct v4l2_m2m_ctx *m2m_ctx; struct s5p_jpeg_q_data out_q; struct s5p_jpeg_q_data cap_q; struct v4l2_fh fh; bool hdr_parsed; + struct v4l2_ctrl_handler ctrl_handler; }; /** |