drivers/media/usb/pvrusb2/pvrusb2-hdw.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/pvrusb2/pvrusb2-hdw.c- Extension
.c- Size
- 141850 bytes
- Lines
- 5151
- 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.
- 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/errno.hlinux/string.hlinux/slab.hlinux/module.hlinux/firmware.hlinux/videodev2.hmedia/v4l2-common.hmedia/tuner.hpvrusb2.hpvrusb2-std.hpvrusb2-util.hpvrusb2-hdw.hpvrusb2-i2c-core.hpvrusb2-eeprom.hpvrusb2-hdw-internal.hpvrusb2-encoder.hpvrusb2-debug.hpvrusb2-fx2-cmd.hpvrusb2-wm8775.hpvrusb2-video-v4l.hpvrusb2-cx2584x-v4l.hpvrusb2-cs53l32a.hpvrusb2-audio.h
Detected Declarations
struct pvr2_mpeg_idsstruct pvr2_fx2cmd_descdefstruct pvr2_std_hackstruct hdw_timerfunction trace_stbitfunction ctrl_channelfreq_getfunction ctrl_channelfreq_setfunction ctrl_channelprog_getfunction ctrl_channelprog_setfunction ctrl_channel_getfunction ctrl_channel_setfunction ctrl_freq_getfunction ctrl_freq_is_dirtyfunction ctrl_freq_clear_dirtyfunction ctrl_freq_setfunction ctrl_cropl_min_getfunction ctrl_cropl_max_getfunction ctrl_cropt_min_getfunction ctrl_cropt_max_getfunction ctrl_cropw_max_getfunction ctrl_croph_max_getfunction ctrl_get_cropcapblfunction ctrl_get_cropcapbtfunction ctrl_get_cropcapbwfunction ctrl_get_cropcapbhfunction ctrl_get_cropcapdlfunction ctrl_get_cropcapdtfunction ctrl_get_cropcapdwfunction ctrl_get_cropcapdhfunction ctrl_get_cropcappanfunction ctrl_get_cropcappadfunction ctrl_vres_max_getfunction ctrl_vres_min_getfunction ctrl_get_inputfunction ctrl_check_inputfunction ctrl_set_inputfunction ctrl_isdirty_inputfunction ctrl_cleardirty_inputfunction ctrl_freq_max_getfunction ctrl_freq_min_getfunction ctrl_cx2341x_is_dirtyfunction ctrl_cx2341x_clear_dirtyfunction ctrl_cx2341x_getfunction ctrl_cx2341x_setfunction ctrl_cx2341x_getv4lflagsfunction ctrl_streamingenabled_getfunction ctrl_masterstate_getfunction ctrl_hsm_get
Annotated Snippet
struct pvr2_mpeg_ids {
const char *strid;
int id;
};
static const struct pvr2_mpeg_ids mpeg_ids[] = {
{
.strid = "audio_layer",
.id = V4L2_CID_MPEG_AUDIO_ENCODING,
},{
.strid = "audio_bitrate",
.id = V4L2_CID_MPEG_AUDIO_L2_BITRATE,
},{
/* Already using audio_mode elsewhere :-( */
.strid = "mpeg_audio_mode",
.id = V4L2_CID_MPEG_AUDIO_MODE,
},{
.strid = "mpeg_audio_mode_extension",
.id = V4L2_CID_MPEG_AUDIO_MODE_EXTENSION,
},{
.strid = "audio_emphasis",
.id = V4L2_CID_MPEG_AUDIO_EMPHASIS,
},{
.strid = "audio_crc",
.id = V4L2_CID_MPEG_AUDIO_CRC,
},{
.strid = "video_aspect",
.id = V4L2_CID_MPEG_VIDEO_ASPECT,
},{
.strid = "video_b_frames",
.id = V4L2_CID_MPEG_VIDEO_B_FRAMES,
},{
.strid = "video_gop_size",
.id = V4L2_CID_MPEG_VIDEO_GOP_SIZE,
},{
.strid = "video_gop_closure",
.id = V4L2_CID_MPEG_VIDEO_GOP_CLOSURE,
},{
.strid = "video_bitrate_mode",
.id = V4L2_CID_MPEG_VIDEO_BITRATE_MODE,
},{
.strid = "video_bitrate",
.id = V4L2_CID_MPEG_VIDEO_BITRATE,
},{
.strid = "video_bitrate_peak",
.id = V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
},{
.strid = "video_temporal_decimation",
.id = V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION,
},{
.strid = "stream_type",
.id = V4L2_CID_MPEG_STREAM_TYPE,
},{
.strid = "video_spatial_filter_mode",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE,
},{
.strid = "video_spatial_filter",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER,
},{
.strid = "video_luma_spatial_filter_type",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE,
},{
.strid = "video_chroma_spatial_filter_type",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE,
},{
.strid = "video_temporal_filter_mode",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE,
},{
.strid = "video_temporal_filter",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER,
},{
.strid = "video_median_filter_type",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE,
},{
.strid = "video_luma_median_filter_top",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP,
},{
.strid = "video_luma_median_filter_bottom",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM,
},{
.strid = "video_chroma_median_filter_top",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP,
},{
.strid = "video_chroma_median_filter_bottom",
.id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,
}
};
#define MPEGDEF_COUNT ARRAY_SIZE(mpeg_ids)
static const char *control_values_srate[] = {
Annotation
- Immediate include surface: `linux/errno.h`, `linux/string.h`, `linux/slab.h`, `linux/module.h`, `linux/firmware.h`, `linux/videodev2.h`, `media/v4l2-common.h`, `media/tuner.h`.
- Detected declarations: `struct pvr2_mpeg_ids`, `struct pvr2_fx2cmd_descdef`, `struct pvr2_std_hack`, `struct hdw_timer`, `function trace_stbit`, `function ctrl_channelfreq_get`, `function ctrl_channelfreq_set`, `function ctrl_channelprog_get`, `function ctrl_channelprog_set`, `function ctrl_channel_get`.
- 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.