linux/drivers/media/pci/saa7134/saa7134-reg.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 *
 * philips saa7134 registers
 */

/* ------------------------------------------------------------------ */
/*
 * PCI ID's
 */
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7130
#define PCI_DEVICE_ID_PHILIPS_SAA7130
#endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7133
#define PCI_DEVICE_ID_PHILIPS_SAA7133
#endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7134
#define PCI_DEVICE_ID_PHILIPS_SAA7134
#endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7135
#define PCI_DEVICE_ID_PHILIPS_SAA7135
#endif

/* ------------------------------------------------------------------ */
/*
 *  registers -- 32 bit
 */

/* DMA channels, n = 0 ... 6 */
#define SAA7134_RS_BA1(n)
#define SAA7134_RS_BA2(n)
#define SAA7134_RS_PITCH(n)
#define SAA7134_RS_CONTROL(n)
#define SAA7134_RS_CONTROL_WSWAP
#define SAA7134_RS_CONTROL_BSWAP
#define SAA7134_RS_CONTROL_BURST_2
#define SAA7134_RS_CONTROL_BURST_4
#define SAA7134_RS_CONTROL_BURST_8
#define SAA7134_RS_CONTROL_BURST_16
#define SAA7134_RS_CONTROL_BURST_32
#define SAA7134_RS_CONTROL_BURST_64
#define SAA7134_RS_CONTROL_BURST_MAX
#define SAA7134_RS_CONTROL_ME
#define SAA7134_FIFO_SIZE
#define SAA7134_THRESHOULD

#define SAA7133_NUM_SAMPLES
#define SAA7133_AUDIO_CHANNEL
#define SAA7133_AUDIO_FORMAT
#define SAA7133_DIGITAL_OUTPUT_SEL1
#define SAA7133_DIGITAL_OUTPUT_SEL2
#define SAA7133_DIGITAL_INPUT_XBAR1
#define SAA7133_ANALOG_IO_SELECT

/* main control */
#define SAA7134_MAIN_CTRL
#define SAA7134_MAIN_CTRL_VPLLE
#define SAA7134_MAIN_CTRL_APLLE
#define SAA7134_MAIN_CTRL_EXOSC
#define SAA7134_MAIN_CTRL_EVFE1
#define SAA7134_MAIN_CTRL_EVFE2
#define SAA7134_MAIN_CTRL_ESFE
#define SAA7134_MAIN_CTRL_EBADC
#define SAA7134_MAIN_CTRL_EBDAC
#define SAA7134_MAIN_CTRL_TE6
#define SAA7134_MAIN_CTRL_TE5
#define SAA7134_MAIN_CTRL_TE4
#define SAA7134_MAIN_CTRL_TE3
#define SAA7134_MAIN_CTRL_TE2
#define SAA7134_MAIN_CTRL_TE1
#define SAA7134_MAIN_CTRL_TE0

/* DMA status */
#define SAA7134_DMA_STATUS

/* audio / video status */
#define SAA7134_AV_STATUS
#define SAA7134_AV_STATUS_STEREO
#define SAA7134_AV_STATUS_DUAL
#define SAA7134_AV_STATUS_PILOT
#define SAA7134_AV_STATUS_SMB
#define SAA7134_AV_STATUS_DMB
#define SAA7134_AV_STATUS_VDSP
#define SAA7134_AV_STATUS_IIC_STATUS
#define SAA7134_AV_STATUS_MVM
#define SAA7134_AV_STATUS_FIDT
#define SAA7134_AV_STATUS_INTL
#define SAA7134_AV_STATUS_RDCAP
#define SAA7134_AV_STATUS_PWR_ON
#define SAA7134_AV_STATUS_LOAD_ERR
#define SAA7134_AV_STATUS_TRIG_ERR
#define SAA7134_AV_STATUS_CONF_ERR

/* interrupt */
#define SAA7134_IRQ1
#define SAA7134_IRQ1_INTE_RA3_1
#define SAA7134_IRQ1_INTE_RA3_0
#define SAA7134_IRQ1_INTE_RA2_3
#define SAA7134_IRQ1_INTE_RA2_2
#define SAA7134_IRQ1_INTE_RA2_1
#define SAA7134_IRQ1_INTE_RA2_0
#define SAA7134_IRQ1_INTE_RA1_3
#define SAA7134_IRQ1_INTE_RA1_2
#define SAA7134_IRQ1_INTE_RA1_1
#define SAA7134_IRQ1_INTE_RA1_0
#define SAA7134_IRQ1_INTE_RA0_7
#define SAA7134_IRQ1_INTE_RA0_6
#define SAA7134_IRQ1_INTE_RA0_5
#define SAA7134_IRQ1_INTE_RA0_4
#define SAA7134_IRQ1_INTE_RA0_3
#define SAA7134_IRQ1_INTE_RA0_2
#define SAA7134_IRQ1_INTE_RA0_1
#define SAA7134_IRQ1_INTE_RA0_0

