summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2006-01-21 21:42:15 +0000
committerMauro Carvalho Chehab <devnull@localhost>2006-01-21 21:42:15 +0000
commitb702770892b1af21633d0703914343bdfc4547c2 (patch)
tree20ee8ec3060a61b35a4eb837d5af97282afaab85 /linux
parenta9eb36aa2780b3c7e3363bb392c804a55ae07422 (diff)
downloadmediapointer-dvb-s2-b702770892b1af21633d0703914343bdfc4547c2.tar.gz
mediapointer-dvb-s2-b702770892b1af21633d0703914343bdfc4547c2.tar.bz2
added some VBI macros and moved minor definitions to header file
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Moved some hardcoded minor numbers to videodev2.h - Included more comments for sliced VBI standards - Included some VBI macros to group similar standards Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/videodev.c16
-rw-r--r--linux/include/linux/videodev2.h38
2 files changed, 41 insertions, 13 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 7a20ebacf..98a9deaf2 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -293,23 +293,23 @@ int video_register_device(struct video_device *vfd, int type, int nr)
switch(type)
{
case VFL_TYPE_GRABBER:
- base=0;
- end=64;
+ base=MINOR_VFL_TYPE_GRABBER_MIN;
+ end=MINOR_VFL_TYPE_GRABBER_MAX+1;
name_base = "video";
break;
case VFL_TYPE_VTX:
- base=192;
- end=224;
+ base=MINOR_VFL_TYPE_VTX_MIN;
+ end=MINOR_VFL_TYPE_VTX_MAX+1;
name_base = "vtx";
break;
case VFL_TYPE_VBI:
- base=224;
- end=256;
+ base=MINOR_VFL_TYPE_VBI_MIN;
+ end=MINOR_VFL_TYPE_VBI_MAX+1;
name_base = "vbi";
break;
case VFL_TYPE_RADIO:
- base=64;
- end=128;
+ base=MINOR_VFL_TYPE_RADIO_MIN;
+ end=MINOR_VFL_TYPE_RADIO_MAX+1;
name_base = "radio";
break;
default:
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 61fa29a05..e2e28e450 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -26,7 +26,7 @@
#include <linux/compiler.h> /* need __user */
-#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */
+#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */
#define HAVE_V4L2 1
/*
@@ -53,6 +53,16 @@
#ifdef __KERNEL__
+/* Minor device allocation */
+#define MINOR_VFL_TYPE_GRABBER_MIN 0
+#define MINOR_VFL_TYPE_GRABBER_MAX 63
+#define MINOR_VFL_TYPE_RADIO_MIN 64
+#define MINOR_VFL_TYPE_RADIO_MAX 127
+#define MINOR_VFL_TYPE_VTX_MIN 192
+#define MINOR_VFL_TYPE_VTX_MAX 223
+#define MINOR_VFL_TYPE_VBI_MIN 224
+#define MINOR_VFL_TYPE_VBI_MAX 255
+
#define VFL_TYPE_GRABBER 0
#define VFL_TYPE_VBI 1
#define VFL_TYPE_RADIO 2
@@ -975,13 +985,15 @@ struct v4l2_sliced_vbi_format
__u32 reserved[2]; /* must be zero */
};
-/* Teletext WST, defined on ITU-R BT.653-2 */
+/* Teletext World System Teletext
+ (WST), defined on ITU-R BT.653-2 */
#define V4L2_SLICED_TELETEXT_PAL_B (0x000001)
#define V4L2_SLICED_TELETEXT_PAL_C (0x000002)
#define V4L2_SLICED_TELETEXT_NTSC_B (0x000010)
#define V4L2_SLICED_TELETEXT_SECAM (0x000020)
-/* Teletext NABTS, defined on ITU-R BT.653-2 */
+/* Teletext North American Broadcast Teletext Specification
+ (NABTS), defined on ITU-R BT.653-2 */
#define V4L2_SLICED_TELETEXT_NTSC_C (0x000040)
#define V4L2_SLICED_TELETEXT_NTSC_D (0x000080)
@@ -1002,8 +1014,24 @@ struct v4l2_sliced_vbi_format
#define V4l2_SLICED_VITC_625 (0x010000)
#define V4l2_SLICED_VITC_525 (0x020000)
-/* Compat macro - Should be removed for 2.6.18 */
-#define V4L2_SLICED_TELETEXT_B V4L2_SLICED_TELETEXT_PAL_B
+#define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\
+ V4L2_SLICED_TELETEXT_NTSC_B)
+
+#define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\
+ V4L2_SLICED_TELETEXT_PAL_C |\
+ V4L2_SLICED_TELETEXT_SECAM |\
+ V4L2_SLICED_TELETEXT_NTSC_B |\
+ V4L2_SLICED_TELETEXT_NTSC_C |\
+ V4L2_SLICED_TELETEXT_NTSC_D)
+
+#define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\
+ V4L2_SLICED_CAPTION_625)
+
+#define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\
+ V4L2_SLICED_WSS_625)
+
+#define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\
+ V4L2_SLICED_VITC_625)
#define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\
V4L2_SLICED_TELETEXT_NTSC_C |\