linux/drivers/media/usb/go7007/go7007-priv.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2005-2006 Micronas USA Inc.
 */

/*
 * This is the private include file for the go7007 driver.  It should not
 * be included by anybody but the driver itself, and especially not by
 * user-space applications.
 */

#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/videobuf2-v4l2.h>

struct go7007;

/* IDs to activate board-specific support code */
#define GO7007_BOARDID_MATRIX_II
#define GO7007_BOARDID_MATRIX_RELOAD
#define GO7007_BOARDID_STAR_TREK
#define GO7007_BOARDID_PCI_VOYAGER
#define GO7007_BOARDID_XMEN
#define GO7007_BOARDID_XMEN_II
#define GO7007_BOARDID_XMEN_III
#define GO7007_BOARDID_MATRIX_REV
#define GO7007_BOARDID_PX_M402U
#define GO7007_BOARDID_PX_TV402U
#define GO7007_BOARDID_LIFEVIEW_LR192
#define GO7007_BOARDID_ENDURA
#define GO7007_BOARDID_ADLINK_MPG24
#define GO7007_BOARDID_SENSORAY_2250
#define GO7007_BOARDID_ADS_USBAV_709

/* Various characteristics of each board */
#define GO7007_BOARD_HAS_AUDIO
#define GO7007_BOARD_USE_ONBOARD_I2C
#define GO7007_BOARD_HAS_TUNER

/* Characteristics of sensor devices */
#define GO7007_SENSOR_VALID_POLAR
#define GO7007_SENSOR_HREF_POLAR
#define GO7007_SENSOR_VREF_POLAR
#define GO7007_SENSOR_FIELD_ID_POLAR
#define GO7007_SENSOR_BIT_WIDTH
#define GO7007_SENSOR_VALID_ENABLE
#define GO7007_SENSOR_656
#define GO7007_SENSOR_CONFIG_MASK
#define GO7007_SENSOR_TV
#define GO7007_SENSOR_VBI
#define GO7007_SENSOR_SCALING
#define GO7007_SENSOR_SAA7115

/* Characteristics of audio sensor devices */
#define GO7007_AUDIO_I2S_MODE_1
#define GO7007_AUDIO_I2S_MODE_2
#define GO7007_AUDIO_I2S_MODE_3
#define GO7007_AUDIO_BCLK_POLAR
#define GO7007_AUDIO_WORD_14
#define GO7007_AUDIO_WORD_16
#define GO7007_AUDIO_ONE_CHANNEL
#define GO7007_AUDIO_I2S_MASTER
#define GO7007_AUDIO_OKI_MODE

#define GO7007_CID_CUSTOM_BASE
#define V4L2_CID_PIXEL_THRESHOLD0
#define V4L2_CID_MOTION_THRESHOLD0
#define V4L2_CID_MB_THRESHOLD0
#define V4L2_CID_PIXEL_THRESHOLD1
#define V4L2_CID_MOTION_THRESHOLD1
#define V4L2_CID_MB_THRESHOLD1
#define V4L2_CID_PIXEL_THRESHOLD2
#define V4L2_CID_MOTION_THRESHOLD2
#define V4L2_CID_MB_THRESHOLD2
#define V4L2_CID_PIXEL_THRESHOLD3
#define V4L2_CID_MOTION_THRESHOLD3
#define V4L2_CID_MB_THRESHOLD3

struct go7007_board_info {};

struct go7007_hpi_ops {};

/* The video buffer size must be a multiple of PAGE_SIZE */
#define GO7007_BUF_PAGES
#define GO7007_BUF_SIZE

struct go7007_buffer {};

#define GO7007_RATIO_1_1
#define GO7007_RATIO_4_3
#define GO7007_RATIO_16_9

enum go7007_parser_state {};

struct go7007 {};

static inline struct go7007 *to_go7007(struct v4l2_device *v4l2_dev)
{}

/* All of these must be called with the hpi_lock mutex held! */
#define go7007_interface_reset(go)
#define go7007_write_interrupt(go, x, y)
#define go7007_stream_start(go)
#define go7007_stream_stop(go)
#define go7007_send_firmware(go, x, y)
#define go7007_write_addr(go, x, y)

/* go7007-driver.c */
int go7007_read_addr(struct go7007 *go, u16 addr, u16 *data);
int go7007_read_interrupt(struct go7007 *go, u16 *value, u16 *data);
int go7007_boot_encoder(struct go7007 *go, int init_i2c);
int go7007_reset_encoder(struct go7007 *go);
int go7007_register_encoder(struct go7007 *go, unsigned num_i2c_devs);
int go7007_start_encoder(struct go7007 *go);
void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length);
struct go7007 *go7007_alloc(const struct go7007_board_info *board,
					struct device *dev);
void go7007_update_board(struct go7007 *go);

/* go7007-fw.c */
int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen);

/* go7007-i2c.c */
int go7007_i2c_init(struct go7007 *go);
int go7007_i2c_remove(struct go7007 *go);

/* go7007-v4l2.c */
int go7007_v4l2_init(struct go7007 *go);
int go7007_v4l2_ctrl_init(struct go7007 *go);
void go7007_v4l2_remove(struct go7007 *go);

/* snd-go7007.c */
int go7007_snd_init(struct go7007 *go);
int go7007_snd_remove(struct go7007 *go);