drivers/media/usb/gspca/t613.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/t613.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/t613.c- Extension
.c- Size
- 27296 bytes
- Lines
- 1042
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/input.hlinux/slab.hgspca.h
Detected Declarations
struct sdstruct additional_sensor_dataenum sensorsfunction reg_rfunction reg_wfunction reg_w_buffunction reg_w_ixbuffunction om6802_sensor_initfunction sd_configfunction setbrightnessfunction setcontrastfunction setcolorsfunction setgammafunction setawb_n_RGBfunction setsharpnessfunction setfreqfunction sd_initfunction setmirrorfunction seteffectfunction poll_sensorfunction sd_startfunction sd_stopNfunction sd_g_volatile_ctrlfunction sd_s_ctrlfunction sd_init_controlsfunction sd_probe
Annotated Snippet
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
struct v4l2_ctrl *freq;
struct { /* awb / color gains control cluster */
struct v4l2_ctrl *awb;
struct v4l2_ctrl *gain;
struct v4l2_ctrl *red_balance;
struct v4l2_ctrl *blue_balance;
};
u8 sensor;
u8 button_pressed;
};
enum sensors {
SENSOR_OM6802,
SENSOR_OTHER,
SENSOR_TAS5130A,
SENSOR_LT168G, /* must verify if this is the actual model */
};
static const struct v4l2_pix_format vga_mode_t16[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160,
.sizeimage = 160 * 120 * 4 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 4},
#if 0 /* HDG: broken with my test cam, so lets disable it */
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 3},
#endif
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 2},
#if 0 /* HDG: broken with my test cam, so lets disable it */
{352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 1},
#endif
{640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480 * 3 / 8 + 590,
.colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0},
};
/* sensor specific data */
struct additional_sensor_data {
const u8 n3[6];
const u8 *n4, n4sz;
const u8 reg80, reg8e;
const u8 nset8[6];
const u8 data1[10];
const u8 data2[9];
const u8 data3[9];
const u8 data5[6];
const u8 stream[4];
};
static const u8 n4_om6802[] = {
0x09, 0x01, 0x12, 0x04, 0x66, 0x8a, 0x80, 0x3c,
0x81, 0x22, 0x84, 0x50, 0x8a, 0x78, 0x8b, 0x68,
0x8c, 0x88, 0x8e, 0x33, 0x8f, 0x24, 0xaa, 0xb1,
0xa2, 0x60, 0xa5, 0x30, 0xa6, 0x3a, 0xa8, 0xe8,
0xae, 0x05, 0xb1, 0x00, 0xbb, 0x04, 0xbc, 0x48,
0xbe, 0x36, 0xc6, 0x88, 0xe9, 0x00, 0xc5, 0xc0,
0x65, 0x0a, 0xbb, 0x86, 0xaf, 0x58, 0xb0, 0x68,
0x87, 0x40, 0x89, 0x2b, 0x8d, 0xff, 0x83, 0x40,
0xac, 0x84, 0xad, 0x86, 0xaf, 0x46
};
static const u8 n4_other[] = {
0x66, 0x00, 0x7f, 0x00, 0x80, 0xac, 0x81, 0x69,
0x84, 0x40, 0x85, 0x70, 0x86, 0x20, 0x8a, 0x68,
0x8b, 0x58, 0x8c, 0x88, 0x8d, 0xff, 0x8e, 0xb8,
0x8f, 0x28, 0xa2, 0x60, 0xa5, 0x40, 0xa8, 0xa8,
0xac, 0x84, 0xad, 0x84, 0xae, 0x24, 0xaf, 0x56,
0xb0, 0x68, 0xb1, 0x00, 0xb2, 0x88, 0xbb, 0xc5,
0xbc, 0x4a, 0xbe, 0x36, 0xc2, 0x88, 0xc5, 0xc0,
0xc6, 0xda, 0xe9, 0x26, 0xeb, 0x00
};
static const u8 n4_tas5130a[] = {
0x80, 0x3c, 0x81, 0x68, 0x83, 0xa0, 0x84, 0x20,
0x8a, 0x68, 0x8b, 0x58, 0x8c, 0x88, 0x8e, 0xb4,
0x8f, 0x24, 0xa1, 0xb1, 0xa2, 0x30, 0xa5, 0x10,
Annotation
- Immediate include surface: `linux/input.h`, `linux/slab.h`, `gspca.h`.
- Detected declarations: `struct sd`, `struct additional_sensor_data`, `enum sensors`, `function reg_r`, `function reg_w`, `function reg_w_buf`, `function reg_w_ixbuf`, `function om6802_sensor_init`, `function sd_config`, `function setbrightness`.
- 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.