aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-01-23 14:11:07 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-23 14:11:07 -0500
commit4d0dddb10723cee2b3048bd2389673703bc228e4 (patch)
treeaea4b467e131d9c1080021840b9884629037d534
parentc835ac24e2e3d5de7fff0620949b61228048e27b (diff)
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)
279 switch(type) 279 switch(type)
280 { 280 {
281 case VFL_TYPE_GRABBER: 281 case VFL_TYPE_GRABBER:
282 base=0; 282 base=MINOR_VFL_TYPE_GRABBER_MIN;
283 end=64; 283 end=MINOR_VFL_TYPE_GRABBER_MAX+1;
284 name_base = "video"; 284 name_base = "video";
285 break; 285 break;
286 case VFL_TYPE_VTX: 286 case VFL_TYPE_VTX:
287 base=192; 287 base=MINOR_VFL_TYPE_VTX_MIN;
288 end=224; 288 end=MINOR_VFL_TYPE_VTX_MAX+1;
289 name_base = "vtx"; 289 name_base = "vtx";
290 break; 290 break;
291 case VFL_TYPE_VBI: 291 case VFL_TYPE_VBI:
292 base=224; 292 base=MINOR_VFL_TYPE_VBI_MIN;
293 end=256; 293 end=MINOR_VFL_TYPE_VBI_MAX+1;
294 name_base = "vbi"; 294 name_base = "vbi";
295 break; 295 break;
296 case VFL_TYPE_RADIO: 296 case VFL_TYPE_RADIO:
297 base=64; 297 base=MINOR_VFL_TYPE_RADIO_MIN;
298 end=128; 298 end=MINOR_VFL_TYPE_RADIO_MAX+1;
299 name_base = "radio"; 299 name_base = "radio";
300 break; 300 break;
301 default: 301 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 @@
21#include <linux/compiler.h> /* need __user */ 21#include <linux/compiler.h> /* need __user */
22 22
23 23
24#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */ 24#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */
25#define HAVE_V4L2 1 25#define HAVE_V4L2 1
26 26
27/* 27/*
@@ -48,6 +48,16 @@
48 48
49#ifdef __KERNEL__ 49#ifdef __KERNEL__
50 50
51/* Minor device allocation */
52#define MINOR_VFL_TYPE_GRABBER_MIN 0
53#define MINOR_VFL_TYPE_GRABBER_MAX 63
54#define MINOR_VFL_TYPE_RADIO_MIN 64
55#define MINOR_VFL_TYPE_RADIO_MAX 127
56#define MINOR_VFL_TYPE_VTX_MIN 192
57#define MINOR_VFL_TYPE_VTX_MAX 223
58#define MINOR_VFL_TYPE_VBI_MIN 224
59#define MINOR_VFL_TYPE_VBI_MAX 255
60
51#define VFL_TYPE_GRABBER 0 61#define VFL_TYPE_GRABBER 0
52#define VFL_TYPE_VBI 1 62#define VFL_TYPE_VBI 1
53#define VFL_TYPE_RADIO 2 63#define VFL_TYPE_RADIO 2
@@ -949,13 +959,15 @@ struct v4l2_sliced_vbi_format
949 __u32 reserved[2]; /* must be zero */ 959 __u32 reserved[2]; /* must be zero */
950}; 960};
951 961
952/* Teletext WST, defined on ITU-R BT.653-2 */ 962/* Teletext World System Teletext
963 (WST), defined on ITU-R BT.653-2 */
953#define V4L2_SLICED_TELETEXT_PAL_B (0x000001) 964#define V4L2_SLICED_TELETEXT_PAL_B (0x000001)
954#define V4L2_SLICED_TELETEXT_PAL_C (0x000002) 965#define V4L2_SLICED_TELETEXT_PAL_C (0x000002)
955#define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) 966#define V4L2_SLICED_TELETEXT_NTSC_B (0x000010)
956#define V4L2_SLICED_TELETEXT_SECAM (0x000020) 967#define V4L2_SLICED_TELETEXT_SECAM (0x000020)
957 968
958/* Teletext NABTS, defined on ITU-R BT.653-2 */ 969/* Teletext North American Broadcast Teletext Specification
970 (NABTS), defined on ITU-R BT.653-2 */
959#define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) 971#define V4L2_SLICED_TELETEXT_NTSC_C (0x000040)
960#define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) 972#define V4L2_SLICED_TELETEXT_NTSC_D (0x000080)
961 973
@@ -976,8 +988,24 @@ struct v4l2_sliced_vbi_format
976#define V4l2_SLICED_VITC_625 (0x010000) 988#define V4l2_SLICED_VITC_625 (0x010000)
977#define V4l2_SLICED_VITC_525 (0x020000) 989#define V4l2_SLICED_VITC_525 (0x020000)
978 990
979/* Compat macro - Should be removed for 2.6.18 */ 991#define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\
980#define V4L2_SLICED_TELETEXT_B V4L2_SLICED_TELETEXT_PAL_B 992 V4L2_SLICED_TELETEXT_NTSC_B)
993
994#define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\
995 V4L2_SLICED_TELETEXT_PAL_C |\
996 V4L2_SLICED_TELETEXT_SECAM |\
997 V4L2_SLICED_TELETEXT_NTSC_B |\
998 V4L2_SLICED_TELETEXT_NTSC_C |\
999 V4L2_SLICED_TELETEXT_NTSC_D)
1000
1001#define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\
1002 V4L2_SLICED_CAPTION_625)
1003
1004#define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\
1005 V4L2_SLICED_WSS_625)
1006
1007#define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\
1008 V4L2_SLICED_VITC_625)
981 1009
982#define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ 1010#define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\
983 V4L2_SLICED_TELETEXT_NTSC_C |\ 1011 V4L2_SLICED_TELETEXT_NTSC_C |\