Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / videotext.h
blob018f92047ff83c9417393a1ebef5285bbce66ab6
1 #ifndef _VTX_H
2 #define _VTX_H
4 /*
5 * Teletext (=Videotext) hardware decoders using interface /dev/vtx
6 * Do not confuse with drivers using /dev/vbi which decode videotext by software
8 * Videotext IOCTLs changed in order to use _IO() macros defined in <linux/ioctl.h>,
9 * unused tuner IOCTLs cleaned up by
10 * Michael Geng <linux@MichaelGeng.de>
12 * Copyright (c) 1994-97 Martin Buck <martin-2.buck@student.uni-ulm.de>
13 * Read COPYING for more information
19 * Videotext ioctls
21 #define VTXIOCGETINFO _IOR (0x81, 1, vtx_info_t)
22 #define VTXIOCCLRPAGE _IOW (0x81, 2, vtx_pagereq_t)
23 #define VTXIOCCLRFOUND _IOW (0x81, 3, vtx_pagereq_t)
24 #define VTXIOCPAGEREQ _IOW (0x81, 4, vtx_pagereq_t)
25 #define VTXIOCGETSTAT _IOW (0x81, 5, vtx_pagereq_t)
26 #define VTXIOCGETPAGE _IOW (0x81, 6, vtx_pagereq_t)
27 #define VTXIOCSTOPDAU _IOW (0x81, 7, vtx_pagereq_t)
28 #define VTXIOCPUTPAGE _IO (0x81, 8)
29 #define VTXIOCSETDISP _IO (0x81, 9)
30 #define VTXIOCPUTSTAT _IO (0x81, 10)
31 #define VTXIOCCLRCACHE _IO (0x81, 11)
32 #define VTXIOCSETVIRT _IOW (0x81, 12, long)
34 /* for compatibility, will go away some day */
35 #define VTXIOCGETINFO_OLD 0x7101 /* get version of driver & capabilities of vtx-chipset */
36 #define VTXIOCCLRPAGE_OLD 0x7102 /* clear page-buffer */
37 #define VTXIOCCLRFOUND_OLD 0x7103 /* clear bits indicating that page was found */
38 #define VTXIOCPAGEREQ_OLD 0x7104 /* search for page */
39 #define VTXIOCGETSTAT_OLD 0x7105 /* get status of page-buffer */
40 #define VTXIOCGETPAGE_OLD 0x7106 /* get contents of page-buffer */
41 #define VTXIOCSTOPDAU_OLD 0x7107 /* stop data acquisition unit */
42 #define VTXIOCPUTPAGE_OLD 0x7108 /* display page on TV-screen */
43 #define VTXIOCSETDISP_OLD 0x7109 /* set TV-mode */
44 #define VTXIOCPUTSTAT_OLD 0x710a /* set status of TV-output-buffer */
45 #define VTXIOCCLRCACHE_OLD 0x710b /* clear cache on VTX-interface (if avail.) */
46 #define VTXIOCSETVIRT_OLD 0x710c /* turn on virtual mode (this disables TV-display) */
48 /*
49 * Definitions for VTXIOCGETINFO
52 #define SAA5243 0
53 #define SAA5246 1
54 #define SAA5249 2
55 #define SAA5248 3
56 #define XSTV5346 4
58 typedef struct {
59 int version_major, version_minor; /* version of driver; if version_major changes, driver */
60 /* is not backward compatible!!! CHECK THIS!!! */
61 int numpages; /* number of page-buffers of vtx-chipset */
62 int cct_type; /* type of vtx-chipset (SAA5243, SAA5246, SAA5248 or
63 * SAA5249) */
65 vtx_info_t;
69 * Definitions for VTXIOC{CLRPAGE,CLRFOUND,PAGEREQ,GETSTAT,GETPAGE,STOPDAU,PUTPAGE,SETDISP}
72 #define MIN_UNIT (1<<0)
73 #define MIN_TEN (1<<1)
74 #define HR_UNIT (1<<2)
75 #define HR_TEN (1<<3)
76 #define PG_UNIT (1<<4)
77 #define PG_TEN (1<<5)
78 #define PG_HUND (1<<6)
79 #define PGMASK_MAX (1<<7)
80 #define PGMASK_PAGE (PG_HUND | PG_TEN | PG_UNIT)
81 #define PGMASK_HOUR (HR_TEN | HR_UNIT)
82 #define PGMASK_MINUTE (MIN_TEN | MIN_UNIT)
84 typedef struct
86 int page; /* number of requested page (hexadecimal) */
87 int hour; /* requested hour (hexadecimal) */
88 int minute; /* requested minute (hexadecimal) */
89 int pagemask; /* mask defining which values of the above are set */
90 int pgbuf; /* buffer where page will be stored */
91 int start; /* start of requested part of page */
92 int end; /* end of requested part of page */
93 void __user *buffer; /* pointer to beginning of destination buffer */
95 vtx_pagereq_t;
99 * Definitions for VTXIOC{GETSTAT,PUTSTAT}
102 #define VTX_PAGESIZE (40 * 24)
103 #define VTX_VIRTUALSIZE (40 * 49)
105 typedef struct
107 int pagenum; /* number of page (hexadecimal) */
108 int hour; /* hour (hexadecimal) */
109 int minute; /* minute (hexadecimal) */
110 int charset; /* national charset */
111 unsigned delete : 1; /* delete page (C4) */
112 unsigned headline : 1; /* insert headline (C5) */
113 unsigned subtitle : 1; /* insert subtitle (C6) */
114 unsigned supp_header : 1; /* suppress header (C7) */
115 unsigned update : 1; /* update page (C8) */
116 unsigned inter_seq : 1; /* interrupted sequence (C9) */
117 unsigned dis_disp : 1; /* disable/suppress display (C10) */
118 unsigned serial : 1; /* serial mode (C11) */
119 unsigned notfound : 1; /* /FOUND */
120 unsigned pblf : 1; /* PBLF */
121 unsigned hamming : 1; /* hamming-error occurred */
123 vtx_pageinfo_t;
125 #endif /* _VTX_H */