#define SAA7134_IRQ2
#define SAA7134_IRQ2_INTE_GPIO23_N
#define SAA7134_IRQ2_INTE_GPIO23_P
#define SAA7134_IRQ2_INTE_GPIO22_N
#define SAA7134_IRQ2_INTE_GPIO22_P
#define SAA7134_IRQ2_INTE_GPIO18_N
#define SAA7134_IRQ2_INTE_GPIO18_P
#define SAA7134_IRQ2_INTE_GPIO16_N
#define SAA7134_IRQ2_INTE_GPIO16_P
#define SAA7134_IRQ2_INTE_SC2
#define SAA7134_IRQ2_INTE_SC1
#define SAA7134_IRQ2_INTE_SC0
#define SAA7134_IRQ2_INTE_DEC4
#define SAA7134_IRQ2_INTE_DEC3
#define SAA7134_IRQ2_INTE_DEC2
#define SAA7134_IRQ2_INTE_DEC1
#define SAA7134_IRQ2_INTE_DEC0
#define SAA7134_IRQ2_INTE_PE
#define SAA7134_IRQ2_INTE_AR

#define SAA7134_IRQ_REPORT
#define SAA7134_IRQ_REPORT_GPIO23
#define SAA7134_IRQ_REPORT_GPIO22
#define SAA7134_IRQ_REPORT_GPIO18
#define SAA7134_IRQ_REPORT_GPIO16
#define SAA7134_IRQ_REPORT_LOAD_ERR
#define SAA7134_IRQ_REPORT_CONF_ERR
#define SAA7134_IRQ_REPORT_TRIG_ERR
#define SAA7134_IRQ_REPORT_MMC
#define SAA7134_IRQ_REPORT_FIDT
#define SAA7134_IRQ_REPORT_INTL
#define SAA7134_IRQ_REPORT_RDCAP
#define SAA7134_IRQ_REPORT_PWR_ON
#define SAA7134_IRQ_REPORT_PE
#define SAA7134_IRQ_REPORT_AR
#define SAA7134_IRQ_REPORT_DONE_RA3
#define SAA7134_IRQ_REPORT_DONE_RA2
#define SAA7134_IRQ_REPORT_DONE_RA1
#define SAA7134_IRQ_REPORT_DONE_RA0
#define SAA7134_IRQ_STATUS


/* ------------------------------------------------------------------ */
/*
 *  registers -- 8 bit
 */

/* video decoder */
#define SAA7134_INCR_DELAY
#define SAA7134_ANALOG_IN_CTRL1
#define SAA7134_ANALOG_IN_CTRL2
#define SAA7134_ANALOG_IN_CTRL3
#define SAA7134_ANALOG_IN_CTRL4
#define SAA7134_HSYNC_START
#define SAA7134_HSYNC_STOP
#define SAA7134_SYNC_CTRL
#define SAA7134_SYNC_CTRL_AUFD
#define SAA7134_LUMA_CTRL
#define SAA7134_LUMA_CTRL_LDEL
#define SAA7134_DEC_LUMA_BRIGHT
#define SAA7134_DEC_LUMA_CONTRAST
#define SAA7134_DEC_CHROMA_SATURATION
#define SAA7134_DEC_CHROMA_HUE
#define SAA7134_CHROMA_CTRL1
#define SAA7134_CHROMA_CTRL1_AUTO0
#define SAA7134_CHROMA_CTRL1_FCTC
#define SAA7134_CHROMA_GAIN
#define SAA7134_CHROMA_CTRL2
#define SAA7134_MODE_DELAY_CTRL

#define SAA7134_ANALOG_ADC
#define SAA7134_ANALOG_ADC_AUTO1
#define SAA7134_VGATE_START
#define SAA7134_VGATE_STOP
#define SAA7134_MISC_VGATE_MSB
#define SAA7134_RAW_DATA_GAIN
#define SAA7134_RAW_DATA_OFFSET
#define SAA7134_STATUS_VIDEO1
#define SAA7134_STATUS_VIDEO2

