drivers/media/usb/stk1160/stk1160.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/stk1160/stk1160.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/stk1160/stk1160.h- Extension
.h- Size
- 4688 bytes
- Lines
- 196
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/i2c.hsound/core.hsound/ac97_codec.hmedia/videobuf2-v4l2.hmedia/v4l2-device.hmedia/v4l2-ctrls.h
Detected Declarations
struct stk1160_bufferstruct stk1160_urbstruct stk1160_isoc_ctlstruct stk1160_fmtstruct stk1160struct regval
Annotated Snippet
struct stk1160_buffer {
/* common v4l buffer stuff -- must be first */
struct vb2_v4l2_buffer vb;
struct list_head list;
void *mem;
unsigned int length; /* buffer length */
unsigned int bytesused; /* bytes written */
int odd; /* current oddity */
/*
* Since we interlace two fields per frame,
* this is different from bytesused.
*/
unsigned int pos; /* current pos inside buffer */
};
struct stk1160_urb {
struct urb *urb;
char *transfer_buffer;
struct sg_table *sgt;
struct stk1160 *dev;
dma_addr_t dma;
};
struct stk1160_isoc_ctl {
/* max packet size of isoc transaction */
int max_pkt_size;
/* number of allocated urbs */
int num_bufs;
struct stk1160_urb urb_ctl[STK1160_NUM_BUFS];
/* current buffer */
struct stk1160_buffer *buf;
};
struct stk1160_fmt {
u32 fourcc; /* v4l2 format id */
int depth;
};
struct stk1160 {
struct v4l2_device v4l2_dev;
struct video_device vdev;
struct v4l2_ctrl_handler ctrl_handler;
struct device *dev;
struct usb_device *udev;
/* saa7115 subdev */
struct v4l2_subdev *sd_saa7115;
/* isoc control struct */
struct list_head avail_bufs;
/* video capture */
struct vb2_queue vb_vidq;
/* max packet size of isoc transaction */
int max_pkt_size;
/* array of wMaxPacketSize */
unsigned int *alt_max_pkt_size;
/* alternate */
int alt;
/* Number of alternative settings */
int num_alt;
struct stk1160_isoc_ctl isoc_ctl;
/* frame properties */
int width; /* current frame width */
int height; /* current frame height */
unsigned int ctl_input; /* selected input */
v4l2_std_id norm; /* current norm */
struct stk1160_fmt *fmt; /* selected format */
unsigned int sequence;
/* i2c i/o */
struct i2c_adapter i2c_adap;
struct i2c_client i2c_client;
struct mutex v4l_lock;
struct mutex vb_queue_lock;
spinlock_t buf_lock;
struct file *fh_owner; /* filehandle ownership */
Annotation
- Immediate include surface: `linux/i2c.h`, `sound/core.h`, `sound/ac97_codec.h`, `media/videobuf2-v4l2.h`, `media/v4l2-device.h`, `media/v4l2-ctrls.h`.
- Detected declarations: `struct stk1160_buffer`, `struct stk1160_urb`, `struct stk1160_isoc_ctl`, `struct stk1160_fmt`, `struct stk1160`, `struct regval`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.