juliette.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. #ifndef _ASM_JULIETTE_H
  2. #define _ASM_JULIETTE_H
  3. /* juliette _IOC_TYPE, bits 8 to 15 in ioctl cmd */
  4. #define JULIOCTYPE 42
  5. /* supported ioctl _IOC_NR's */
  6. #define JULSTARTDMA 0x1 /* start a picture asynchronously */
  7. /* set parameters */
  8. #define SETDEFAULT 0x2 /* CCD/VIDEO/SS1M */
  9. #define SETPARAMETERS 0x3 /* CCD/VIDEO */
  10. #define SETSIZE 0x4 /* CCD/VIDEO/SS1M */
  11. #define SETCOMPRESSION 0x5 /* CCD/VIDEO/SS1M */
  12. #define SETCOLORLEVEL 0x6 /* CCD/VIDEO */
  13. #define SETBRIGHTNESS 0x7 /* CCD */
  14. #define SETROTATION 0x8 /* CCD */
  15. #define SETTEXT 0x9 /* CCD/VIDEO/SS1M */
  16. #define SETCLOCK 0xa /* CCD/VIDEO/SS1M */
  17. #define SETDATE 0xb /* CCD/VIDEO/SS1M */
  18. #define SETTIMEFORMAT 0xc /* CCD/VIDEO/SS1M */
  19. #define SETDATEFORMAT 0xd /* VIDEO */
  20. #define SETTEXTALIGNMENT 0xe /* VIDEO */
  21. #define SETFPS 0xf /* CCD/VIDEO/SS1M */
  22. #define SETVGA 0xff /* VIDEO */
  23. #define SETCOMMENT 0xfe /* CCD/VIDEO */
  24. /* get parameters */
  25. #define GETDRIVERTYPE 0x10 /* CCD/VIDEO/SS1M */
  26. #define GETNBROFCAMERAS 0x11 /* CCD/VIDEO/SS1M */
  27. #define GETPARAMETERS 0x12 /* CCD/VIDEO/SS1M */
  28. #define GETBUFFERSIZE 0x13 /* CCD/VIDEO/SS1M */
  29. #define GETVIDEOTYPE 0x14 /* VIDEO/SS1M */
  30. #define GETVIDEOSIGNAL 0x15 /* VIDEO */
  31. #define GETMODULATION 0x16 /* VIDEO */
  32. #define GETDCYVALUES 0xa0 /* CCD /SS1M */
  33. #define GETDCYWIDTH 0xa1 /* CCD /SS1M */
  34. #define GETDCYHEIGHT 0xa2 /* CCD /SS1M */
  35. #define GETSIZE 0xa3 /* CCD/VIDEO */
  36. #define GETCOMPRESSION 0xa4 /* CCD/VIDEO */
  37. /* detect and get parameters */
  38. #define DETECTMODULATION 0x17 /* VIDEO */
  39. #define DETECTVIDEOTYPE 0x18 /* VIDEO */
  40. #define DETECTVIDEOSIGNAL 0x19 /* VIDEO */
  41. /* configure default parameters */
  42. #define CONFIGUREDEFAULT 0x20 /* CCD/VIDEO/SS1M */
  43. #define DEFSIZE 0x21 /* CCD/VIDEO/SS1M */
  44. #define DEFCOMPRESSION 0x22 /* CCD/VIDEO/SS1M */
  45. #define DEFCOLORLEVEL 0x23 /* CCD/VIDEO */
  46. #define DEFBRIGHTNESS 0x24 /* CCD */
  47. #define DEFROTATION 0x25 /* CCD */
  48. #define DEFWHITEBALANCE 0x26 /* CCD */
  49. #define DEFEXPOSURE 0x27 /* CCD */
  50. #define DEFAUTOEXPWINDOW 0x28 /* CCD */
  51. #define DEFTEXT 0x29 /* CCD/VIDEO/SS1M */
  52. #define DEFCLOCK 0x2a /* CCD/VIDEO/SS1M */
  53. #define DEFDATE 0x2b /* CCD/VIDEO/SS1M */
  54. #define DEFTIMEFORMAT 0x2c /* CCD/VIDEO/SS1M */
  55. #define DEFDATEFORMAT 0x2d /* VIDEO */
  56. #define DEFTEXTALIGNMENT 0x2e /* VIDEO */
  57. #define DEFFPS 0x2f /* CCD/VIDEO/SS1M */
  58. #define DEFTEXTSTRING 0x30 /* CCD/VIDEO/SS1M */
  59. #define DEFHEADERINFO 0x31 /* CCD/VIDEO/SS1M */
  60. #define DEFWEXAR 0x32 /* CCD */
  61. #define DEFLINEDELAY 0x33 /* CCD */
  62. #define DEFDISABLEDVIDEO 0x34 /* VIDEO */
  63. #define DEFVIDEOTYPE 0x35 /* VIDEO */
  64. #define DEFMODULATION 0x36 /* VIDEO */
  65. #define DEFXOFFSET 0x37 /* VIDEO */
  66. #define DEFYOFFSET 0x38 /* VIDEO */
  67. #define DEFYCMODE 0x39 /* VIDEO */
  68. #define DEFVCRMODE 0x3a /* VIDEO */
  69. #define DEFSTOREDCYVALUES 0x3b /* CCD/VIDEO/SS1M */
  70. #define DEFWCDS 0x3c /* CCD */
  71. #define DEFVGA 0x3d /* VIDEO */
  72. #define DEFCOMMENT 0x3e /* CCD/VIDEO */
  73. #define DEFCOMMENTSIZE 0x3f /* CCD/VIDEO */
  74. #define DEFCOMMENTTEXT 0x50 /* CCD/VIDEO */
  75. #define DEFSTOREDCYTEXT 0x51 /* VIDEO */
  76. #define JULABORTDMA 0x70 /* Abort current DMA transfer */
  77. /* juliette general i/o port */
  78. #define JIO_READBITS 0x40 /* read and return current port bits */
  79. #define JIO_SETBITS 0x41 /* set bits marked by 1 in the argument */
  80. #define JIO_CLRBITS 0x42 /* clr bits marked by 1 in the argument */
  81. #define JIO_READDIR 0x43 /* read direction, 0=input 1=output */
  82. #define JIO_SETINPUT 0x44 /* set direction, 0=unchanged 1=input
  83. returns current dir */
  84. #define JIO_SETOUTPUT 0x45 /* set direction, 0=unchanged 1=output
  85. returns current dir */
  86. /**** YumYum internal adresses ****/
  87. /* Juliette buffer addresses */
  88. #define BUFFER1_VIDEO 0x1100
  89. #define BUFFER2_VIDEO 0x2800
  90. #define ACDC_BUFF_VIDEO 0x0aaa
  91. #define BUFFER1 0x1700
  92. #define BUFFER2 0x2b01
  93. #define ACDC_BUFFER 0x1200
  94. #define BUFFER1_SS1M 0x1100
  95. #define BUFFER2_SS1M 0x2800
  96. #define ACDC_BUFF_SS1M 0x0900
  97. /* Juliette parameter memory addresses */
  98. #define PA_BUFFER_CNT 0x3f09 /* CCD/VIDEO */
  99. #define PA_CCD_BUFFER 0x3f10 /* CCD */
  100. #define PA_VIDEO_BUFFER 0x3f10 /* VIDEO */
  101. #define PA_DCT_BUFFER 0x3f11 /* CCD/VIDEO */
  102. #define PA_TEMP 0x3f12 /* CCD/VIDEO */
  103. #define PA_VIDEOLINE_RD 0x3f13 /* VIDEO */
  104. #define PA_VIDEOLINE_WR 0x3f14 /* VIDEO */
  105. #define PA_VI_HDELAY0 0x3f15 /* VIDEO */
  106. #define PA_VI_VDELAY0 0x3f16 /* VIDEO */
  107. #define PA_VI_HDELAY1 0x3f17 /* VIDEO */
  108. #define PA_VI_VDELAY1 0x3f18 /* VIDEO */
  109. #define PA_VI_HDELAY2 0x3f19 /* VIDEO */
  110. #define PA_VI_VDELAY2 0x3f1a /* VIDEO */
  111. #define PA_VI_HDELAY3 0x3f1b /* VIDEO */
  112. #define PA_VI_VDELAY3 0x3f1c /* VIDEO */
  113. #define PA_VI_CTRL 0x3f20 /* VIDEO */
  114. #define PA_JPEG_CTRL 0x3f22 /* CCD/VIDEO */
  115. #define PA_BUFFER_SIZE 0x3f24 /* CCD/VIDEO */
  116. #define PA_PAL_NTSC 0x3f25 /* VIDEO */
  117. #define PA_MACROBLOCKS 0x3f26 /* CCD/VIDEO */
  118. #define PA_COLOR 0x3f27 /* VIDEO */
  119. #define PA_MEMCH1CNT2 0x3f28 /* CCD/VIDEO */
  120. #define PA_MEMCH1CNT3 0x3f29 /* VIDEO */
  121. #define PA_MEMCH1STR2 0x3f2a /* CCD/VIDEO */
  122. #define PA_MEMCH1STR3 0x3f2b /* VIDEO */
  123. #define PA_BUFFERS 0x3f2c /* CCD/VIDEO */
  124. #define PA_PROGRAM 0x3f2d /* CCD/VIDEO */
  125. #define PA_ROTATION 0x3f2e /* CCD */
  126. #define PA_PC 0x3f30 /* CCD/VIDEO */
  127. #define PA_PC2 0x3f31 /* VIDEO */
  128. #define PA_ODD_LINE 0x3f32 /* VIDEO */
  129. #define PA_EXP_DELAY 0x3f34 /* CCD */
  130. #define PA_MACROBLOCK_CNT 0x3f35 /* CCD/VIDEO */
  131. #define PA_DRAM_PTR1_L 0x3f36 /* CCD/VIDEO */
  132. #define PA_CLPOB_CNT 0x3f37 /* CCD */
  133. #define PA_DRAM_PTR1_H 0x3f38 /* CCD/VIDEO */
  134. #define PA_DRAM_PTR2_L 0x3f3a /* VIDEO */
  135. #define PA_DRAM_PTR2_H 0x3f3c /* VIDEO */
  136. #define PA_CCD_LINE_CNT 0x3f3f /* CCD */
  137. #define PA_VIDEO_LINE_CNT 0x3f3f /* VIDEO */
  138. #define PA_TEXT 0x3f41 /* CCD/VIDEO */
  139. #define PA_CAMERA_CHANGED 0x3f42 /* VIDEO */
  140. #define PA_TEXTALIGNMENT 0x3f43 /* VIDEO */
  141. #define PA_DISABLED 0x3f44 /* VIDEO */
  142. #define PA_MACROBLOCKTEXT 0x3f45 /* VIDEO */
  143. #define PA_VGA 0x3f46 /* VIDEO */
  144. #define PA_ZERO 0x3ffe /* VIDEO */
  145. #define PA_NULL 0x3fff /* CCD/VIDEO */
  146. typedef enum {
  147. jpeg = 0,
  148. dummy = 1
  149. } request_type;
  150. typedef enum {
  151. hugesize = 0,
  152. fullsize = 1,
  153. halfsize = 2,
  154. fieldsize = 3
  155. } size_type;
  156. typedef enum {
  157. min = 0,
  158. low = 1,
  159. medium = 2,
  160. high = 3,
  161. very_high = 4,
  162. very_low = 5,
  163. q1 = 6,
  164. q2 = 7,
  165. q3 = 8,
  166. q4 = 9,
  167. q5 = 10,
  168. q6 = 11
  169. } compr_type;
  170. typedef enum {
  171. deg_0 = 0,
  172. deg_180 = 1,
  173. deg_90 = 2,
  174. deg_270 = 3
  175. } rotation_type;
  176. typedef enum {
  177. auto_white = 0,
  178. hold = 1,
  179. fixed_outdoor = 2,
  180. fixed_indoor = 3,
  181. fixed_fluor = 4
  182. } white_balance_type;
  183. typedef enum {
  184. auto_exp = 0,
  185. fixed_exp = 1
  186. } exposure_type;
  187. typedef enum {
  188. no_window = 0,
  189. center = 1,
  190. top = 2,
  191. lower = 3,
  192. left = 4,
  193. right = 5,
  194. spot = 6,
  195. cw = 7
  196. } exp_window_type;
  197. typedef enum {
  198. h_24 = 0,
  199. h_12 = 1,
  200. h_24P = 2
  201. } hour_type;
  202. typedef enum {
  203. standard = 0,
  204. YYYY_MM_DD = 1,
  205. Www_Mmm_DD_YYYY = 2,
  206. Www_DD_MM_YYYY = 3
  207. } date_type;
  208. typedef enum {
  209. left_align = 0,
  210. center_align = 1,
  211. right_align = 2
  212. } alignment_type;
  213. typedef enum {
  214. off = 0,
  215. on = 1,
  216. no = 0,
  217. yes = 1
  218. } enable_type;
  219. typedef enum {
  220. disabled = 0,
  221. enabled = 1,
  222. extended = 2
  223. } comment_type;
  224. typedef enum {
  225. pal = 0,
  226. ntsc = 1
  227. } video_type;
  228. typedef enum {
  229. pal_bghi_ntsc_m = 0,
  230. ntsc_4_43_50hz_pal_4_43_60hz = 1,
  231. pal_n_ntsc_4_43_60hz = 2,
  232. ntsc_n_pal_m = 3,
  233. secam_pal_4_43_60hz = 4
  234. } modulation_type;
  235. typedef enum {
  236. cam0 = 0,
  237. cam1 = 1,
  238. cam2 = 2,
  239. cam3 = 3,
  240. quad = 32
  241. } camera_type;
  242. typedef enum {
  243. video_driver = 0,
  244. ccd_driver = 1
  245. } driver_type;
  246. struct jul_param {
  247. request_type req_type;
  248. size_type size;
  249. compr_type compression;
  250. rotation_type rotation;
  251. int color_level;
  252. int brightness;
  253. white_balance_type white_balance;
  254. exposure_type exposure;
  255. exp_window_type auto_exp_window;
  256. hour_type time_format;
  257. date_type date_format;
  258. alignment_type text_alignment;
  259. enable_type text;
  260. enable_type clock;
  261. enable_type date;
  262. enable_type fps;
  263. enable_type vga;
  264. enable_type comment;
  265. };
  266. struct video_param {
  267. enable_type disabled;
  268. modulation_type modulation;
  269. video_type video;
  270. enable_type signal;
  271. enable_type vcr;
  272. int xoffset;
  273. int yoffset;
  274. };
  275. /* The juliette_request structure is used during the JULSTARTDMA asynchronous
  276. * picture-taking ioctl call as an argument to specify a buffer which will get
  277. * the final picture.
  278. */
  279. struct juliette_request {
  280. char *buf; /* Pointer to the buffer to hold picture data */
  281. unsigned int buflen; /* Length of the above buffer */
  282. unsigned int size; /* Resulting length, 0 if the picture is not ready */
  283. };
  284. #endif