include/linux/firmware/cirrus/cs_dsp.h

Source file repositories/reference/linux-study-clean/include/linux/firmware/cirrus/cs_dsp.h

File Facts

System
Linux kernel
Corpus path
include/linux/firmware/cirrus/cs_dsp.h
Extension
.h
Size
11634 bytes
Lines
361
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct cs_dsp_region {
	int type;
	unsigned int base;
};

/**
 * struct cs_dsp_alg_region - Describes a logical algorithm region in DSP address space
 * @alg:	Algorithm id
 * @ver:	Expected algorithm version
 * @type:	Memory region type
 * @base:	Address of region
 */
struct cs_dsp_alg_region {
	unsigned int alg;
	unsigned int ver;
	int type;
	unsigned int base;
};

/**
 * struct cs_dsp_coeff_ctl - Describes a coefficient control
 * @list:		List node for internal use
 * @dsp:		DSP instance associated with this control
 * @cache:		Cached value of the control
 * @fw_name:		Name of the firmware
 * @subname:		Name of the control parsed from the WMFW
 * @subname_len:	Length of subname
 * @offset:		Offset of control within alg_region in words
 * @len:		Length of the cached value in bytes
 * @type:		One of the WMFW_CTL_TYPE_ control types defined in wmfw.h
 * @flags:		Bitfield of WMFW_CTL_FLAG_ control flags defined in wmfw.h
 * @set:		Flag indicating the value has been written by the user
 * @enabled:		Flag indicating whether control is enabled
 * @alg_region:		Logical region associated with this control
 * @priv:		For use by the client
 */
struct cs_dsp_coeff_ctl {
	struct list_head list;
	struct cs_dsp *dsp;
	void *cache;
	const char *fw_name;
	/* Subname is needed to match with firmware */
	const char *subname;
	unsigned int subname_len;
	unsigned int offset;
	unsigned int len;
	unsigned int type;
	unsigned int flags;
	unsigned int set:1;
	unsigned int enabled:1;
	struct cs_dsp_alg_region alg_region;

	void *priv;
};

struct cs_dsp_ops;
struct cs_dsp_client_ops;

/**
 * struct cs_dsp - Configuration and state of a Cirrus Logic DSP
 * @name:		The name of the DSP instance
 * @rev:		Revision of the DSP
 * @num:		DSP instance number
 * @type:		Type of DSP
 * @dev:		Driver model representation of the device
 * @regmap:		Register map of the device
 * @ops:		Function pointers for internal callbacks
 * @client_ops:		Function pointers for client callbacks
 * @base:		Address of the DSP registers
 * @base_sysinfo:	Address of the sysinfo register (Halo only)
 * @sysclk_reg:		Address of the sysclk register (ADSP1 only)
 * @sysclk_mask:	Mask of frequency bits within sysclk register (ADSP1 only)
 * @sysclk_shift:	Shift of frequency bits within sysclk register (ADSP1 only)
 * @alg_regions:	List of currently loaded algorithm regions
 * @fw_name:		Name of the current firmware
 * @fw_id:		ID of the current firmware, obtained from the wmfw
 * @fw_id_version:	Version of the firmware, obtained from the wmfw
 * @fw_vendor_id:	Vendor of the firmware, obtained from the wmfw
 * @mem:		DSP memory region descriptions
 * @num_mems:		Number of memory regions in this DSP
 * @fw_ver:		Version of the wmfw file format
 * @booted:		Flag indicating DSP has been configured
 * @running:		Flag indicating DSP is executing firmware
 * @ctl_list:		Controls defined within the loaded DSP firmware
 * @lock_regions:	Enable MPU traps on specified memory regions
 * @pwr_lock:		Lock used to serialize accesses
 * @debugfs_root:	Debugfs directory for this DSP instance
 * @wmfw_file_name:	Filename of the currently loaded firmware
 * @bin_file_name:	Filename of the currently loaded coefficients
 */

Annotation

Implementation Notes