linux/drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Broadcom BCM2835 V4L2 driver
 *
 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
 *
 * Authors: Vincent Sanders @ Collabora
 *          Dave Stevenson @ Broadcom
 *		(now [email protected])
 *          Simon Mellor @ Broadcom
 *          Luke Diamand @ Broadcom
 */

/*
 * all the data structures which serialise the MMAL protocol. note
 * these are directly mapped onto the recived message data.
 *
 * BEWARE: They seem to *assume* pointers are u32 and that there is no
 * structure padding!
 *
 * NOTE: this implementation uses kernel types to ensure sizes. Rather
 * than assigning values to enums to force their size the
 * implementation uses fixed size types and not the enums (though the
 * comments have the actual enum type
 */
#ifndef MMAL_MSG_H
#define MMAL_MSG_H

#define VC_MMAL_VER
#define VC_MMAL_MIN_VER

/* max total message size is 512 bytes */
#define MMAL_MSG_MAX_SIZE
/* with six 32bit header elements max payload is therefore 488 bytes */
#define MMAL_MSG_MAX_PAYLOAD

#include "mmal-msg-common.h"
#include "mmal-msg-format.h"
#include "mmal-msg-port.h"
#include "mmal-vchiq.h"

enum mmal_msg_type {};

/* port action request messages differ depending on the action type */
enum mmal_msg_port_action_type {};

struct mmal_msg_header {};

/* Send from VC to host to report version */
struct mmal_msg_version {};

/* request to VC to create component */
struct mmal_msg_component_create {};

/* reply from VC to component creation request */
struct mmal_msg_component_create_reply {};

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

struct mmal_msg_component_destroy_reply {};

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

struct mmal_msg_component_enable_reply {};

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

struct mmal_msg_component_disable_reply {};

/* request to VC to get port information */
struct mmal_msg_port_info_get {};

/* reply from VC to get port info request */
struct mmal_msg_port_info_get_reply {};

/* request to VC to set port information */
struct mmal_msg_port_info_set {};

/* reply from VC to port info set request */
struct mmal_msg_port_info_set_reply {};

/* port action requests that take a mmal_port as a parameter */
struct mmal_msg_port_action_port {};

/* port action requests that take handles as a parameter */
struct mmal_msg_port_action_handle {};

struct mmal_msg_port_action_reply {};

/* MMAL buffer transfer */

/* Size of space reserved in a buffer message for short messages. */
#define MMAL_VC_SHORT_DATA

/* Signals that the current payload is the end of the stream of data */
#define MMAL_BUFFER_HEADER_FLAG_EOS
/* Signals that the start of the current payload starts a frame */
#define MMAL_BUFFER_HEADER_FLAG_FRAME_START
/* Signals that the end of the current payload ends a frame */
#define MMAL_BUFFER_HEADER_FLAG_FRAME_END
/* Signals that the current payload contains only complete frames (>1) */
#define MMAL_BUFFER_HEADER_FLAG_FRAME
/* Signals that the current payload is a keyframe (i.e. self decodable) */
#define MMAL_BUFFER_HEADER_FLAG_KEYFRAME
/*
 * Signals a discontinuity in the stream of data (e.g. after a seek).
 * Can be used for instance by a decoder to reset its state
 */
#define MMAL_BUFFER_HEADER_FLAG_DISCONTINUITY
/*
 * Signals a buffer containing some kind of config data for the component
 * (e.g. codec config data)
 */
#define MMAL_BUFFER_HEADER_FLAG_CONFIG
/* Signals an encrypted payload */
#define MMAL_BUFFER_HEADER_FLAG_ENCRYPTED
/* Signals a buffer containing side information */
#define MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO
/*
 * Signals a buffer which is the snapshot/postview image from a stills
 * capture
 */
#define MMAL_BUFFER_HEADER_FLAGS_SNAPSHOT
/* Signals a buffer which contains data known to be corrupted */
#define MMAL_BUFFER_HEADER_FLAG_CORRUPTED
/* Signals that a buffer failed to be transmitted */
#define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED

struct mmal_driver_buffer {};

/* buffer header */
struct mmal_buffer_header {};

struct mmal_buffer_header_type_specific {};

struct mmal_msg_buffer_from_host {};

/* port parameter setting */

#define MMAL_WORKER_PORT_PARAMETER_SPACE

struct mmal_msg_port_parameter_set {};

struct mmal_msg_port_parameter_set_reply {};

/* port parameter getting */

struct mmal_msg_port_parameter_get {};

struct mmal_msg_port_parameter_get_reply {};

/* event messages */
#define MMAL_WORKER_EVENT_SPACE

struct mmal_msg_event_to_host {};

/* all mmal messages are serialised through this structure */
struct mmal_msg {};
#endif