linux/drivers/media/usb/gspca/spca501.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * SPCA501 chip based cameras initialization data
 *
 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
 */

#define pr_fmt(fmt)

#define MODULE_NAME

#include "gspca.h"

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/* specific webcam descriptor */
struct sd {};

static const struct v4l2_pix_format vga_mode[] =;

#define SPCA50X_REG_USB
/*
 * Data to initialize a SPCA501. From a capture file provided by Bill Roehl
 * With SPCA501 chip description
 */
#define CCDSP_SET
#define TG_SET
#undef DSPWIN_SET		/* set DSP windows parameters */
#undef ALTER_GAMA	/* Set alternate set to YUV transform coeffs. */
#define SPCA501_SNAPBIT
#define SPCA501_SNAPCTRL
/* Frame packet header offsets for the spca501 */
#define SPCA501_OFFSET_GPIO
#define SPCA501_OFFSET_TYPE
#define SPCA501_OFFSET_TURN3A
#define SPCA501_OFFSET_FRAMSEQ
#define SPCA501_OFFSET_COMPRESS
#define SPCA501_OFFSET_QUANT
#define SPCA501_OFFSET_QUANT2
#define SPCA501_OFFSET_DATA

#define SPCA501_PROP_COMP_ENABLE(d)
#define SPCA501_PROP_SNAP(d)
#define SPCA501_PROP_SNAP_CTRL(d)
#define SPCA501_PROP_COMP_THRESH(d)
#define SPCA501_PROP_COMP_QUANT(d)

/* SPCA501 CCDSP control */
#define SPCA501_REG_CCDSP
/* SPCA501 control/status registers */
#define SPCA501_REG_CTLRL

/* registers for color correction and YUV transformation */
#define SPCA501_A11
#define SPCA501_A12
#define SPCA501_A13
#define SPCA501_A21
#define SPCA501_A22
#define SPCA501_A23
#define SPCA501_A31
#define SPCA501_A32
#define SPCA501_A33

/* Data for video camera initialization before capturing */
static const __u16 spca501_open_data[][3] =;

/*
   The SPCAxxx docs from Sunplus document these values
   in tables, one table per register number.  In the data
   below, dmRequest is the register number, index is the Addr,
   and value is a combination of Bit values.
   Bit  Value (hex)
   0    01
   1    02
   2    04
   3    08
   4    10
   5    20
   6    40
   7    80
 */

/* Data for chip initialization (set default values) */
static const __u16 spca501_init_data[][3] =;

/* Data for video camera init before capture.
 * Capture and decoding by Colin Peart.
 * This is for the 3com HomeConnect Lite which is spca501a based.
 */
static const __u16 spca501_3com_open_data[][3] =;

/*
 * Data used to initialize a SPCA501C with HV7131B sensor.
 * From a capture file taken with USBSnoop v 1.5
 * I have a "SPCA501C pc camera chipset" manual by sunplus, but some
 * of the value meanings are obscure or simply "reserved".
 * to do list:
 * 1) Understand what every value means
 * 2) Understand why some values seem to appear more than once
 * 3) Write a small comment for each line of the following arrays.
 */
static const __u16 spca501c_arowana_open_data[][3] =;

static const __u16 spca501c_arowana_init_data[][3] =;

/* Unknown camera from Ori Usbid 0x0000:0x0000 */
/* Based on snoops from Ori Cohen */
static const __u16 spca501c_mysterious_open_data[][3] =;

/* Based on snoops from Ori Cohen */
static const __u16 spca501c_mysterious_init_data[][3] =;

static int reg_write(struct gspca_dev *gspca_dev,
					__u16 req, __u16 index, __u16 value)
{}


static int write_vector(struct gspca_dev *gspca_dev, const __u16 data[][3])
{}

static void setbrightness(struct gspca_dev *gspca_dev, s32 val)
{}

static void setcontrast(struct gspca_dev *gspca_dev, s32 val)
{}

static void setcolors(struct gspca_dev *gspca_dev, s32 val)
{}

static void setblue_balance(struct gspca_dev *gspca_dev, s32 val)
{}

static void setred_balance(struct gspca_dev *gspca_dev, s32 val)
{}

/* this function is called at probe time */
static int sd_config(struct gspca_dev *gspca_dev,
			const struct usb_device_id *id)
{}

/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{}

static int sd_start(struct gspca_dev *gspca_dev)
{}

static void sd_stopN(struct gspca_dev *gspca_dev)
{}

/* called on streamoff with alt 0 and on disconnect */
static void sd_stop0(struct gspca_dev *gspca_dev)
{}

static void sd_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,			/* isoc packet */
			int len)			/* iso packet length */
{}

static int sd_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops sd_ctrl_ops =;

static int sd_init_controls(struct gspca_dev *gspca_dev)
{}

/* sub-driver description */
static const struct sd_desc sd_desc =;

/* -- module initialisation -- */
static const struct usb_device_id device_table[] =;
MODULE_DEVICE_TABLE(usb, device_table);

/* -- device connect -- */
static int sd_probe(struct usb_interface *intf,
			const struct usb_device_id *id)
{}

static struct usb_driver sd_driver =;

module_usb_driver();