summaryrefslogtreecommitdiff
path: root/drivers/staging/media/platform/bcm2835/mmal-msg-common.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-01-28 00:54:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-31 12:44:27 +0300
commit7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a (patch)
tree6869f582ae3576e4da1886262a184b183a3367c3 /drivers/staging/media/platform/bcm2835/mmal-msg-common.h
parent50e66ccbb72d50edc25844bb476f0e4645e12f7a (diff)
downloadlinux-7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a.tar.xz
staging: Import the BCM2835 MMAL-based V4L2 camera driver.
- Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. - Uses 3.6.10 timestamping - Camera power based on use - Uses immutable input mode on video encoder This code comes from the Raspberry Pi kernel tree (rpi-4.9.y) as of a15ba877dab4e61ea3fc7b006e2a73828b083c52. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/platform/bcm2835/mmal-msg-common.h')
-rw-r--r--drivers/staging/media/platform/bcm2835/mmal-msg-common.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/staging/media/platform/bcm2835/mmal-msg-common.h b/drivers/staging/media/platform/bcm2835/mmal-msg-common.h
new file mode 100644
index 000000000000..66e8a6edf628
--- /dev/null
+++ b/drivers/staging/media/platform/bcm2835/mmal-msg-common.h
@@ -0,0 +1,50 @@
+/*
+ * 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>
+ */
+
+#ifndef MMAL_MSG_COMMON_H
+#define MMAL_MSG_COMMON_H
+
+enum mmal_msg_status {
+ MMAL_MSG_STATUS_SUCCESS = 0, /**< Success */
+ MMAL_MSG_STATUS_ENOMEM, /**< Out of memory */
+ MMAL_MSG_STATUS_ENOSPC, /**< Out of resources other than memory */
+ MMAL_MSG_STATUS_EINVAL, /**< Argument is invalid */
+ MMAL_MSG_STATUS_ENOSYS, /**< Function not implemented */
+ MMAL_MSG_STATUS_ENOENT, /**< No such file or directory */
+ MMAL_MSG_STATUS_ENXIO, /**< No such device or address */
+ MMAL_MSG_STATUS_EIO, /**< I/O error */
+ MMAL_MSG_STATUS_ESPIPE, /**< Illegal seek */
+ MMAL_MSG_STATUS_ECORRUPT, /**< Data is corrupt \attention */
+ MMAL_MSG_STATUS_ENOTREADY, /**< Component is not ready */
+ MMAL_MSG_STATUS_ECONFIG, /**< Component is not configured */
+ MMAL_MSG_STATUS_EISCONN, /**< Port is already connected */
+ MMAL_MSG_STATUS_ENOTCONN, /**< Port is disconnected */
+ MMAL_MSG_STATUS_EAGAIN, /**< Resource temporarily unavailable. */
+ MMAL_MSG_STATUS_EFAULT, /**< Bad address */
+};
+
+struct mmal_rect {
+ s32 x; /**< x coordinate (from left) */
+ s32 y; /**< y coordinate (from top) */
+ s32 width; /**< width */
+ s32 height; /**< height */
+};
+
+struct mmal_rational {
+ s32 num; /**< Numerator */
+ s32 den; /**< Denominator */
+};
+
+#endif /* MMAL_MSG_COMMON_H */