drivers/media/usb/gspca/ov519.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/ov519.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/ov519.c- Extension
.c- Size
- 137995 bytes
- Lines
- 5031
- 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/input.hgspca.hjpeg.hw996Xcf.c
Detected Declarations
struct sdstruct ctrl_validstruct ov_regvalsstruct ov_i2c_regvalsenum sensorsfunction ov7670_abs_to_smfunction reg_wfunction reg_rfunction reg_r8function reg_w_maskfunction multiplefunction ov511_i2c_wfunction ov511_i2c_rfunction i2c_wfunction i2c_rfunction ovfx2_i2c_wfunction ovfx2_i2c_rfunction i2c_wfunction i2c_rfunction i2c_w_maskfunction ov51x_stopfunction stoppedfunction init_ov_sensorfunction tofunction write_regvalsfunction write_i2c_regvalsfunction ov_hires_configurefunction ov8xx0_configurefunction ov7xx0_configurefunction ov6xx0_configurefunction ov51x_led_controlfunction sd_reset_snapshotfunction ov51x_upload_quan_tablesfunction ov511_configurefunction ov518_configurefunction ov519_configurefunction ovfx2_configurefunction ov519_set_modefunction ov519_set_frfunction setautogainfunction sd_configfunction sd_initfunction sd_isoc_initfunction ov511_mode_init_regsfunction ov518_mode_init_regsfunction ov519_mode_init_regsfunction mode_init_ov_sensor_regsfunction sethvflip
Annotated Snippet
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
struct v4l2_ctrl *jpegqual;
struct v4l2_ctrl *freq;
struct { /* h/vflip control cluster */
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
};
struct { /* autobrightness/brightness control cluster */
struct v4l2_ctrl *autobright;
struct v4l2_ctrl *brightness;
};
u8 revision;
u8 packet_nr;
char bridge;
#define BRIDGE_OV511 0
#define BRIDGE_OV511PLUS 1
#define BRIDGE_OV518 2
#define BRIDGE_OV518PLUS 3
#define BRIDGE_OV519 4 /* = ov530 */
#define BRIDGE_OVFX2 5
#define BRIDGE_W9968CF 6
#define BRIDGE_MASK 7
char invert_led;
#define BRIDGE_INVERT_LED 8
char snapshot_pressed;
char snapshot_needs_reset;
/* Determined by sensor type */
u8 sif;
#define QUALITY_MIN 50
#define QUALITY_MAX 70
#define QUALITY_DEF 50
u8 stopped; /* Streaming is temporarily paused */
u8 first_frame;
u8 frame_rate; /* current Framerate */
u8 clockdiv; /* clockdiv override */
s8 sensor; /* Type of image sensor chip (SEN_*) */
u8 sensor_addr;
u16 sensor_width;
u16 sensor_height;
s16 sensor_reg_cache[256];
u8 jpeg_hdr[JPEG_HDR_SZ];
};
enum sensors {
SEN_OV2610,
SEN_OV2610AE,
SEN_OV3610,
SEN_OV6620,
SEN_OV6630,
SEN_OV66308AF,
SEN_OV7610,
SEN_OV7620,
SEN_OV7620AE,
SEN_OV7640,
SEN_OV7648,
SEN_OV7660,
SEN_OV7670,
SEN_OV76BE,
SEN_OV8610,
SEN_OV9600,
};
/* Note this is a bit of a hack, but the w9968cf driver needs the code for all
the ov sensors which is already present here. When we have the time we
really should move the sensor drivers to v4l2 sub drivers. */
#include "w996Xcf.c"
/* table of the disabled controls */
struct ctrl_valid {
unsigned int has_brightness:1;
unsigned int has_contrast:1;
unsigned int has_exposure:1;
unsigned int has_autogain:1;
unsigned int has_sat:1;
unsigned int has_hvflip:1;
unsigned int has_autobright:1;
unsigned int has_freq:1;
Annotation
- Immediate include surface: `linux/input.h`, `gspca.h`, `jpeg.h`, `w996Xcf.c`.
- Detected declarations: `struct sd`, `struct ctrl_valid`, `struct ov_regvals`, `struct ov_i2c_regvals`, `enum sensors`, `function ov7670_abs_to_sm`, `function reg_w`, `function reg_r`, `function reg_r8`, `function reg_w_mask`.
- 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.