drivers/media/usb/pvrusb2/pvrusb2-hdw.h
Source file repositories/reference/linux-study-clean/drivers/media/usb/pvrusb2/pvrusb2-hdw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/pvrusb2/pvrusb2-hdw.h- Extension
.h- Size
- 11651 bytes
- Lines
- 330
- 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
linux/usb.hlinux/videodev2.hmedia/v4l2-dev.hpvrusb2-io.hpvrusb2-ctrl.h
Detected Declarations
struct pvr2_hdwstruct pvr2_hdw_debug_infoenum pvr2_configenum pvr2_v4l_type
Annotated Snippet
struct pvr2_hdw_debug_info {
int big_lock_held;
int ctl_lock_held;
int flag_disconnected;
int flag_init_ok;
int flag_ok;
int fw1_state;
int flag_decoder_missed;
int flag_tripped;
int state_encoder_ok;
int state_encoder_run;
int state_decoder_run;
int state_decoder_ready;
int state_usbstream_run;
int state_decoder_quiescent;
int state_pipeline_config;
int state_pipeline_req;
int state_pipeline_pause;
int state_pipeline_idle;
int cmd_debug_state;
int cmd_debug_write_len;
int cmd_debug_read_len;
int cmd_debug_write_pend;
int cmd_debug_read_pend;
int cmd_debug_timeout;
int cmd_debug_rstatus;
int cmd_debug_wstatus;
unsigned char cmd_code;
};
/* Non-intrusively retrieve internal state info - this is useful for
diagnosing lockups. Note that this operation is completed without any
kind of locking and so it is not atomic and may yield inconsistent
results. This is *purely* a debugging aid. */
void pvr2_hdw_get_debug_info_unlocked(const struct pvr2_hdw *hdw,
struct pvr2_hdw_debug_info *);
/* Intrusively retrieve internal state info - this is useful for
diagnosing overall driver state. This operation synchronizes against
the overall driver mutex - so if there are locking problems this will
likely hang! This is *purely* a debugging aid. */
void pvr2_hdw_get_debug_info_locked(struct pvr2_hdw *hdw,
struct pvr2_hdw_debug_info *);
/* Report out several lines of text that describes driver internal state.
Results are written into the passed-in buffer. */
unsigned int pvr2_hdw_state_report(struct pvr2_hdw *hdw,
char *buf_ptr,unsigned int buf_size);
/* Cause modules to log their state once */
void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw);
/* Cause encoder firmware to be uploaded into the device. This is normally
done autonomously, but the interface is exported here because it is also
a debugging aid. */
int pvr2_upload_firmware2(struct pvr2_hdw *hdw);
#endif /* __PVRUSB2_HDW_H */
Annotation
- Immediate include surface: `linux/usb.h`, `linux/videodev2.h`, `media/v4l2-dev.h`, `pvrusb2-io.h`, `pvrusb2-ctrl.h`.
- Detected declarations: `struct pvr2_hdw`, `struct pvr2_hdw_debug_info`, `enum pvr2_config`, `enum pvr2_v4l_type`.
- 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.