Blame view

include/linux/videotext.h 4.15 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  #ifndef _VTX_H
  #define _VTX_H
  
  /*
   * Teletext (=Videotext) hardware decoders using interface /dev/vtx
   * Do not confuse with drivers using /dev/vbi which decode videotext by software
   *
   * Videotext IOCTLs changed in order to use _IO() macros defined in <linux/ioctl.h>,
   * unused tuner IOCTLs cleaned up by
   * Michael Geng <linux@MichaelGeng.de>
   *
   * Copyright (c) 1994-97 Martin Buck  <martin-2.buck@student.uni-ulm.de>
   * Read COPYING for more information
   *
   */
  
  
  /*
   *	Videotext ioctls
   */
  #define VTXIOCGETINFO	_IOR  (0x81,  1, vtx_info_t)
  #define VTXIOCCLRPAGE	_IOW  (0x81,  2, vtx_pagereq_t)
  #define VTXIOCCLRFOUND	_IOW  (0x81,  3, vtx_pagereq_t)
  #define VTXIOCPAGEREQ	_IOW  (0x81,  4, vtx_pagereq_t)
  #define VTXIOCGETSTAT	_IOW  (0x81,  5, vtx_pagereq_t)
  #define VTXIOCGETPAGE	_IOW  (0x81,  6, vtx_pagereq_t)
  #define VTXIOCSTOPDAU	_IOW  (0x81,  7, vtx_pagereq_t)
  #define VTXIOCPUTPAGE	_IO   (0x81,  8)
  #define VTXIOCSETDISP	_IO   (0x81,  9)
  #define VTXIOCPUTSTAT	_IO   (0x81, 10)
  #define VTXIOCCLRCACHE	_IO   (0x81, 11)
  #define VTXIOCSETVIRT	_IOW  (0x81, 12, long)
  
  /* for compatibility, will go away some day */
  #define VTXIOCGETINFO_OLD  0x7101  /* get version of driver & capabilities of vtx-chipset */
  #define VTXIOCCLRPAGE_OLD  0x7102  /* clear page-buffer */
  #define VTXIOCCLRFOUND_OLD 0x7103  /* clear bits indicating that page was found */
  #define VTXIOCPAGEREQ_OLD  0x7104  /* search for page */
  #define VTXIOCGETSTAT_OLD  0x7105  /* get status of page-buffer */
  #define VTXIOCGETPAGE_OLD  0x7106  /* get contents of page-buffer */
  #define VTXIOCSTOPDAU_OLD  0x7107  /* stop data acquisition unit */
  #define VTXIOCPUTPAGE_OLD  0x7108  /* display page on TV-screen */
  #define VTXIOCSETDISP_OLD  0x7109  /* set TV-mode */
  #define VTXIOCPUTSTAT_OLD  0x710a  /* set status of TV-output-buffer */
  #define VTXIOCCLRCACHE_OLD 0x710b  /* clear cache on VTX-interface (if avail.) */
  #define VTXIOCSETVIRT_OLD  0x710c  /* turn on virtual mode (this disables TV-display) */
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
47
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
48
49
   *	Definitions for VTXIOCGETINFO
   */
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
50

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
52
53
54
55
56
57
58
  #define SAA5243 0
  #define SAA5246 1
  #define SAA5249 2
  #define SAA5248 3
  #define XSTV5346 4
  
  typedef struct {
  	int version_major, version_minor;	/* version of driver; if version_major changes, driver */
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
59
  						/* is not backward compatible!!! CHECK THIS!!! */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
60
61
  	int numpages;				/* number of page-buffers of vtx-chipset */
  	int cct_type;				/* type of vtx-chipset (SAA5243, SAA5246, SAA5248 or
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
62
  						 * SAA5249) */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  }
  vtx_info_t;
  
  
  /*
   *	Definitions for VTXIOC{CLRPAGE,CLRFOUND,PAGEREQ,GETSTAT,GETPAGE,STOPDAU,PUTPAGE,SETDISP}
   */
  
  #define MIN_UNIT   (1<<0)
  #define MIN_TEN    (1<<1)
  #define HR_UNIT    (1<<2)
  #define HR_TEN     (1<<3)
  #define PG_UNIT    (1<<4)
  #define PG_TEN     (1<<5)
  #define PG_HUND    (1<<6)
  #define PGMASK_MAX (1<<7)
  #define PGMASK_PAGE (PG_HUND | PG_TEN | PG_UNIT)
  #define PGMASK_HOUR (HR_TEN | HR_UNIT)
  #define PGMASK_MINUTE (MIN_TEN | MIN_UNIT)
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
82
  typedef struct
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
  {
  	int page;	/* number of requested page (hexadecimal) */
  	int hour;	/* requested hour (hexadecimal) */
  	int minute;	/* requested minute (hexadecimal) */
  	int pagemask;	/* mask defining which values of the above are set */
  	int pgbuf;	/* buffer where page will be stored */
  	int start;	/* start of requested part of page */
  	int end;	/* end of requested part of page */
  	void __user *buffer;	/* pointer to beginning of destination buffer */
  }
  vtx_pagereq_t;
  
  
  /*
   *	Definitions for VTXIOC{GETSTAT,PUTSTAT}
   */
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
99

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
100
101
  #define VTX_PAGESIZE (40 * 24)
  #define VTX_VIRTUALSIZE (40 * 49)
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
102
  typedef struct
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
  {
  	int pagenum;			/* number of page (hexadecimal) */
  	int hour;			/* hour (hexadecimal) */
  	int minute;			/* minute (hexadecimal) */
  	int charset;			/* national charset */
  	unsigned delete : 1;		/* delete page (C4) */
  	unsigned headline : 1;		/* insert headline (C5) */
  	unsigned subtitle : 1;		/* insert subtitle (C6) */
  	unsigned supp_header : 1;	/* suppress header (C7) */
  	unsigned update : 1;		/* update page (C8) */
  	unsigned inter_seq : 1;		/* interrupted sequence (C9) */
  	unsigned dis_disp : 1;		/* disable/suppress display (C10) */
  	unsigned serial : 1;		/* serial mode (C11) */
  	unsigned notfound : 1;		/* /FOUND */
  	unsigned pblf : 1;		/* PBLF */
  	unsigned hamming : 1;		/* hamming-error occurred */
  }
  vtx_pageinfo_t;
fdd2a7e2d   Mauro Carvalho Chehab   V4L/DVB (8500a): ...
121

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
122
  #endif /* _VTX_H */