drivers/media/usb/cx231xx/cx231xx.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/cx231xx/cx231xx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/cx231xx/cx231xx.h- Extension
.h- Size
- 29018 bytes
- Lines
- 985
- 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.
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/videodev2.hlinux/types.hlinux/ioctl.hlinux/i2c.hlinux/workqueue.hlinux/mutex.hlinux/usb.hmedia/drv-intf/cx2341x.hmedia/videobuf2-vmalloc.hmedia/v4l2-device.hmedia/v4l2-ctrls.hmedia/v4l2-fh.hmedia/rc-core.hmedia/i2c/ir-kbd-i2c.hcx231xx-reg.hcx231xx-pcb-cfg.hcx231xx-conf-reg.h
Detected Declarations
struct cx23417_fmtstruct cx231xxstruct cx231xx_isoc_ctlstruct cx231xx_bulk_ctlstruct cx231xx_fmtstruct cx231xx_bufferstruct cx231xx_dmaqueuestruct cx231xx_reg_seqstruct cx231xx_inputstruct cx231xx_boardstruct cx231xx_audiostruct cx231xx_i2cstruct cx231xx_i2c_xfer_datastruct VENDOR_REQUEST_INstruct cx231xx_tvnormstruct cx231xx_video_modestruct cx231xx_tsportstruct cx231xxstruct cx231xx_opsenum cx231xx_modeenum cx231xx_std_modeenum cx231xx_stream_stateenum ps_package_headenum cx231xx_itypeenum cx231xx_v_inputenum cx231xx_amuxenum cx231xx_decoderenum CX231XX_I2C_MASTER_PORTenum cx231xx_dev_stateenum AFE_MODEenum AUDIO_INPUTenum TRANSFER_TYPEfunction cx231xx_ir_initfunction cx231xx_ir_exitfunction norm_maxh
Annotated Snippet
struct cx23417_fmt {
u32 fourcc; /* v4l2 format id */
int depth;
int flags;
u32 cxformat;
};
enum cx231xx_mode {
CX231XX_SUSPEND,
CX231XX_ANALOG_MODE,
CX231XX_DIGITAL_MODE,
};
enum cx231xx_std_mode {
CX231XX_TV_AIR = 0,
CX231XX_TV_CABLE
};
enum cx231xx_stream_state {
STREAM_OFF,
STREAM_INTERRUPT,
STREAM_ON,
};
struct cx231xx;
struct cx231xx_isoc_ctl {
/* max packet size of isoc transaction */
int max_pkt_size;
/* number of allocated urbs */
int num_bufs;
/* urb for isoc transfers */
struct urb **urb;
/* transfer buffers for isoc transfer */
char **transfer_buffer;
/* Last buffer command and region */
u8 cmd;
int pos, size, pktsize;
/* Last field: ODD or EVEN? */
int field;
/* Stores incomplete commands */
u32 tmp_buf;
int tmp_buf_len;
/* Stores already requested buffers */
struct cx231xx_buffer *buf;
/* Stores the number of received fields */
int nfields;
/* isoc urb callback */
int (*isoc_copy) (struct cx231xx *dev, struct urb *urb);
};
struct cx231xx_bulk_ctl {
/* max packet size of bulk transaction */
int max_pkt_size;
/* number of allocated urbs */
int num_bufs;
/* urb for bulk transfers */
struct urb **urb;
/* transfer buffers for bulk transfer */
char **transfer_buffer;
/* Last buffer command and region */
u8 cmd;
int pos, size, pktsize;
/* Last field: ODD or EVEN? */
int field;
/* Stores incomplete commands */
u32 tmp_buf;
int tmp_buf_len;
/* Stores already requested buffers */
struct cx231xx_buffer *buf;
/* Stores the number of received fields */
int nfields;
/* bulk urb callback */
Annotation
- Immediate include surface: `linux/videodev2.h`, `linux/types.h`, `linux/ioctl.h`, `linux/i2c.h`, `linux/workqueue.h`, `linux/mutex.h`, `linux/usb.h`, `media/drv-intf/cx2341x.h`.
- Detected declarations: `struct cx23417_fmt`, `struct cx231xx`, `struct cx231xx_isoc_ctl`, `struct cx231xx_bulk_ctl`, `struct cx231xx_fmt`, `struct cx231xx_buffer`, `struct cx231xx_dmaqueue`, `struct cx231xx_reg_seq`, `struct cx231xx_input`, `struct cx231xx_board`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.