~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst (Architecture i386) and /Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst (Architecture sparc)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari      1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0
  2                                                     2 
  3 .. c:namespace:: dtv.legacy.osd                     3 .. c:namespace:: dtv.legacy.osd
  4                                                     4 
  5 .. _dvb_osd:                                        5 .. _dvb_osd:
  6                                                     6 
  7 ==============                                      7 ==============
  8 DVB OSD Device                                      8 DVB OSD Device
  9 ==============                                      9 ==============
 10                                                    10 
 11 .. attention:: Do **not** use in new drivers!      11 .. attention:: Do **not** use in new drivers!
 12              See: :ref:`legacy_dvb_decoder_not     12              See: :ref:`legacy_dvb_decoder_notes`
 13                                                    13 
 14 The DVB OSD device controls the OnScreen-Displ     14 The DVB OSD device controls the OnScreen-Display of the AV7110 based
 15 DVB-cards with hardware MPEG2 decoder. It can      15 DVB-cards with hardware MPEG2 decoder. It can be accessed through
 16 ``/dev/dvb/adapter?/osd0``.                        16 ``/dev/dvb/adapter?/osd0``.
 17 Data types and ioctl definitions can be access     17 Data types and ioctl definitions can be accessed by including
 18 ``linux/dvb/osd.h`` in your application.           18 ``linux/dvb/osd.h`` in your application.
 19                                                    19 
 20 The OSD is not a frame-buffer like on many oth     20 The OSD is not a frame-buffer like on many other cards.
 21 It is a kind of canvas one can draw on.            21 It is a kind of canvas one can draw on.
 22 The color-depth is limited depending on the me     22 The color-depth is limited depending on the memory size installed.
 23 An appropriate palette of colors has to be set     23 An appropriate palette of colors has to be set up.
 24 The installed memory size can be identified wi     24 The installed memory size can be identified with the `OSD_GET_CAPABILITY`_
 25 ioctl.                                             25 ioctl.
 26                                                    26 
 27 OSD Data Types                                     27 OSD Data Types
 28 ==============                                     28 ==============
 29                                                    29 
 30 OSD_Command                                        30 OSD_Command
 31 -----------                                        31 -----------
 32                                                    32 
 33 Synopsis                                           33 Synopsis
 34 ~~~~~~~~                                           34 ~~~~~~~~
 35                                                    35 
 36 .. code-block:: c                                  36 .. code-block:: c
 37                                                    37 
 38     typedef enum {                                 38     typedef enum {
 39         /* All functions return -2 on "not ope     39         /* All functions return -2 on "not open" */
 40         OSD_Close = 1,                             40         OSD_Close = 1,
 41         OSD_Open,                                  41         OSD_Open,
 42         OSD_Show,                                  42         OSD_Show,
 43         OSD_Hide,                                  43         OSD_Hide,
 44         OSD_Clear,                                 44         OSD_Clear,
 45         OSD_Fill,                                  45         OSD_Fill,
 46         OSD_SetColor,                              46         OSD_SetColor,
 47         OSD_SetPalette,                            47         OSD_SetPalette,
 48         OSD_SetTrans,                              48         OSD_SetTrans,
 49         OSD_SetPixel,                              49         OSD_SetPixel,
 50         OSD_GetPixel,                              50         OSD_GetPixel,
 51         OSD_SetRow,                                51         OSD_SetRow,
 52         OSD_SetBlock,                              52         OSD_SetBlock,
 53         OSD_FillRow,                               53         OSD_FillRow,
 54         OSD_FillBlock,                             54         OSD_FillBlock,
 55         OSD_Line,                                  55         OSD_Line,
 56         OSD_Query,                                 56         OSD_Query,
 57         OSD_Test,                                  57         OSD_Test,
 58         OSD_Text,                                  58         OSD_Text,
 59         OSD_SetWindow,                             59         OSD_SetWindow,
 60         OSD_MoveWindow,                            60         OSD_MoveWindow,
 61         OSD_OpenRaw,                               61         OSD_OpenRaw,
 62     } OSD_Command;                                 62     } OSD_Command;
 63                                                    63 
 64 Commands                                           64 Commands
 65 ~~~~~~~~                                           65 ~~~~~~~~
 66                                                    66 
 67 .. note::  All functions return -2 on "not ope     67 .. note::  All functions return -2 on "not open"
 68                                                    68 
 69 .. flat-table::                                    69 .. flat-table::
 70     :header-rows:  1                               70     :header-rows:  1
 71     :stub-columns: 0                               71     :stub-columns: 0
 72                                                    72 
 73     -  ..                                          73     -  ..
 74                                                    74 
 75        -  Command                                  75        -  Command
 76                                                    76 
 77        -  | Used variables of ``struct`` `osd_     77        -  | Used variables of ``struct`` `osd_cmd_t`_.
 78           | Usage{variable} if alternative use     78           | Usage{variable} if alternative use.
 79                                                    79 
 80        -  :cspan:`2` Description                   80        -  :cspan:`2` Description
 81                                                    81 
 82                                                    82 
 83                                                    83 
 84     -  ..                                          84     -  ..
 85                                                    85 
 86        -  ``OSD_Close``                            86        -  ``OSD_Close``
 87                                                    87 
 88        -  -                                        88        -  -
 89                                                    89 
 90        -  | Disables OSD and releases the buff     90        -  | Disables OSD and releases the buffers.
 91           | Returns 0 on success.                  91           | Returns 0 on success.
 92                                                    92 
 93     -  ..                                          93     -  ..
 94                                                    94 
 95        -  ``OSD_Open``                             95        -  ``OSD_Open``
 96                                                    96 
 97        -  | x0,y0,x1,y1,                           97        -  | x0,y0,x1,y1,
 98           | BitPerPixel[2/4/8]{color&0x0F},        98           | BitPerPixel[2/4/8]{color&0x0F},
 99           | mix[0..15]{color&0xF0}                 99           | mix[0..15]{color&0xF0}
100                                                   100 
101        -  | Opens OSD with this size and bit d    101        -  | Opens OSD with this size and bit depth
102           | Returns 0 on success,                 102           | Returns 0 on success,
103           | -1 on DRAM allocation error,          103           | -1 on DRAM allocation error,
104           | -2 on "already open".                 104           | -2 on "already open".
105                                                   105 
106     -  ..                                         106     -  ..
107                                                   107 
108        -  ``OSD_Show``                            108        -  ``OSD_Show``
109                                                   109 
110        - -                                        110        - -
111                                                   111 
112        -  | Enables OSD mode.                     112        -  | Enables OSD mode.
113           | Returns 0 on success.                 113           | Returns 0 on success.
114                                                   114 
115     -  ..                                         115     -  ..
116                                                   116 
117        -  ``OSD_Hide``                            117        -  ``OSD_Hide``
118                                                   118 
119        - -                                        119        - -
120                                                   120 
121        -  | Disables OSD mode.                    121        -  | Disables OSD mode.
122           | Returns 0 on success.                 122           | Returns 0 on success.
123                                                   123 
124     -  ..                                         124     -  ..
125                                                   125 
126        -  ``OSD_Clear``                           126        -  ``OSD_Clear``
127                                                   127 
128        - -                                        128        - -
129                                                   129 
130        -  | Sets all pixel to color 0.            130        -  | Sets all pixel to color 0.
131           | Returns 0 on success.                 131           | Returns 0 on success.
132                                                   132 
133     -  ..                                         133     -  ..
134                                                   134 
135        -  ``OSD_Fill``                            135        -  ``OSD_Fill``
136                                                   136 
137        -  color                                   137        -  color
138                                                   138 
139        -  | Sets all pixel to color <color>.      139        -  | Sets all pixel to color <color>.
140           | Returns 0 on success.                 140           | Returns 0 on success.
141                                                   141 
142     -  ..                                         142     -  ..
143                                                   143 
144        -  ``OSD_SetColor``                        144        -  ``OSD_SetColor``
145                                                   145 
146        -  | color,                                146        -  | color,
147           | R{x0},G{y0},B{x1},                    147           | R{x0},G{y0},B{x1},
148           | opacity{y1}                           148           | opacity{y1}
149                                                   149 
150        -  | Set palette entry <num> to <r,g,b>    150        -  | Set palette entry <num> to <r,g,b>, <mix> and <trans> apply
151           | R,G,B: 0..255                         151           | R,G,B: 0..255
152           | R=Red, G=Green, B=Blue                152           | R=Red, G=Green, B=Blue
153           | opacity=0:      pixel opacity 0% (    153           | opacity=0:      pixel opacity 0% (only video pixel shows)
154           | opacity=1..254: pixel opacity as s    154           | opacity=1..254: pixel opacity as specified in header
155           | opacity=255:    pixel opacity 100%    155           | opacity=255:    pixel opacity 100% (only OSD pixel shows)
156           | Returns 0 on success, -1 on error.    156           | Returns 0 on success, -1 on error.
157                                                   157 
158     -  ..                                         158     -  ..
159                                                   159 
160        -  ``OSD_SetPalette``                      160        -  ``OSD_SetPalette``
161                                                   161 
162        -  | firstcolor{color},                    162        -  | firstcolor{color},
163           | lastcolor{x0},data                    163           | lastcolor{x0},data
164                                                   164 
165        -  | Set a number of entries in the pal    165        -  | Set a number of entries in the palette.
166           | Sets the entries "firstcolor" thro    166           | Sets the entries "firstcolor" through "lastcolor" from the
167             array "data".                         167             array "data".
168           | Data has 4 byte for each color:       168           | Data has 4 byte for each color:
169           | R,G,B, and a opacity value: 0->tra    169           | R,G,B, and a opacity value: 0->transparent, 1..254->mix,
170             255->pixel                            170             255->pixel
171                                                   171 
172     -  ..                                         172     -  ..
173                                                   173 
174        -  ``OSD_SetTrans``                        174        -  ``OSD_SetTrans``
175                                                   175 
176        -  transparency{color}                     176        -  transparency{color}
177                                                   177 
178        -  | Sets transparency of mixed pixel (    178        -  | Sets transparency of mixed pixel (0..15).
179           | Returns 0 on success.                 179           | Returns 0 on success.
180                                                   180 
181     -  ..                                         181     -  ..
182                                                   182 
183        -  ``OSD_SetPixel``                        183        -  ``OSD_SetPixel``
184                                                   184 
185        -  x0,y0,color                             185        -  x0,y0,color
186                                                   186 
187        -  | Sets pixel <x>,<y> to color number    187        -  | Sets pixel <x>,<y> to color number <color>.
188           | Returns 0 on success, -1 on error.    188           | Returns 0 on success, -1 on error.
189                                                   189 
190     -  ..                                         190     -  ..
191                                                   191 
192        -  ``OSD_GetPixel``                        192        -  ``OSD_GetPixel``
193                                                   193 
194        -  x0,y0                                   194        -  x0,y0
195                                                   195 
196        -  | Returns color number of pixel <x>,    196        -  | Returns color number of pixel <x>,<y>,  or -1.
197           | Command currently not supported by    197           | Command currently not supported by the AV7110!
198                                                   198 
199     -  ..                                         199     -  ..
200                                                   200 
201        -  ``OSD_SetRow``                          201        -  ``OSD_SetRow``
202                                                   202 
203        -  x0,y0,x1,data                           203        -  x0,y0,x1,data
204                                                   204 
205        -  | Fills pixels x0,y through  x1,y wi    205        -  | Fills pixels x0,y through  x1,y with the content of data[].
206           | Returns 0 on success, -1 on clippi    206           | Returns 0 on success, -1 on clipping all pixel (no pixel
207             drawn).                               207             drawn).
208                                                   208 
209     -  ..                                         209     -  ..
210                                                   210 
211        -  ``OSD_SetBlock``                        211        -  ``OSD_SetBlock``
212                                                   212 
213        -  | x0,y0,x1,y1,                          213        -  | x0,y0,x1,y1,
214           | increment{color},                     214           | increment{color},
215           | data                                  215           | data
216                                                   216 
217        -  | Fills pixels x0,y0 through  x1,y1     217        -  | Fills pixels x0,y0 through  x1,y1 with the content of data[].
218           | Inc contains the width of one line    218           | Inc contains the width of one line in the data block,
219           | inc<=0 uses block width as line wi    219           | inc<=0 uses block width as line width.
220           | Returns 0 on success, -1 on clippi    220           | Returns 0 on success, -1 on clipping all pixel.
221                                                   221 
222     -  ..                                         222     -  ..
223                                                   223 
224        -  ``OSD_FillRow``                         224        -  ``OSD_FillRow``
225                                                   225 
226        -  x0,y0,x1,color                          226        -  x0,y0,x1,color
227                                                   227 
228        -  | Fills pixels x0,y through  x1,y wi    228        -  | Fills pixels x0,y through  x1,y with the color <color>.
229           | Returns 0 on success, -1 on clippi    229           | Returns 0 on success, -1 on clipping all pixel.
230                                                   230 
231     -  ..                                         231     -  ..
232                                                   232 
233        -  ``OSD_FillBlock``                       233        -  ``OSD_FillBlock``
234                                                   234 
235        -  x0,y0,x1,y1,color                       235        -  x0,y0,x1,y1,color
236                                                   236 
237        -  | Fills pixels x0,y0 through  x1,y1     237        -  | Fills pixels x0,y0 through  x1,y1 with the color <color>.
238           | Returns 0 on success, -1 on clippi    238           | Returns 0 on success, -1 on clipping all pixel.
239                                                   239 
240     -  ..                                         240     -  ..
241                                                   241 
242        -  ``OSD_Line``                            242        -  ``OSD_Line``
243                                                   243 
244        -  x0,y0,x1,y1,color                       244        -  x0,y0,x1,y1,color
245                                                   245 
246        -  | Draw a line from x0,y0 to x1,y1 wi    246        -  | Draw a line from x0,y0 to x1,y1 with the color <color>.
247           | Returns 0 on success.                 247           | Returns 0 on success.
248                                                   248 
249     -  ..                                         249     -  ..
250                                                   250 
251        -  ``OSD_Query``                           251        -  ``OSD_Query``
252                                                   252 
253        -  | x0,y0,x1,y1,                          253        -  | x0,y0,x1,y1,
254           | xasp{color}; yasp=11                  254           | xasp{color}; yasp=11
255                                                   255 
256        -  | Fills parameters with the picture     256        -  | Fills parameters with the picture dimensions and the pixel
257             aspect ratio.                         257             aspect ratio.
258           | Returns 0 on success.                 258           | Returns 0 on success.
259           | Command currently not supported by    259           | Command currently not supported by the AV7110!
260                                                   260 
261     -  ..                                         261     -  ..
262                                                   262 
263        -  ``OSD_Test``                            263        -  ``OSD_Test``
264                                                   264 
265        -  -                                       265        -  -
266                                                   266 
267        -  | Draws a test picture.                 267        -  | Draws a test picture.
268           | For debugging purposes only.          268           | For debugging purposes only.
269           | Returns 0 on success.                 269           | Returns 0 on success.
270     -  ..                                         270     -  ..
271                                                   271 
272        -  ``OSD_Text``                            272        -  ``OSD_Text``
273                                                   273 
274        -  x0,y0,size,color,text                   274        -  x0,y0,size,color,text
275                                                   275 
276        -  Draws a text at position x0,y0 with     276        -  Draws a text at position x0,y0 with the color <color>.
277                                                   277 
278     -  ..                                         278     -  ..
279                                                   279 
280        -  ``OSD_SetWindow``                       280        -  ``OSD_SetWindow``
281                                                   281 
282        -  x0                                      282        -  x0
283                                                   283 
284        -  Set window with number 0<x0<8 as cur    284        -  Set window with number 0<x0<8 as current.
285                                                   285 
286     -  ..                                         286     -  ..
287                                                   287 
288        -  ``OSD_MoveWindow``                      288        -  ``OSD_MoveWindow``
289                                                   289 
290        -  x0,y0                                   290        -  x0,y0
291                                                   291 
292        -  Move current window to (x0, y0).        292        -  Move current window to (x0, y0).
293                                                   293 
294     -  ..                                         294     -  ..
295                                                   295 
296        -  ``OSD_OpenRaw``                         296        -  ``OSD_OpenRaw``
297                                                   297 
298        -  | x0,y0,x1,y1,                          298        -  | x0,y0,x1,y1,
299           | `osd_raw_window_t`_ {color}           299           | `osd_raw_window_t`_ {color}
300                                                   300 
301        -  Open other types of OSD windows.        301        -  Open other types of OSD windows.
302                                                   302 
303 Description                                       303 Description
304 ~~~~~~~~~~~                                       304 ~~~~~~~~~~~
305                                                   305 
306 The ``OSD_Command`` data type is used with the    306 The ``OSD_Command`` data type is used with the `OSD_SEND_CMD`_ ioctl to
307 tell the driver which OSD_Command to execute.     307 tell the driver which OSD_Command to execute.
308                                                   308 
309                                                   309 
310 -----                                             310 -----
311                                                   311 
312 osd_cmd_t                                         312 osd_cmd_t
313 ---------                                         313 ---------
314                                                   314 
315 Synopsis                                          315 Synopsis
316 ~~~~~~~~                                          316 ~~~~~~~~
317                                                   317 
318 .. code-block:: c                                 318 .. code-block:: c
319                                                   319 
320     typedef struct osd_cmd_s {                    320     typedef struct osd_cmd_s {
321         OSD_Command cmd;                          321         OSD_Command cmd;
322         int x0;                                   322         int x0;
323         int y0;                                   323         int y0;
324         int x1;                                   324         int x1;
325         int y1;                                   325         int y1;
326         int color;                                326         int color;
327         void __user *data;                        327         void __user *data;
328     } osd_cmd_t;                                  328     } osd_cmd_t;
329                                                   329 
330 Variables                                         330 Variables
331 ~~~~~~~~~                                         331 ~~~~~~~~~
332                                                   332 
333 .. flat-table::                                   333 .. flat-table::
334     :header-rows:  0                              334     :header-rows:  0
335     :stub-columns: 0                              335     :stub-columns: 0
336                                                   336 
337     -  ..                                         337     -  ..
338                                                   338 
339        -  ``OSD_Command cmd``                     339        -  ``OSD_Command cmd``
340                                                   340 
341        -  `OSD_Command`_ to be executed.          341        -  `OSD_Command`_ to be executed.
342                                                   342 
343     -  ..                                         343     -  ..
344                                                   344 
345        -  ``int x0``                              345        -  ``int x0``
346                                                   346 
347        -  First horizontal position.              347        -  First horizontal position.
348                                                   348 
349     -  ..                                         349     -  ..
350                                                   350 
351        -  ``int y0``                              351        -  ``int y0``
352                                                   352 
353        -  First vertical position.                353        -  First vertical position.
354                                                   354 
355     -  ..                                         355     -  ..
356                                                   356 
357        -  ``int x1``                              357        -  ``int x1``
358                                                   358 
359        -  Second horizontal position.             359        -  Second horizontal position.
360                                                   360 
361     -  ..                                         361     -  ..
362                                                   362 
363        -  ``int y1``                              363        -  ``int y1``
364                                                   364 
365        -  Second vertical position.               365        -  Second vertical position.
366                                                   366 
367     -  ..                                         367     -  ..
368                                                   368 
369        -  ``int color``                           369        -  ``int color``
370                                                   370 
371        -  Number of the color in the palette.     371        -  Number of the color in the palette.
372                                                   372 
373     -  ..                                         373     -  ..
374                                                   374 
375        -  ``void __user *data``                   375        -  ``void __user *data``
376                                                   376 
377        -  Command specific Data.                  377        -  Command specific Data.
378                                                   378 
379 Description                                       379 Description
380 ~~~~~~~~~~~                                       380 ~~~~~~~~~~~
381                                                   381 
382 The ``osd_cmd_t`` data type is used with the `    382 The ``osd_cmd_t`` data type is used with the `OSD_SEND_CMD`_ ioctl.
383 It contains the data for the OSD_Command and t    383 It contains the data for the OSD_Command and the `OSD_Command`_ itself.
384 The structure has to be passed to the driver a    384 The structure has to be passed to the driver and the components may be
385 modified by it.                                   385 modified by it.
386                                                   386 
387                                                   387 
388 -----                                             388 -----
389                                                   389 
390                                                   390 
391 osd_raw_window_t                                  391 osd_raw_window_t
392 ----------------                                  392 ----------------
393                                                   393 
394 Synopsis                                          394 Synopsis
395 ~~~~~~~~                                          395 ~~~~~~~~
396                                                   396 
397 .. code-block:: c                                 397 .. code-block:: c
398                                                   398 
399     typedef enum {                                399     typedef enum {
400         OSD_BITMAP1,                              400         OSD_BITMAP1,
401         OSD_BITMAP2,                              401         OSD_BITMAP2,
402         OSD_BITMAP4,                              402         OSD_BITMAP4,
403         OSD_BITMAP8,                              403         OSD_BITMAP8,
404         OSD_BITMAP1HR,                            404         OSD_BITMAP1HR,
405         OSD_BITMAP2HR,                            405         OSD_BITMAP2HR,
406         OSD_BITMAP4HR,                            406         OSD_BITMAP4HR,
407         OSD_BITMAP8HR,                            407         OSD_BITMAP8HR,
408         OSD_YCRCB422,                             408         OSD_YCRCB422,
409         OSD_YCRCB444,                             409         OSD_YCRCB444,
410         OSD_YCRCB444HR,                           410         OSD_YCRCB444HR,
411         OSD_VIDEOTSIZE,                           411         OSD_VIDEOTSIZE,
412         OSD_VIDEOHSIZE,                           412         OSD_VIDEOHSIZE,
413         OSD_VIDEOQSIZE,                           413         OSD_VIDEOQSIZE,
414         OSD_VIDEODSIZE,                           414         OSD_VIDEODSIZE,
415         OSD_VIDEOTHSIZE,                          415         OSD_VIDEOTHSIZE,
416         OSD_VIDEOTQSIZE,                          416         OSD_VIDEOTQSIZE,
417         OSD_VIDEOTDSIZE,                          417         OSD_VIDEOTDSIZE,
418         OSD_VIDEONSIZE,                           418         OSD_VIDEONSIZE,
419         OSD_CURSOR                                419         OSD_CURSOR
420     } osd_raw_window_t;                           420     } osd_raw_window_t;
421                                                   421 
422 Constants                                         422 Constants
423 ~~~~~~~~~                                         423 ~~~~~~~~~
424                                                   424 
425 .. flat-table::                                   425 .. flat-table::
426     :header-rows:  0                              426     :header-rows:  0
427     :stub-columns: 0                              427     :stub-columns: 0
428                                                   428 
429     -  ..                                         429     -  ..
430                                                   430 
431        -  ``OSD_BITMAP1``                         431        -  ``OSD_BITMAP1``
432                                                   432 
433        -  :cspan:`1` 1 bit bitmap                 433        -  :cspan:`1` 1 bit bitmap
434                                                   434 
435     -  ..                                         435     -  ..
436                                                   436 
437        -  ``OSD_BITMAP2``                         437        -  ``OSD_BITMAP2``
438                                                   438 
439        -  2 bit bitmap                            439        -  2 bit bitmap
440                                                   440 
441     -  ..                                         441     -  ..
442                                                   442 
443        -  ``OSD_BITMAP4``                         443        -  ``OSD_BITMAP4``
444                                                   444 
445        -  4 bit bitmap                            445        -  4 bit bitmap
446                                                   446 
447     -  ..                                         447     -  ..
448                                                   448 
449        -  ``OSD_BITMAP8``                         449        -  ``OSD_BITMAP8``
450                                                   450 
451        -  8 bit bitmap                            451        -  8 bit bitmap
452                                                   452 
453     -  ..                                         453     -  ..
454                                                   454 
455        -  ``OSD_BITMAP1HR``                       455        -  ``OSD_BITMAP1HR``
456                                                   456 
457        -  1 Bit bitmap half resolution            457        -  1 Bit bitmap half resolution
458                                                   458 
459     -  ..                                         459     -  ..
460                                                   460 
461        -  ``OSD_BITMAP2HR``                       461        -  ``OSD_BITMAP2HR``
462                                                   462 
463        -  2 Bit bitmap half resolution            463        -  2 Bit bitmap half resolution
464                                                   464 
465     -  ..                                         465     -  ..
466                                                   466 
467        -  ``OSD_BITMAP4HR``                       467        -  ``OSD_BITMAP4HR``
468                                                   468 
469        -  4 Bit bitmap half resolution            469        -  4 Bit bitmap half resolution
470                                                   470 
471     -  ..                                         471     -  ..
472                                                   472 
473        -  ``OSD_BITMAP8HR``                       473        -  ``OSD_BITMAP8HR``
474                                                   474 
475        -  8 Bit bitmap half resolution            475        -  8 Bit bitmap half resolution
476                                                   476 
477     -  ..                                         477     -  ..
478                                                   478 
479        -  ``OSD_YCRCB422``                        479        -  ``OSD_YCRCB422``
480                                                   480 
481        -  4:2:2 YCRCB Graphic Display             481        -  4:2:2 YCRCB Graphic Display
482                                                   482 
483     -  ..                                         483     -  ..
484                                                   484 
485        -  ``OSD_YCRCB444``                        485        -  ``OSD_YCRCB444``
486                                                   486 
487        -  4:4:4 YCRCB Graphic Display             487        -  4:4:4 YCRCB Graphic Display
488                                                   488 
489     -  ..                                         489     -  ..
490                                                   490 
491        -  ``OSD_YCRCB444HR``                      491        -  ``OSD_YCRCB444HR``
492                                                   492 
493        -  4:4:4 YCRCB graphic half resolution     493        -  4:4:4 YCRCB graphic half resolution
494                                                   494 
495     -  ..                                         495     -  ..
496                                                   496 
497        -  ``OSD_VIDEOTSIZE``                      497        -  ``OSD_VIDEOTSIZE``
498                                                   498 
499        -  True Size Normal MPEG Video Display     499        -  True Size Normal MPEG Video Display
500                                                   500 
501     -  ..                                         501     -  ..
502                                                   502 
503        -  ``OSD_VIDEOHSIZE``                      503        -  ``OSD_VIDEOHSIZE``
504                                                   504 
505        -  MPEG Video Display Half Resolution      505        -  MPEG Video Display Half Resolution
506                                                   506 
507     -  ..                                         507     -  ..
508                                                   508 
509        -  ``OSD_VIDEOQSIZE``                      509        -  ``OSD_VIDEOQSIZE``
510                                                   510 
511        -  MPEG Video Display Quarter Resolutio    511        -  MPEG Video Display Quarter Resolution
512                                                   512 
513     -  ..                                         513     -  ..
514                                                   514 
515        -  ``OSD_VIDEODSIZE``                      515        -  ``OSD_VIDEODSIZE``
516                                                   516 
517        -  MPEG Video Display Double Resolution    517        -  MPEG Video Display Double Resolution
518                                                   518 
519     -  ..                                         519     -  ..
520                                                   520 
521        -  ``OSD_VIDEOTHSIZE``                     521        -  ``OSD_VIDEOTHSIZE``
522                                                   522 
523        -  True Size MPEG Video Display Half Re    523        -  True Size MPEG Video Display Half Resolution
524                                                   524 
525     -  ..                                         525     -  ..
526                                                   526 
527        -  ``OSD_VIDEOTQSIZE``                     527        -  ``OSD_VIDEOTQSIZE``
528                                                   528 
529        -  True Size MPEG Video Display Quarter    529        -  True Size MPEG Video Display Quarter Resolution
530                                                   530 
531     -  ..                                         531     -  ..
532                                                   532 
533        -  ``OSD_VIDEOTDSIZE``                     533        -  ``OSD_VIDEOTDSIZE``
534                                                   534 
535        -  True Size MPEG Video Display Double     535        -  True Size MPEG Video Display Double Resolution
536                                                   536 
537     -  ..                                         537     -  ..
538                                                   538 
539        -  ``OSD_VIDEONSIZE``                      539        -  ``OSD_VIDEONSIZE``
540                                                   540 
541        -  Full Size MPEG Video Display            541        -  Full Size MPEG Video Display
542                                                   542 
543     -  ..                                         543     -  ..
544                                                   544 
545        -  ``OSD_CURSOR``                          545        -  ``OSD_CURSOR``
546                                                   546 
547        -  Cursor                                  547        -  Cursor
548                                                   548 
549 Description                                       549 Description
550 ~~~~~~~~~~~                                       550 ~~~~~~~~~~~
551                                                   551 
552 The ``osd_raw_window_t`` data type is used wit    552 The ``osd_raw_window_t`` data type is used with the `OSD_Command`_
553 OSD_OpenRaw to tell the driver which type of O    553 OSD_OpenRaw to tell the driver which type of OSD to open.
554                                                   554 
555                                                   555 
556 -----                                             556 -----
557                                                   557 
558                                                   558 
559 osd_cap_t                                         559 osd_cap_t
560 ---------                                         560 ---------
561                                                   561 
562 Synopsis                                          562 Synopsis
563 ~~~~~~~~                                          563 ~~~~~~~~
564                                                   564 
565 .. code-block:: c                                 565 .. code-block:: c
566                                                   566 
567     typedef struct osd_cap_s {                    567     typedef struct osd_cap_s {
568         int  cmd;                                 568         int  cmd;
569     #define OSD_CAP_MEMSIZE         1             569     #define OSD_CAP_MEMSIZE         1
570         long val;                                 570         long val;
571     } osd_cap_t;                                  571     } osd_cap_t;
572                                                   572 
573 Variables                                         573 Variables
574 ~~~~~~~~~                                         574 ~~~~~~~~~
575                                                   575 
576 .. flat-table::                                   576 .. flat-table::
577     :header-rows:  0                              577     :header-rows:  0
578     :stub-columns: 0                              578     :stub-columns: 0
579                                                   579 
580     -  ..                                         580     -  ..
581                                                   581 
582        -  ``int  cmd``                            582        -  ``int  cmd``
583                                                   583 
584        -  Capability to query.                    584        -  Capability to query.
585                                                   585 
586     -  ..                                         586     -  ..
587                                                   587 
588        -  ``long val``                            588        -  ``long val``
589                                                   589 
590        -  Used to store the Data.                 590        -  Used to store the Data.
591                                                   591 
592 Supported capabilities                            592 Supported capabilities
593 ~~~~~~~~~~~~~~~~~~~~~~                            593 ~~~~~~~~~~~~~~~~~~~~~~
594                                                   594 
595 .. flat-table::                                   595 .. flat-table::
596     :header-rows:  0                              596     :header-rows:  0
597     :stub-columns: 0                              597     :stub-columns: 0
598                                                   598 
599     -  ..                                         599     -  ..
600                                                   600 
601        -  ``OSD_CAP_MEMSIZE``                     601        -  ``OSD_CAP_MEMSIZE``
602                                                   602 
603        -  Memory size installed on the card.      603        -  Memory size installed on the card.
604                                                   604 
605 Description                                       605 Description
606 ~~~~~~~~~~~                                       606 ~~~~~~~~~~~
607                                                   607 
608 This structure of data used with the `OSD_GET_    608 This structure of data used with the `OSD_GET_CAPABILITY`_ call.
609                                                   609 
610                                                   610 
611 -----                                             611 -----
612                                                   612 
613                                                   613 
614 OSD Function Calls                                614 OSD Function Calls
615 ==================                                615 ==================
616                                                   616 
617 OSD_SEND_CMD                                      617 OSD_SEND_CMD
618 ------------                                      618 ------------
619                                                   619 
620 Synopsis                                          620 Synopsis
621 ~~~~~~~~                                          621 ~~~~~~~~
622                                                   622 
623 .. c:macro:: OSD_SEND_CMD                         623 .. c:macro:: OSD_SEND_CMD
624                                                   624 
625 .. code-block:: c                                 625 .. code-block:: c
626                                                   626 
627     int ioctl(int fd, int request = OSD_SEND_C    627     int ioctl(int fd, int request = OSD_SEND_CMD, enum osd_cmd_t *cmd)
628                                                   628 
629                                                   629 
630 Arguments                                         630 Arguments
631 ~~~~~~~~~                                         631 ~~~~~~~~~
632                                                   632 
633 .. flat-table::                                   633 .. flat-table::
634     :header-rows:  0                              634     :header-rows:  0
635     :stub-columns: 0                              635     :stub-columns: 0
636                                                   636 
637     -  ..                                         637     -  ..
638                                                   638 
639        -  ``int fd``                              639        -  ``int fd``
640                                                   640 
641        -  :cspan:`1` File descriptor returned     641        -  :cspan:`1` File descriptor returned by a previous call
642           to `open()`_.                           642           to `open()`_.
643                                                   643 
644     -  ..                                         644     -  ..
645                                                   645 
646        -  ``int request``                         646        -  ``int request``
647                                                   647 
648        -  Pointer to the location of the struc    648        -  Pointer to the location of the structure `osd_cmd_t`_ for this
649           command.                                649           command.
650                                                   650 
651 Description                                       651 Description
652 ~~~~~~~~~~~                                       652 ~~~~~~~~~~~
653                                                   653 
654 .. attention:: Do **not** use in new drivers!     654 .. attention:: Do **not** use in new drivers!
655              See: :ref:`legacy_dvb_decoder_not    655              See: :ref:`legacy_dvb_decoder_notes`
656                                                   656 
657 This ioctl sends the `OSD_Command`_ to the car    657 This ioctl sends the `OSD_Command`_ to the card.
658                                                   658 
659 Return Value                                      659 Return Value
660 ~~~~~~~~~~~~                                      660 ~~~~~~~~~~~~
661                                                   661 
662 On success 0 is returned, on error -1 and the     662 On success 0 is returned, on error -1 and the ``errno`` variable is set
663 appropriately. The generic error codes are des    663 appropriately. The generic error codes are described at the
664 :ref:`Generic Error Codes <gen-errors>` chapte    664 :ref:`Generic Error Codes <gen-errors>` chapter.
665                                                   665 
666 .. flat-table::                                   666 .. flat-table::
667     :header-rows:  0                              667     :header-rows:  0
668     :stub-columns: 0                              668     :stub-columns: 0
669                                                   669 
670     -  ..                                         670     -  ..
671                                                   671 
672        -  ``EINVAL``                              672        -  ``EINVAL``
673                                                   673 
674        -  Command is out of range.                674        -  Command is out of range.
675                                                   675 
676                                                   676 
677 -----                                             677 -----
678                                                   678 
679                                                   679 
680 OSD_GET_CAPABILITY                                680 OSD_GET_CAPABILITY
681 ------------------                                681 ------------------
682                                                   682 
683 Synopsis                                          683 Synopsis
684 ~~~~~~~~                                          684 ~~~~~~~~
685                                                   685 
686 .. c:macro:: OSD_GET_CAPABILITY                   686 .. c:macro:: OSD_GET_CAPABILITY
687                                                   687 
688 .. code-block:: c                                 688 .. code-block:: c
689                                                   689 
690     int ioctl(int fd, int request = OSD_GET_CA    690     int ioctl(int fd, int request = OSD_GET_CAPABILITY,
691     struct osd_cap_t *cap)                        691     struct osd_cap_t *cap)
692                                                   692 
693 Arguments                                         693 Arguments
694 ~~~~~~~~~                                         694 ~~~~~~~~~
695                                                   695 
696 .. flat-table::                                   696 .. flat-table::
697     :header-rows:  0                              697     :header-rows:  0
698     :stub-columns: 0                              698     :stub-columns: 0
699                                                   699 
700     -  ..                                         700     -  ..
701                                                   701 
702        -  ``int fd``                              702        -  ``int fd``
703                                                   703 
704        -  :cspan:`1` File descriptor returned     704        -  :cspan:`1` File descriptor returned by a previous call
705           to `open()`_.                           705           to `open()`_.
706                                                   706 
707     -  ..                                         707     -  ..
708                                                   708 
709        -  ``int request``                         709        -  ``int request``
710                                                   710 
711        -  Equals ``OSD_GET_CAPABILITY`` for th    711        -  Equals ``OSD_GET_CAPABILITY`` for this command.
712                                                   712 
713     -  ..                                         713     -  ..
714                                                   714 
715        -  ``unsigned int *cap``                   715        -  ``unsigned int *cap``
716                                                   716 
717        -  Pointer to the location of the struc    717        -  Pointer to the location of the structure `osd_cap_t`_ for this
718           command.                                718           command.
719                                                   719 
720 Description                                       720 Description
721 ~~~~~~~~~~~                                       721 ~~~~~~~~~~~
722                                                   722 
723 .. attention:: Do **not** use in new drivers!     723 .. attention:: Do **not** use in new drivers!
724              See: :ref:`legacy_dvb_decoder_not    724              See: :ref:`legacy_dvb_decoder_notes`
725                                                   725 
726 This ioctl is used to get the capabilities of     726 This ioctl is used to get the capabilities of the OSD of the AV7110 based
727 DVB-decoder-card in use.                          727 DVB-decoder-card in use.
728                                                   728 
729 .. note::                                         729 .. note::
730     The structure osd_cap_t has to be setup by    730     The structure osd_cap_t has to be setup by the user and passed to the
731     driver.                                       731     driver.
732                                                   732 
733 Return Value                                      733 Return Value
734 ~~~~~~~~~~~~                                      734 ~~~~~~~~~~~~
735                                                   735 
736 On success 0 is returned, on error -1 and the     736 On success 0 is returned, on error -1 and the ``errno`` variable is set
737 appropriately. The generic error codes are des    737 appropriately. The generic error codes are described at the
738 :ref:`Generic Error Codes <gen-errors>` chapte    738 :ref:`Generic Error Codes <gen-errors>` chapter.
739                                                   739 
740 .. flat-table::                                   740 .. flat-table::
741     :header-rows:  0                              741     :header-rows:  0
742     :stub-columns: 0                              742     :stub-columns: 0
743                                                   743 
744                                                   744 
745     -  ..                                         745     -  ..
746                                                   746 
747        -  ``EINVAL``                              747        -  ``EINVAL``
748                                                   748 
749        -  Unsupported capability.                 749        -  Unsupported capability.
750                                                   750 
751                                                   751 
752 -----                                             752 -----
753                                                   753 
754                                                   754 
755 open()                                            755 open()
756 ------                                            756 ------
757                                                   757 
758 Synopsis                                          758 Synopsis
759 ~~~~~~~~                                          759 ~~~~~~~~
760                                                   760 
761 .. code-block:: c                                 761 .. code-block:: c
762                                                   762 
763     #include <fcntl.h>                            763     #include <fcntl.h>
764                                                   764 
765 .. c:function:: int open(const char *deviceNam    765 .. c:function:: int open(const char *deviceName, int flags)
766                                                   766 
767 Arguments                                         767 Arguments
768 ~~~~~~~~~                                         768 ~~~~~~~~~
769                                                   769 
770 .. flat-table::                                   770 .. flat-table::
771     :header-rows:  0                              771     :header-rows:  0
772     :stub-columns: 0                              772     :stub-columns: 0
773                                                   773 
774     -  ..                                         774     -  ..
775                                                   775 
776        -  ``const char *deviceName``              776        -  ``const char *deviceName``
777                                                   777 
778        -  Name of specific OSD device.            778        -  Name of specific OSD device.
779                                                   779 
780     -  ..                                         780     -  ..
781                                                   781 
782        -  :rspan:`3` ``int flags``                782        -  :rspan:`3` ``int flags``
783                                                   783 
784        -  :cspan:`1` A bit-wise OR of the foll    784        -  :cspan:`1` A bit-wise OR of the following flags:
785                                                   785 
786     -  ..                                         786     -  ..
787                                                   787 
788        -  ``O_RDONLY``                            788        -  ``O_RDONLY``
789                                                   789 
790        -  read-only access                        790        -  read-only access
791                                                   791 
792     -  ..                                         792     -  ..
793                                                   793 
794        -  ``O_RDWR``                              794        -  ``O_RDWR``
795                                                   795 
796        -  read/write access                       796        -  read/write access
797                                                   797 
798     -  ..                                         798     -  ..
799                                                   799 
800        -  ``O_NONBLOCK``                          800        -  ``O_NONBLOCK``
801        -  | Open in non-blocking mode             801        -  | Open in non-blocking mode
802           | (blocking mode is the default)        802           | (blocking mode is the default)
803                                                   803 
804 Description                                       804 Description
805 ~~~~~~~~~~~                                       805 ~~~~~~~~~~~
806                                                   806 
807 This system call opens a named OSD device (e.g    807 This system call opens a named OSD device (e.g.
808 ``/dev/dvb/adapter?/osd0``) for subsequent use    808 ``/dev/dvb/adapter?/osd0``) for subsequent use.
809                                                   809 
810 Return Value                                      810 Return Value
811 ~~~~~~~~~~~~                                      811 ~~~~~~~~~~~~
812                                                   812 
813 .. flat-table::                                   813 .. flat-table::
814     :header-rows:  0                              814     :header-rows:  0
815     :stub-columns: 0                              815     :stub-columns: 0
816                                                   816 
817     -  ..                                         817     -  ..
818                                                   818 
819        -  ``ENODEV``                              819        -  ``ENODEV``
820                                                   820 
821        -  Device driver not loaded/available.     821        -  Device driver not loaded/available.
822                                                   822 
823     -  ..                                         823     -  ..
824                                                   824 
825        -  ``EINTERNAL``                           825        -  ``EINTERNAL``
826                                                   826 
827        -  Internal error.                         827        -  Internal error.
828                                                   828 
829     -  ..                                         829     -  ..
830                                                   830 
831        -  ``EBUSY``                               831        -  ``EBUSY``
832                                                   832 
833        -  Device or resource busy.                833        -  Device or resource busy.
834                                                   834 
835     -  ..                                         835     -  ..
836                                                   836 
837        -  ``EINVAL``                              837        -  ``EINVAL``
838                                                   838 
839        -  Invalid argument.                       839        -  Invalid argument.
840                                                   840 
841                                                   841 
842 -----                                             842 -----
843                                                   843 
844                                                   844 
845 close()                                           845 close()
846 -------                                           846 -------
847                                                   847 
848 Synopsis                                          848 Synopsis
849 ~~~~~~~~                                          849 ~~~~~~~~
850                                                   850 
851 .. c:function:: int close(int fd)                 851 .. c:function:: int close(int fd)
852                                                   852 
853 Arguments                                         853 Arguments
854 ~~~~~~~~~                                         854 ~~~~~~~~~
855                                                   855 
856 .. flat-table::                                   856 .. flat-table::
857     :header-rows:  0                              857     :header-rows:  0
858     :stub-columns: 0                              858     :stub-columns: 0
859                                                   859 
860     -  ..                                         860     -  ..
861                                                   861 
862        -  ``int fd``                              862        -  ``int fd``
863                                                   863 
864        -  :cspan:`1` File descriptor returned     864        -  :cspan:`1` File descriptor returned by a previous call
865           to `open()`_ .                          865           to `open()`_ .
866                                                   866 
867 Description                                       867 Description
868 ~~~~~~~~~~~                                       868 ~~~~~~~~~~~
869                                                   869 
870 This system call closes a previously opened OS    870 This system call closes a previously opened OSD device.
871                                                   871 
872 Return Value                                      872 Return Value
873 ~~~~~~~~~~~~                                      873 ~~~~~~~~~~~~
874                                                   874 
875 .. flat-table::                                   875 .. flat-table::
876     :header-rows:  0                              876     :header-rows:  0
877     :stub-columns: 0                              877     :stub-columns: 0
878                                                   878 
879     -  ..                                         879     -  ..
880                                                   880 
881        -  ``EBADF``                               881        -  ``EBADF``
882                                                   882 
883        -  fd is not a valid open file descript    883        -  fd is not a valid open file descriptor.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php