linux/include/media/drv-intf/cx25840.h

/* SPDX-License-Identifier: GPL-2.0-or-later */

/*
 *   cx25840.h - definition for cx25840/1/2/3 inputs
 *
 *   Copyright (C) 2006 Hans Verkuil ([email protected])
 */

#ifndef _CX25840_H_
#define _CX25840_H_

/*
 * Note that the cx25840 driver requires that the bridge driver calls the
 * v4l2_subdev's load_fw operation in order to load the driver's firmware.
 * This will load the firmware on the first invocation (further ones are NOP).
 * Without this the audio standard detection will fail and you will
 * only get mono.
 * Alternatively, you can call the reset operation (this can be done
 * multiple times if needed, each invocation will fully reinitialize
 * the device).
 *
 * Since loading the firmware is often problematic when the driver is
 * compiled into the kernel I recommend postponing calling this function
 * until the first open of the video device. Another reason for
 * postponing it is that loading this firmware takes a long time (seconds)
 * due to the slow i2c bus speed. So it will speed up the boot process if
 * you can avoid loading the fw as long as the video device isn't used.
 */

enum cx25840_video_input {};

/*
 * The defines below are used to set the chip video output settings
 * in the generic mode that can be enabled by calling the subdevice
 * init core op.
 *
 * The requested settings can be passed to the init core op as
 * @val parameter and to the s_routing video op as @config parameter.
 *
 * For details please refer to the section 3.7 Video Output Formatting and
 * to Video Out Control 1 to 4 registers in the section 5.6 Video Decoder Core
 * of the chip datasheet.
 */
#define CX25840_VCONFIG_FMT_SHIFT
#define CX25840_VCONFIG_FMT_MASK
#define CX25840_VCONFIG_FMT_BT601
#define CX25840_VCONFIG_FMT_BT656
#define CX25840_VCONFIG_FMT_VIP11
#define CX25840_VCONFIG_FMT_VIP2

#define CX25840_VCONFIG_RES_SHIFT
#define CX25840_VCONFIG_RES_MASK
#define CX25840_VCONFIG_RES_8BIT
#define CX25840_VCONFIG_RES_10BIT

#define CX25840_VCONFIG_VBIRAW_SHIFT
#define CX25840_VCONFIG_VBIRAW_MASK
#define CX25840_VCONFIG_VBIRAW_DISABLED
#define CX25840_VCONFIG_VBIRAW_ENABLED

#define CX25840_VCONFIG_ANCDATA_SHIFT
#define CX25840_VCONFIG_ANCDATA_MASK
#define CX25840_VCONFIG_ANCDATA_DISABLED
#define CX25840_VCONFIG_ANCDATA_ENABLED

#define CX25840_VCONFIG_TASKBIT_SHIFT
#define CX25840_VCONFIG_TASKBIT_MASK
#define CX25840_VCONFIG_TASKBIT_ZERO
#define CX25840_VCONFIG_TASKBIT_ONE

#define CX25840_VCONFIG_ACTIVE_SHIFT
#define CX25840_VCONFIG_ACTIVE_MASK
#define CX25840_VCONFIG_ACTIVE_COMPOSITE
#define CX25840_VCONFIG_ACTIVE_HORIZONTAL

#define CX25840_VCONFIG_VALID_SHIFT
#define CX25840_VCONFIG_VALID_MASK
#define CX25840_VCONFIG_VALID_NORMAL
#define CX25840_VCONFIG_VALID_ANDACTIVE

#define CX25840_VCONFIG_HRESETW_SHIFT
#define CX25840_VCONFIG_HRESETW_MASK
#define CX25840_VCONFIG_HRESETW_NORMAL
#define CX25840_VCONFIG_HRESETW_PIXCLK

#define CX25840_VCONFIG_CLKGATE_SHIFT
#define CX25840_VCONFIG_CLKGATE_MASK
#define CX25840_VCONFIG_CLKGATE_NONE
#define CX25840_VCONFIG_CLKGATE_VALID
#define CX25840_VCONFIG_CLKGATE_VALIDACTIVE

#define CX25840_VCONFIG_DCMODE_SHIFT
#define CX25840_VCONFIG_DCMODE_MASK
#define CX25840_VCONFIG_DCMODE_DWORDS
#define CX25840_VCONFIG_DCMODE_BYTES

#define CX25840_VCONFIG_IDID0S_SHIFT
#define CX25840_VCONFIG_IDID0S_MASK
#define CX25840_VCONFIG_IDID0S_NORMAL
#define CX25840_VCONFIG_IDID0S_LINECNT

#define CX25840_VCONFIG_VIPCLAMP_SHIFT
#define CX25840_VCONFIG_VIPCLAMP_MASK
#define CX25840_VCONFIG_VIPCLAMP_ENABLED
#define CX25840_VCONFIG_VIPCLAMP_DISABLED

enum cx25840_audio_input {};

enum cx25840_io_pin {};

enum cx25840_io_pad {};

enum cx25840_io_pin_strength {};

enum cx23885_io_pin {};

enum cx23885_io_pad {};

/*
 * pvr150_workaround activates a workaround for a hardware bug that is
 * present in Hauppauge PVR-150 (and possibly PVR-500) cards that have
 * certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The
 * audio autodetect fails on some channels for these models and the workaround
 * is to select the audio standard explicitly. Many thanks to Hauppauge for
 * providing this information.
 *
 * This platform data only needs to be supplied by the ivtv driver.
 */
struct cx25840_platform_data {};

#endif