sound/soc/intel/atom/sst/sst.h

Source file repositories/reference/linux-study-clean/sound/soc/intel/atom/sst/sst.h

File Facts

System
Linux kernel
Corpus path
sound/soc/intel/atom/sst/sst.h
Extension
.h
Size
14733 bytes
Lines
525
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sst_block {
	bool	condition;
	int	ret_code;
	void	*data;
	u32     size;
	bool	on;
	u32     msg_id;
	u32     drv_id;
	struct list_head node;
};

/**
 * struct stream_info - structure that holds the stream information
 *
 * @status : stream current state
 * @prev : stream prev state
 * @resume_status : stream current state to restore on resume
 * @resume_prev : stream prev state to restore on resume
 * @lock : stream mutex for protecting state
 * @alloc_param : parameters used for stream (re-)allocation
 * @pcm_substream : PCM substream
 * @period_elapsed : PCM period elapsed callback
 * @sfreq : stream sampling freq
 * @cumm_bytes : cummulative bytes decoded
 */
struct stream_info {
	unsigned int		status;
	unsigned int		prev;
	unsigned int		resume_status;
	unsigned int		resume_prev;
	struct mutex		lock;
	struct snd_sst_alloc_mrfld alloc_param;

	void			*pcm_substream;
	void (*period_elapsed)(void *pcm_substream);

	unsigned int		sfreq;
	u32			cumm_bytes;

	void			*compr_cb_param;
	void (*compr_cb)(void *compr_cb_param);

	void			*drain_cb_param;
	void (*drain_notify)(void *drain_cb_param);

	unsigned int		num_ch;
	unsigned int		pipe_id;
	unsigned int		task_id;
};

#define SST_FW_SIGN "$SST"
#define SST_FW_LIB_SIGN "$LIB"

/**
 * struct sst_fw_header - FW file headers
 *
 * @signature : FW signature
 * @file_size: size of fw image
 * @modules : # of modules
 * @file_format : version of header format
 * @reserved : reserved fields
 */
struct sst_fw_header {
	unsigned char signature[FW_SIGNATURE_SIZE];
	u32 file_size;
	u32 modules;
	u32 file_format;
	u32 reserved[4];
};

/**
 * struct fw_module_header - module header in FW
 *
 * @signature: module signature
 * @mod_size: size of module
 * @blocks: block count
 * @type: block type
 * @entry_point: module netry point
 */
struct fw_module_header {
	unsigned char signature[FW_SIGNATURE_SIZE];
	u32 mod_size;
	u32 blocks;
	u32 type;
	u32 entry_point;
};

/**
 * struct fw_block_info - block header for FW
 *

Annotation

Implementation Notes