drivers/media/pci/cx23885/cx23885.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/cx23885/cx23885.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/cx23885/cx23885.h- Extension
.h- Size
- 20833 bytes
- Lines
- 637
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/i2c.hlinux/kdev_t.hlinux/slab.hmedia/v4l2-device.hmedia/v4l2-fh.hmedia/v4l2-ctrls.hmedia/tuner.hmedia/tveeprom.hmedia/videobuf2-dma-sg.hmedia/videobuf2-dvb.hmedia/rc-core.hcx23885-reg.hmedia/drv-intf/cx2341x.hlinux/mutex.h
Detected Declarations
struct cx23885_fmtstruct cx23885_tvnormstruct cx23885_riscmemstruct cx23885_bufferstruct cx23885_inputstruct cx23885_boardstruct cx23885_subidstruct cx23885_i2cstruct cx23885_dmaqueuestruct cx23885_tsportstruct cx23885_kernel_irstruct cx23885_audio_bufferstruct cx23885_audio_devstruct cx23885_devstruct sram_channelenum cx23885_itypeenum cx23885_src_sel_typefunction norm_maxh
Annotated Snippet
struct cx23885_fmt {
u32 fourcc; /* v4l2 format id */
int depth;
int flags;
u32 cxformat;
};
struct cx23885_tvnorm {
char *name;
v4l2_std_id id;
u32 cxiformat;
u32 cxoformat;
};
enum cx23885_itype {
CX23885_VMUX_COMPOSITE1 = 1,
CX23885_VMUX_COMPOSITE2,
CX23885_VMUX_COMPOSITE3,
CX23885_VMUX_COMPOSITE4,
CX23885_VMUX_SVIDEO,
CX23885_VMUX_COMPONENT,
CX23885_VMUX_TELEVISION,
CX23885_VMUX_CABLE,
CX23885_VMUX_DVB,
CX23885_VMUX_DEBUG,
CX23885_RADIO,
};
enum cx23885_src_sel_type {
CX23885_SRC_SEL_EXT_656_VIDEO = 0,
CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
};
struct cx23885_riscmem {
unsigned int size;
__le32 *cpu;
__le32 *jmp;
dma_addr_t dma;
};
/* buffer for one video frame */
struct cx23885_buffer {
/* common v4l buffer stuff -- must be first */
struct vb2_v4l2_buffer vb;
struct list_head queue;
/* cx23885 specific */
unsigned int bpl;
struct cx23885_riscmem risc;
struct cx23885_fmt *fmt;
u32 count;
};
struct cx23885_input {
enum cx23885_itype type;
unsigned int vmux;
unsigned int amux;
u32 gpio0, gpio1, gpio2, gpio3;
};
typedef enum {
CX23885_MPEG_UNDEFINED = 0,
CX23885_MPEG_DVB,
CX23885_ANALOG_VIDEO,
CX23885_MPEG_ENCODER,
} port_t;
struct cx23885_board {
char *name;
port_t porta, portb, portc;
int num_fds_portb, num_fds_portc;
unsigned int tuner_type;
unsigned int radio_type;
unsigned char tuner_addr;
unsigned char radio_addr;
unsigned int tuner_bus;
/* Vendors can and do run the PCIe bridge at different
* clock rates, driven physically by crystals on the PCBs.
* The core has to accommodate this. This allows the user
* to add new boards with new frequencys. The value is
* expressed in Hz.
*
* The core framework will default this value based on
* current designs, but it can vary.
*/
u32 clk_freq;
struct cx23885_input input[MAX_CX23885_INPUT];
int ci_type; /* for NetUP */
/* Force bottom field first during DMA (888 workaround) */
Annotation
- Immediate include surface: `linux/pci.h`, `linux/i2c.h`, `linux/kdev_t.h`, `linux/slab.h`, `media/v4l2-device.h`, `media/v4l2-fh.h`, `media/v4l2-ctrls.h`, `media/tuner.h`.
- Detected declarations: `struct cx23885_fmt`, `struct cx23885_tvnorm`, `struct cx23885_riscmem`, `struct cx23885_buffer`, `struct cx23885_input`, `struct cx23885_board`, `struct cx23885_subid`, `struct cx23885_i2c`, `struct cx23885_dmaqueue`, `struct cx23885_tsport`.
- 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.