drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c- Extension
.c- Size
- 4240 bytes
- Lines
- 163
- 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
pvrusb2-cx2584x-v4l.hpvrusb2-hdw-internal.hpvrusb2-debug.hmedia/drv-intf/cx25840.hlinux/videodev2.hmedia/v4l2-common.hlinux/errno.h
Detected Declarations
struct routing_scheme_itemstruct routing_schemefunction pvr2_cx25840_subdev_update
Annotated Snippet
struct routing_scheme_item {
int vid;
int aud;
};
struct routing_scheme {
const struct routing_scheme_item *def;
unsigned int cnt;
};
static const struct routing_scheme_item routing_scheme0[] = {
[PVR2_CVAL_INPUT_TV] = {
.vid = CX25840_COMPOSITE7,
.aud = CX25840_AUDIO8,
},
[PVR2_CVAL_INPUT_RADIO] = { /* Treat the same as composite */
.vid = CX25840_COMPOSITE3,
.aud = CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_COMPOSITE] = {
.vid = CX25840_COMPOSITE3,
.aud = CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_SVIDEO] = {
.vid = CX25840_SVIDEO1,
.aud = CX25840_AUDIO_SERIAL,
},
};
static const struct routing_scheme routing_def0 = {
.def = routing_scheme0,
.cnt = ARRAY_SIZE(routing_scheme0),
};
/* Specific to gotview device */
static const struct routing_scheme_item routing_schemegv[] = {
[PVR2_CVAL_INPUT_TV] = {
.vid = CX25840_COMPOSITE2,
.aud = CX25840_AUDIO5,
},
[PVR2_CVAL_INPUT_RADIO] = {
/* line-in is used for radio and composite. A GPIO is
used to switch between the two choices. */
.vid = CX25840_COMPOSITE1,
.aud = CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_COMPOSITE] = {
.vid = CX25840_COMPOSITE1,
.aud = CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_SVIDEO] = {
.vid = (CX25840_SVIDEO_LUMA3|CX25840_SVIDEO_CHROMA4),
.aud = CX25840_AUDIO_SERIAL,
},
};
static const struct routing_scheme routing_defgv = {
.def = routing_schemegv,
.cnt = ARRAY_SIZE(routing_schemegv),
};
/* Specific to grabster av400 device */
static const struct routing_scheme_item routing_schemeav400[] = {
[PVR2_CVAL_INPUT_COMPOSITE] = {
.vid = CX25840_COMPOSITE1,
.aud = CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_SVIDEO] = {
.vid = (CX25840_SVIDEO_LUMA2|CX25840_SVIDEO_CHROMA4),
.aud = CX25840_AUDIO_SERIAL,
},
};
static const struct routing_scheme routing_defav400 = {
.def = routing_schemeav400,
.cnt = ARRAY_SIZE(routing_schemeav400),
};
static const struct routing_scheme_item routing_scheme160xxx[] = {
[PVR2_CVAL_INPUT_TV] = {
.vid = CX25840_COMPOSITE7,
.aud = CX25840_AUDIO8,
},
[PVR2_CVAL_INPUT_RADIO] = {
.vid = CX25840_COMPOSITE4,
.aud = CX25840_AUDIO6,
},
[PVR2_CVAL_INPUT_COMPOSITE] = {
.vid = CX25840_COMPOSITE3,
.aud = CX25840_AUDIO_SERIAL,
Annotation
- Immediate include surface: `pvrusb2-cx2584x-v4l.h`, `pvrusb2-hdw-internal.h`, `pvrusb2-debug.h`, `media/drv-intf/cx25840.h`, `linux/videodev2.h`, `media/v4l2-common.h`, `linux/errno.h`.
- Detected declarations: `struct routing_scheme_item`, `struct routing_scheme`, `function pvr2_cx25840_subdev_update`.
- 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.