drivers/media/usb/gspca/ov534_9.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/ov534_9.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/ov534_9.c- Extension
.c- Size
- 41652 bytes
- Lines
- 1822
- 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
gspca.h
Detected Declarations
struct sdenum sensorsenum ov361xfunction reg_w_ifunction reg_wfunction reg_rfunction sccb_check_statusfunction sccb_writefunction sccb_readfunction reg_w_arrayfunction sccb_w_arrayfunction set_ledfunction setbrightnessfunction setcontrastfunction setautogainfunction setexposurefunction setsharpnessfunction setsaturfunction setlightfreqfunction sd_configfunction sd_initfunction sd_start_ov361xfunction sd_startfunction sd_stopNfunction sd_pkt_scanfunction sd_s_ctrlfunction sd_init_controlsfunction sd_probe
Annotated Snippet
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
__u32 last_pts;
u8 last_fid;
u8 sensor;
};
enum sensors {
SENSOR_OV965x, /* ov9657 */
SENSOR_OV971x, /* ov9712 */
SENSOR_OV562x, /* ov5621 */
SENSOR_OV361x, /* ov3610 */
NSENSORS
};
static const struct v4l2_pix_format ov965x_mode[] = {
#define QVGA_MODE 0
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG},
#define VGA_MODE 1
{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG},
#define SVGA_MODE 2
{800, 600, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 800,
.sizeimage = 800 * 600 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG},
#define XGA_MODE 3
{1024, 768, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 1024,
.sizeimage = 1024 * 768 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG},
#define SXGA_MODE 4
{1280, 1024, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 1280,
.sizeimage = 1280 * 1024 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG},
};
static const struct v4l2_pix_format ov971x_mode[] = {
{640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480,
.colorspace = V4L2_COLORSPACE_SRGB
}
};
static const struct v4l2_pix_format ov562x_mode[] = {
{2592, 1680, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 2592,
.sizeimage = 2592 * 1680,
.colorspace = V4L2_COLORSPACE_SRGB
}
};
enum ov361x {
ov361x_2048 = 0,
ov361x_1600,
ov361x_1024,
ov361x_640,
ov361x_320,
ov361x_160,
ov361x_last
};
static const struct v4l2_pix_format ov361x_mode[] = {
{0x800, 0x600, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 0x800,
.sizeimage = 0x800 * 0x600,
.colorspace = V4L2_COLORSPACE_SRGB},
{1600, 1200, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 1600,
.sizeimage = 1600 * 1200,
.colorspace = V4L2_COLORSPACE_SRGB},
{1024, 768, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 768,
.sizeimage = 1024 * 768,
.colorspace = V4L2_COLORSPACE_SRGB},
{640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480,
.colorspace = V4L2_COLORSPACE_SRGB},
{320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240,
.colorspace = V4L2_COLORSPACE_SRGB},
Annotation
- Immediate include surface: `gspca.h`.
- Detected declarations: `struct sd`, `enum sensors`, `enum ov361x`, `function reg_w_i`, `function reg_w`, `function reg_r`, `function sccb_check_status`, `function sccb_write`, `function sccb_read`, `function reg_w_array`.
- 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.