sound/core/pcm.c
Source file repositories/reference/linux-study-clean/sound/core/pcm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/core/pcm.c- Extension
.c- Size
- 33606 bytes
- Lines
- 1233
- Domain
- Driver Families
- Bucket
- sound/core
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/init.hlinux/slab.hlinux/module.hlinux/time.hlinux/mutex.hlinux/device.hlinux/nospec.hsound/core.hsound/minors.hsound/pcm.hsound/timer.hsound/control.hsound/info.hpcm_local.hlinux/soundcard.h
Detected Declarations
function list_for_each_entryfunction snd_pcm_nextfunction list_for_each_entryfunction snd_pcm_addfunction list_for_each_entryfunction snd_pcm_control_ioctlfunction snd_pcm_proc_info_readfunction snd_pcm_stream_proc_info_readfunction snd_pcm_substream_proc_info_readfunction snd_pcm_substream_proc_hw_params_readfunction snd_pcm_substream_proc_sw_params_readfunction snd_pcm_substream_proc_status_readfunction snd_pcm_xrun_injection_writefunction snd_pcm_xrun_debug_readfunction snd_pcm_xrun_debug_writefunction snd_pcm_stream_proc_initfunction snd_pcm_stream_proc_donefunction create_substream_info_entryfunction snd_pcm_substream_proc_initfunction snd_pcm_stream_proc_initfunction snd_pcm_stream_proc_donefunction snd_pcm_substream_proc_initfunction do_pcm_suspendfunction snd_pcm_newfunction _snd_pcm_newfunction snd_pcm_set_opsfunction snd_pcm_set_opsfunction free_chmapfunction snd_pcm_free_streamfunction snd_pcm_freefunction snd_pcm_dev_freefunction snd_pcm_attach_substreamfunction snd_pcm_detach_substreamfunction pcm_class_showfunction snd_pcm_dev_registerfunction snd_pcm_dev_disconnectfunction for_each_pcm_substreamfunction snd_pcm_notifyfunction snd_pcm_proc_readfunction snd_pcm_proc_initfunction snd_pcm_proc_donefunction alsa_pcm_initfunction alsa_pcm_exitmodule init alsa_pcm_initexport snd_pcm_format_nameexport snd_pcm_new_streamexport snd_pcm_newexport snd_pcm_new_internal
Annotated Snippet
module_init(alsa_pcm_init)
module_exit(alsa_pcm_exit)
Annotation
- Immediate include surface: `linux/init.h`, `linux/slab.h`, `linux/module.h`, `linux/time.h`, `linux/mutex.h`, `linux/device.h`, `linux/nospec.h`, `sound/core.h`.
- Detected declarations: `function list_for_each_entry`, `function snd_pcm_next`, `function list_for_each_entry`, `function snd_pcm_add`, `function list_for_each_entry`, `function snd_pcm_control_ioctl`, `function snd_pcm_proc_info_read`, `function snd_pcm_stream_proc_info_read`, `function snd_pcm_substream_proc_info_read`, `function snd_pcm_substream_proc_hw_params_read`.
- Atlas domain: Driver Families / sound/core.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.