diff options
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 87 |
1 files changed, 77 insertions, 10 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5208b12d5550..af2d6155d3fe 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -17,11 +17,12 @@ | |||
17 | #include <linux/time.h> /* need struct timeval */ | 17 | #include <linux/time.h> /* need struct timeval */ |
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/mutex.h> | ||
20 | #endif | 21 | #endif |
21 | #include <linux/compiler.h> /* need __user */ | 22 | #include <linux/compiler.h> /* need __user */ |
22 | 23 | ||
23 | 24 | ||
24 | #define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */ | 25 | #define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ |
25 | #define HAVE_V4L2 1 | 26 | #define HAVE_V4L2 1 |
26 | 27 | ||
27 | /* | 28 | /* |
@@ -48,6 +49,16 @@ | |||
48 | 49 | ||
49 | #ifdef __KERNEL__ | 50 | #ifdef __KERNEL__ |
50 | 51 | ||
52 | /* Minor device allocation */ | ||
53 | #define MINOR_VFL_TYPE_GRABBER_MIN 0 | ||
54 | #define MINOR_VFL_TYPE_GRABBER_MAX 63 | ||
55 | #define MINOR_VFL_TYPE_RADIO_MIN 64 | ||
56 | #define MINOR_VFL_TYPE_RADIO_MAX 127 | ||
57 | #define MINOR_VFL_TYPE_VTX_MIN 192 | ||
58 | #define MINOR_VFL_TYPE_VTX_MAX 223 | ||
59 | #define MINOR_VFL_TYPE_VBI_MIN 224 | ||
60 | #define MINOR_VFL_TYPE_VBI_MAX 255 | ||
61 | |||
51 | #define VFL_TYPE_GRABBER 0 | 62 | #define VFL_TYPE_GRABBER 0 |
52 | #define VFL_TYPE_VBI 1 | 63 | #define VFL_TYPE_VBI 1 |
53 | #define VFL_TYPE_RADIO 2 | 64 | #define VFL_TYPE_RADIO 2 |
@@ -64,7 +75,7 @@ struct video_device | |||
64 | int minor; | 75 | int minor; |
65 | 76 | ||
66 | /* device ops + callbacks */ | 77 | /* device ops + callbacks */ |
67 | struct file_operations *fops; | 78 | const struct file_operations *fops; |
68 | void (*release)(struct video_device *vfd); | 79 | void (*release)(struct video_device *vfd); |
69 | 80 | ||
70 | 81 | ||
@@ -80,7 +91,7 @@ struct video_device | |||
80 | 91 | ||
81 | /* for videodev.c intenal usage -- please don't touch */ | 92 | /* for videodev.c intenal usage -- please don't touch */ |
82 | int users; /* video_exclusive_{open|close} ... */ | 93 | int users; /* video_exclusive_{open|close} ... */ |
83 | struct semaphore lock; /* ... helper function uses these */ | 94 | struct mutex lock; /* ... helper function uses these */ |
84 | char devfs_name[64]; /* devfs */ | 95 | char devfs_name[64]; /* devfs */ |
85 | struct class_device class_dev; /* sysfs */ | 96 | struct class_device class_dev; /* sysfs */ |
86 | }; | 97 | }; |
@@ -872,6 +883,7 @@ struct v4l2_modulator | |||
872 | #define V4L2_TUNER_MODE_LANG2 0x0002 | 883 | #define V4L2_TUNER_MODE_LANG2 0x0002 |
873 | #define V4L2_TUNER_MODE_SAP 0x0002 | 884 | #define V4L2_TUNER_MODE_SAP 0x0002 |
874 | #define V4L2_TUNER_MODE_LANG1 0x0003 | 885 | #define V4L2_TUNER_MODE_LANG1 0x0003 |
886 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 | ||
875 | 887 | ||
876 | struct v4l2_frequency | 888 | struct v4l2_frequency |
877 | { | 889 | { |
@@ -952,13 +964,68 @@ struct v4l2_sliced_vbi_format | |||
952 | __u32 reserved[2]; /* must be zero */ | 964 | __u32 reserved[2]; /* must be zero */ |
953 | }; | 965 | }; |
954 | 966 | ||
955 | #define V4L2_SLICED_TELETEXT_B (0x0001) | 967 | /* Teletext World System Teletext |
956 | #define V4L2_SLICED_VPS (0x0400) | 968 | (WST), defined on ITU-R BT.653-2 */ |
957 | #define V4L2_SLICED_CAPTION_525 (0x1000) | 969 | #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) |
958 | #define V4L2_SLICED_WSS_625 (0x4000) | 970 | #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) |
959 | 971 | #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) | |
960 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | 972 | #define V4L2_SLICED_TELETEXT_SECAM (0x000020) |
961 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | 973 | |
974 | /* Teletext North American Broadcast Teletext Specification | ||
975 | (NABTS), defined on ITU-R BT.653-2 */ | ||
976 | #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) | ||
977 | #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) | ||
978 | |||
979 | /* Video Program System, defined on ETS 300 231*/ | ||
980 | #define V4L2_SLICED_VPS (0x000400) | ||
981 | |||
982 | /* Closed Caption, defined on EIA-608 */ | ||
983 | #define V4L2_SLICED_CAPTION_525 (0x001000) | ||
984 | #define V4L2_SLICED_CAPTION_625 (0x002000) | ||
985 | |||
986 | /* Wide Screen System, defined on ITU-R BT1119.1 */ | ||
987 | #define V4L2_SLICED_WSS_625 (0x004000) | ||
988 | |||
989 | /* Wide Screen System, defined on IEC 61880 */ | ||
990 | #define V4L2_SLICED_WSS_525 (0x008000) | ||
991 | |||
992 | /* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ | ||
993 | #define V4l2_SLICED_VITC_625 (0x010000) | ||
994 | #define V4l2_SLICED_VITC_525 (0x020000) | ||
995 | |||
996 | #define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
997 | V4L2_SLICED_TELETEXT_NTSC_B) | ||
998 | |||
999 | #define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1000 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1001 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1002 | V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1003 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1004 | V4L2_SLICED_TELETEXT_NTSC_D) | ||
1005 | |||
1006 | #define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ | ||
1007 | V4L2_SLICED_CAPTION_625) | ||
1008 | |||
1009 | #define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ | ||
1010 | V4L2_SLICED_WSS_625) | ||
1011 | |||
1012 | #define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ | ||
1013 | V4L2_SLICED_VITC_625) | ||
1014 | |||
1015 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1016 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1017 | V4L2_SLICED_TELETEXT_NTSC_D |\ | ||
1018 | V4L2_SLICED_CAPTION_525 |\ | ||
1019 | V4L2_SLICED_WSS_525 |\ | ||
1020 | V4l2_SLICED_VITC_525) | ||
1021 | |||
1022 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1023 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1024 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1025 | V4L2_SLICED_VPS |\ | ||
1026 | V4L2_SLICED_CAPTION_625 |\ | ||
1027 | V4L2_SLICED_WSS_625 |\ | ||
1028 | V4l2_SLICED_VITC_625) | ||
962 | 1029 | ||
963 | struct v4l2_sliced_vbi_cap | 1030 | struct v4l2_sliced_vbi_cap |
964 | { | 1031 | { |