sound/pci/ctxfi/ctdaio.h
Source file repositories/reference/linux-study-clean/sound/pci/ctxfi/ctdaio.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/ctxfi/ctdaio.h- Extension
.h- Size
- 3332 bytes
- Lines
- 125
- 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 dao_rsc_opsstruct dai_rsc_opsstruct daio_mgrstruct daiostruct daostruct daistruct dao_descstruct dao_rsc_opsstruct dai_rsc_opsstruct daio_descstruct daio_mgrenum DAIOTYP
Annotated Snippet
struct daio {
struct rsc rscl; /* Basic resource info for left TX/RX */
struct rsc rscr; /* Basic resource info for right TX/RX */
enum DAIOTYP type;
unsigned char output;
};
struct dao {
struct daio daio;
const struct dao_rsc_ops *ops; /* DAO specific operations */
struct imapper **imappers;
struct daio_mgr *mgr;
struct hw *hw;
void *ctrl_blk;
};
struct dai {
struct daio daio;
const struct dai_rsc_ops *ops; /* DAI specific operations */
struct hw *hw;
void *ctrl_blk;
};
struct dao_desc {
unsigned int msr:4;
unsigned int passthru:1;
};
struct dao_rsc_ops {
int (*set_spos)(struct dao *dao, unsigned int spos);
int (*commit_write)(struct dao *dao);
int (*get_spos)(struct dao *dao, unsigned int *spos);
int (*reinit)(struct dao *dao, const struct dao_desc *desc);
int (*set_left_input)(struct dao *dao, struct rsc *input);
int (*set_right_input)(struct dao *dao, struct rsc *input);
int (*clear_left_input)(struct dao *dao);
int (*clear_right_input)(struct dao *dao);
};
struct dai_rsc_ops {
int (*set_srt_srcl)(struct dai *dai, struct rsc *src);
int (*set_srt_srcr)(struct dai *dai, struct rsc *src);
int (*set_srt_msr)(struct dai *dai, unsigned int msr);
int (*set_enb_src)(struct dai *dai, unsigned int enb);
int (*set_enb_srt)(struct dai *dai, unsigned int enb);
int (*commit_write)(struct dai *dai);
};
/* Define daio resource request description info */
struct daio_desc {
unsigned int type:4;
unsigned int msr:4;
unsigned int passthru:1;
unsigned int output:1;
};
struct daio_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 one daio resource */
int (*get_daio)(struct daio_mgr *mgr,
const struct daio_desc *desc, struct daio **rdaio);
/* return one daio resource */
int (*put_daio)(struct daio_mgr *mgr, struct daio *daio);
int (*daio_enable)(struct daio_mgr *mgr, struct daio *daio);
int (*daio_disable)(struct daio_mgr *mgr, struct daio *daio);
int (*imap_add)(struct daio_mgr *mgr, struct imapper *entry);
int (*imap_delete)(struct daio_mgr *mgr, struct imapper *entry);
int (*commit_write)(struct daio_mgr *mgr);
};
/* Constructor and destructor of daio resource manager */
int daio_mgr_create(struct hw *hw, void **ptr);
int daio_mgr_destroy(void *ptr);
#endif /* CTDAIO_H */
Annotation
- Immediate include surface: `ctresource.h`, `ctimap.h`, `linux/spinlock.h`, `linux/list.h`, `sound/core.h`.
- Detected declarations: `struct dao_rsc_ops`, `struct dai_rsc_ops`, `struct daio_mgr`, `struct daio`, `struct dao`, `struct dai`, `struct dao_desc`, `struct dao_rsc_ops`, `struct dai_rsc_ops`, `struct daio_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.