blob: 15273987093e41e7823f98a953f088332db066aa [file] [log] [blame]
Sakari Ailus5689b282012-05-18 09:31:18 -03001/*
2 * include/linux/v4l2-common.h
3 *
4 * Common V4L2 and V4L2 subdev definitions.
5 *
6 * Users are advised to #include this file either through videodev2.h
7 * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
8 * to this file directly.
9 *
10 * Copyright (C) 2012 Nokia Corporation
11 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * version 2 as published by the Free Software Foundation.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 * 02110-1301 USA
26 *
27 */
28
29#ifndef __V4L2_COMMON__
30#define __V4L2_COMMON__
31
Mauro Carvalho Chehab773bcf82014-04-06 10:48:31 -030032#include <linux/types.h>
33
Sakari Ailus563df3d2012-06-13 16:01:10 -030034/*
35 *
36 * Selection interface definitions
37 *
38 */
Sakari Ailus5689b282012-05-18 09:31:18 -030039
40/* Current cropping area */
41#define V4L2_SEL_TGT_CROP 0x0000
42/* Default cropping area */
43#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
44/* Cropping bounds */
45#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
Sakari Ailus0b4bc762014-10-15 13:38:15 -030046/* Native frame size */
47#define V4L2_SEL_TGT_NATIVE_SIZE 0x0003
Sakari Ailus5689b282012-05-18 09:31:18 -030048/* Current composing area */
49#define V4L2_SEL_TGT_COMPOSE 0x0100
50/* Default composing area */
51#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
52/* Composing bounds */
53#define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102
54/* Current composing area plus all padding pixels */
55#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
56
Sakari Ailus563df3d2012-06-13 16:01:10 -030057/* Backward compatibility target definitions --- to be removed. */
Sakari Ailus5689b282012-05-18 09:31:18 -030058#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
59#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
Sakari Ailus660e22c2012-07-30 05:08:47 -030060#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP
61#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
62#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS
63#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
Sakari Ailus5689b282012-05-18 09:31:18 -030064
Sakari Ailus563df3d2012-06-13 16:01:10 -030065/* Selection flags */
66#define V4L2_SEL_FLAG_GE (1 << 0)
67#define V4L2_SEL_FLAG_LE (1 << 1)
68#define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2)
69
70/* Backward compatibility flag definitions --- to be removed. */
71#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE
72#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE
73#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
74
Hans Verkuil254a4772014-03-04 07:46:47 -030075struct v4l2_edid {
76 __u32 pad;
77 __u32 start_block;
78 __u32 blocks;
79 __u32 reserved[5];
Hans Verkuil2dd477d2014-03-17 09:54:22 -030080 __u8 *edid;
Hans Verkuil254a4772014-03-04 07:46:47 -030081};
82
Sakari Ailus563df3d2012-06-13 16:01:10 -030083#endif /* __V4L2_COMMON__ */