~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to include/linux/v4l2-subdev.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * V4L2 subdev userspace API
 
3
 *
 
4
 * Copyright (C) 2010 Nokia Corporation
 
5
 *
 
6
 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 
7
 *           Sakari Ailus <sakari.ailus@iki.fi>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License version 2 as
 
11
 * published by the Free Software Foundation.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
 */
 
22
 
 
23
#ifndef __LINUX_V4L2_SUBDEV_H
 
24
#define __LINUX_V4L2_SUBDEV_H
 
25
 
 
26
#include <linux/ioctl.h>
 
27
#include <linux/types.h>
 
28
#include <linux/v4l2-mediabus.h>
 
29
 
 
30
/**
 
31
 * enum v4l2_subdev_format_whence - Media bus format type
 
32
 * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only
 
33
 * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device
 
34
 */
 
35
enum v4l2_subdev_format_whence {
 
36
        V4L2_SUBDEV_FORMAT_TRY = 0,
 
37
        V4L2_SUBDEV_FORMAT_ACTIVE = 1,
 
38
};
 
39
 
 
40
/**
 
41
 * struct v4l2_subdev_format - Pad-level media bus format
 
42
 * @which: format type (from enum v4l2_subdev_format_whence)
 
43
 * @pad: pad number, as reported by the media API
 
44
 * @format: media bus format (format code and frame size)
 
45
 */
 
46
struct v4l2_subdev_format {
 
47
        __u32 which;
 
48
        __u32 pad;
 
49
        struct v4l2_mbus_framefmt format;
 
50
        __u32 reserved[8];
 
51
};
 
52
 
 
53
/**
 
54
 * struct v4l2_subdev_crop - Pad-level crop settings
 
55
 * @which: format type (from enum v4l2_subdev_format_whence)
 
56
 * @pad: pad number, as reported by the media API
 
57
 * @rect: pad crop rectangle boundaries
 
58
 */
 
59
struct v4l2_subdev_crop {
 
60
        __u32 which;
 
61
        __u32 pad;
 
62
        struct v4l2_rect rect;
 
63
        __u32 reserved[8];
 
64
};
 
65
 
 
66
/**
 
67
 * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration
 
68
 * @pad: pad number, as reported by the media API
 
69
 * @index: format index during enumeration
 
70
 * @code: format code (from enum v4l2_mbus_pixelcode)
 
71
 */
 
72
struct v4l2_subdev_mbus_code_enum {
 
73
        __u32 pad;
 
74
        __u32 index;
 
75
        __u32 code;
 
76
        __u32 reserved[9];
 
77
};
 
78
 
 
79
/**
 
80
 * struct v4l2_subdev_frame_size_enum - Media bus format enumeration
 
81
 * @pad: pad number, as reported by the media API
 
82
 * @index: format index during enumeration
 
83
 * @code: format code (from enum v4l2_mbus_pixelcode)
 
84
 */
 
85
struct v4l2_subdev_frame_size_enum {
 
86
        __u32 index;
 
87
        __u32 pad;
 
88
        __u32 code;
 
89
        __u32 min_width;
 
90
        __u32 max_width;
 
91
        __u32 min_height;
 
92
        __u32 max_height;
 
93
        __u32 reserved[9];
 
94
};
 
95
 
 
96
/**
 
97
 * struct v4l2_subdev_frame_interval - Pad-level frame rate
 
98
 * @pad: pad number, as reported by the media API
 
99
 * @interval: frame interval in seconds
 
100
 */
 
101
struct v4l2_subdev_frame_interval {
 
102
        __u32 pad;
 
103
        struct v4l2_fract interval;
 
104
        __u32 reserved[9];
 
105
};
 
106
 
 
107
/**
 
108
 * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration
 
109
 * @pad: pad number, as reported by the media API
 
110
 * @index: frame interval index during enumeration
 
111
 * @code: format code (from enum v4l2_mbus_pixelcode)
 
112
 * @width: frame width in pixels
 
113
 * @height: frame height in pixels
 
114
 * @interval: frame interval in seconds
 
115
 */
 
116
struct v4l2_subdev_frame_interval_enum {
 
117
        __u32 index;
 
118
        __u32 pad;
 
119
        __u32 code;
 
120
        __u32 width;
 
121
        __u32 height;
 
122
        struct v4l2_fract interval;
 
123
        __u32 reserved[9];
 
124
};
 
125
 
 
126
#define VIDIOC_SUBDEV_G_FMT     _IOWR('V',  4, struct v4l2_subdev_format)
 
127
#define VIDIOC_SUBDEV_S_FMT     _IOWR('V',  5, struct v4l2_subdev_format)
 
128
#define VIDIOC_SUBDEV_G_FRAME_INTERVAL \
 
129
                        _IOWR('V', 21, struct v4l2_subdev_frame_interval)
 
130
#define VIDIOC_SUBDEV_S_FRAME_INTERVAL \
 
131
                        _IOWR('V', 22, struct v4l2_subdev_frame_interval)
 
132
#define VIDIOC_SUBDEV_ENUM_MBUS_CODE \
 
133
                        _IOWR('V',  2, struct v4l2_subdev_mbus_code_enum)
 
134
#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
 
135
                        _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
 
136
#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
 
137
                        _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
 
138
#define VIDIOC_SUBDEV_G_CROP    _IOWR('V', 59, struct v4l2_subdev_crop)
 
139
#define VIDIOC_SUBDEV_S_CROP    _IOWR('V', 60, struct v4l2_subdev_crop)
 
140
 
 
141
#endif