2 * Broadcom BM2835 V4L2 driver
4 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
10 * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk>
11 * Dave Stevenson <dsteve@broadcom.com>
12 * Simon Mellor <simellor@broadcom.com>
13 * Luke Diamand <luked@broadcom.com>
16 /* MMAL_PORT_TYPE_T */
18 MMAL_PORT_TYPE_UNKNOWN = 0, /**< Unknown port type */
19 MMAL_PORT_TYPE_CONTROL, /**< Control port */
20 MMAL_PORT_TYPE_INPUT, /**< Input port */
21 MMAL_PORT_TYPE_OUTPUT, /**< Output port */
22 MMAL_PORT_TYPE_CLOCK, /**< Clock port */
25 /** The port is pass-through and doesn't need buffer headers allocated */
26 #define MMAL_PORT_CAPABILITY_PASSTHROUGH 0x01
27 /** The port wants to allocate the buffer payloads.
28 * This signals a preference that payload allocation should be done
29 * on this port for efficiency reasons.
31 #define MMAL_PORT_CAPABILITY_ALLOCATION 0x02
32 /** The port supports format change events.
33 * This applies to input ports and is used to let the client know
34 * whether the port supports being reconfigured via a format
35 * change event (i.e. without having to disable the port).
37 #define MMAL_PORT_CAPABILITY_SUPPORTS_EVENT_FORMAT_CHANGE 0x04
39 /* mmal port structure (MMAL_PORT_T)
41 * most elements are informational only, the pointer values for
42 * interogation messages are generally provided as additional
43 * strucures within the message. When used to set values only teh
44 * buffer_num, buffer_size and userdata parameters are writable.
47 u32 priv; /* Private member used by the framework */
48 u32 name; /* Port name. Used for debugging purposes (RO) */
50 u32 type; /* Type of the port (RO) enum mmal_port_type */
51 u16 index; /* Index of the port in its type list (RO) */
52 u16 index_all; /* Index of the port in the list of all ports (RO) */
54 u32 is_enabled; /* Indicates whether the port is enabled or not (RO) */
55 u32 format; /* Format of the elementary stream */
57 u32 buffer_num_min; /* Minimum number of buffers the port
58 * requires (RO). This is set by the
62 u32 buffer_size_min; /* Minimum size of buffers the port
63 * requires (RO). This is set by the
67 u32 buffer_alignment_min; /* Minimum alignment requirement for
68 * the buffers (RO). A value of
69 * zero means no special alignment
70 * requirements. This is set by the
74 u32 buffer_num_recommended; /* Number of buffers the port
75 * recommends for optimal
76 * performance (RO). A value of
77 * zero means no special
78 * recommendation. This is set
82 u32 buffer_size_recommended; /* Size of buffers the port
83 * recommends for optimal
84 * performance (RO). A value of
85 * zero means no special
86 * recommendation. This is set
90 u32 buffer_num; /* Actual number of buffers the port will use.
91 * This is set by the client.
94 u32 buffer_size; /* Actual maximum size of the buffers that
95 * will be sent to the port. This is set by
99 u32 component; /* Component this port belongs to (Read Only) */
101 u32 userdata; /* Field reserved for use by the client */
103 u32 capabilities; /* Flags describing the capabilities of a
104 * port (RO). Bitwise combination of \ref
105 * portcapabilities "Port capabilities"