diff options
author | Michael Zoran <mzoran@crowfest.net> | 2017-02-27 15:35:13 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:17:07 +0100 |
commit | 212afb97efe15b5b1b596a746fb6042e6f9b36a9 (patch) | |
tree | 1f9c126b399bc0dd104afda959e16c5e99a712c9 /drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h | |
parent | 051420a997a58fcf87fd71650ffe2e4d89f6757e (diff) | |
download | op-kernel-dev-212afb97efe15b5b1b596a746fb6042e6f9b36a9.zip op-kernel-dev-212afb97efe15b5b1b596a746fb6042e6f9b36a9.tar.gz |
staging: bcm2835-camera: Move driver under vc04_services
The bcm2835-camera driver is part of v04_services, so it makes
sense for it to be located under vc04_services to make
configuration clearer.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h')
-rw-r--r-- | drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h b/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h new file mode 100644 index 0000000..a55c1ea --- /dev/null +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h @@ -0,0 +1,107 @@ +/* + * Broadcom BM2835 V4L2 driver + * + * Copyright © 2013 Raspberry Pi (Trading) Ltd. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + * + * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk> + * Dave Stevenson <dsteve@broadcom.com> + * Simon Mellor <simellor@broadcom.com> + * Luke Diamand <luked@broadcom.com> + */ + +/* MMAL_PORT_TYPE_T */ +enum mmal_port_type { + MMAL_PORT_TYPE_UNKNOWN = 0, /**< Unknown port type */ + MMAL_PORT_TYPE_CONTROL, /**< Control port */ + MMAL_PORT_TYPE_INPUT, /**< Input port */ + MMAL_PORT_TYPE_OUTPUT, /**< Output port */ + MMAL_PORT_TYPE_CLOCK, /**< Clock port */ +}; + +/** The port is pass-through and doesn't need buffer headers allocated */ +#define MMAL_PORT_CAPABILITY_PASSTHROUGH 0x01 +/** The port wants to allocate the buffer payloads. + * This signals a preference that payload allocation should be done + * on this port for efficiency reasons. */ +#define MMAL_PORT_CAPABILITY_ALLOCATION 0x02 +/** The port supports format change events. + * This applies to input ports and is used to let the client know + * whether the port supports being reconfigured via a format + * change event (i.e. without having to disable the port). */ +#define MMAL_PORT_CAPABILITY_SUPPORTS_EVENT_FORMAT_CHANGE 0x04 + +/* mmal port structure (MMAL_PORT_T) + * + * most elements are informational only, the pointer values for + * interogation messages are generally provided as additional + * strucures within the message. When used to set values only teh + * buffer_num, buffer_size and userdata parameters are writable. + */ +struct mmal_port { + void *priv; /* Private member used by the framework */ + const char *name; /* Port name. Used for debugging purposes (RO) */ + + u32 type; /* Type of the port (RO) enum mmal_port_type */ + u16 index; /* Index of the port in its type list (RO) */ + u16 index_all; /* Index of the port in the list of all ports (RO) */ + + u32 is_enabled; /* Indicates whether the port is enabled or not (RO) */ + struct mmal_es_format *format; /* Format of the elementary stream */ + + u32 buffer_num_min; /* Minimum number of buffers the port + * requires (RO). This is set by the + * component. + */ + + u32 buffer_size_min; /* Minimum size of buffers the port + * requires (RO). This is set by the + * component. + */ + + u32 buffer_alignment_min; /* Minimum alignment requirement for + * the buffers (RO). A value of + * zero means no special alignment + * requirements. This is set by the + * component. + */ + + u32 buffer_num_recommended; /* Number of buffers the port + * recommends for optimal + * performance (RO). A value of + * zero means no special + * recommendation. This is set + * by the component. + */ + + u32 buffer_size_recommended; /* Size of buffers the port + * recommends for optimal + * performance (RO). A value of + * zero means no special + * recommendation. This is set + * by the component. + */ + + u32 buffer_num; /* Actual number of buffers the port will use. + * This is set by the client. + */ + + u32 buffer_size; /* Actual maximum size of the buffers that + * will be sent to the port. This is set by + * the client. + */ + + void *component; /* Component this port belongs to (Read Only) */ + + void *userdata; /* Field reserved for use by the client */ + + u32 capabilities; /* Flags describing the capabilities of a + * port (RO). Bitwise combination of \ref + * portcapabilities "Port capabilities" + * values. + */ + +}; |