/* video scaler */
#define SAA7134_SOURCE_TIMING1
#define SAA7134_SOURCE_TIMING2
#define SAA7134_REGION_ENABLE
#define SAA7134_SCALER_STATUS0
#define SAA7134_SCALER_STATUS1
#define SAA7134_START_GREEN
#define SAA7134_START_BLUE
#define SAA7134_START_RED
#define SAA7134_GREEN_PATH(x)
#define SAA7134_BLUE_PATH(x)
#define SAA7134_RED_PATH(x)

#define TASK_A
#define TASK_B
#define SAA7134_TASK_CONDITIONS(t)
#define SAA7134_FIELD_HANDLING(t)
#define SAA7134_DATA_PATH(t)
#define SAA7134_VBI_H_START1(t)
#define SAA7134_VBI_H_START2(t)
#define SAA7134_VBI_H_STOP1(t)
#define SAA7134_VBI_H_STOP2(t)
#define SAA7134_VBI_V_START1(t)
#define SAA7134_VBI_V_START2(t)
#define SAA7134_VBI_V_STOP1(t)
#define SAA7134_VBI_V_STOP2(t)
#define SAA7134_VBI_H_LEN1(t)
#define SAA7134_VBI_H_LEN2(t)
#define SAA7134_VBI_V_LEN1(t)
#define SAA7134_VBI_V_LEN2(t)

#define SAA7134_VIDEO_H_START1(t)
#define SAA7134_VIDEO_H_START2(t)
#define SAA7134_VIDEO_H_STOP1(t)
#define SAA7134_VIDEO_H_STOP2(t)
#define SAA7134_VIDEO_V_START1(t)
#define SAA7134_VIDEO_V_START2(t)
#define SAA7134_VIDEO_V_STOP1(t)
#define SAA7134_VIDEO_V_STOP2(t)
#define SAA7134_VIDEO_PIXELS1(t)
#define SAA7134_VIDEO_PIXELS2(t)
#define SAA7134_VIDEO_LINES1(t)
#define SAA7134_VIDEO_LINES2(t)

#define SAA7134_H_PRESCALE(t)
#define SAA7134_ACC_LENGTH(t)
#define SAA7134_LEVEL_CTRL(t)
#define SAA7134_FIR_PREFILTER_CTRL(t)
#define SAA7134_LUMA_BRIGHT(t)
#define SAA7134_LUMA_CONTRAST(t)
#define SAA7134_CHROMA_SATURATION(t)
#define SAA7134_VBI_H_SCALE_INC1(t)
#define SAA7134_VBI_H_SCALE_INC2(t)
#define SAA7134_VBI_PHASE_OFFSET_LUMA(t)
#define SAA7134_VBI_PHASE_OFFSET_CHROMA(t)
#define SAA7134_H_SCALE_INC1(t)
#define SAA7134_H_SCALE_INC2(t)
#define SAA7134_H_PHASE_OFF_LUMA(t)
#define SAA7134_H_PHASE_OFF_CHROMA(t)
#define SAA7134_V_SCALE_RATIO1(t)
#define SAA7134_V_SCALE_RATIO2(t)
#define SAA7134_V_FILTER(t)
#define SAA7134_V_PHASE_OFFSET0(t)
#define SAA7134_V_PHASE_OFFSET1(t)
#define SAA7134_V_PHASE_OFFSET2(t)
#define SAA7134_V_PHASE_OFFSET3(t)

/* clipping & dma */
#define SAA7134_OFMT_VIDEO_A
#define SAA7134_OFMT_DATA_A
#define SAA7134_OFMT_VIDEO_B
#define SAA7134_OFMT_DATA_B
#define SAA7134_ALPHA_NOCLIP
#define SAA7134_ALPHA_CLIP
#define SAA7134_UV_PIXEL
#define SAA7134_CLIP_RED
#define SAA7134_CLIP_GREEN
#define SAA7134_CLIP_BLUE

/* i2c bus */
#define SAA7134_I2C_ATTR_STATUS
#define SAA7134_I2C_DATA
#define SAA7134_I2C_CLOCK_SELECT
#define SAA7134_I2C_TIMER

