videotext.h 4.2 KB

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