include/sound/sof.h
Source file repositories/reference/linux-study-clean/include/sound/sof.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/sof.h- Extension
.h- Size
- 4805 bytes
- Lines
- 183
- 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
linux/pci.hsound/soc.hsound/soc-acpi.h
Detected Declarations
struct snd_sof_dsp_opsstruct snd_sof_devstruct sof_loadable_file_profilestruct snd_sof_pdatastruct sof_dev_descenum sof_fw_stateenum sof_dsp_power_statesenum sof_ipc_type
Annotated Snippet
struct sof_loadable_file_profile {
enum sof_ipc_type ipc_type;
const char *fw_path;
const char *fw_path_postfix;
const char *fw_name;
const char *fw_lib_path;
const char *fw_lib_path_postfix;
const char *tplg_path;
const char *tplg_name;
};
/*
* SOF Platform data.
*/
struct snd_sof_pdata {
const char *name;
const char *platform;
/*
* PCI SSID. As PCI does not define 0 as invalid, the subsystem_id_set
* flag indicates that a value has been written to these members.
*/
unsigned short subsystem_vendor;
unsigned short subsystem_device;
bool subsystem_id_set;
struct device *dev;
/*
* notification callback used if the hardware initialization
* can take time or is handled in a workqueue. This callback
* can be used by the caller to e.g. enable runtime_pm
* or limit functionality until all low-level inits are
* complete.
*/
void (*sof_probe_complete)(struct device *dev);
/* descriptor */
const struct sof_dev_desc *desc;
/* platform's preferred IPC type and path overrides */
struct sof_loadable_file_profile ipc_file_profile_base;
/* firmware and topology filenames */
const char *fw_filename_prefix;
const char *fw_filename;
const char *tplg_filename_prefix;
const char *tplg_filename;
bool disable_function_topology;
/* loadable external libraries available under this directory */
const char *fw_lib_prefix;
/* machine */
struct platform_device *pdev_mach;
const struct snd_soc_acpi_mach *machine;
const struct snd_sof_of_mach *of_machine;
void *hw_pdata;
enum sof_ipc_type ipc_type;
};
/*
* Descriptor used for setting up SOF platform data. This is used when
* ACPI/PCI data is missing or mapped differently.
*/
struct sof_dev_desc {
/* list of machines using this configuration */
struct snd_soc_acpi_mach *machines;
struct snd_sof_of_mach *of_machines;
/* alternate list of machines using this configuration */
struct snd_soc_acpi_mach *alt_machines;
bool use_acpi_target_states;
/* Platform resource indexes in BAR / ACPI resources. */
/* Must set to -1 if not used - add new items to end */
int resindex_lpe_base;
int resindex_pcicfg_base;
int resindex_imr_base;
int irqindex_host_ipc;
/* IPC timeouts in ms */
int ipc_timeout;
int boot_timeout;
/* chip information for dsp */
Annotation
- Immediate include surface: `linux/pci.h`, `sound/soc.h`, `sound/soc-acpi.h`.
- Detected declarations: `struct snd_sof_dsp_ops`, `struct snd_sof_dev`, `struct sof_loadable_file_profile`, `struct snd_sof_pdata`, `struct sof_dev_desc`, `enum sof_fw_state`, `enum sof_dsp_power_states`, `enum sof_ipc_type`.
- 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.