linux/drivers/media/pci/bt8xx/bttvp.h

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

    bttv - Bt848 frame grabber driver

    bttv's *private* header file  --  nobody other than bttv itself
    should ever include this file.

    (c) 2000-2002 Gerd Knorr <[email protected]>

*/

#ifndef _BTTVP_H_
#define _BTTVP_H_

#include <linux/types.h>
#include <linux/wait.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/pci.h>
#include <linux/input.h>
#include <linux/mutex.h>
#include <linux/scatterlist.h>
#include <linux/device.h>
#include <asm/io.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/videobuf2-dma-sg.h>
#include <media/tveeprom.h>
#include <media/rc-core.h>
#include <media/i2c/ir-kbd-i2c.h>
#include <media/drv-intf/tea575x.h>

#include "bt848.h"
#include "bttv.h"
#include "btcx-risc.h"

#ifdef __KERNEL__

#define FORMAT_FLAGS_DITHER
#define FORMAT_FLAGS_PACKED
#define FORMAT_FLAGS_PLANAR
#define FORMAT_FLAGS_RAW
#define FORMAT_FLAGS_CrCb

#define RISC_SLOT_O_VBI
#define RISC_SLOT_O_FIELD
#define RISC_SLOT_E_VBI
#define RISC_SLOT_E_FIELD
#define RISC_SLOT_LOOP

#define RESOURCE_VIDEO_STREAM
#define RESOURCE_VBI
#define RESOURCE_VIDEO_READ

#define RAW_LINES
#define RAW_BPL

#define UNSET

/* Min. value in VDELAY register. */
#define MIN_VDELAY
/* Even to get Cb first, odd for Cr. */
#define MAX_HDELAY
/* Limits scaled width, which must be a multiple of 4. */
#define MAX_HACTIVE

#define BTTV_NORMS
/* ---------------------------------------------------------- */

struct bttv_tvnorm {};
extern const struct bttv_tvnorm bttv_tvnorms[];

struct bttv_format {};

struct bttv_ir {};


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

struct bttv_geometry {};

struct bttv_buffer {};

struct bttv_buffer_set {};

struct bttv_vbi_fmt {};

/* bttv-vbi.c */
extern const struct vb2_ops bttv_vbi_qops;

void bttv_vbi_fmt_reset(struct bttv_vbi_fmt *f, unsigned int norm);

struct bttv_crop {};

/* ---------------------------------------------------------- */
/* bttv-risc.c                                                */

/* risc code generators - capture */
int bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
		     struct scatterlist *sglist,
		     unsigned int offset, unsigned int bpl,
		     unsigned int pitch, unsigned int skip_lines,
		     unsigned int store_lines);

/* control dma register + risc main loop */
void bttv_set_dma(struct bttv *btv, int override);
int bttv_risc_init_main(struct bttv *btv);
int bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
		   int irqflags);

/* capture buffer handling */
int bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf);
int bttv_buffer_activate_video(struct bttv *btv,
			       struct bttv_buffer_set *set);
int bttv_buffer_risc_vbi(struct bttv *btv, struct bttv_buffer *buf);
int bttv_buffer_activate_vbi(struct bttv *btv,
			     struct bttv_buffer *vbi);

/* ---------------------------------------------------------- */
/* bttv-vbi.c                                                 */

/*
 * 2048 for compatibility with earlier driver versions. The driver really
 * stores 1024 + tvnorm->vbipack * 4 samples per line in the buffer. Note
 * tvnorm->vbipack is <= 0xFF (limit of VBIPACK_LO + HI is 0x1FF DWORDs) and
 * VBI read()s store a frame counter in the last four bytes of the VBI image.
 */
#define VBI_BPL

#define VBI_DEFLINES

int bttv_try_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *f);
int bttv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *f);
int bttv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *f);

/* ---------------------------------------------------------- */
/* bttv-gpio.c */

extern const struct bus_type bttv_sub_bus_type;
int bttv_sub_add_device(struct bttv_core *core, char *name);
int bttv_sub_del_devices(struct bttv_core *core);

/* ---------------------------------------------------------- */
/* bttv-input.c                                               */

extern void init_bttv_i2c_ir(struct bttv *btv);

/* ---------------------------------------------------------- */
/* bttv-i2c.c                                                 */
extern int init_bttv_i2c(struct bttv *btv);
extern int fini_bttv_i2c(struct bttv *btv);

/* ---------------------------------------------------------- */
/* bttv-driver.c                                              */

/* insmod options */
extern unsigned int bttv_verbose;
extern unsigned int bttv_debug;
extern unsigned int bttv_gpio;
int check_alloc_btres_lock(struct bttv *btv, int bit);
void free_btres_lock(struct bttv *btv, int bits);
extern void bttv_gpio_tracking(struct bttv *btv, char *comment);

#define dprintk(fmt, ...)
#define dprintk_cont(fmt, ...)
#define d2printk(fmt, ...)

#define BTTV_MAX_FBUF
#define BTTV_TIMEOUT
#define BTTV_FREE_IDLE


struct bttv_pll_info {};

/* for gpio-connected remote control */
struct bttv_input {};

struct bttv_suspend_state {};

struct bttv_tea575x_gpio {};

struct bttv {};

static inline struct bttv *to_bttv(struct v4l2_device *v4l2_dev)
{}

/* our devices */
#define BTTV_MAX
extern unsigned int bttv_num;
extern struct bttv *bttvs[BTTV_MAX];

static inline unsigned int bttv_muxsel(const struct bttv *btv,
				       unsigned int input)
{}

#endif

void init_irqreg(struct bttv *btv);

#define btwrite(dat,adr)
#define btread(adr)

#define btand(dat,adr)
#define btor(dat,adr)
#define btaor(dat,mask,adr)

#endif /* _BTTVP_H_ */