sound/soc/intel/avs/messages.h

Source file repositories/reference/linux-study-clean/sound/soc/intel/avs/messages.h

File Facts

System
Linux kernel
Corpus path
sound/soc/intel/avs/messages.h
Extension
.h
Size
25211 bytes
Lines
1036
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 avs_tlv {
	u32 type;
	u32 length;
	u32 value[];
} __packed;
static_assert(sizeof(struct avs_tlv) == 8);

#define avs_tlv_size(tlv) struct_size(tlv, value, (tlv)->length / 4)

enum avs_module_msg_type {
	AVS_MOD_INIT_INSTANCE = 0,
	AVS_MOD_LARGE_CONFIG_GET = 3,
	AVS_MOD_LARGE_CONFIG_SET = 4,
	AVS_MOD_BIND = 5,
	AVS_MOD_UNBIND = 6,
	AVS_MOD_SET_DX = 7,
	AVS_MOD_SET_D0IX = 8,
	AVS_MOD_DELETE_INSTANCE = 11,
};

union avs_module_msg {
	u64 val;
	struct {
		union {
			u32 primary;
			struct {
				u32 module_id:16;
				u32 instance_id:8;
				u32 module_msg_type:5;
				u32 msg_direction:1;
				u32 msg_target:1;
			};
		};
		union {
			u32 val;
			struct {
				u32 param_block_size:16;
				u32 ppl_instance_id:8;
				u32 core_id:4;
				u32 proc_domain:1;
			} init_instance;
			struct {
				u32 data_off_size:20;
				u32 large_param_id:8;
				u32 final_block:1;
				u32 init_block:1;
			} large_config;
			struct {
				u32 dst_module_id:16;
				u32 dst_instance_id:8;
				u32 dst_queue:3;
				u32 src_queue:3;
			} bind_unbind;
			struct {
				/* pre-IceLake */
				u32 wake:1;
				u32 streaming:1;
				/* IceLake and onwards */
				u32 prevent_pg:1;
				u32 prevent_local_cg:1;
			} set_d0ix;
		} ext;
	};
} __packed;
static_assert(sizeof(union avs_module_msg) == 8);

#define AVS_IPC_NOT_SUPPORTED 15

union avs_reply_msg {
	u64 val;
	struct {
		union {
			u32 primary;
			struct {
				u32 status:24;
				u32 global_msg_type:5;
				u32 msg_direction:1;
				u32 msg_target:1;
			};
		};
		union {
			u32 val;
			/* module loading */
			struct {
				u32 err_mod_id:16;
			} load_multi_mods;
			/* pipeline management */
			struct {
				u32 state:5;
			} get_ppl_state;

Annotation

Implementation Notes