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

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SAA7146_VV__
#define __SAA7146_VV__

#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-fh.h>
#include <media/drv-intf/saa7146.h>
#include <media/videobuf2-dma-sg.h>

#define MAX_SAA7146_CAPTURE_BUFFERS
#define BUFFER_TIMEOUT

#define WRITE_RPS0(x)

#define WRITE_RPS1(x)

struct	saa7146_video_dma {};

#define FORMAT_BYTE_SWAP
#define FORMAT_IS_PLANAR

struct saa7146_format {};

struct saa7146_standard
{};

/* buffer for one video/vbi frame */
struct saa7146_buf {};

struct saa7146_dmaqueue {};

struct saa7146_vv
{};

/* flags */
#define SAA7146_USE_PORT_B_FOR_VBI

struct saa7146_ext_vv
{};

struct saa7146_use_ops  {};

/* from saa7146_fops.c */
int saa7146_register_device(struct video_device *vid, struct saa7146_dev *dev, char *name, int type);
int saa7146_unregister_device(struct video_device *vid, struct saa7146_dev *dev);
void saa7146_buffer_finish(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, int state);
void saa7146_buffer_next(struct saa7146_dev *dev, struct saa7146_dmaqueue *q,int vbi);
int saa7146_buffer_queue(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, struct saa7146_buf *buf);
void saa7146_buffer_timeout(struct timer_list *t);

int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
int saa7146_vv_release(struct saa7146_dev* dev);

/* from saa7146_hlp.c */
void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next);
void saa7146_write_out_dma(struct saa7146_dev* dev, int which, struct saa7146_video_dma* vdma) ;
void saa7146_set_hps_source_and_sync(struct saa7146_dev *saa, int source, int sync);
void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data);

/* from saa7146_video.c */
extern const struct v4l2_ioctl_ops saa7146_video_ioctl_ops;
extern const struct v4l2_ioctl_ops saa7146_vbi_ioctl_ops;
extern const struct saa7146_use_ops saa7146_video_uops;
extern const struct vb2_ops video_qops;
long saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg);
int saa7146_s_ctrl(struct v4l2_ctrl *ctrl);

/* from saa7146_vbi.c */
extern const struct saa7146_use_ops saa7146_vbi_uops;
extern const struct vb2_ops vbi_qops;

/* resource management functions */
int saa7146_res_get(struct saa7146_dev *dev, unsigned int bit);
void saa7146_res_free(struct saa7146_dev *dev, unsigned int bits);

#define RESOURCE_DMA1_HPS
#define RESOURCE_DMA2_CLP
#define RESOURCE_DMA3_BRS

/* saa7146 source inputs */
#define SAA7146_HPS_SOURCE_PORT_A
#define SAA7146_HPS_SOURCE_PORT_B
#define SAA7146_HPS_SOURCE_YPB_CPA
#define SAA7146_HPS_SOURCE_YPA_CPB

/* sync inputs */
#define SAA7146_HPS_SYNC_PORT_A
#define SAA7146_HPS_SYNC_PORT_B

/* some memory sizes */
/* max. 16 clipping rectangles */
#define SAA7146_CLIPPING_MEM

/* some defines for the various clipping-modes */
#define SAA7146_CLIPPING_RECT
#define SAA7146_CLIPPING_RECT_INVERTED
#define SAA7146_CLIPPING_MASK
#define SAA7146_CLIPPING_MASK_INVERTED

/* output formats: each entry holds four information */
#define RGB08_COMPOSED
/* this means: planar?=0, yuv2rgb-conversation-mode=2, dither=yes(=1), format-mode = 7 */
#define RGB15_COMPOSED
#define RGB16_COMPOSED
#define RGB24_COMPOSED
#define RGB32_COMPOSED

#define Y8
#define YUV411_COMPOSED
#define YUV422_COMPOSED
/* this means: planar?=1, yuv2rgb-conversion-mode=0, dither=no(=0), format-mode = b */
#define YUV411_DECOMPOSED
#define YUV422_DECOMPOSED
#define YUV420_DECOMPOSED

#define IS_PLANAR(x)

/* misc defines */
#define SAA7146_NO_SWAP
#define SAA7146_TWO_BYTE_SWAP
#define SAA7146_FOUR_BYTE_SWAP

#endif