drivers/platform/raspberrypi/vchiq-mmal/mmal-msg.h

Source file repositories/reference/linux-study-clean/drivers/platform/raspberrypi/vchiq-mmal/mmal-msg.h

File Facts

System
Linux kernel
Corpus path
drivers/platform/raspberrypi/vchiq-mmal/mmal-msg.h
Extension
.h
Size
12032 bytes
Lines
407
Domain
Driver Families
Bucket
drivers/platform
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 mmal_msg_header {
	u32 magic;
	u32 type;	/* enum mmal_msg_type */

	/* Opaque handle to the control service */
	u32 control_service;

	u32 context;	/* a u32 per message context */
	u32 status;	/* The status of the vchiq operation */
	u32 padding;
};

/* Send from VC to host to report version */
struct mmal_msg_version {
	u32 flags;
	u32 major;
	u32 minor;
	u32 minimum;
};

/* request to VC to create component */
struct mmal_msg_component_create {
	u32 client_component;	/* component context */
	char name[128];
	u32 pid;		/* For debug */
};

/* reply from VC to component creation request */
struct mmal_msg_component_create_reply {
	u32 status;	/* enum mmal_msg_status - how does this differ to
			 * the one in the header?
			 */
	u32 component_handle; /* VideoCore handle for component */
	u32 input_num;        /* Number of input ports */
	u32 output_num;       /* Number of output ports */
	u32 clock_num;        /* Number of clock ports */
};

/* request to VC to destroy a component */
struct mmal_msg_component_destroy {
	u32 component_handle;
};

struct mmal_msg_component_destroy_reply {
	u32 status; /* The component destruction status */
};

/* request and reply to VC to enable a component */
struct mmal_msg_component_enable {
	u32 component_handle;
};

struct mmal_msg_component_enable_reply {
	u32 status; /* The component enable status */
};

/* request and reply to VC to disable a component */
struct mmal_msg_component_disable {
	u32 component_handle;
};

struct mmal_msg_component_disable_reply {
	u32 status; /* The component disable status */
};

/* request to VC to get port information */
struct mmal_msg_port_info_get {
	u32 component_handle;  /* component handle port is associated with */
	u32 port_type;         /* enum mmal_msg_port_type */
	u32 index;             /* port index to query */
};

/* reply from VC to get port info request */
struct mmal_msg_port_info_get_reply {
	u32 status;		/* enum mmal_msg_status */
	u32 component_handle;	/* component handle port is associated with */
	u32 port_type;		/* enum mmal_msg_port_type */
	u32 port_index;		/* port indexed in query */
	s32 found;		/* unused */
	u32 port_handle;	/* Handle to use for this port */
	struct mmal_port port;
	struct mmal_es_format format; /* elementary stream format */
	union mmal_es_specific_format es; /* es type specific data */
	u8 extradata[MMAL_FORMAT_EXTRADATA_MAX_SIZE]; /* es extra data */
};

/* request to VC to set port information */
struct mmal_msg_port_info_set {
	u32 component_handle;
	u32 port_type;		/* enum mmal_msg_port_type */

Annotation

Implementation Notes