include: linux: Import V4L2 uAPI headers from Linux v4.19
Import the following files from the Linux UAPI to keep our V4L2 interface in sync: media-bus-format.h v4l2-common.h v4l2-controls.h v4l2-mediabus.h v4l2-subdev.h videodev2.h Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
557a53267a
commit
2b63efe092
6 changed files with 4095 additions and 0 deletions
156
include/linux/media-bus-format.h
Normal file
156
include/linux/media-bus-format.h
Normal file
|
@ -0,0 +1,156 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Media Bus API header
|
||||
*
|
||||
* Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_MEDIA_BUS_FORMAT_H
|
||||
#define __LINUX_MEDIA_BUS_FORMAT_H
|
||||
|
||||
/*
|
||||
* These bus formats uniquely identify data formats on the data bus. Format 0
|
||||
* is reserved, MEDIA_BUS_FMT_FIXED shall be used by host-client pairs, where
|
||||
* the data format is fixed. Additionally, "2X8" means that one pixel is
|
||||
* transferred in two 8-bit samples, "BE" or "LE" specify in which order those
|
||||
* samples are transferred over the bus: "LE" means that the least significant
|
||||
* bits are transferred first, "BE" means that the most significant bits are
|
||||
* transferred first, and "PADHI" and "PADLO" define which bits - low or high,
|
||||
* in the incomplete high byte, are filled with padding bits.
|
||||
*
|
||||
* The bus formats are grouped by type, bus_width, bits per component, samples
|
||||
* per pixel and order of subsamples. Numerical values are sorted using generic
|
||||
* numerical sort order (8 thus comes before 10).
|
||||
*
|
||||
* As their value can't change when a new bus format is inserted in the
|
||||
* enumeration, the bus formats are explicitly given a numerical value. The next
|
||||
* free values for each category are listed below, update them when inserting
|
||||
* new pixel codes.
|
||||
*/
|
||||
|
||||
#define MEDIA_BUS_FMT_FIXED 0x0001
|
||||
|
||||
/* RGB - next is 0x101b */
|
||||
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
|
||||
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
|
||||
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
|
||||
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
|
||||
#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
|
||||
#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
|
||||
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
|
||||
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
|
||||
#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
|
||||
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
|
||||
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
|
||||
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
|
||||
#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
|
||||
#define MEDIA_BUS_FMT_BGR888_1X24 0x1013
|
||||
#define MEDIA_BUS_FMT_GBR888_1X24 0x1014
|
||||
#define MEDIA_BUS_FMT_RGB888_1X24 0x100a
|
||||
#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b
|
||||
#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c
|
||||
#define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG 0x1011
|
||||
#define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012
|
||||
#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d
|
||||
#define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f
|
||||
#define MEDIA_BUS_FMT_RGB101010_1X30 0x1018
|
||||
#define MEDIA_BUS_FMT_RGB121212_1X36 0x1019
|
||||
#define MEDIA_BUS_FMT_RGB161616_1X48 0x101a
|
||||
|
||||
/* YUV (including grey) - next is 0x202d */
|
||||
#define MEDIA_BUS_FMT_Y8_1X8 0x2001
|
||||
#define MEDIA_BUS_FMT_UV8_1X8 0x2015
|
||||
#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002
|
||||
#define MEDIA_BUS_FMT_VYUY8_1_5X8 0x2003
|
||||
#define MEDIA_BUS_FMT_YUYV8_1_5X8 0x2004
|
||||
#define MEDIA_BUS_FMT_YVYU8_1_5X8 0x2005
|
||||
#define MEDIA_BUS_FMT_UYVY8_2X8 0x2006
|
||||
#define MEDIA_BUS_FMT_VYUY8_2X8 0x2007
|
||||
#define MEDIA_BUS_FMT_YUYV8_2X8 0x2008
|
||||
#define MEDIA_BUS_FMT_YVYU8_2X8 0x2009
|
||||
#define MEDIA_BUS_FMT_Y10_1X10 0x200a
|
||||
#define MEDIA_BUS_FMT_Y10_2X8_PADHI_LE 0x202c
|
||||
#define MEDIA_BUS_FMT_UYVY10_2X10 0x2018
|
||||
#define MEDIA_BUS_FMT_VYUY10_2X10 0x2019
|
||||
#define MEDIA_BUS_FMT_YUYV10_2X10 0x200b
|
||||
#define MEDIA_BUS_FMT_YVYU10_2X10 0x200c
|
||||
#define MEDIA_BUS_FMT_Y12_1X12 0x2013
|
||||
#define MEDIA_BUS_FMT_UYVY12_2X12 0x201c
|
||||
#define MEDIA_BUS_FMT_VYUY12_2X12 0x201d
|
||||
#define MEDIA_BUS_FMT_YUYV12_2X12 0x201e
|
||||
#define MEDIA_BUS_FMT_YVYU12_2X12 0x201f
|
||||
#define MEDIA_BUS_FMT_UYVY8_1X16 0x200f
|
||||
#define MEDIA_BUS_FMT_VYUY8_1X16 0x2010
|
||||
#define MEDIA_BUS_FMT_YUYV8_1X16 0x2011
|
||||
#define MEDIA_BUS_FMT_YVYU8_1X16 0x2012
|
||||
#define MEDIA_BUS_FMT_YDYUYDYV8_1X16 0x2014
|
||||
#define MEDIA_BUS_FMT_UYVY10_1X20 0x201a
|
||||
#define MEDIA_BUS_FMT_VYUY10_1X20 0x201b
|
||||
#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d
|
||||
#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e
|
||||
#define MEDIA_BUS_FMT_VUY8_1X24 0x2024
|
||||
#define MEDIA_BUS_FMT_YUV8_1X24 0x2025
|
||||
#define MEDIA_BUS_FMT_UYYVYY8_0_5X24 0x2026
|
||||
#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020
|
||||
#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021
|
||||
#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022
|
||||
#define MEDIA_BUS_FMT_YVYU12_1X24 0x2023
|
||||
#define MEDIA_BUS_FMT_YUV10_1X30 0x2016
|
||||
#define MEDIA_BUS_FMT_UYYVYY10_0_5X30 0x2027
|
||||
#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017
|
||||
#define MEDIA_BUS_FMT_UYYVYY12_0_5X36 0x2028
|
||||
#define MEDIA_BUS_FMT_YUV12_1X36 0x2029
|
||||
#define MEDIA_BUS_FMT_YUV16_1X48 0x202a
|
||||
#define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b
|
||||
|
||||
/* Bayer - next is 0x3021 */
|
||||
#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
|
||||
#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
|
||||
#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
|
||||
#define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014
|
||||
#define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015
|
||||
#define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016
|
||||
#define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 0x3017
|
||||
#define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 0x3018
|
||||
#define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 0x300b
|
||||
#define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 0x300c
|
||||
#define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 0x3009
|
||||
#define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 0x300d
|
||||
#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE 0x3003
|
||||
#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE 0x3004
|
||||
#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE 0x3005
|
||||
#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE 0x3006
|
||||
#define MEDIA_BUS_FMT_SBGGR10_1X10 0x3007
|
||||
#define MEDIA_BUS_FMT_SGBRG10_1X10 0x300e
|
||||
#define MEDIA_BUS_FMT_SGRBG10_1X10 0x300a
|
||||
#define MEDIA_BUS_FMT_SRGGB10_1X10 0x300f
|
||||
#define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008
|
||||
#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010
|
||||
#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011
|
||||
#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012
|
||||
#define MEDIA_BUS_FMT_SBGGR14_1X14 0x3019
|
||||
#define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a
|
||||
#define MEDIA_BUS_FMT_SGRBG14_1X14 0x301b
|
||||
#define MEDIA_BUS_FMT_SRGGB14_1X14 0x301c
|
||||
#define MEDIA_BUS_FMT_SBGGR16_1X16 0x301d
|
||||
#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e
|
||||
#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f
|
||||
#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020
|
||||
|
||||
/* JPEG compressed formats - next is 0x4002 */
|
||||
#define MEDIA_BUS_FMT_JPEG_1X8 0x4001
|
||||
|
||||
/* Vendor specific formats - next is 0x5002 */
|
||||
|
||||
/* S5C73M3 sensor specific interleaved UYVY and JPEG */
|
||||
#define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 0x5001
|
||||
|
||||
/* HSV - next is 0x6002 */
|
||||
#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
|
||||
|
||||
#endif /* __LINUX_MEDIA_BUS_FORMAT_H */
|
108
include/linux/v4l2-common.h
Normal file
108
include/linux/v4l2-common.h
Normal file
|
@ -0,0 +1,108 @@
|
|||
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* include/linux/v4l2-common.h
|
||||
*
|
||||
* Common V4L2 and V4L2 subdev definitions.
|
||||
*
|
||||
* Users are advised to #include this file either through videodev2.h
|
||||
* (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
|
||||
* to this file directly.
|
||||
*
|
||||
* Copyright (C) 2012 Nokia Corporation
|
||||
* Contact: 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 as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Alternatively you can redistribute this file under the terms of the
|
||||
* BSD license as stated below:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. The names of its contributors may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __V4L2_COMMON__
|
||||
#define __V4L2_COMMON__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
*
|
||||
* Selection interface definitions
|
||||
*
|
||||
*/
|
||||
|
||||
/* Current cropping area */
|
||||
#define V4L2_SEL_TGT_CROP 0x0000
|
||||
/* Default cropping area */
|
||||
#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
|
||||
/* Cropping bounds */
|
||||
#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
|
||||
/* Native frame size */
|
||||
#define V4L2_SEL_TGT_NATIVE_SIZE 0x0003
|
||||
/* Current composing area */
|
||||
#define V4L2_SEL_TGT_COMPOSE 0x0100
|
||||
/* Default composing area */
|
||||
#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
|
||||
/* Composing bounds */
|
||||
#define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102
|
||||
/* Current composing area plus all padding pixels */
|
||||
#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
|
||||
|
||||
/* Backward compatibility target definitions --- to be removed. */
|
||||
#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
|
||||
#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
|
||||
#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP
|
||||
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
|
||||
#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS
|
||||
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
|
||||
|
||||
/* Selection flags */
|
||||
#define V4L2_SEL_FLAG_GE (1 << 0)
|
||||
#define V4L2_SEL_FLAG_LE (1 << 1)
|
||||
#define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2)
|
||||
|
||||
/* Backward compatibility flag definitions --- to be removed. */
|
||||
#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE
|
||||
#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE
|
||||
#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
|
||||
|
||||
struct v4l2_edid {
|
||||
__u32 pad;
|
||||
__u32 start_block;
|
||||
__u32 blocks;
|
||||
__u32 reserved[5];
|
||||
__u8 *edid;
|
||||
};
|
||||
|
||||
#endif /* __V4L2_COMMON__ */
|
1095
include/linux/v4l2-controls.h
Normal file
1095
include/linux/v4l2-controls.h
Normal file
File diff suppressed because it is too large
Load diff
139
include/linux/v4l2-mediabus.h
Normal file
139
include/linux/v4l2-mediabus.h
Normal file
|
@ -0,0 +1,139 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Media Bus API header
|
||||
*
|
||||
* Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_V4L2_MEDIABUS_H
|
||||
#define __LINUX_V4L2_MEDIABUS_H
|
||||
|
||||
#include <linux/media-bus-format.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
/**
|
||||
* struct v4l2_mbus_framefmt - frame format on the media bus
|
||||
* @width: image width
|
||||
* @height: image height
|
||||
* @code: data format code (from enum v4l2_mbus_pixelcode)
|
||||
* @field: used interlacing type (from enum v4l2_field)
|
||||
* @colorspace: colorspace of the data (from enum v4l2_colorspace)
|
||||
* @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
|
||||
* @quantization: quantization of the data (from enum v4l2_quantization)
|
||||
* @xfer_func: transfer function of the data (from enum v4l2_xfer_func)
|
||||
*/
|
||||
struct v4l2_mbus_framefmt {
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
__u32 code;
|
||||
__u32 field;
|
||||
__u32 colorspace;
|
||||
__u16 ycbcr_enc;
|
||||
__u16 quantization;
|
||||
__u16 xfer_func;
|
||||
__u16 reserved[11];
|
||||
};
|
||||
|
||||
/*
|
||||
* enum v4l2_mbus_pixelcode and its definitions are now deprecated, and
|
||||
* MEDIA_BUS_FMT_ definitions (defined in media-bus-format.h) should be
|
||||
* used instead.
|
||||
*
|
||||
* New defines should only be added to media-bus-format.h. The
|
||||
* v4l2_mbus_pixelcode enum is frozen.
|
||||
*/
|
||||
|
||||
#define V4L2_MBUS_FROM_MEDIA_BUS_FMT(name) \
|
||||
V4L2_MBUS_FMT_ ## name = MEDIA_BUS_FMT_ ## name
|
||||
|
||||
enum v4l2_mbus_pixelcode {
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(FIXED),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB444_2X8_PADHI_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB555_2X8_PADHI_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(BGR565_2X8_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB565_2X8_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB666_1X18),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_1X24),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(RGB888_2X12_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(ARGB8888_1X32),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UV8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1_5X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1_5X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1_5X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1_5X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_2X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_2X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_2X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_2X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y10_1X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_2X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_2X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_2X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_2X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(Y12_1X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY8_1X16),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY8_1X16),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV8_1X16),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU8_1X16),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YDYUYDYV8_1X16),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY10_1X20),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY10_1X20),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV10_1X20),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU10_1X20),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUV10_1X30),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(AYUV8_1X32),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_2X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_2X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_2X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_2X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(UYVY12_1X24),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(VYUY12_1X24),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YUYV12_1X24),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(YVYU12_1X24),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_ALAW8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_ALAW8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_ALAW8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_ALAW8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_DPCM8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_DPCM8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_DPCM8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_DPCM8_1X8),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADHI_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_BE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_2X8_PADLO_LE),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_1X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_1X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_1X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_1X10),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR12_1X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG12_1X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG12_1X12),
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB12_1X12),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(JPEG_1X8),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(S5C_UYVY_JPEG_1X8),
|
||||
|
||||
V4L2_MBUS_FROM_MEDIA_BUS_FMT(AHSV8888_1X32),
|
||||
};
|
||||
|
||||
#endif
|
185
include/linux/v4l2-subdev.h
Normal file
185
include/linux/v4l2-subdev.h
Normal file
|
@ -0,0 +1,185 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* V4L2 subdev userspace API
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation
|
||||
*
|
||||
* 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/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/v4l2-common.h>
|
||||
#include <linux/v4l2-mediabus.h>
|
||||
|
||||
/**
|
||||
* enum v4l2_subdev_format_whence - Media bus format type
|
||||
* @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only
|
||||
* @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device
|
||||
*/
|
||||
enum v4l2_subdev_format_whence {
|
||||
V4L2_SUBDEV_FORMAT_TRY = 0,
|
||||
V4L2_SUBDEV_FORMAT_ACTIVE = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_format - Pad-level media bus format
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @format: media bus format (format code and frame size)
|
||||
*/
|
||||
struct v4l2_subdev_format {
|
||||
__u32 which;
|
||||
__u32 pad;
|
||||
struct v4l2_mbus_framefmt format;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_crop - Pad-level crop settings
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @rect: pad crop rectangle boundaries
|
||||
*/
|
||||
struct v4l2_subdev_crop {
|
||||
__u32 which;
|
||||
__u32 pad;
|
||||
struct v4l2_rect rect;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @index: format index during enumeration
|
||||
* @code: format code (MEDIA_BUS_FMT_ definitions)
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
*/
|
||||
struct v4l2_subdev_mbus_code_enum {
|
||||
__u32 pad;
|
||||
__u32 index;
|
||||
__u32 code;
|
||||
__u32 which;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_frame_size_enum - Media bus format enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @index: format index during enumeration
|
||||
* @code: format code (MEDIA_BUS_FMT_ definitions)
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
*/
|
||||
struct v4l2_subdev_frame_size_enum {
|
||||
__u32 index;
|
||||
__u32 pad;
|
||||
__u32 code;
|
||||
__u32 min_width;
|
||||
__u32 max_width;
|
||||
__u32 min_height;
|
||||
__u32 max_height;
|
||||
__u32 which;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_frame_interval - Pad-level frame rate
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @interval: frame interval in seconds
|
||||
*/
|
||||
struct v4l2_subdev_frame_interval {
|
||||
__u32 pad;
|
||||
struct v4l2_fract interval;
|
||||
__u32 reserved[9];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_frame_interval_enum - Frame interval enumeration
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @index: frame interval index during enumeration
|
||||
* @code: format code (MEDIA_BUS_FMT_ definitions)
|
||||
* @width: frame width in pixels
|
||||
* @height: frame height in pixels
|
||||
* @interval: frame interval in seconds
|
||||
* @which: format type (from enum v4l2_subdev_format_whence)
|
||||
*/
|
||||
struct v4l2_subdev_frame_interval_enum {
|
||||
__u32 index;
|
||||
__u32 pad;
|
||||
__u32 code;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
struct v4l2_fract interval;
|
||||
__u32 which;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct v4l2_subdev_selection - selection info
|
||||
*
|
||||
* @which: either V4L2_SUBDEV_FORMAT_ACTIVE or V4L2_SUBDEV_FORMAT_TRY
|
||||
* @pad: pad number, as reported by the media API
|
||||
* @target: Selection target, used to choose one of possible rectangles,
|
||||
* defined in v4l2-common.h; V4L2_SEL_TGT_* .
|
||||
* @flags: constraint flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
|
||||
* @r: coordinates of the selection window
|
||||
* @reserved: for future use, set to zero for now
|
||||
*
|
||||
* Hardware may use multiple helper windows to process a video stream.
|
||||
* The structure is used to exchange this selection areas between
|
||||
* an application and a driver.
|
||||
*/
|
||||
struct v4l2_subdev_selection {
|
||||
__u32 which;
|
||||
__u32 pad;
|
||||
__u32 target;
|
||||
__u32 flags;
|
||||
struct v4l2_rect r;
|
||||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
/* Backwards compatibility define --- to be removed */
|
||||
#define v4l2_subdev_edid v4l2_edid
|
||||
|
||||
#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
|
||||
#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
|
||||
#define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)
|
||||
#define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval)
|
||||
#define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum)
|
||||
#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
|
||||
#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
|
||||
#define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
|
||||
#define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
|
||||
#define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
|
||||
#define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
|
||||
/* 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)
|
||||
#define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
|
||||
#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
|
||||
#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
|
||||
#define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id)
|
||||
#define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
|
||||
#define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
|
||||
#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
|
||||
#define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
|
||||
#define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
|
||||
|
||||
#endif
|
2412
include/linux/videodev2.h
Normal file
2412
include/linux/videodev2.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue