aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r--include/media/v4l2-common.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 642520acdfa7..5564db13c0d5 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -26,8 +26,14 @@
26#ifndef V4L2_COMMON_H_ 26#ifndef V4L2_COMMON_H_
27#define V4L2_COMMON_H_ 27#define V4L2_COMMON_H_
28 28
29#include <media/v4l2-dev.h>
30
29/* v4l debugging and diagnostics */ 31/* v4l debugging and diagnostics */
30 32
33/* Debug bitmask flags to be used on V4L2 */
34#define V4L2_DEBUG_IOCTL 0x01
35#define V4L2_DEBUG_IOCTL_ARG 0x02
36
31/* Common printk constucts for v4l-i2c drivers. These macros create a unique 37/* Common printk constucts for v4l-i2c drivers. These macros create a unique
32 prefix consisting of the driver name, the adapter number and the i2c 38 prefix consisting of the driver name, the adapter number and the i2c
33 address. */ 39 address. */
@@ -78,6 +84,19 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg);
78 84
79/* ------------------------------------------------------------------------- */ 85/* ------------------------------------------------------------------------- */
80 86
87/* Control helper functions */
88
89int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
90 const char **menu_items);
91const char **v4l2_ctrl_get_menu(u32 id);
92int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def);
93int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl);
94int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu,
95 struct v4l2_queryctrl *qctrl, const char **menu_items);
96u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
97
98/* ------------------------------------------------------------------------- */
99
81/* Internal ioctls */ 100/* Internal ioctls */
82 101
83/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ 102/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */
@@ -112,6 +131,8 @@ enum v4l2_chip_ident {
112 V4L2_IDENT_SAA7129 = 159, 131 V4L2_IDENT_SAA7129 = 159,
113 132
114 /* module cx25840: reserved range 200-249 */ 133 /* module cx25840: reserved range 200-249 */
134 V4L2_IDENT_CX25836 = 236,
135 V4L2_IDENT_CX25837 = 237,
115 V4L2_IDENT_CX25840 = 240, 136 V4L2_IDENT_CX25840 = 240,
116 V4L2_IDENT_CX25841 = 241, 137 V4L2_IDENT_CX25841 = 241,
117 V4L2_IDENT_CX25842 = 242, 138 V4L2_IDENT_CX25842 = 242,
@@ -211,4 +232,15 @@ struct v4l2_routing {
211#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) 232#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
212#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) 233#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing)
213 234
235struct v4l2_crystal_freq {
236 u32 freq; /* frequency in Hz of the crystal */
237 u32 flags; /* device specific flags */
238};
239
240/* Sets the frequency of the crystal used to generate the clocks.
241 An extra flags field allows device specific configuration regarding
242 clock frequency dividers, etc. If not used, then set flags to 0.
243 If the frequency is not supported, then -EINVAL is returned. */
244#define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq)
245
214#endif /* V4L2_COMMON_H_ */ 246#endif /* V4L2_COMMON_H_ */