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.

Dependency Surface

Detected Declarations

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

Implementation Notes