include/sound/sof/topology.h
Source file repositories/reference/linux-study-clean/include/sound/sof/topology.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/sof/topology.h- Extension
.h- Size
- 9130 bytes
- Lines
- 311
- Domain
- Driver Families
- Bucket
- include/sound
- 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
sound/sof/header.h
Detected Declarations
struct sof_ipc_compstruct sof_ipc_bufferstruct sof_ipc_comp_configstruct sof_ipc_comp_hoststruct sof_ipc_comp_daistruct sof_ipc_comp_mixerstruct sof_ipc_comp_volumestruct sof_ipc_comp_srcstruct sof_ipc_comp_asrcstruct sof_ipc_comp_muxstruct sof_ipc_comp_tonestruct sof_ipc_comp_processstruct sof_ipc_freestruct sof_ipc_comp_replystruct sof_ipc_pipe_newstruct sof_ipc_pipe_readystruct sof_ipc_pipe_freestruct sof_ipc_pipe_comp_connectenum sof_comp_typeenum sof_volume_rampenum sof_ipc_process_typeenum sof_ipc_pipe_sched_time_domainenum sof_event_types
Annotated Snippet
struct sof_ipc_comp {
struct sof_ipc_cmd_hdr hdr;
uint32_t id;
uint32_t type;
uint32_t pipeline_id;
uint32_t core;
/* extended data length, 0 if no extended data */
uint32_t ext_data_length;
} __packed __aligned(4);
/*
* Component Buffers
*/
/*
* SOF memory capabilities, add new ones at the end
*/
#define SOF_MEM_CAPS_RAM BIT(0)
#define SOF_MEM_CAPS_ROM BIT(1)
#define SOF_MEM_CAPS_EXT BIT(2) /**< external */
#define SOF_MEM_CAPS_LP BIT(3) /**< low power */
#define SOF_MEM_CAPS_HP BIT(4) /**< high performance */
#define SOF_MEM_CAPS_DMA BIT(5) /**< DMA'able */
#define SOF_MEM_CAPS_CACHE BIT(6) /**< cacheable */
#define SOF_MEM_CAPS_EXEC BIT(7) /**< executable */
#define SOF_MEM_CAPS_L3 BIT(8) /**< L3 memory */
/*
* overrun will cause ring buffer overwrite, instead of XRUN.
*/
#define SOF_BUF_OVERRUN_PERMITTED BIT(0)
/*
* underrun will cause readback of 0s, instead of XRUN.
*/
#define SOF_BUF_UNDERRUN_PERMITTED BIT(1)
/* the UUID size in bytes, shared between FW and host */
#define SOF_UUID_SIZE 16
/* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */
struct sof_ipc_buffer {
struct sof_ipc_comp comp;
uint32_t size; /**< buffer size in bytes */
uint32_t caps; /**< SOF_MEM_CAPS_ */
uint32_t flags; /**< SOF_BUF_ flags defined above */
uint32_t reserved; /**< reserved for future use */
} __packed __aligned(4);
/* generic component config data - must always be after struct sof_ipc_comp */
struct sof_ipc_comp_config {
struct sof_ipc_cmd_hdr hdr;
uint32_t periods_sink; /**< 0 means variable */
uint32_t periods_source;/**< 0 means variable */
uint32_t reserved1; /**< reserved */
uint32_t frame_fmt; /**< SOF_IPC_FRAME_ */
uint32_t xrun_action;
/* reserved for future use */
uint32_t reserved[2];
} __packed __aligned(4);
/* generic host component */
struct sof_ipc_comp_host {
struct sof_ipc_comp comp;
struct sof_ipc_comp_config config;
uint32_t direction; /**< SOF_IPC_STREAM_ */
uint32_t no_irq; /**< don't send periodic IRQ to host/DSP */
uint32_t dmac_config; /**< DMA engine specific */
} __packed __aligned(4);
/* generic DAI component */
struct sof_ipc_comp_dai {
struct sof_ipc_comp comp;
struct sof_ipc_comp_config config;
uint32_t direction; /**< SOF_IPC_STREAM_ */
uint32_t dai_index; /**< index of this type dai */
uint32_t type; /**< DAI type - SOF_DAI_ */
uint32_t reserved; /**< reserved */
} __packed __aligned(4);
/* generic mixer component */
struct sof_ipc_comp_mixer {
struct sof_ipc_comp comp;
struct sof_ipc_comp_config config;
} __packed __aligned(4);
/* volume ramping types */
enum sof_volume_ramp {
Annotation
- Immediate include surface: `sound/sof/header.h`.
- Detected declarations: `struct sof_ipc_comp`, `struct sof_ipc_buffer`, `struct sof_ipc_comp_config`, `struct sof_ipc_comp_host`, `struct sof_ipc_comp_dai`, `struct sof_ipc_comp_mixer`, `struct sof_ipc_comp_volume`, `struct sof_ipc_comp_src`, `struct sof_ipc_comp_asrc`, `struct sof_ipc_comp_mux`.
- Atlas domain: Driver Families / include/sound.
- 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.