linux/drivers/staging/vc04_services/bcm2835-camera/controls.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Broadcom BCM2835 V4L2 driver
 *
 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
 *
 * Authors: Vincent Sanders @ Collabora
 *          Dave Stevenson @ Broadcom
 *		(now [email protected])
 *          Simon Mellor @ Broadcom
 *          Luke Diamand @ Broadcom
 */

#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <media/videobuf2-vmalloc.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include <media/v4l2-common.h>

#include "../vchiq-mmal/mmal-common.h"
#include "../vchiq-mmal/mmal-vchiq.h"
#include "../vchiq-mmal/mmal-parameters.h"
#include "bcm2835-camera.h"

/* The supported V4L2_CID_AUTO_EXPOSURE_BIAS values are from -4.0 to +4.0.
 * MMAL values are in 1/6th increments so the MMAL range is -24 to +24.
 * V4L2 docs say value "is expressed in terms of EV, drivers should interpret
 * the values as 0.001 EV units, where the value 1000 stands for +1 EV."
 * V4L2 is limited to a max of 32 values in a menu, so count in 1/3rds from
 * -4 to +4
 */
static const s64 ev_bias_qmenu[] =;

/* Supported ISO values (*1000)
 * ISOO = auto ISO
 */
static const s64 iso_qmenu[] =;

static const u32 iso_values[] =;

enum bcm2835_mmal_ctrl_type {};

struct bcm2835_mmal_v4l2_ctrl {};

struct v4l2_to_mmal_effects_setting {};

static const struct v4l2_to_mmal_effects_setting
	v4l2_to_mmal_effects_values[] =;

struct v4l2_mmal_scene_config {};

static const struct v4l2_mmal_scene_config scene_configs[] =;

/* control handlers*/

static int ctrl_set_rational(struct bcm2835_mmal_dev *dev,
			     struct v4l2_ctrl *ctrl,
			     const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_value(struct bcm2835_mmal_dev *dev,
			  struct v4l2_ctrl *ctrl,
			  const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_iso(struct bcm2835_mmal_dev *dev,
			struct v4l2_ctrl *ctrl,
			const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_value_ev(struct bcm2835_mmal_dev *dev,
			     struct v4l2_ctrl *ctrl,
			     const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_rotate(struct bcm2835_mmal_dev *dev,
			   struct v4l2_ctrl *ctrl,
			   const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_flip(struct bcm2835_mmal_dev *dev,
			 struct v4l2_ctrl *ctrl,
			 const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_exposure(struct bcm2835_mmal_dev *dev,
			     struct v4l2_ctrl *ctrl,
			     const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_metering_mode(struct bcm2835_mmal_dev *dev,
				  struct v4l2_ctrl *ctrl,
				  const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_flicker_avoidance(struct bcm2835_mmal_dev *dev,
				      struct v4l2_ctrl *ctrl,
				      const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_awb_mode(struct bcm2835_mmal_dev *dev,
			     struct v4l2_ctrl *ctrl,
			     const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_awb_gains(struct bcm2835_mmal_dev *dev,
			      struct v4l2_ctrl *ctrl,
			      const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_image_effect(struct bcm2835_mmal_dev *dev,
				 struct v4l2_ctrl *ctrl,
				 const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_colfx(struct bcm2835_mmal_dev *dev,
			  struct v4l2_ctrl *ctrl,
			  const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_bitrate(struct bcm2835_mmal_dev *dev,
			    struct v4l2_ctrl *ctrl,
			    const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_bitrate_mode(struct bcm2835_mmal_dev *dev,
				 struct v4l2_ctrl *ctrl,
				 const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_image_encode_output(struct bcm2835_mmal_dev *dev,
					struct v4l2_ctrl *ctrl,
					const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_video_encode_param_output(struct bcm2835_mmal_dev *dev,
					      struct v4l2_ctrl *ctrl,
					      const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_video_encode_profile_level(struct bcm2835_mmal_dev *dev,
					       struct v4l2_ctrl *ctrl,
					       const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int ctrl_set_scene_mode(struct bcm2835_mmal_dev *dev,
			       struct v4l2_ctrl *ctrl,
			       const struct bcm2835_mmal_v4l2_ctrl *mmal_ctrl)
{}

static int bcm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops bcm2835_mmal_ctrl_ops =;

static const struct bcm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] =;

int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev)
{}

int set_framerate_params(struct bcm2835_mmal_dev *dev)
{}

int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl)
{}