drivers/media/pci/saa7134/saa7134-core.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/saa7134/saa7134-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/saa7134/saa7134-core.c- Extension
.c- Size
- 41486 bytes
- Lines
- 1525
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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
saa7134.hsaa7134-reg.hlinux/init.hlinux/list.hlinux/module.hlinux/kernel.hlinux/slab.hlinux/kmod.hlinux/sound.hlinux/interrupt.hlinux/delay.hlinux/mutex.hlinux/dma-mapping.hlinux/pm.h
Detected Declarations
function saa7134_track_gpiofunction saa7134_set_gpiofunction request_module_asyncfunction request_submodulesfunction flush_request_submodulesfunction saa7134_buffer_pagesfunction saa7134_buffer_countfunction saa7134_buffer_startpagefunction saa7134_buffer_basefunction saa7134_pgtable_allocfunction saa7134_pgtable_buildfunction saa7134_pgtable_freefunction saa7134_buffer_queuefunction saa7134_buffer_finishfunction saa7134_buffer_nextfunction saa7134_buffer_timeoutfunction saa7134_stop_streamingfunction saa7134_set_dmabitsfunction print_irqstatusfunction saa7134_irqfunction saa7134_hw_enable1function saa7134_hwinit1function saa7134_hw_enable2function saa7134_hwinit2function saa7134_hwfinifunction must_configure_manuallyfunction saa7134_unregister_media_devicefunction saa7134_media_releasefunction saa7134_create_entitiesfunction saa7134_unregister_videofunction mpeg_ops_attachfunction mpeg_ops_detachfunction saa7134_initdevfunction pci_resource_lenfunction saa7134_finidevfunction saa7134_buffer_requeuefunction saa7134_suspendfunction saa7134_resumefunction saa7134_ts_registerfunction saa7134_ts_unregisterfunction saa7134_initfunction saa7134_finimodule init saa7134_initexport saa7134_devlist_lockexport saa7134_devlistexport saa7134_stop_streamingexport saa7134_ts_registerexport saa7134_ts_unregister
Annotated Snippet
static struct pci_driver saa7134_pci_driver = {
.name = "saa7134",
.id_table = saa7134_pci_tbl,
.probe = saa7134_initdev,
.remove = saa7134_finidev,
.driver.pm = &saa7134_pm_ops,
};
static int __init saa7134_init(void)
{
pr_info("saa7130/34: v4l2 driver version %s loaded\n",
SAA7134_VERSION);
return pci_register_driver(&saa7134_pci_driver);
}
static void __exit saa7134_fini(void)
{
pci_unregister_driver(&saa7134_pci_driver);
}
module_init(saa7134_init);
module_exit(saa7134_fini);
/* ----------------------------------------------------------- */
EXPORT_SYMBOL(saa7134_set_gpio);
EXPORT_SYMBOL(saa7134_boards);
/* ----------------- for the DMA sound modules --------------- */
EXPORT_SYMBOL(saa7134_dmasound_init);
EXPORT_SYMBOL(saa7134_dmasound_exit);
EXPORT_SYMBOL(saa7134_pgtable_free);
EXPORT_SYMBOL(saa7134_pgtable_build);
EXPORT_SYMBOL(saa7134_pgtable_alloc);
EXPORT_SYMBOL(saa7134_set_dmabits);
Annotation
- Immediate include surface: `saa7134.h`, `saa7134-reg.h`, `linux/init.h`, `linux/list.h`, `linux/module.h`, `linux/kernel.h`, `linux/slab.h`, `linux/kmod.h`.
- Detected declarations: `function saa7134_track_gpio`, `function saa7134_set_gpio`, `function request_module_async`, `function request_submodules`, `function flush_request_submodules`, `function saa7134_buffer_pages`, `function saa7134_buffer_count`, `function saa7134_buffer_startpage`, `function saa7134_buffer_base`, `function saa7134_pgtable_alloc`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.