sound/soc/intel/avs/debug.h

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

File Facts

System
Linux kernel
Corpus path
sound/soc/intel/avs/debug.h
Extension
.h
Size
2422 bytes
Lines
92
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_apl_log_buffer_layout {
	u32 read_ptr;
	u32 write_ptr;
	u8 buffer[];
} __packed;
static_assert(sizeof(struct avs_apl_log_buffer_layout) == 8);

#define avs_apl_log_payload_size(adev) \
	(avs_log_buffer_size(adev) - sizeof(struct avs_apl_log_buffer_layout))

#define avs_apl_log_payload_addr(addr) \
	(addr + sizeof(struct avs_apl_log_buffer_layout))

#ifdef CONFIG_DEBUG_FS
int avs_register_probe_component(struct avs_dev *adev, const char *name);

#define AVS_SET_ENABLE_LOGS_OP(name) \
	.enable_logs = avs_##name##_enable_logs

bool avs_logging_fw(struct avs_dev *adev);
void avs_dump_fw_log(struct avs_dev *adev, const void __iomem *src, unsigned int len);
void avs_dump_fw_log_wakeup(struct avs_dev *adev, const void __iomem *src, unsigned int len);

void avs_debugfs_init(struct avs_dev *adev);
void avs_debugfs_exit(struct avs_dev *adev);

#else
static inline int avs_register_probe_component(struct avs_dev *adev, const char *name)
{
	return -EOPNOTSUPP;
}

#define AVS_SET_ENABLE_LOGS_OP(name)

static inline bool avs_logging_fw(struct avs_dev *adev)
{
	return false;
}

static inline void avs_dump_fw_log(struct avs_dev *adev, const void __iomem *src, unsigned int len)
{
}

static inline void avs_dump_fw_log_wakeup(struct avs_dev *adev, const void __iomem *src,
					  unsigned int len)
{
}

static inline void avs_debugfs_init(struct avs_dev *adev) { }
static inline void avs_debugfs_exit(struct avs_dev *adev) { }
#endif

#endif

Annotation

Implementation Notes