drivers/media/usb/gspca/cpia1.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/cpia1.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/cpia1.c- Extension
.c- Size
- 55561 bytes
- Lines
- 1899
- 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/input.hlinux/sched/signal.hlinux/bitops.hgspca.h
Detected Declarations
struct cam_paramsstruct sdfunction cpia_usb_transferCmdfunction do_commandfunction do_command_extendedfunction find_over_exposurefunction reset_camera_paramsfunction printstatusfunction goto_low_powerfunction goto_high_powerfunction get_version_informationfunction save_camera_statefunction command_setformatfunction command_setcolourparamsfunction command_setapcorfunction command_setvloffsetfunction command_setexposurefunction command_setcolourbalancefunction command_setcompressiontargetfunction command_setyuvtreshfunction command_setcompressionparamsfunction command_setcompressionfunction command_setsensorfpsfunction command_setflickerctrlfunction command_setecptimingfunction command_pausefunction command_resumefunction command_setlightsfunction set_flickerfunction monitor_exposurefunction restart_flickerfunction sd_configfunction sd_startfunction sd_stopNfunction sd_initfunction sd_pkt_scanfunction sd_dq_callbackfunction framesfunction sd_s_ctrlfunction sd_init_controlsfunction sd_probe
Annotated Snippet
struct cam_params {
struct {
u8 firmwareVersion;
u8 firmwareRevision;
u8 vcVersion;
u8 vcRevision;
} version;
struct {
u16 vendor;
u16 product;
u16 deviceRevision;
} pnpID;
struct {
u8 vpVersion;
u8 vpRevision;
u16 cameraHeadID;
} vpVersion;
struct {
u8 systemState;
u8 grabState;
u8 streamState;
u8 fatalError;
u8 cmdError;
u8 debugFlags;
u8 vpStatus;
u8 errorCode;
} status;
struct {
u8 brightness;
u8 contrast;
u8 saturation;
} colourParams;
struct {
u8 gainMode;
u8 expMode;
u8 compMode;
u8 centreWeight;
u8 gain;
u8 fineExp;
u8 coarseExpLo;
u8 coarseExpHi;
u8 redComp;
u8 green1Comp;
u8 green2Comp;
u8 blueComp;
} exposure;
struct {
u8 balanceMode;
u8 redGain;
u8 greenGain;
u8 blueGain;
} colourBalance;
struct {
u8 divisor;
u8 baserate;
} sensorFps;
struct {
u8 gain1;
u8 gain2;
u8 gain4;
u8 gain8;
} apcor;
struct {
u8 disabled;
u8 flickerMode;
u8 coarseJump;
u8 allowableOverExposure;
} flickerControl;
struct {
u8 gain1;
u8 gain2;
u8 gain4;
u8 gain8;
} vlOffset;
struct {
u8 mode;
u8 decimation;
} compression;
struct {
u8 frTargeting;
u8 targetFR;
u8 targetQ;
} compressionTarget;
struct {
u8 yThreshold;
u8 uvThreshold;
} yuvThreshold;
struct {
u8 hysteresis;
u8 threshMax;
Annotation
- Immediate include surface: `linux/input.h`, `linux/sched/signal.h`, `linux/bitops.h`, `gspca.h`.
- Detected declarations: `struct cam_params`, `struct sd`, `function cpia_usb_transferCmd`, `function do_command`, `function do_command_extended`, `function find_over_exposure`, `function reset_camera_params`, `function printstatus`, `function goto_low_power`, `function goto_high_power`.
- 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.