drivers/media/usb/dvb-usb/cxusb.h

Source file repositories/reference/linux-study-clean/drivers/media/usb/dvb-usb/cxusb.h

File Facts

System
Linux kernel
Corpus path
drivers/media/usb/dvb-usb/cxusb.h
Extension
.h
Size
4778 bytes
Lines
205
Domain
Driver Families
Bucket
drivers/media
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 cxusb_state {
	u8 gpio_write_state[3];
	bool gpio_write_refresh[3];
	struct i2c_client *i2c_client_demod;
	struct i2c_client *i2c_client_tuner;

	unsigned char data[MAX_XFER_SIZE];

	struct mutex stream_mutex;
	u8 last_lock;
	int (*fe_read_status)(struct dvb_frontend *fe,
			      enum fe_status *status);
};

enum cxusb_open_type {
	CXUSB_OPEN_INIT,
	CXUSB_OPEN_NONE,
	CXUSB_OPEN_ANALOG,
	CXUSB_OPEN_DIGITAL
};

struct cxusb_medion_auxbuf {
	u8 *buf;
	unsigned int len;
	unsigned int paylen;
};

enum cxusb_bt656_mode {
	NEW_FRAME, FIRST_FIELD, SECOND_FIELD
};

enum cxusb_bt656_fmode {
	START_SEARCH, LINE_SAMPLES, VBI_SAMPLES
};

struct cxusb_bt656_params {
	enum cxusb_bt656_mode mode;
	enum cxusb_bt656_fmode fmode;
	unsigned int pos;
	unsigned int line;
	unsigned int linesamples;
	u8 *buf;
};

struct cxusb_medion_dev {
	/* has to be the first one */
	struct cxusb_state state;

	struct dvb_usb_device *dvbdev;

	enum cxusb_open_type open_type;
	unsigned int open_ctr;
	struct mutex open_lock;

#ifdef CONFIG_DVB_USB_CXUSB_ANALOG
	struct v4l2_device v4l2dev;
	struct v4l2_subdev *cx25840;
	struct v4l2_subdev *tuner;
	struct v4l2_subdev *tda9887;
	struct video_device *videodev, *radiodev;
	struct mutex dev_lock;

	struct vb2_queue videoqueue;
	u32 input;
	bool stop_streaming;
	u32 width, height;
	u32 field_order;
	struct cxusb_medion_auxbuf auxbuf;
	v4l2_std_id norm;

	struct urb *streamurbs[CXUSB_VIDEO_URBS];
	unsigned long urbcomplete;
	struct work_struct urbwork;
	unsigned int nexturb;

	struct cxusb_bt656_params bt656;
	struct cxusb_medion_vbuffer *vbuf;
	__u32 vbuf_sequence;

	struct list_head buflist;

	struct completion v4l2_release;
#endif
};

struct cxusb_medion_vbuffer {
	struct vb2_v4l2_buffer vb2;
	struct list_head list;
};

Annotation

Implementation Notes