summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-01-23 17:11:07 -0200
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-23 17:11:07 -0200
commit4d0dddb10723cee2b3048bd2389673703bc228e4 (patch)
treeaea4b467e131d9c1080021840b9884629037d534
parentc835ac24e2e3d5de7fff0620949b61228048e27b (diff)
downloadlwn-4d0dddb10723cee2b3048bd2389673703bc228e4.tar.gz
lwn-4d0dddb10723cee2b3048bd2389673703bc228e4.zip
V4L/DVB (3419): added some VBI macros and moved minor definitions to header file
- 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>
-rw-r--r--drivers/media/video/videodev.c16
-rw-r--r--include/linux/videodev2.h38
2 files changed, 41 insertions, 13 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 078880e4c8c0..908fbec776ac 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -279,23 +279,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/include/linux/videodev2.h b/include/linux/videodev2.h
index 27ae3d679cbe..6e33ce96cab0 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -21,7 +21,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
/*
@@ -48,6 +48,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
@@ -949,13 +959,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)
@@ -976,8 +988,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 |\