include/sound/sof/ipc4/header.h
Source file repositories/reference/linux-study-clean/include/sound/sof/ipc4/header.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/sof/ipc4/header.h- Extension
.h- Size
- 22800 bytes
- Lines
- 667
- Domain
- Driver Families
- Bucket
- include/sound
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.huapi/sound/sof/abi.h
Detected Declarations
struct sof_ipc4_msgstruct sof_ipc4_tuplestruct sof_ipc4_audio_formatstruct sof_ipc4_base_module_cfgstruct sof_ipc4_fw_versionstruct sof_ipc4_dx_state_infostruct sof_ipc4_intel_mic_privacy_capstruct sof_ipc4_notify_resource_datastruct sof_ipc4_notify_module_datastruct sof_ipc4_module_init_ext_initstruct sof_ipc4_module_init_ext_objectstruct sof_ipc4_mod_init_ext_dp_memory_dataenum sof_ipc4_msg_targetenum sof_ipc4_global_msgenum sof_ipc4_msg_direnum sof_ipc4_pipeline_stateenum sof_ipc4_channel_configenum sof_ipc4_interleaved_styleenum sof_ipc4_sample_typeenum sof_ipc4_module_typeenum sof_ipc4_base_fw_paramsenum sof_ipc4_fw_config_paramsenum sof_ipc4_hw_config_paramsenum sof_ipc4_notification_typeenum sof_ipc4_mod_init_ext_obj_id
Annotated Snippet
struct sof_ipc4_msg {
union {
u64 header_u64;
struct {
u32 primary;
u32 extension;
};
};
size_t data_size;
void *data_ptr;
};
/**
* struct sof_ipc4_tuple - Generic type/ID and parameter tuple
* @type: type/ID
* @size: size of the @value array in bytes
* @value: value for the given type
*/
struct sof_ipc4_tuple {
uint32_t type;
uint32_t size;
uint32_t value[];
} __packed;
/*
* IPC4 messages have two 32 bit identifier made up as follows :-
*
* header - msg type, msg id, msg direction ...
* extension - extra params such as msg data size in mailbox
*
* These are sent at the start of the IPC message in the mailbox. Messages
* should not be sent in the doorbell (special exceptions for firmware).
*/
/*
* IPC4 primary header bit allocation for messages
* bit 0-23: message type specific
* bit 24-28: type: enum sof_ipc4_global_msg if target is SOF_IPC4_FW_GEN_MSG
* enum sof_ipc4_module_type if target is SOF_IPC4_MODULE_MSG
* bit 29: response - sof_ipc4_msg_dir
* bit 30: target - enum sof_ipc4_msg_target
* bit 31: reserved, unused
*/
/* Value of target field - must fit into 1 bit */
enum sof_ipc4_msg_target {
/* Global FW message */
SOF_IPC4_FW_GEN_MSG,
/* Module message */
SOF_IPC4_MODULE_MSG
};
/* Value of type field - must fit into 5 bits */
enum sof_ipc4_global_msg {
SOF_IPC4_GLB_BOOT_CONFIG,
SOF_IPC4_GLB_ROM_CONTROL,
SOF_IPC4_GLB_IPCGATEWAY_CMD,
/* 3 .. 12: RESERVED - do not use */
SOF_IPC4_GLB_PERF_MEASUREMENTS_CMD = 13,
SOF_IPC4_GLB_CHAIN_DMA,
SOF_IPC4_GLB_LOAD_MULTIPLE_MODULES,
SOF_IPC4_GLB_UNLOAD_MULTIPLE_MODULES,
/* pipeline settings */
SOF_IPC4_GLB_CREATE_PIPELINE,
SOF_IPC4_GLB_DELETE_PIPELINE,
SOF_IPC4_GLB_SET_PIPELINE_STATE,
SOF_IPC4_GLB_GET_PIPELINE_STATE,
SOF_IPC4_GLB_GET_PIPELINE_CONTEXT_SIZE,
SOF_IPC4_GLB_SAVE_PIPELINE,
SOF_IPC4_GLB_RESTORE_PIPELINE,
/*
* library loading
*
* Loads library (using Code Load or HD/A Host Output DMA)
*/
SOF_IPC4_GLB_LOAD_LIBRARY,
/*
* Prepare the host DMA channel for library loading, must be followed by
* a SOF_IPC4_GLB_LOAD_LIBRARY message as the library loading step
*/
SOF_IPC4_GLB_LOAD_LIBRARY_PREPARE,
SOF_IPC4_GLB_INTERNAL_MESSAGE,
Annotation
- Immediate include surface: `linux/types.h`, `uapi/sound/sof/abi.h`.
- Detected declarations: `struct sof_ipc4_msg`, `struct sof_ipc4_tuple`, `struct sof_ipc4_audio_format`, `struct sof_ipc4_base_module_cfg`, `struct sof_ipc4_fw_version`, `struct sof_ipc4_dx_state_info`, `struct sof_ipc4_intel_mic_privacy_cap`, `struct sof_ipc4_notify_resource_data`, `struct sof_ipc4_notify_module_data`, `struct sof_ipc4_module_init_ext_init`.
- Atlas domain: Driver Families / include/sound.
- Implementation status: integration 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.