linux/drivers/media/i2c/saa7127.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * saa7127 - Philips SAA7127/SAA7129 video encoder driver
 *
 * Copyright (C) 2003 Roy Bulter <[email protected]>
 *
 * Based on SAA7126 video encoder driver by Gillem & Andreas Oberritter
 *
 * Copyright (C) 2000-2001 Gillem <[email protected]>
 * Copyright (C) 2002 Andreas Oberritter <[email protected]>
 *
 * Based on Stadis 4:2:2 MPEG-2 Decoder Driver by Nathan Laredo
 *
 * Copyright (C) 1999 Nathan Laredo <[email protected]>
 *
 * This driver is designed for the Hauppauge 250/350 Linux driver
 * from the ivtv Project
 *
 * Copyright (C) 2003 Kevin Thayer <[email protected]>
 *
 * Dual output support:
 * Copyright (C) 2004 Eric Varsanyi
 *
 * NTSC Tuning and 7.5 IRE Setup
 * Copyright (C) 2004  Chris Kennedy <[email protected]>
 *
 * VBI additions & cleanup:
 * Copyright (C) 2004, 2005 Hans Verkuil <[email protected]>
 *
 * Note: the saa7126 is identical to the saa7127, and the saa7128 is
 * identical to the saa7129, except that the saa7126 and saa7128 have
 * macrovision anti-taping support. This driver will almost certainly
 * work fine for those chips, except of course for the missing anti-taping
 * support.
 */


#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/i2c/saa7127.h>

static int debug;
static int test_image;

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
module_param(debug, int, 0644);
module_param(test_image, int, 0644);
MODULE_PARM_DESC();
MODULE_PARM_DESC();


/*
 * SAA7127 registers
 */

#define SAA7127_REG_STATUS
#define SAA7127_REG_WIDESCREEN_CONFIG
#define SAA7127_REG_WIDESCREEN_ENABLE
#define SAA7127_REG_BURST_START
#define SAA7127_REG_BURST_END
#define SAA7127_REG_COPYGEN_0
#define SAA7127_REG_COPYGEN_1
#define SAA7127_REG_COPYGEN_2
#define SAA7127_REG_OUTPUT_PORT_CONTROL
#define SAA7127_REG_GAIN_LUMINANCE_RGB
#define SAA7127_REG_GAIN_COLORDIFF_RGB
#define SAA7127_REG_INPUT_PORT_CONTROL_1
#define SAA7129_REG_FADE_KEY_COL2
#define SAA7127_REG_CHROMA_PHASE
#define SAA7127_REG_GAINU
#define SAA7127_REG_GAINV
#define SAA7127_REG_BLACK_LEVEL
#define SAA7127_REG_BLANKING_LEVEL
#define SAA7127_REG_VBI_BLANKING
#define SAA7127_REG_DAC_CONTROL
#define SAA7127_REG_BURST_AMP
#define SAA7127_REG_SUBC3
#define SAA7127_REG_SUBC2
#define SAA7127_REG_SUBC1
#define SAA7127_REG_SUBC0
#define SAA7127_REG_LINE_21_ODD_0
#define SAA7127_REG_LINE_21_ODD_1
#define SAA7127_REG_LINE_21_EVEN_0
#define SAA7127_REG_LINE_21_EVEN_1
#define SAA7127_REG_RCV_PORT_CONTROL
#define SAA7127_REG_VTRIG
#define SAA7127_REG_HTRIG_HI
#define SAA7127_REG_MULTI
#define SAA7127_REG_CLOSED_CAPTION
#define SAA7127_REG_RCV2_OUTPUT_START
#define SAA7127_REG_RCV2_OUTPUT_END
#define SAA7127_REG_RCV2_OUTPUT_MSBS
#define SAA7127_REG_TTX_REQUEST_H_START
#define SAA7127_REG_TTX_REQUEST_H_DELAY_LENGTH
#define SAA7127_REG_CSYNC_ADVANCE_VSYNC_SHIFT
#define SAA7127_REG_TTX_ODD_REQ_VERT_START
#define SAA7127_REG_TTX_ODD_REQ_VERT_END
#define SAA7127_REG_TTX_EVEN_REQ_VERT_START
#define SAA7127_REG_TTX_EVEN_REQ_VERT_END
#define SAA7127_REG_FIRST_ACTIVE
#define SAA7127_REG_LAST_ACTIVE
#define SAA7127_REG_MSB_VERTICAL
#define SAA7127_REG_DISABLE_TTX_LINE_LO_0
#define SAA7127_REG_DISABLE_TTX_LINE_LO_1

/*
 **********************************************************************
 *
 *  Arrays with configuration parameters for the SAA7127
 *
 **********************************************************************
 */

struct i2c_reg_value {};

static const struct i2c_reg_value saa7129_init_config_extra[] =;

static const struct i2c_reg_value saa7127_init_config_common[] =;

#define SAA7127_60HZ_DAC_CONTROL
static const struct i2c_reg_value saa7127_init_config_60hz[] =;

#define SAA7127_50HZ_PAL_DAC_CONTROL
static struct i2c_reg_value saa7127_init_config_50hz_pal[] =;

#define SAA7127_50HZ_SECAM_DAC_CONTROL
static struct i2c_reg_value saa7127_init_config_50hz_secam[] =;

/*
 **********************************************************************
 *
 *  Encoder Struct, holds the configuration state of the encoder
 *
 **********************************************************************
 */

enum saa712x_model {};

struct saa7127_state {};

static inline struct saa7127_state *to_state(struct v4l2_subdev *sd)
{}

static const char * const output_strs[] =;

static const char * const wss_strs[] =;

/* ----------------------------------------------------------------------- */

static int saa7127_read(struct v4l2_subdev *sd, u8 reg)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_write_inittab(struct v4l2_subdev *sd,
				 const struct i2c_reg_value *regs)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_vps(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_cc(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_xds(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_wss(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_video_enable(struct v4l2_subdev *sd, int enable)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_std(struct v4l2_subdev *sd, v4l2_std_id std)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_output_type(struct v4l2_subdev *sd, int output)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_set_input_type(struct v4l2_subdev *sd, int input)
{}

/* ----------------------------------------------------------------------- */

static int saa7127_s_std_output(struct v4l2_subdev *sd, v4l2_std_id std)
{}

static int saa7127_s_routing(struct v4l2_subdev *sd,
			     u32 input, u32 output, u32 config)
{}

static int saa7127_s_stream(struct v4l2_subdev *sd, int enable)
{}

static int saa7127_g_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt)
{}

static int saa7127_s_vbi_data(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data)
{}

#ifdef CONFIG_VIDEO_ADV_DEBUG
static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg)
{}

static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg)
{}
#endif

static int saa7127_log_status(struct v4l2_subdev *sd)
{}

/* ----------------------------------------------------------------------- */

static const struct v4l2_subdev_core_ops saa7127_core_ops =;

static const struct v4l2_subdev_video_ops saa7127_video_ops =;

static const struct v4l2_subdev_vbi_ops saa7127_vbi_ops =;

static const struct v4l2_subdev_ops saa7127_ops =;

/* ----------------------------------------------------------------------- */

static int saa7127_probe(struct i2c_client *client)
{}

/* ----------------------------------------------------------------------- */

static void saa7127_remove(struct i2c_client *client)
{}

/* ----------------------------------------------------------------------- */

static const struct i2c_device_id saa7127_id[] =;
MODULE_DEVICE_TABLE(i2c, saa7127_id);

static struct i2c_driver saa7127_driver =;

module_i2c_driver();