drivers/staging/media/av7110/av7110.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/av7110/av7110.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/av7110/av7110.h
Extension
.h
Size
7068 bytes
Lines
312
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct av7110_p2t {
	u8		  pes[TS_SIZE];
	u8		  counter;
	long		  pos;
	int		  frags;
	struct dvb_demux_feed *feed;
};

/* video MPEG decoder events: */
/* (code copied from dvb_frontend.c, should maybe be factored out...) */
#define MAX_VIDEO_EVENT 8
struct dvb_video_events {
	struct video_event	  events[MAX_VIDEO_EVENT];
	int			  eventw;
	int			  eventr;
	int			  overflow;
	wait_queue_head_t	  wait_queue;
	spinlock_t		  lock;
};

struct av7110;

/* infrared remote control */
struct infrared {
	struct rc_dev		*rcdev;
	char			input_phys[32];
	u32			ir_config;
};

#define MAX_CI_SLOTS	2

/* place to store all the necessary device information */
struct av7110 {
	/* devices */

	struct dvb_device	dvb_dev;
	struct dvb_net		dvb_net;

	struct video_device	v4l_dev;
	struct video_device	vbi_dev;

	struct saa7146_dev	*dev;

	struct i2c_adapter	i2c_adap;

	char			*card_name;

	/* support for analog module of dvb-c */
	int			analog_tuner_flags;
	int			current_input;
	u32			current_freq;

	struct tasklet_struct	debi_tasklet;
	struct tasklet_struct	gpio_tasklet;

	int adac_type;	       /* audio DAC type */
#define DVB_ADAC_TI	  0
#define DVB_ADAC_CRYSTAL  1
#define DVB_ADAC_MSP34x0  2
#define DVB_ADAC_MSP34x5  3
#define DVB_ADAC_NONE	 -1

	/* buffers */

	void		       *iobuf;	 /* memory for all buffers */
	struct dvb_ringbuffer	avout;   /* buffer for video or A/V mux */
#define AVOUTLEN (128 * 1024)
	struct dvb_ringbuffer	aout;    /* buffer for audio */
#define AOUTLEN (64 * 1024)
	void		       *bmpbuf;
#define BMPLEN (8 * 32768 + 1024)

	/* bitmap buffers and states */

	int			bmpp;
	int			bmplen;
	volatile int		bmp_state;
#define BMP_NONE     0
#define BMP_LOADING  1
#define BMP_LOADED   2
	wait_queue_head_t	bmpq;

	/* DEBI and polled command interface */

	spinlock_t		debilock;
	struct mutex		dcomlock;
	volatile int		debitype;
	volatile int		debilen;

	/* Recording and playback flags */

Annotation

Implementation Notes