sound/pci/ctxfi/ctvmem.h
Source file repositories/reference/linux-study-clean/sound/pci/ctxfi/ctvmem.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ctxfi/ctvmem.h- Extension
.h- Size
- 1721 bytes
- Lines
- 61
- Domain
- Driver Families
- Bucket
- sound/pci
- 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.
- 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/mutex.hlinux/list.hlinux/pci.hsound/memalloc.h
Detected Declarations
struct ct_vm_blockstruct snd_pcm_substreamstruct ct_vm
Annotated Snippet
struct ct_vm_block {
unsigned int addr; /* starting logical addr of this block */
unsigned int size; /* size of this device virtual mem block */
struct list_head list;
};
struct snd_pcm_substream;
/* Virtual memory management object for card device */
struct ct_vm {
struct snd_dma_buffer ptp[CT_PTP_NUM]; /* Device page table pages */
unsigned int size; /* Available addr space in bytes */
struct list_head unused; /* List of unused blocks */
struct list_head used; /* List of used blocks */
struct mutex lock;
/* Map host addr (kmalloced/vmalloced) to device logical addr. */
struct ct_vm_block *(*map)(struct ct_vm *, struct snd_pcm_substream *,
int size);
/* Unmap device logical addr area. */
void (*unmap)(struct ct_vm *, struct ct_vm_block *block);
dma_addr_t (*get_ptp_phys)(struct ct_vm *vm, int index);
};
int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci);
void ct_vm_destroy(struct ct_vm *vm);
#endif /* CTVMEM_H */
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/list.h`, `linux/pci.h`, `sound/memalloc.h`.
- Detected declarations: `struct ct_vm_block`, `struct snd_pcm_substream`, `struct ct_vm`.
- Atlas domain: Driver Families / sound/pci.
- 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.