1#ifndef _VTX_H
2#define _VTX_H
3
4
5
6
7
8
9
10
11
12
13
14
15#define VTXIOCGETINFO 0x7101
16#define VTXIOCCLRPAGE 0x7102
17#define VTXIOCCLRFOUND 0x7103
18#define VTXIOCPAGEREQ 0x7104
19#define VTXIOCGETSTAT 0x7105
20#define VTXIOCGETPAGE 0x7106
21#define VTXIOCSTOPDAU 0x7107
22#define VTXIOCPUTPAGE 0x7108
23#define VTXIOCSETDISP 0x7109
24#define VTXIOCPUTSTAT 0x710a
25#define VTXIOCCLRCACHE 0x710b
26#define VTXIOCSETVIRT 0x710c
27
28
29
30
31
32
33#define SAA5243 0
34#define SAA5246 1
35#define SAA5249 2
36#define SAA5248 3
37#define XSTV5346 4
38
39typedef struct {
40 int version_major, version_minor;
41
42 int numpages;
43 int cct_type;
44
45}
46vtx_info_t;
47
48
49
50
51
52
53#define MIN_UNIT (1<<0)
54#define MIN_TEN (1<<1)
55#define HR_UNIT (1<<2)
56#define HR_TEN (1<<3)
57#define PG_UNIT (1<<4)
58#define PG_TEN (1<<5)
59#define PG_HUND (1<<6)
60#define PGMASK_MAX (1<<7)
61#define PGMASK_PAGE (PG_HUND | PG_TEN | PG_UNIT)
62#define PGMASK_HOUR (HR_TEN | HR_UNIT)
63#define PGMASK_MINUTE (MIN_TEN | MIN_UNIT)
64
65typedef struct
66{
67 int page;
68 int hour;
69 int minute;
70 int pagemask;
71 int pgbuf;
72 int start;
73 int end;
74 void *buffer;
75}
76vtx_pagereq_t;
77
78
79
80
81
82
83#define VTX_PAGESIZE (40 * 24)
84#define VTX_VIRTUALSIZE (40 * 49)
85
86typedef struct
87{
88 int pagenum;
89 int hour;
90 int minute;
91 int charset;
92 unsigned delete : 1;
93 unsigned headline : 1;
94 unsigned subtitle : 1;
95 unsigned supp_header : 1;
96 unsigned update : 1;
97 unsigned inter_seq : 1;
98 unsigned dis_disp : 1;
99 unsigned serial : 1;
100 unsigned notfound : 1;
101 unsigned pblf : 1;
102 unsigned hamming : 1;
103}
104vtx_pageinfo_t;
105
106
107
108
109
110
111typedef enum {
112 DISPOFF, DISPNORM, DISPTRANS, DISPINS, INTERLACE_OFFSET
113} vtxdisp_t;
114
115
116
117
118
119
120
121#define TUNIOCGETINFO 0x7201
122#define TUNIOCRESET 0x7202
123#define TUNIOCSETFREQ 0x7203
124#define TUNIOCGETFREQ 0x7204
125#define TUNIOCSETCHAN 0x7205
126#define TUNIOCGETCHAN 0x7206
127
128
129typedef struct
130{
131 int version_major, version_minor;
132
133 unsigned freq : 1;
134 unsigned chan : 1;
135 unsigned scan : 1;
136 unsigned autoscan : 1;
137 unsigned afc : 1;
138 unsigned dummy1, dummy2, dummy3, dummy4, dummy5, dummy6, dummy7, dummy8, dummy9, dummy10,
139 dummy11 : 1;
140 int dummy12, dummy13, dummy14, dummy15, dummy16, dummy17, dummy18, dummy19;
141} tuner_info_t;
142
143
144#endif
145