1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Broadcom BM2835 V4L2 driver
5 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
7 * Authors: Vincent Sanders @ Collabora
8 * Dave Stevenson @ Broadcom
9 * (now dave.stevenson@raspberrypi.org)
10 * Simon Mellor @ Broadcom
11 * Luke Diamand @ Broadcom
14 /* MMAL_PORT_TYPE_T */
16 MMAL_PORT_TYPE_UNKNOWN = 0, /* Unknown port type */
17 MMAL_PORT_TYPE_CONTROL, /* Control port */
18 MMAL_PORT_TYPE_INPUT, /* Input port */
19 MMAL_PORT_TYPE_OUTPUT, /* Output port */
20 MMAL_PORT_TYPE_CLOCK, /* Clock port */
23 /* The port is pass-through and doesn't need buffer headers allocated */
24 #define MMAL_PORT_CAPABILITY_PASSTHROUGH 0x01
26 *The port wants to allocate the buffer payloads.
27 * This signals a preference that payload allocation should be done
28 * on this port for efficiency reasons.
30 #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
40 * mmal port structure (MMAL_PORT_T)
42 * most elements are informational only, the pointer values for
43 * interogation messages are generally provided as additional
44 * structures within the message. When used to set values only the
45 * buffer_num, buffer_size and userdata parameters are writable.
48 u32 priv; /* Private member used by the framework */
49 u32 name; /* Port name. Used for debugging purposes (RO) */
51 u32 type; /* Type of the port (RO) enum mmal_port_type */
52 u16 index; /* Index of the port in its type list (RO) */
53 u16 index_all; /* Index of the port in the list of all ports (RO) */
55 u32 is_enabled; /* Indicates whether the port is enabled or not (RO) */
56 u32 format; /* Format of the elementary stream */
58 u32 buffer_num_min; /* Minimum number of buffers the port
59 * requires (RO). This is set by the
63 u32 buffer_size_min; /* Minimum size of buffers the port
64 * requires (RO). This is set by the
68 u32 buffer_alignment_min;/* Minimum alignment requirement for
69 * the buffers (RO). A value of
70 * zero means no special alignment
71 * requirements. This is set by the
75 u32 buffer_num_recommended; /* Number of buffers the port
76 * recommends for optimal
77 * performance (RO). A value of
78 * zero means no special
79 * recommendation. This is set
83 u32 buffer_size_recommended; /* Size of buffers the port
84 * recommends for optimal
85 * performance (RO). A value of
86 * zero means no special
87 * recommendation. This is set
91 u32 buffer_num; /* Actual number of buffers the port will use.
92 * This is set by the client.
95 u32 buffer_size; /* Actual maximum size of the buffers that
96 * will be sent to the port. This is set by
100 u32 component; /* Component this port belongs to (Read Only) */
102 u32 userdata; /* Field reserved for use by the client */
104 u32 capabilities; /* Flags describing the capabilities of a
105 * port (RO). Bitwise combination of \ref
106 * portcapabilities "Port capabilities"