summaryrefslogtreecommitdiff
path: root/include/linux/v4l2-subdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/v4l2-subdev.h')
-rw-r--r--include/linux/v4l2-subdev.h56
1 files changed, 25 insertions, 31 deletions
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h
index 480891db..b383c2fe 100644
--- a/include/linux/v4l2-subdev.h
+++ b/include/linux/v4l2-subdev.h
@@ -6,24 +6,12 @@
*
* Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
* Sakari Ailus <sakari.ailus@iki.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __LINUX_V4L2_SUBDEV_H
#define __LINUX_V4L2_SUBDEV_H
+#include <linux/const.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
@@ -202,29 +190,14 @@ struct v4l2_subdev_capability {
/* The v4l2 sub-device video device node is registered in read-only mode. */
#define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
-/* The v4l2 sub-device supports multiplexed streams. */
-#define V4L2_SUBDEV_CAP_MPLEXED 0x00000002
+/* The v4l2 sub-device supports routing and multiplexed streams. */
+#define V4L2_SUBDEV_CAP_STREAMS 0x00000002
/*
* Is the route active? An active route will start when streaming is enabled
* on a video node.
*/
-#define V4L2_SUBDEV_ROUTE_FL_ACTIVE _BITUL(0)
-
-/*
- * Is the route immutable, i.e. can it be activated and inactivated?
- * Set by the driver.
- */
-#define V4L2_SUBDEV_ROUTE_FL_IMMUTABLE _BITUL(1)
-
-/*
- * Is the route a source endpoint? A source endpoint route refers to a stream
- * generated internally by the subdevice (usually a sensor), and thus there
- * is no sink-side endpoint for the route. The sink_pad and sink_stream
- * fields are unused.
- * Set by the driver.
- */
-#define V4L2_SUBDEV_ROUTE_FL_SOURCE _BITUL(2)
+#define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0)
/**
* struct v4l2_subdev_route - A route inside a subdev
@@ -260,6 +233,24 @@ struct v4l2_subdev_routing {
__u32 reserved[6];
};
+/*
+ * The client is aware of streams. Setting this flag enables the use of 'stream'
+ * fields (referring to the stream number) with various ioctls. If this is not
+ * set (which is the default), the 'stream' fields will be forced to 0 by the
+ * kernel.
+ */
+ #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1ULL << 0)
+
+/**
+ * struct v4l2_subdev_client_capability - Capabilities of the client accessing
+ * the subdev
+ *
+ * @capabilities: A bitmask of V4L2_SUBDEV_CLIENT_CAP_* flags.
+ */
+struct v4l2_subdev_client_capability {
+ __u64 capabilities;
+};
+
/* Backwards compatibility define --- to be removed */
#define v4l2_subdev_edid v4l2_edid
@@ -277,6 +268,9 @@ struct v4l2_subdev_routing {
#define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
#define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing)
#define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing)
+#define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability)
+#define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability)
+
/* The following ioctls are identical to the ioctls in videodev2.h */
#define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
#define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)