include/sound/sdca_function.h

Source file repositories/reference/linux-study-clean/include/sound/sdca_function.h

File Facts

System
Linux kernel
Corpus path
include/sound/sdca_function.h
Extension
.h
Size
50486 bytes
Lines
1474
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 sdca_init_write {
	u32 addr;
	u8 val;
};

/**
 * define SDCA_CTL_TYPE - create a unique identifier for an SDCA Control
 * @ent: Entity Type code.
 * @sel: Control Selector code.
 *
 * Sometimes there is a need to identify a type of Control, for example to
 * determine what name the control should have. SDCA Selectors are reused
 * across Entity types, as such it is necessary to combine both the Entity
 * Type and the Control Selector to obtain a unique identifier.
 */
#define SDCA_CTL_TYPE(ent, sel) ((ent) << 8 | (sel))

/**
 * define SDCA_CTL_TYPE_S - static version of SDCA_CTL_TYPE
 * @ent: Entity name, for example IT, MFPU, etc. this string can be read
 * from the last characters of the SDCA_ENTITY_TYPE_* macros.
 * @sel: Control Selector name, for example MIC_BIAS, MUTE, etc. this
 * string can be read from the last characters of the SDCA_CTL_*_*
 * macros.
 *
 * Short hand to specific a Control type statically for example:
 * SDCA_CTL_TYPE_S(IT, MIC_BIAS).
 */
#define SDCA_CTL_TYPE_S(ent, sel) SDCA_CTL_TYPE(SDCA_ENTITY_TYPE_##ent, \
						SDCA_CTL_##ent##_##sel)

/**
 * enum sdca_messageoffset_range - Column definitions UMP MessageOffset
 */
enum sdca_messageoffset_range {
	SDCA_MESSAGEOFFSET_BUFFER_START_ADDRESS		= 0,
	SDCA_MESSAGEOFFSET_BUFFER_LENGTH		= 1,
	SDCA_MESSAGEOFFSET_UMP_MODE			= 2,
	SDCA_MESSAGEOFFSET_NCOLS			= 3,
};

/**
 * enum sdca_ump_mode - SDCA UMP Mode
 */
enum sdca_ump_mode {
	SDCA_UMP_MODE_DIRECT				= 0x00,
	SDCA_UMP_MODE_INDIRECT				= 0x01,
};

/**
 * enum sdca_ump_owner - SDCA UMP Owner
 */
enum sdca_ump_owner {
	SDCA_UMP_OWNER_HOST				= 0x00,
	SDCA_UMP_OWNER_DEVICE				= 0x01,
};

/**
 * enum sdca_it_controls - SDCA Controls for Input Terminal
 *
 * Control Selectors for Input Terminal from SDCA specification v1.0
 * section 6.2.1.3.
 */
enum sdca_it_controls {
	SDCA_CTL_IT_MIC_BIAS				= 0x03,
	SDCA_CTL_IT_USAGE				= 0x04,
	SDCA_CTL_IT_LATENCY				= 0x08,
	SDCA_CTL_IT_CLUSTERINDEX			= 0x10,
	SDCA_CTL_IT_DATAPORT_SELECTOR			= 0x11,
	SDCA_CTL_IT_MATCHING_GUID			= 0x12,
	SDCA_CTL_IT_KEEP_ALIVE				= 0x13,
	SDCA_CTL_IT_NDAI_STREAM				= 0x14,
	SDCA_CTL_IT_NDAI_CATEGORY			= 0x15,
	SDCA_CTL_IT_NDAI_CODINGTYPE			= 0x16,
	SDCA_CTL_IT_NDAI_PACKETTYPE			= 0x17,
};

/**
 * enum sdca_ot_controls - SDCA Controls for Output Terminal
 *
 * Control Selectors for Output Terminal from SDCA specification v1.0
 * section 6.2.2.3.
 */
enum sdca_ot_controls {
	SDCA_CTL_OT_USAGE				= 0x04,
	SDCA_CTL_OT_LATENCY				= 0x08,
	SDCA_CTL_OT_DATAPORT_SELECTOR			= 0x11,
	SDCA_CTL_OT_MATCHING_GUID			= 0x12,
	SDCA_CTL_OT_KEEP_ALIVE				= 0x13,
	SDCA_CTL_OT_NDAI_STREAM				= 0x14,

Annotation

Implementation Notes