Commit ed986d1f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] meye: convert to the control framework

Convert the meye driver to the control framework. Some private controls
have been replaced with standardized controls (SHARPNESS and JPEGQUAL).
The AGC control looks like it can be replaced by the AUTOGAIN control, but
it isn't a boolean so I do not know how to interpret it.
The FRAMERATE control looks like it can be replaced by S_PARM, but again,
without knowing how to interpret it I decided to leave it alone.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent cd13823f
This diff is collapsed.
......@@ -39,6 +39,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kfifo.h>
#include <media/v4l2-ctrls.h>
/****************************************************************************/
/* Motion JPEG chip registers */
......@@ -290,6 +291,7 @@ struct meye_grab_buffer {
/* Motion Eye device structure */
struct meye {
struct v4l2_device v4l2_dev; /* Main v4l2_device struct */
struct v4l2_ctrl_handler hdl;
struct pci_dev *mchip_dev; /* pci device */
u8 mchip_irq; /* irq */
u8 mchip_mode; /* actual mchip mode: HIC_MODE... */
......
......@@ -57,10 +57,8 @@ struct meye_params {
#define MEYEIOC_STILLJCAPT _IOR ('v', BASE_VIDIOC_PRIVATE+5, int)
/* V4L2 private controls */
#define V4L2_CID_AGC V4L2_CID_PRIVATE_BASE
#define V4L2_CID_MEYE_SHARPNESS (V4L2_CID_PRIVATE_BASE + 1)
#define V4L2_CID_PICTURE (V4L2_CID_PRIVATE_BASE + 2)
#define V4L2_CID_JPEGQUAL (V4L2_CID_PRIVATE_BASE + 3)
#define V4L2_CID_FRAMERATE (V4L2_CID_PRIVATE_BASE + 4)
#define V4L2_CID_MEYE_AGC (V4L2_CID_USER_MEYE_BASE + 0)
#define V4L2_CID_MEYE_PICTURE (V4L2_CID_USER_MEYE_BASE + 1)
#define V4L2_CID_MEYE_FRAMERATE (V4L2_CID_USER_MEYE_BASE + 2)
#endif
......@@ -140,6 +140,11 @@ enum v4l2_colorfx {
/* last CID + 1 */
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
/* USER-class private control IDs */
/* The base for the meye driver controls. See linux/meye.h for the list
* of controls. We reserve 16 controls for this driver. */
#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000)
/* MPEG-class control IDs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment