Mercurial > mplayer.hg
annotate vidix/unichrome_vid.c @ 24084:2b572bde6b3d
Add support for AVSEEK_SIZE in demux_lavf
author | reimar |
---|---|
date | Mon, 20 Aug 2007 09:27:47 +0000 |
parents | 91ad6d4d6a54 |
children | 0d255d03016f |
rev | line source |
---|---|
22850 | 1 /* |
23046
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
2 * VIDIX driver for VIA CLE266/Unichrome chipsets. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
3 * Copyright (C) 2004 Timothy Lee |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
4 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
5 * This file is part of MPlayer. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
6 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
7 * MPlayer is free software; you can redistribute it and/or modify |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
10 * (at your option) any later version. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
11 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
12 * MPlayer is distributed in the hope that it will be useful, |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
15 * GNU General Public License for more details. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
16 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
18 * along with MPlayer; if not, write to the Free Software |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
20 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
21 * Thanks to Gilles Frattini for bugfixes |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
22 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
23 * Changes: |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
24 * 2004-03-10 |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
25 * Initial version |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
26 * 2004-10-09 |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
27 * Added Doxygen documentation (Benjamin Zores <ben@geexbox.org>) |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
28 * 2004-11-08 |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
29 * Added h/w revision detection (Timothy Lee <timothy.lee@siriushk.com>) |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22905
diff
changeset
|
30 */ |
22850 | 31 |
32 #include <errno.h> | |
33 #include <stdio.h> | |
34 #include <stdlib.h> | |
35 #include <string.h> | |
36 #include <inttypes.h> | |
37 #include <unistd.h> | |
38 | |
39 #include "vidix.h" | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
40 #include "vidixlib.h" |
22850 | 41 #include "fourcc.h" |
22901 | 42 #include "dha.h" |
22900
a9e111b88c4a
merged libdha and libvidix, moved all files from libdha to vidix directory
ben
parents:
22874
diff
changeset
|
43 #include "pci_ids.h" |
a9e111b88c4a
merged libdha and libvidix, moved all files from libdha to vidix directory
ben
parents:
22874
diff
changeset
|
44 #include "pci_names.h" |
22905 | 45 #include "config.h" |
22850 | 46 |
47 #include "unichrome_regs.h" | |
48 | |
49 /** | |
50 * @brief Information on PCI device. | |
51 */ | |
23059 | 52 static pciinfo_t pci_info; |
22850 | 53 |
54 /** | |
55 * @brief Unichrome driver colorkey settings. | |
56 */ | |
57 static vidix_grkey_t uc_grkey; | |
58 | |
59 static int frames[VID_PLAY_MAXFRAMES]; | |
23059 | 60 static uint8_t *vio; |
61 static uint8_t *uc_mem; | |
62 static uint8_t mclk_save[3]; | |
63 static uint8_t hwrev; | |
22850 | 64 |
65 #define VIA_OUT(hwregs, reg, val) *(volatile uint32_t *)((hwregs) + (reg)) = (val) | |
66 #define VIA_IN(hwregs, reg) *(volatile uint32_t *)((hwregs) + (reg)) | |
67 #define VGA_OUT8(hwregs, reg, val) *(volatile uint8_t *)((hwregs) + (reg) + 0x8000) = (val) | |
68 #define VGA_IN8(hwregs, reg) *(volatile uint8_t *)((hwregs) + (reg) + 0x8000) | |
69 #define VIDEO_OUT(hwregs, reg, val) VIA_OUT((hwregs)+0x200, reg, val) | |
70 #define VIDEO_IN(hwregs, reg) VIA_IN((hwregs)+0x200, reg) | |
71 | |
72 #define outb(val,reg) OUTPORT8(reg,val) | |
73 #define inb(reg) INPORT8(reg) | |
74 | |
75 #define ALIGN_TO(v, n) (((v) + (n-1)) & ~(n-1)) | |
76 #define UC_MAP_V1_FIFO_CONTROL(depth, pre_thr, thr) \ | |
77 (((depth)-1) | ((thr) << 8) | ((pre_thr) << 24)) | |
78 | |
79 #define VIDEOMEMORY_SIZE (8 * 1024 * 1024) | |
80 #define FRAMEBUFFER_SIZE 0x200000 | |
81 #define FRAMEBUFFER_START (VIDEOMEMORY_SIZE - FRAMEBUFFER_SIZE) | |
82 | |
83 #ifdef DEBUG_LOGFILE | |
23059 | 84 static FILE *logfile = 0; |
22850 | 85 #define LOGWRITE(x) {if(logfile) fprintf(logfile,x);} |
86 #else | |
87 #define LOGWRITE(x) | |
88 #endif | |
89 | |
90 /** | |
91 * @brief Unichrome driver vidix capabilities. | |
92 */ | |
93 static vidix_capability_t uc_cap = { | |
94 "VIA CLE266 Unichrome driver", | |
95 "Timothy Lee <timothy@siriushk.com>", | |
96 TYPE_OUTPUT, | |
97 {0, 0, 0, 0}, | |
98 4096, | |
99 4096, | |
100 4, | |
101 4, | |
102 -1, | |
103 FLAG_UPSCALER | FLAG_DOWNSCALER, | |
104 VENDOR_VIA2, | |
105 -1, | |
106 {0, 0, 0, 0} | |
107 }; | |
108 | |
109 /** | |
110 * @brief list of card IDs compliant with the Unichrome driver . | |
111 */ | |
112 static unsigned short uc_card_ids[] = { | |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22866
diff
changeset
|
113 DEVICE_VIA2_VT8623_APOLLO_CLE266, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22866
diff
changeset
|
114 DEVICE_VIA2_VT8378_S3_UNICHROME |
22850 | 115 }; |
116 | |
117 /** | |
118 * @brief Find chip index in Unichrome compliant devices list. | |
119 * | |
120 * @param chip_id PCI device ID. | |
121 * | |
122 * @returns index position in uc_card_ids if successful. | |
123 * -1 if chip_id is not a compliant chipset ID. | |
124 */ | |
125 static int | |
126 find_chip (unsigned chip_id) | |
127 { | |
128 unsigned i; | |
129 for (i = 0; i < sizeof (uc_card_ids) / sizeof (unsigned short); i++) | |
130 { | |
131 if (chip_id == uc_card_ids[i]) | |
132 return i; | |
133 } | |
134 return -1; | |
135 } | |
136 | |
137 /** | |
138 * @brief Map hardware settings for vertical scaling. | |
139 * | |
140 * @param sh source height. | |
141 * @param dh destination height. | |
142 * @param zoom will hold vertical setting of zoom register. | |
143 * @param mini will hold vertical setting of mini register. | |
144 * | |
145 * @returns 1 if successful. | |
146 * 0 if the zooming factor is too large or small. | |
147 * | |
148 * @note Derived from VIA's V4L driver. | |
149 * See ddover.c, DDOVER_HQVCalcZoomHeight() | |
150 */ | |
151 static int | |
22866 | 152 uc_ovl_map_vzoom (uint32_t sh, uint32_t dh, uint32_t * zoom, uint32_t * mini) |
22850 | 153 { |
154 uint32_t sh1, tmp, d; | |
155 int zoom_ok = 1; | |
156 | |
157 if (sh == dh) /* No zoom */ | |
158 { | |
159 /* Do nothing */ | |
160 } | |
161 else if (sh < dh) /* Zoom in */ | |
162 { | |
163 tmp = (sh * 0x0400) / dh; | |
164 zoom_ok = !(tmp > 0x3ff); | |
165 | |
166 *zoom |= (tmp & 0x3ff) | V1_Y_ZOOM_ENABLE; | |
167 *mini |= V1_Y_INTERPOLY | V1_YCBCR_INTERPOLY; | |
168 } | |
169 else /* sw > dh - Zoom out */ | |
170 { | |
171 /* Find a suitable divider (1 << d) = {2, 4, 8 or 16} */ | |
172 sh1 = sh; | |
173 for (d = 1; d < 5; d++) | |
174 { | |
175 sh1 >>= 1; | |
176 if (sh1 <= dh) | |
177 break; | |
178 } | |
179 if (d == 5) /* too small */ | |
180 { | |
181 d = 4; | |
182 zoom_ok = 0; | |
183 } | |
184 | |
185 *mini |= ((d << 1) - 1) << 16; /* <= {1,3,5,7} << 16 */ | |
186 | |
187 /* Add scaling */ | |
188 if (sh1 < dh) | |
189 { | |
190 tmp = (sh1 * 0x400) / dh; | |
191 *zoom |= ((tmp & 0x3ff) | V1_Y_ZOOM_ENABLE); | |
192 *mini |= V1_Y_INTERPOLY | V1_YCBCR_INTERPOLY; | |
193 } | |
194 } | |
195 | |
196 return zoom_ok; | |
197 } | |
198 | |
199 /** | |
200 * @brief Map hardware settings for horizontal scaling. | |
201 * | |
202 * @param sw source width. | |
203 * @param dw destination width. | |
204 * @param zoom will hold horizontal setting of zoom register. | |
205 * @param mini will hold horizontal setting of mini register. | |
206 * @param falign will hold fetch aligment. | |
207 * @param dcount will hold display count. | |
208 * | |
209 * @returns 1 if successful. | |
210 * 0 if the zooming factor is too large or small. | |
211 * | |
212 * @note Derived from VIA's V4L driver. | |
213 * See ddover.c, DDOVER_HQVCalcZoomWidth() and DDOver_GetDisplayCount() | |
214 */ | |
215 static int | |
22866 | 216 uc_ovl_map_hzoom (uint32_t sw, uint32_t dw, uint32_t * zoom, uint32_t * mini, |
22850 | 217 int *falign, int *dcount) |
218 { | |
219 uint32_t tmp, sw1, d; | |
220 int md; /* Minify-divider */ | |
221 int zoom_ok = 1; | |
222 | |
223 md = 1; | |
224 *falign = 0; | |
225 | |
226 if (sw == dw) /* no zoom */ | |
227 { | |
228 /* Do nothing */ | |
229 } | |
230 else if (sw < dw) /* zoom in */ | |
231 { | |
232 tmp = (sw * 0x0800) / dw; | |
233 zoom_ok = !(tmp > 0x7ff); | |
234 | |
235 *zoom |= ((tmp & 0x7ff) << 16) | V1_X_ZOOM_ENABLE; | |
236 *mini |= V1_X_INTERPOLY; | |
237 } | |
238 else /* sw > dw - Zoom out */ | |
239 { | |
240 /* Find a suitable divider (1 << d) = {2, 4, 8 or 16} */ | |
241 sw1 = sw; | |
242 for (d = 1; d < 5; d++) | |
243 { | |
244 sw1 >>= 1; | |
245 if (sw1 <= dw) | |
246 break; | |
247 } | |
248 if (d == 5) /* too small */ | |
249 { | |
250 d = 4; | |
251 zoom_ok = 0; | |
252 } | |
253 | |
254 md = 1 << d; /* <= {2,4,8,16} */ | |
255 *falign = ((md << 1) - 1) & 0xf; /* <= {3,7,15,15} */ | |
256 *mini |= V1_X_INTERPOLY; | |
257 *mini |= ((d << 1) - 1) << 24; /* <= {1,3,5,7} << 24 */ | |
258 | |
259 /* Add scaling */ | |
260 if (sw1 < dw) | |
261 { | |
262 /* CLE bug */ | |
263 /* tmp = sw1*0x0800 / dw; */ | |
264 tmp = (sw1 - 2) * 0x0800 / dw; | |
265 *zoom |= ((tmp & 0x7ff) << 16) | V1_X_ZOOM_ENABLE; | |
266 } | |
267 } | |
268 | |
269 *dcount = sw - md; | |
270 return zoom_ok; | |
271 } | |
272 | |
273 /** | |
274 * @brief qword fetch register setting. | |
275 * | |
276 * @param format overlay pixel format. | |
277 * @param sw source width. | |
278 * | |
279 * @return qword fetch register setting | |
280 * | |
281 * @note Derived from VIA's V4L driver. See ddover.c, DDOver_GetFetch() | |
282 * @note Only call after uc_ovl_map_hzoom() | |
283 */ | |
284 static uint32_t | |
285 uc_ovl_map_qwfetch (uint32_t format, int sw) | |
286 { | |
287 uint32_t fetch = 0; | |
288 | |
289 switch (format) | |
290 { | |
291 case IMGFMT_YV12: | |
292 case IMGFMT_I420: | |
293 fetch = ALIGN_TO (sw, 32) >> 4; | |
294 break; | |
295 case IMGFMT_UYVY: | |
296 case IMGFMT_YVYU: | |
297 case IMGFMT_YUY2: | |
298 fetch = (ALIGN_TO (sw << 1, 16) >> 4) + 1; | |
299 break; | |
300 case IMGFMT_BGR15: | |
301 case IMGFMT_BGR16: | |
302 fetch = (ALIGN_TO (sw << 1, 16) >> 4) + 1; | |
303 break; | |
304 case IMGFMT_BGR32: | |
305 fetch = (ALIGN_TO (sw << 2, 16) >> 4) + 1; | |
306 break; | |
307 default: | |
308 printf ("[unichrome] Unexpected pixelformat!"); | |
309 break; | |
310 } | |
311 | |
312 if (fetch < 4) | |
313 fetch = 4; | |
314 | |
315 return fetch; | |
316 } | |
317 | |
318 /** | |
319 * @brief Map pixel format. | |
320 * | |
321 * @param format pixel format. | |
322 * | |
323 * @return the mapped pixel format. | |
324 * | |
325 * @note Derived from VIA's V4L driver. See ddover.c, DDOver_GetV1Format() | |
326 */ | |
327 static uint32_t | |
328 uc_ovl_map_format (uint32_t format) | |
329 { | |
330 switch (format) | |
331 { | |
332 case IMGFMT_UYVY: | |
333 case IMGFMT_YVYU: | |
334 case IMGFMT_YUY2: | |
335 return V1_COLORSPACE_SIGN | V1_YUV422; | |
336 case IMGFMT_IYUV: | |
337 return V1_COLORSPACE_SIGN | V1_YCbCr420 | V1_SWAP_SW; | |
338 case IMGFMT_YV12: | |
339 case IMGFMT_I420: | |
340 return V1_COLORSPACE_SIGN | V1_YCbCr420; | |
341 case IMGFMT_BGR15: | |
342 return V1_RGB15; | |
343 case IMGFMT_BGR16: | |
344 return V1_RGB16; | |
345 case IMGFMT_BGR32: | |
346 return V1_RGB32; | |
347 default: | |
348 printf ("[unichrome] Unexpected pixelformat!"); | |
349 return V1_YUV422; | |
350 } | |
351 } | |
352 | |
353 /** | |
354 * @brief Calculate V1 control and fifo-control register values. | |
355 * | |
356 * @param format pixel format. | |
357 * @param sw source width. | |
358 * @param hwrev CLE266 hardware revision. | |
359 * @param extfifo_on set this 1 if the extended FIFO is enabled. | |
360 * @param control will hold value for V1_CONTROL. | |
361 * @param fifo will hold value for V1_FIFO_CONTROL. | |
362 */ | |
363 static void | |
364 uc_ovl_map_v1_control (uint32_t format, int sw, | |
365 int hwrev, int extfifo_on, | |
366 uint32_t * control, uint32_t * fifo) | |
367 { | |
368 *control = V1_BOB_ENABLE | uc_ovl_map_format (format); | |
369 | |
370 if (hwrev == 0x10) | |
371 { | |
372 *control |= V1_EXPIRE_NUM_F; | |
373 } | |
374 else | |
375 { | |
376 if (extfifo_on) | |
377 { | |
378 *control |= V1_EXPIRE_NUM_A | V1_FIFO_EXTENDED; | |
379 } | |
380 else | |
381 { | |
382 *control |= V1_EXPIRE_NUM; | |
383 } | |
384 } | |
385 | |
386 if ((format == IMGFMT_YV12) || (format == IMGFMT_I420)) | |
387 { | |
388 /* Minified video will be skewed without this workaround. */ | |
389 if (sw <= 80) /* Fetch count <= 5 */ | |
390 { | |
391 *fifo = UC_MAP_V1_FIFO_CONTROL (16, 0, 0); | |
392 } | |
393 else | |
394 { | |
395 if (hwrev == 0x10) | |
396 *fifo = UC_MAP_V1_FIFO_CONTROL (64, 56, 56); | |
397 else | |
398 *fifo = UC_MAP_V1_FIFO_CONTROL (16, 12, 8); | |
399 } | |
400 } | |
401 else | |
402 { | |
403 if (hwrev == 0x10) | |
404 { | |
405 *fifo = UC_MAP_V1_FIFO_CONTROL (64, 56, 56); /* Default rev 0x10 */ | |
406 } | |
407 else | |
408 { | |
409 if (extfifo_on) | |
410 *fifo = UC_MAP_V1_FIFO_CONTROL (48, 40, 40); | |
411 else | |
412 *fifo = UC_MAP_V1_FIFO_CONTROL (32, 29, 16); /* Default */ | |
413 } | |
414 } | |
415 } | |
416 | |
417 /** | |
418 * @brief Setup extended FIFO. | |
419 * | |
420 * @param extfifo_on pointer determining if extended fifo is enable or not. | |
421 * @param dst_w destination width. | |
422 */ | |
423 static void | |
424 uc_ovl_setup_fifo (int *extfifo_on, int dst_w) | |
425 { | |
426 if (dst_w <= 1024) /* Disable extended FIFO */ | |
427 { | |
428 outb (0x16, 0x3c4); | |
429 outb (mclk_save[0], 0x3c5); | |
430 outb (0x17, 0x3c4); | |
431 outb (mclk_save[1], 0x3c5); | |
432 outb (0x18, 0x3c4); | |
433 outb (mclk_save[2], 0x3c5); | |
434 *extfifo_on = 0; | |
435 } | |
436 else /* Enable extended FIFO */ | |
437 { | |
438 outb (0x17, 0x3c4); | |
439 outb (0x2f, 0x3c5); | |
440 outb (0x16, 0x3c4); | |
441 outb ((mclk_save[0] & 0xf0) | 0x14, 0x3c5); | |
442 outb (0x18, 0x3c4); | |
443 outb (0x56, 0x3c5); | |
444 *extfifo_on = 1; | |
445 } | |
446 } | |
447 | |
448 static void | |
449 uc_ovl_vcmd_wait (volatile uint8_t * vio) | |
450 { | |
451 while ((VIDEO_IN (vio, V_COMPOSE_MODE) | |
452 & (V1_COMMAND_FIRE | V3_COMMAND_FIRE))); | |
453 } | |
454 | |
455 /** | |
456 * @brief Probe hardware to find some useable chipset. | |
457 * | |
458 * @param verbose specifies verbose level. | |
459 * @param force specifies force mode : driver should ignore | |
460 * device_id (danger but useful for new devices) | |
461 * | |
462 * @returns 0 if it can handle something in PC. | |
463 * a negative error code otherwise. | |
464 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
465 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
466 unichrome_probe (int verbose, int force) |
22850 | 467 { |
468 pciinfo_t lst[MAX_PCI_DEVICES]; | |
469 unsigned i, num_pci; | |
470 int err; | |
471 err = pci_scan (lst, &num_pci); | |
472 if (err) | |
473 { | |
474 printf ("[unichrome] Error occurred during pci scan: %s\n", | |
475 strerror (err)); | |
476 return err; | |
477 } | |
478 else | |
479 { | |
480 err = ENXIO; | |
481 for (i = 0; i < num_pci; i++) | |
482 { | |
483 if (lst[i].vendor == VENDOR_VIA2) | |
484 { | |
485 int idx; | |
486 const char *dname; | |
487 idx = find_chip (lst[i].device); | |
488 if (idx == -1) | |
489 continue; | |
490 dname = pci_device_name (VENDOR_VIA2, lst[i].device); | |
491 dname = dname ? dname : "Unknown chip"; | |
492 printf ("[unichrome] Found chip: %s\n", dname); | |
493 if ((lst[i].command & PCI_COMMAND_IO) == 0) | |
494 { | |
495 printf ("[unichrome] Device is disabled, ignoring\n"); | |
496 continue; | |
497 } | |
498 uc_cap.device_id = lst[i].device; | |
499 err = 0; | |
500 memcpy (&pci_info, &lst[i], sizeof (pciinfo_t)); | |
501 break; | |
502 } | |
503 } | |
504 } | |
505 | |
506 if (err && verbose) | |
507 printf ("[unichrome] Can't find chip\n"); | |
508 return err; | |
509 } | |
510 | |
511 /** | |
512 * @brief Initializes driver. | |
513 * | |
514 * @returns 0 if ok. | |
515 * a negative error code otherwise. | |
516 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
517 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
518 unichrome_init (void) |
22850 | 519 { |
520 long tmp; | |
521 uc_mem = map_phys_mem (pci_info.base0, VIDEOMEMORY_SIZE); | |
522 enable_app_io (); | |
523 | |
524 outb (0x2f, 0x3c4); | |
525 tmp = inb (0x3c5) << 0x18; | |
526 vio = map_phys_mem (tmp, 0x1000); | |
527 | |
528 outb (0x16, 0x3c4); | |
529 mclk_save[0] = inb (0x3c5); | |
530 outb (0x17, 0x3c4); | |
531 mclk_save[1] = inb (0x3c5); | |
532 outb (0x18, 0x3c4); | |
533 mclk_save[2] = inb (0x3c5); | |
534 | |
535 uc_grkey.ckey.blue = 0x00; | |
536 uc_grkey.ckey.green = 0x00; | |
537 uc_grkey.ckey.red = 0x00; | |
538 | |
539 /* Detect whether we have a CLE266Ax or CLE266Cx */ | |
540 outb (0x4f, 0x3d4); | |
541 tmp = inb (0x3d5); | |
542 outb (0x4f, 0x3d4); | |
543 outb (0x55, 0x3d5); | |
544 outb (0x4f, 0x3d4); | |
545 if (0x55 == inb (0x3d5)) | |
546 { | |
547 /* Only CLE266Cx supports CR4F */ | |
548 hwrev = 0x11; | |
549 } | |
550 else | |
551 { | |
552 /* Otherwise assume to be a CLE266Ax */ | |
553 hwrev = 0x00; | |
554 } | |
555 outb (0x4f, 0x3d4); | |
556 outb (tmp, 0x3d5); | |
557 | |
558 #ifdef DEBUG_LOGFILE | |
559 logfile = fopen ("/tmp/uc_vidix.log", "w"); | |
560 #endif | |
561 return 0; | |
562 } | |
563 | |
564 /** | |
565 * @brief Destroys driver. | |
566 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
567 static void |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
568 unichrome_destroy (void) |
22850 | 569 { |
570 #ifdef DEBUG_LOGFILE | |
571 if (logfile) | |
572 fclose (logfile); | |
573 #endif | |
574 outb (0x16, 0x3c4); | |
575 outb (mclk_save[0], 0x3c5); | |
576 outb (0x17, 0x3c4); | |
577 outb (mclk_save[1], 0x3c5); | |
578 outb (0x18, 0x3c4); | |
579 outb (mclk_save[2], 0x3c5); | |
580 | |
581 disable_app_io (); | |
582 unmap_phys_mem (uc_mem, VIDEOMEMORY_SIZE); | |
583 unmap_phys_mem (vio, 0x1000); | |
584 } | |
585 | |
586 /** | |
587 * @brief Get chipset's hardware capabilities. | |
588 * | |
589 * @param to Pointer to the vidix_capability_t structure to be filled. | |
590 * | |
591 * @returns 0. | |
592 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
593 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
594 unichrome_get_caps (vidix_capability_t * to) |
22850 | 595 { |
596 memcpy (to, &uc_cap, sizeof (vidix_capability_t)); | |
597 return 0; | |
598 } | |
599 | |
600 /** | |
601 * @brief Report if the video FourCC is supported by hardware. | |
602 * | |
603 * @param fourcc input image format. | |
604 * | |
605 * @returns 1 if the fourcc is supported. | |
606 * 0 otherwise. | |
607 */ | |
608 static int | |
609 is_supported_fourcc (uint32_t fourcc) | |
610 { | |
611 switch (fourcc) | |
612 { | |
613 case IMGFMT_YV12: | |
614 case IMGFMT_I420: | |
615 case IMGFMT_UYVY: | |
616 case IMGFMT_YVYU: | |
617 case IMGFMT_YUY2: | |
618 case IMGFMT_BGR15: | |
619 case IMGFMT_BGR16: | |
620 case IMGFMT_BGR32: | |
621 return 1; | |
622 default: | |
623 return 0; | |
624 } | |
625 } | |
626 | |
627 /** | |
628 * @brief Try to configure video memory for given fourcc. | |
629 * | |
630 * @param to Pointer to the vidix_fourcc_t structure to be filled. | |
631 * | |
632 * @returns 0 if ok. | |
633 * errno otherwise. | |
634 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
635 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
636 unichrome_query_fourcc (vidix_fourcc_t * to) |
22850 | 637 { |
638 if (is_supported_fourcc (to->fourcc)) | |
639 { | |
23060 | 640 to->depth = VID_DEPTH_ALL; |
22850 | 641 to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY; |
642 return 0; | |
643 } | |
644 else | |
645 to->depth = to->flags = 0; | |
646 return ENOSYS; | |
647 } | |
648 | |
649 /** | |
650 * @brief Get the GrKeys | |
651 * | |
652 * @param grkey Pointer to the vidix_grkey_t structure to be filled by driver. | |
653 * | |
654 * @return 0. | |
655 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
656 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
657 unichrome_get_gkey (vidix_grkey_t * grkey) |
22850 | 658 { |
659 memcpy (grkey, &uc_grkey, sizeof (vidix_grkey_t)); | |
660 return (0); | |
661 } | |
662 | |
663 /** | |
664 * @brief Set the GrKeys | |
665 * | |
666 * @param grkey Colorkey to be set. | |
667 * | |
668 * @return 0. | |
669 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
670 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
671 unichrome_set_gkey (const vidix_grkey_t * grkey) |
22850 | 672 { |
673 unsigned long dwCompose = VIDEO_IN (vio, V_COMPOSE_MODE) & ~0x0f; | |
674 memcpy (&uc_grkey, grkey, sizeof (vidix_grkey_t)); | |
675 if (uc_grkey.ckey.op != CKEY_FALSE) | |
676 { | |
677 /* Set colorkey (how do I detect BPP in hardware ??) */ | |
678 unsigned long ckey; | |
679 if (1) /* Assume 16-bit graphics */ | |
680 { | |
681 ckey = (grkey->ckey.blue & 0x1f) | |
682 | ((grkey->ckey.green & 0x3f) << 5) | |
683 | ((grkey->ckey.red & 0x1f) << 11); | |
684 } | |
685 else | |
686 { | |
687 ckey = (grkey->ckey.blue) | |
688 | (grkey->ckey.green << 8) | (grkey->ckey.red << 16); | |
689 } | |
690 VIDEO_OUT (vio, V_COLOR_KEY, ckey); | |
691 dwCompose |= SELECT_VIDEO_IF_COLOR_KEY; | |
692 } | |
693 | |
694 /* Execute the changes */ | |
695 VIDEO_OUT (vio, V_COMPOSE_MODE, dwCompose | V1_COMMAND_FIRE); | |
696 return (0); | |
697 } | |
698 | |
699 /** | |
700 * @brief Unichrome driver equalizer capabilities. | |
701 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
702 static vidix_video_eq_t equal = { |
22850 | 703 VEQ_CAP_BRIGHTNESS | VEQ_CAP_SATURATION | VEQ_CAP_HUE, |
704 300, 100, 0, 0, 0, 0, 0, 0 | |
705 }; | |
706 | |
707 | |
708 /** | |
709 * @brief Get the equalizer capabilities. | |
710 * | |
711 * @param eq Pointer to the vidix_video_eq_t structure to be filled by driver. | |
712 * | |
713 * @return 0. | |
714 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
715 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
716 unichrome_get_eq (vidix_video_eq_t * eq) |
22850 | 717 { |
718 memcpy (eq, &equal, sizeof (vidix_video_eq_t)); | |
719 return 0; | |
720 } | |
721 | |
722 /** | |
723 * @brief Set the equalizer capabilities for color correction | |
724 * | |
725 * @param eq equalizer capabilities to be set. | |
726 * | |
727 * @return 0. | |
728 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
729 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
730 unichrome_set_eq (const vidix_video_eq_t * eq) |
22850 | 731 { |
732 return 0; | |
733 } | |
734 | |
735 /** | |
736 * @brief Y, U, V offsets. | |
737 */ | |
738 static int YOffs, UOffs, VOffs; | |
739 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
740 static int unichrome_frame_select (unsigned int frame); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
741 |
22850 | 742 /** |
743 * @brief Configure driver for playback. Driver should prepare BES. | |
744 * | |
745 * @param info configuration description for playback. | |
746 * | |
747 * @returns 0 in case of success. | |
748 * -1 otherwise. | |
749 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
750 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
751 unichrome_config_playback (vidix_playback_t * info) |
22850 | 752 { |
753 int src_w, drw_w; | |
754 int src_h, drw_h; | |
22866 | 755 long base0, pitch = 0; |
756 int uv_size = 0, swap_uv; | |
22850 | 757 unsigned int i; |
758 int extfifo_on; | |
759 | |
760 /* Overlay register settings */ | |
761 uint32_t win_start, win_end; | |
762 uint32_t zoom, mini; | |
763 uint32_t dcount, falign, qwfetch; | |
764 uint32_t v_ctrl, fifo_ctrl; | |
765 | |
766 if (!is_supported_fourcc (info->fourcc)) | |
767 return -1; | |
768 | |
769 src_w = info->src.w; | |
770 src_h = info->src.h; | |
771 | |
772 drw_w = info->dest.w; | |
773 drw_h = info->dest.h; | |
774 | |
775 /* Setup FIFO */ | |
776 uc_ovl_setup_fifo (&extfifo_on, src_w); | |
777 | |
778 /* Get image format, FIFO size, etc. */ | |
779 uc_ovl_map_v1_control (info->fourcc, src_w, hwrev, extfifo_on, | |
780 &v_ctrl, &fifo_ctrl); | |
781 | |
782 /* Setup layer window */ | |
783 win_start = (info->dest.x << 16) | info->dest.y; | |
784 win_end = ((info->dest.x + drw_w - 1) << 16) | (info->dest.y + drw_h - 1); | |
785 | |
786 /* Get scaling and data-fetch parameters */ | |
787 zoom = 0; | |
788 mini = 0; | |
789 uc_ovl_map_vzoom (src_h, drw_h, &zoom, &mini); | |
22866 | 790 uc_ovl_map_hzoom (src_w, drw_w, &zoom, &mini, (int *) &falign, (int *) &dcount); |
22850 | 791 qwfetch = uc_ovl_map_qwfetch (info->fourcc, src_w); |
792 | |
793 /* Calculate buffer sizes */ | |
794 swap_uv = 0; | |
795 switch (info->fourcc) | |
796 { | |
797 case IMGFMT_YV12: | |
798 swap_uv = 1; | |
799 case IMGFMT_I420: | |
800 case IMGFMT_UYVY: | |
801 case IMGFMT_YVYU: | |
802 pitch = ALIGN_TO (src_w, 32); | |
803 uv_size = (pitch >> 1) * (src_h >> 1); | |
804 break; | |
805 | |
806 case IMGFMT_YUY2: | |
807 case IMGFMT_BGR15: | |
808 case IMGFMT_BGR16: | |
809 pitch = ALIGN_TO (src_w << 1, 32); | |
810 uv_size = 0; | |
811 break; | |
812 | |
813 case IMGFMT_BGR32: | |
814 pitch = ALIGN_TO (src_w << 2, 32); | |
815 uv_size = 0; | |
816 break; | |
817 } | |
818 if ((src_w > 4096) || (src_h > 4096) || | |
819 (src_w < 32) || (src_h < 1) || (pitch > 0x1fff)) | |
820 { | |
821 printf ("[unichrome] Layer size out of bounds\n"); | |
822 } | |
823 | |
824 /* Calculate offsets */ | |
825 info->offset.y = 0; | |
826 info->offset.v = info->offset.y + pitch * src_h; | |
827 info->offset.u = info->offset.v + uv_size; | |
828 info->frame_size = info->offset.u + uv_size; | |
829 YOffs = info->offset.y; | |
830 UOffs = (swap_uv ? info->offset.v : info->offset.u); | |
831 VOffs = (swap_uv ? info->offset.u : info->offset.v); | |
832 | |
833 /* Assume we have 2 MB to play with */ | |
834 info->num_frames = FRAMEBUFFER_SIZE / info->frame_size; | |
835 if (info->num_frames > VID_PLAY_MAXFRAMES) | |
836 info->num_frames = VID_PLAY_MAXFRAMES; | |
837 | |
838 /* Start at 6 MB. Let's hope it's not in use. */ | |
839 base0 = FRAMEBUFFER_START; | |
840 info->dga_addr = uc_mem + base0; | |
841 | |
842 info->dest.pitch.y = 32; | |
843 info->dest.pitch.u = 32; | |
844 info->dest.pitch.v = 32; | |
845 | |
846 for (i = 0; i < info->num_frames; i++) | |
847 { | |
848 info->offsets[i] = info->frame_size * i; | |
849 frames[i] = base0 + info->offsets[i]; | |
850 } | |
851 | |
852 /* Write to the hardware */ | |
853 uc_ovl_vcmd_wait (vio); | |
854 | |
855 /* Configure diy_pitchlay parameters now */ | |
856 if (v_ctrl & V1_COLORSPACE_SIGN) | |
857 { | |
858 if (hwrev >= 0x10) | |
859 { | |
860 VIDEO_OUT (vio, V1_ColorSpaceReg_2, ColorSpaceValue_2_3123C0); | |
861 VIDEO_OUT (vio, V1_ColorSpaceReg_1, ColorSpaceValue_1_3123C0); | |
862 } | |
863 else | |
864 { | |
865 VIDEO_OUT (vio, V1_ColorSpaceReg_2, ColorSpaceValue_2); | |
866 VIDEO_OUT (vio, V1_ColorSpaceReg_1, ColorSpaceValue_1); | |
867 } | |
868 } | |
869 | |
870 VIDEO_OUT (vio, V1_CONTROL, v_ctrl); | |
871 VIDEO_OUT (vio, V_FIFO_CONTROL, fifo_ctrl); | |
872 | |
873 VIDEO_OUT (vio, V1_WIN_START_Y, win_start); | |
874 VIDEO_OUT (vio, V1_WIN_END_Y, win_end); | |
875 | |
876 VIDEO_OUT (vio, V1_SOURCE_HEIGHT, (src_h << 16) | dcount); | |
877 | |
878 VIDEO_OUT (vio, V12_QWORD_PER_LINE, qwfetch << 20); | |
879 VIDEO_OUT (vio, V1_STRIDE, pitch | ((pitch >> 1) << 16)); | |
880 | |
881 VIDEO_OUT (vio, V1_MINI_CONTROL, mini); | |
882 VIDEO_OUT (vio, V1_ZOOM_CONTROL, zoom); | |
883 | |
884 /* Configure buffer address and execute the changes now! */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
885 unichrome_frame_select (0); |
22850 | 886 |
887 return 0; | |
888 } | |
889 | |
890 /** | |
891 * @brief Set playback on : driver should activate BES on this call. | |
892 * | |
893 * @return 0. | |
894 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
895 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
896 unichrome_playback_on (void) |
22850 | 897 { |
898 LOGWRITE ("Enable overlay\n"); | |
899 | |
900 /* Turn on overlay */ | |
901 VIDEO_OUT (vio, V1_CONTROL, VIDEO_IN (vio, V1_CONTROL) | V1_ENABLE); | |
902 | |
903 /* Execute the changes */ | |
904 VIDEO_OUT (vio, V_COMPOSE_MODE, | |
905 VIDEO_IN (vio, V_COMPOSE_MODE) | V1_COMMAND_FIRE); | |
906 | |
907 return 0; | |
908 } | |
909 | |
910 /** | |
911 * @brief Set playback off : driver should deactivate BES on this call. | |
912 * | |
913 * @return 0. | |
914 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
915 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
916 unichrome_playback_off (void) |
22850 | 917 { |
918 LOGWRITE ("Disable overlay\n"); | |
919 | |
920 uc_ovl_vcmd_wait (vio); | |
921 | |
922 /* Restore FIFO */ | |
923 VIDEO_OUT (vio, V_FIFO_CONTROL, UC_MAP_V1_FIFO_CONTROL (16, 12, 8)); | |
924 | |
925 /* Turn off overlay */ | |
926 VIDEO_OUT (vio, V1_CONTROL, VIDEO_IN (vio, V1_CONTROL) & ~V1_ENABLE); | |
927 | |
928 /* Execute the changes */ | |
929 VIDEO_OUT (vio, V_COMPOSE_MODE, | |
930 VIDEO_IN (vio, V_COMPOSE_MODE) | V1_COMMAND_FIRE); | |
931 | |
932 return 0; | |
933 } | |
934 | |
935 /** | |
936 * @brief Driver should prepare and activate corresponded frame. | |
937 * | |
938 * @param frame the frame index. | |
939 * | |
940 * @return 0. | |
941 * | |
942 * @note This function is used only for double and triple buffering | |
943 * and never used for single buffering playback. | |
944 */ | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
945 static int |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
946 unichrome_frame_select (unsigned int frame) |
22850 | 947 { |
948 LOGWRITE ("Frame select\n"); | |
949 | |
950 uc_ovl_vcmd_wait (vio); | |
951 | |
952 /* Configure buffer address */ | |
953 VIDEO_OUT (vio, V1_STARTADDR_Y0, frames[frame] + YOffs); | |
954 VIDEO_OUT (vio, V1_STARTADDR_CB0, frames[frame] + UOffs); | |
955 VIDEO_OUT (vio, V1_STARTADDR_CR0, frames[frame] + VOffs); | |
956 | |
957 /* Execute the changes */ | |
958 VIDEO_OUT (vio, V_COMPOSE_MODE, | |
959 VIDEO_IN (vio, V_COMPOSE_MODE) | V1_COMMAND_FIRE); | |
960 | |
961 return 0; | |
962 } | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
963 |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
964 VDXDriver unichrome_drv = { |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
965 "unichrome", |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
966 NULL, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
967 .probe = unichrome_probe, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
968 .get_caps = unichrome_get_caps, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
969 .query_fourcc = unichrome_query_fourcc, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
970 .init = unichrome_init, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
971 .destroy = unichrome_destroy, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
972 .config_playback = unichrome_config_playback, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
973 .playback_on = unichrome_playback_on, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
974 .playback_off = unichrome_playback_off, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
975 .frame_sel = unichrome_frame_select, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
976 .get_eq = unichrome_get_eq, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
977 .set_eq = unichrome_set_eq, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
978 .get_gkey = unichrome_get_gkey, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
979 .set_gkey = unichrome_set_gkey, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
980 }; |