sound/pci/ctxfi/ctsrc.h
Source file repositories/reference/linux-study-clean/sound/pci/ctxfi/ctsrc.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ctxfi/ctsrc.h- Extension
.h- Size
- 4448 bytes
- Lines
- 149
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ctresource.hctimap.hlinux/spinlock.hlinux/list.hsound/core.h
Detected Declarations
struct src_rsc_opsstruct srcstruct src_rsc_opsstruct src_descstruct src_mgrstruct srcimp_mgrstruct srcimp_rsc_opsstruct srcimpstruct srcimp_rsc_opsstruct srcimp_descstruct srcimp_mgrenum SRCMODE
Annotated Snippet
struct src {
struct rsc rsc; /* Basic resource info */
struct src *intlv; /* Pointer to next interleaved SRC in a series */
const struct src_rsc_ops *ops; /* SRC specific operations */
/* Number of contiguous srcs for interleaved usage */
unsigned char multi;
unsigned char mode; /* Working mode of this SRC resource */
};
struct src_rsc_ops {
int (*set_state)(struct src *src, unsigned int state);
int (*set_bm)(struct src *src, unsigned int bm);
int (*set_sf)(struct src *src, unsigned int sf);
int (*set_pm)(struct src *src, unsigned int pm);
int (*set_rom)(struct src *src, unsigned int rom);
int (*set_vo)(struct src *src, unsigned int vo);
int (*set_st)(struct src *src, unsigned int st);
int (*set_bp)(struct src *src, unsigned int bp);
int (*set_cisz)(struct src *src, unsigned int cisz);
int (*set_ca)(struct src *src, unsigned int ca);
int (*set_sa)(struct src *src, unsigned int sa);
int (*set_la)(struct src *src, unsigned int la);
int (*set_pitch)(struct src *src, unsigned int pitch);
int (*set_clr_zbufs)(struct src *src);
int (*commit_write)(struct src *src);
int (*get_ca)(struct src *src);
int (*init)(struct src *src);
struct src* (*next_interleave)(struct src *src);
};
/* Define src resource request description info */
struct src_desc {
/* Number of contiguous master srcs for interleaved usage */
unsigned char multi;
unsigned char msr;
unsigned char mode; /* Working mode of the requested srcs */
};
/* Define src manager object */
struct src_mgr {
struct rsc_mgr mgr; /* Basic resource manager info */
struct snd_card *card; /* pointer to this card */
spinlock_t mgr_lock;
/* request src resource */
int (*get_src)(struct src_mgr *mgr,
const struct src_desc *desc, struct src **rsrc);
/* return src resource */
int (*put_src)(struct src_mgr *mgr, struct src *src);
int (*src_enable_s)(struct src_mgr *mgr, struct src *src);
int (*src_enable)(struct src_mgr *mgr, struct src *src);
int (*src_disable)(struct src_mgr *mgr, struct src *src);
int (*commit_write)(struct src_mgr *mgr);
};
/* Define the descriptor of a SRC Input Mapper resource */
struct srcimp_mgr;
struct srcimp_rsc_ops;
struct srcimp {
struct rsc rsc;
unsigned char idx[8];
unsigned int mapped; /* A bit-map indicating which conj rsc is mapped */
struct srcimp_mgr *mgr;
const struct srcimp_rsc_ops *ops;
struct imapper imappers[];
};
struct srcimp_rsc_ops {
int (*map)(struct srcimp *srcimp, struct src *user, struct rsc *input);
int (*unmap)(struct srcimp *srcimp);
};
/* Define SRCIMP resource request description info */
struct srcimp_desc {
unsigned int msr;
};
struct srcimp_mgr {
struct rsc_mgr mgr; /* Basic resource manager info */
struct snd_card *card; /* pointer to this card */
spinlock_t mgr_lock;
spinlock_t imap_lock;
struct list_head imappers;
struct imapper *init_imap;
unsigned int init_imap_added;
/* request srcimp resource */
int (*get_srcimp)(struct srcimp_mgr *mgr,
const struct srcimp_desc *desc,
Annotation
- Immediate include surface: `ctresource.h`, `ctimap.h`, `linux/spinlock.h`, `linux/list.h`, `sound/core.h`.
- Detected declarations: `struct src_rsc_ops`, `struct src`, `struct src_rsc_ops`, `struct src_desc`, `struct src_mgr`, `struct srcimp_mgr`, `struct srcimp_rsc_ops`, `struct srcimp`, `struct srcimp_rsc_ops`, `struct srcimp_desc`.
- 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.