sound/soc/sof/sof-priv.h
Source file repositories/reference/linux-study-clean/sound/soc/sof/sof-priv.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/sof/sof-priv.h- Extension
.h- Size
- 30220 bytes
- Lines
- 910
- 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/device.hsound/hdaudio.hsound/sof.hsound/sof/info.hsound/sof/pm.hsound/sof/trace.hsound/compress_params.huapi/sound/sof/fw.hsound/sof/ext_manifest.h
Detected Declarations
struct snd_sof_pcm_streamstruct sof_dsp_power_statestruct sof_compr_streamstruct snd_sof_devstruct snd_sof_ipc_msgstruct snd_sof_ipcstruct snd_sof_debugfs_mapstruct snd_soc_tplg_opsstruct snd_soc_componentstruct snd_sof_pdatastruct snd_sof_platform_stream_paramsstruct sof_firmwarestruct snd_sof_dsp_opsstruct dsp_arch_opsstruct snd_sof_dfsentrystruct snd_sof_debugfs_mapstruct snd_sof_mailboxstruct snd_sof_ipc_msgstruct sof_ipc_fw_tracing_opsstruct sof_ipc_pm_opsstruct sof_ipc_fw_loader_opsstruct sof_ipc_tplg_opsstruct sof_ipc_pcm_opsstruct sof_ipc_opsstruct snd_sof_ipcstruct snd_sof_devstruct sof_client_devenum sof_system_suspend_stateenum sof_dfsentry_typeenum sof_debugfs_access_typeenum sof_dai_accessfunction snd_sof_ipc_msgs_rxfunction sof_ipc_tx_message_no_replyfunction sof_ipc_tx_message_no_pm_no_replyfunction snd_sof_ipc_process_replyfunction sof_stackfunction sof_oopsfunction sof_client_dev_to_sof_devfunction sof_client_dev_registerfunction sof_client_dev_unregisterfunction sof_unregister_clientsfunction sof_resume_clients
Annotated Snippet
struct sof_dsp_power_state {
u32 state;
u32 substate; /* platform-specific */
};
/* System suspend target state */
enum sof_system_suspend_state {
SOF_SUSPEND_NONE = 0,
SOF_SUSPEND_S0IX,
SOF_SUSPEND_S3,
SOF_SUSPEND_S4,
SOF_SUSPEND_S5,
};
enum sof_dfsentry_type {
SOF_DFSENTRY_TYPE_IOMEM = 0,
SOF_DFSENTRY_TYPE_BUF,
};
enum sof_debugfs_access_type {
SOF_DEBUGFS_ACCESS_ALWAYS = 0,
SOF_DEBUGFS_ACCESS_D0_ONLY,
};
struct sof_compr_stream {
u64 copied_total;
u32 sampling_rate;
u16 channels;
u16 sample_container_bytes;
struct snd_codec codec_params;
size_t posn_offset;
};
struct snd_sof_dev;
struct snd_sof_ipc_msg;
struct snd_sof_ipc;
struct snd_sof_debugfs_map;
struct snd_soc_tplg_ops;
struct snd_soc_component;
struct snd_sof_pdata;
/**
* struct snd_sof_platform_stream_params - platform dependent stream parameters
* @phy_addr: Platform dependent address to be used, if @use_phy_addr
* is true
* @stream_tag: Stream tag to use
* @use_phy_addr: Use the provided @phy_addr for configuration
* @no_ipc_position: Disable position update IPC from firmware
* @cont_update_posn: Continuous position update.
*/
struct snd_sof_platform_stream_params {
u32 phy_addr;
u16 stream_tag;
bool use_phy_address;
bool no_ipc_position;
bool cont_update_posn;
};
/**
* struct sof_firmware - Container struct for SOF firmware
* @fw: Pointer to the firmware
* @payload_offset: Offset of the data within the loaded firmware image to be
* loaded to the DSP (skipping for example ext_manifest section)
*/
struct sof_firmware {
const struct firmware *fw;
u32 payload_offset;
};
enum sof_dai_access {
SOF_DAI_DSP_ACCESS, /* access from DSP only */
SOF_DAI_HOST_ACCESS, /* access from host only */
SOF_DAI_ACCESS_NUM
};
/*
* SOF DSP HW abstraction operations.
* Used to abstract DSP HW architecture and any IO busses between host CPU
* and DSP device(s).
*/
struct snd_sof_dsp_ops {
/* probe/remove/shutdown */
int (*probe_early)(struct snd_sof_dev *sof_dev); /* optional */
int (*probe)(struct snd_sof_dev *sof_dev); /* mandatory */
void (*remove)(struct snd_sof_dev *sof_dev); /* optional */
void (*remove_late)(struct snd_sof_dev *sof_dev); /* optional */
int (*shutdown)(struct snd_sof_dev *sof_dev); /* optional */
Annotation
- Immediate include surface: `linux/device.h`, `sound/hdaudio.h`, `sound/sof.h`, `sound/sof/info.h`, `sound/sof/pm.h`, `sound/sof/trace.h`, `sound/compress_params.h`, `uapi/sound/sof/fw.h`.
- Detected declarations: `struct snd_sof_pcm_stream`, `struct sof_dsp_power_state`, `struct sof_compr_stream`, `struct snd_sof_dev`, `struct snd_sof_ipc_msg`, `struct snd_sof_ipc`, `struct snd_sof_debugfs_map`, `struct snd_soc_tplg_ops`, `struct snd_soc_component`, `struct snd_sof_pdata`.
- 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.