History

[media] v4l2-subdev.h: add 'which' field for the enum structs

While all other pad ops allow you to select whether to use the 'try' or the 'active' formats, the enum ops didn't have that option and always used 'try'. However, this will fail if a simple (e.g. PCI) bridge driver wants to use the enum pad op of a subdev that's also used in a complex platform driver like the omap3. Such a bridge driver generally wants to enum formats based on the active format. So add a new 'which' field to these structs. Note that V4L2_SUBDEV_FORMAT_TRY is 0, so the default remains TRY (applications need to set reserved to 0).

Hans Verkuil committed 11 years ago

Commit e1c47e71 parent f7234131 file · +9 −3Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/v4l2-subdev.h+9−3
@@ -69,12 +69,14 @@ struct v4l2_subdev_crop { · 68 unmodified lines
69 * @pad: pad number, as reported by the media API69 * @pad: pad number, as reported by the media API
70 * @index: format index during enumeration70 * @index: format index during enumeration
71 * @code: format code (MEDIA_BUS_FMT_ definitions)71 * @code: format code (MEDIA_BUS_FMT_ definitions)
72 * @which: format type (from enum v4l2_subdev_format_whence)
72 */73 */
73struct v4l2_subdev_mbus_code_enum {74struct v4l2_subdev_mbus_code_enum {
74 __u32 pad;75 __u32 pad;
75 __u32 index;76 __u32 index;
76 __u32 code;77 __u32 code;
77 __u32 reserved[9];78 __u32 which;
79 __u32 reserved[8];
78};80};
79 81
80/**82/**
@@ -82,6 +84,7 @@ struct v4l2_subdev_mbus_code_enum { · 1 unmodified line
82 * @pad: pad number, as reported by the media API84 * @pad: pad number, as reported by the media API
83 * @index: format index during enumeration85 * @index: format index during enumeration
84 * @code: format code (MEDIA_BUS_FMT_ definitions)86 * @code: format code (MEDIA_BUS_FMT_ definitions)
87 * @which: format type (from enum v4l2_subdev_format_whence)
85 */88 */
86struct v4l2_subdev_frame_size_enum {89struct v4l2_subdev_frame_size_enum {
87 __u32 index;90 __u32 index;
@@ -91,7 +94,8 @@ struct v4l2_subdev_frame_size_enum { · 3 unmodified lines
91 __u32 max_width;94 __u32 max_width;
92 __u32 min_height;95 __u32 min_height;
93 __u32 max_height;96 __u32 max_height;
94 __u32 reserved[9];97 __u32 which;
98 __u32 reserved[8];
95};99};
96 100
97/**101/**
@@ -113,6 +117,7 @@ struct v4l2_subdev_frame_interval { · 15 unmodified lines
113 * @width: frame width in pixels117 * @width: frame width in pixels
114 * @height: frame height in pixels118 * @height: frame height in pixels
115 * @interval: frame interval in seconds119 * @interval: frame interval in seconds
120 * @which: format type (from enum v4l2_subdev_format_whence)
116 */121 */
117struct v4l2_subdev_frame_interval_enum {122struct v4l2_subdev_frame_interval_enum {
118 __u32 index;123 __u32 index;
@@ -121,7 +126,8 @@ struct v4l2_subdev_frame_interval_enum { · 2 unmodified lines
121 __u32 width;126 __u32 width;
122 __u32 height;127 __u32 height;
123 struct v4l2_fract interval;128 struct v4l2_fract interval;
124 __u32 reserved[9];129 __u32 which;
130 __u32 reserved[8];
125};131};
126 132
127/**133/**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t