sound/soc/intel/catpt/core.h
Source file repositories/reference/linux-study-clean/sound/soc/intel/catpt/core.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/catpt/core.h- Extension
.h- Size
- 4874 bytes
- Lines
- 176
- Domain
- Driver Families
- Bucket
- sound/soc
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma/dw.hlinux/irqreturn.hmessages.hregisters.hsound/memalloc.huapi/sound/asound.h
Detected Declarations
struct catpt_devstruct catpt_ipc_msgstruct catpt_ipcstruct catpt_module_typestruct catpt_specstruct catpt_devstruct snd_pcm_substreamstruct catpt_stream_templatestruct catpt_stream_runtime
Annotated Snippet
struct catpt_ipc_msg {
union {
u32 header;
union catpt_global_msg rsp;
};
void *data;
size_t size;
};
struct catpt_ipc {
struct device *dev;
struct catpt_ipc_msg rx;
struct catpt_fw_ready config;
u32 default_timeout;
bool ready;
spinlock_t lock;
struct mutex mutex;
struct completion done_completion;
struct completion busy_completion;
};
void catpt_ipc_init(struct catpt_ipc *ipc, struct device *dev);
struct catpt_module_type {
bool loaded;
u32 entry_point;
u32 persistent_size;
u32 scratch_size;
/* DRAM, initial module state */
u32 state_offset;
u32 state_size;
struct list_head node;
};
struct catpt_spec {
struct snd_soc_acpi_mach *machines;
u8 core_id;
const char *fw_name;
u32 host_dram_offset;
u32 host_iram_offset;
u32 host_shim_offset;
u32 host_dma_offset[CATPT_DMA_COUNT];
u32 host_ssp_offset[CATPT_SSP_COUNT];
u32 dram_mask;
u32 iram_mask;
u32 d3srampgd_bit;
u32 d3pgd_bit;
void (*pll_shutdown)(struct catpt_dev *cdev, bool enable);
};
struct catpt_dev {
struct device *dev;
struct dw_dma_chip *dmac;
struct catpt_ipc ipc;
void __iomem *pci_ba;
void __iomem *lpe_ba;
u32 lpe_base;
int irq;
const struct catpt_spec *spec;
struct completion fw_ready;
struct resource dram;
struct resource iram;
struct resource *scratch;
struct catpt_mixer_stream_info mixer;
struct catpt_module_type modules[CATPT_MODULE_COUNT];
struct catpt_ssp_device_format devfmt[CATPT_SSP_COUNT];
struct list_head stream_list;
struct mutex stream_mutex;
struct mutex clk_mutex;
struct catpt_dx_context dx_ctx;
void *dxbuf_vaddr;
dma_addr_t dxbuf_paddr;
};
int catpt_dmac_probe(struct catpt_dev *cdev);
void catpt_dmac_remove(struct catpt_dev *cdev);
struct dma_chan *catpt_dma_request_config_chan(struct catpt_dev *cdev);
int catpt_dma_memcpy_todsp(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t dst_addr, dma_addr_t src_addr,
size_t size);
int catpt_dma_memcpy_fromdsp(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t dst_addr, dma_addr_t src_addr,
Annotation
- Immediate include surface: `linux/dma/dw.h`, `linux/irqreturn.h`, `messages.h`, `registers.h`, `sound/memalloc.h`, `uapi/sound/asound.h`.
- Detected declarations: `struct catpt_dev`, `struct catpt_ipc_msg`, `struct catpt_ipc`, `struct catpt_module_type`, `struct catpt_spec`, `struct catpt_dev`, `struct snd_pcm_substream`, `struct catpt_stream_template`, `struct catpt_stream_runtime`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: source implementation candidate.
- 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.