/* audio */
#define SAA7134_NICAM_ADD_DATA1
#define SAA7134_NICAM_ADD_DATA2
#define SAA7134_NICAM_STATUS
#define SAA7134_AUDIO_STATUS
#define SAA7134_NICAM_ERROR_COUNT
#define SAA7134_IDENT_SIF
#define SAA7134_LEVEL_READOUT1
#define SAA7134_LEVEL_READOUT2
#define SAA7134_NICAM_ERROR_LOW
#define SAA7134_NICAM_ERROR_HIGH
#define SAA7134_DCXO_IDENT_CTRL
#define SAA7134_DEMODULATOR
#define SAA7134_AGC_GAIN_SELECT
#define SAA7134_CARRIER1_FREQ0
#define SAA7134_CARRIER1_FREQ1
#define SAA7134_CARRIER1_FREQ2
#define SAA7134_CARRIER2_FREQ0
#define SAA7134_CARRIER2_FREQ1
#define SAA7134_CARRIER2_FREQ2
#define SAA7134_NUM_SAMPLES0
#define SAA7134_NUM_SAMPLES1
#define SAA7134_NUM_SAMPLES2
#define SAA7134_AUDIO_FORMAT_CTRL
#define SAA7134_MONITOR_SELECT
#define SAA7134_FM_DEEMPHASIS
#define SAA7134_FM_DEMATRIX
#define SAA7134_CHANNEL1_LEVEL
#define SAA7134_CHANNEL2_LEVEL
#define SAA7134_NICAM_CONFIG
#define SAA7134_NICAM_LEVEL_ADJUST
#define SAA7134_STEREO_DAC_OUTPUT_SELECT
#define SAA7134_I2S_OUTPUT_FORMAT
#define SAA7134_I2S_OUTPUT_SELECT
#define SAA7134_I2S_OUTPUT_LEVEL
#define SAA7134_DSP_OUTPUT_SELECT
#define SAA7134_AUDIO_MUTE_CTRL
#define SAA7134_SIF_SAMPLE_FREQ
#define SAA7134_ANALOG_IO_SELECT
#define SAA7134_AUDIO_CLOCK0
#define SAA7134_AUDIO_CLOCK1
#define SAA7134_AUDIO_CLOCK2
#define SAA7134_AUDIO_PLL_CTRL
#define SAA7134_AUDIO_CLOCKS_PER_FIELD0
#define SAA7134_AUDIO_CLOCKS_PER_FIELD1
#define SAA7134_AUDIO_CLOCKS_PER_FIELD2

/* video port output */
#define SAA7134_VIDEO_PORT_CTRL0
#define SAA7134_VIDEO_PORT_CTRL1
#define SAA7134_VIDEO_PORT_CTRL2
#define SAA7134_VIDEO_PORT_CTRL3
#define SAA7134_VIDEO_PORT_CTRL4
#define SAA7134_VIDEO_PORT_CTRL5
#define SAA7134_VIDEO_PORT_CTRL6
#define SAA7134_VIDEO_PORT_CTRL7
#define SAA7134_VIDEO_PORT_CTRL8

/* transport stream interface */
#define SAA7134_TS_PARALLEL
#define SAA7134_TS_PARALLEL_SERIAL
#define SAA7134_TS_SERIAL0
#define SAA7134_TS_SERIAL1
#define SAA7134_TS_DMA0
#define SAA7134_TS_DMA1
#define SAA7134_TS_DMA2

/* GPIO Controls */
#define SAA7134_GPIO_GPRESCAN
#define SAA7134_GPIO_27_25

#define SAA7134_GPIO_GPMODE0
#define SAA7134_GPIO_GPMODE1
#define SAA7134_GPIO_GPMODE2
#define SAA7134_GPIO_GPMODE3
#define SAA7134_GPIO_GPSTATUS0
#define SAA7134_GPIO_GPSTATUS1
#define SAA7134_GPIO_GPSTATUS2
#define SAA7134_GPIO_GPSTATUS3

/* I2S output */
#define SAA7134_I2S_AUDIO_OUTPUT

/* test modes */
#define SAA7134_SPECIAL_MODE
#define SAA7134_PRODUCTION_TEST_MODE

/* audio -- saa7133 + saa7135 only */
#define SAA7135_DSP_RWSTATE
#define SAA7135_DSP_RWSTATE_ERR
#define SAA7135_DSP_RWSTATE_IDA
#define SAA7135_DSP_RWSTATE_RDB
#define SAA7135_DSP_RWSTATE_WRR

#define SAA7135_DSP_RWCLEAR
#define SAA7135_DSP_RWCLEAR_RERR

#define SAA7133_I2S_AUDIO_CONTROL