doc-rst: linux_tv: remove whitespaces
[deliverable/linux.git] / Documentation / linux_tv / media / dvb / ca_function_calls.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _ca_function_calls:
4
5 *****************
6 CA Function Calls
7 *****************
8
9
10 .. _ca_fopen:
11
12 DVB CA open()
13 =============
14
15 Description
16 -----------
17
18 This system call opens a named ca device (e.g. /dev/ost/ca) for
19 subsequent use.
20
21 When an open() call has succeeded, the device will be ready for use. The
22 significance of blocking or non-blocking mode is described in the
23 documentation for functions where there is a difference. It does not
24 affect the semantics of the open() call itself. A device opened in
25 blocking mode can later be put into non-blocking mode (and vice versa)
26 using the F_SETFL command of the fcntl system call. This is a standard
27 system call, documented in the Linux manual page for fcntl. Only one
28 user can open the CA Device in O_RDWR mode. All other attempts to open
29 the device in this mode will fail, and an error code will be returned.
30
31 Synopsis
32 --------
33
34 .. cpp:function:: int open(const char *deviceName, int flags)
35
36 Arguments
37 ----------
38
39
40
41 .. flat-table::
42 :header-rows: 0
43 :stub-columns: 0
44
45
46 - .. row 1
47
48 - const char \*deviceName
49
50 - Name of specific video device.
51
52 - .. row 2
53
54 - int flags
55
56 - A bit-wise OR of the following flags:
57
58 - .. row 3
59
60 -
61 - O_RDONLY read-only access
62
63 - .. row 4
64
65 -
66 - O_RDWR read/write access
67
68 - .. row 5
69
70 -
71 - O_NONBLOCK open in non-blocking mode
72
73 - .. row 6
74
75 -
76 - (blocking mode is the default)
77
78
79 Return Value
80 ------------
81
82
83
84 .. flat-table::
85 :header-rows: 0
86 :stub-columns: 0
87
88
89 - .. row 1
90
91 - ``ENODEV``
92
93 - Device driver not loaded/available.
94
95 - .. row 2
96
97 - ``EINTERNAL``
98
99 - Internal error.
100
101 - .. row 3
102
103 - ``EBUSY``
104
105 - Device or resource busy.
106
107 - .. row 4
108
109 - ``EINVAL``
110
111 - Invalid argument.
112
113
114
115 .. _ca_fclose:
116
117 DVB CA close()
118 ==============
119
120 Description
121 -----------
122
123 This system call closes a previously opened audio device.
124
125 Synopsis
126 --------
127
128 .. cpp:function:: int close(int fd)
129
130 Arguments
131 ----------
132
133
134
135 .. flat-table::
136 :header-rows: 0
137 :stub-columns: 0
138
139
140 - .. row 1
141
142 - int fd
143
144 - File descriptor returned by a previous call to open().
145
146
147 Return Value
148 ------------
149
150
151
152 .. flat-table::
153 :header-rows: 0
154 :stub-columns: 0
155
156
157 - .. row 1
158
159 - ``EBADF``
160
161 - fd is not a valid open file descriptor.
162
163
164
165 .. _CA_RESET:
166
167 CA_RESET
168 ========
169
170 Description
171 -----------
172
173 This ioctl is undocumented. Documentation is welcome.
174
175 Synopsis
176 --------
177
178 .. cpp:function:: int ioctl(fd, int request = CA_RESET)
179
180 Arguments
181 ----------
182
183
184
185 .. flat-table::
186 :header-rows: 0
187 :stub-columns: 0
188
189
190 - .. row 1
191
192 - int fd
193
194 - File descriptor returned by a previous call to open().
195
196 - .. row 2
197
198 - int request
199
200 - Equals CA_RESET for this command.
201
202
203 Return Value
204 ------------
205
206 On success 0 is returned, on error -1 and the ``errno`` variable is set
207 appropriately. The generic error codes are described at the
208 :ref:`Generic Error Codes <gen-errors>` chapter.
209
210
211 .. _CA_GET_CAP:
212
213 CA_GET_CAP
214 ==========
215
216 Description
217 -----------
218
219 This ioctl is undocumented. Documentation is welcome.
220
221 Synopsis
222 --------
223
224 .. cpp:function:: int ioctl(fd, int request = CA_GET_CAP, ca_caps_t *)
225
226 Arguments
227 ----------
228
229
230
231 .. flat-table::
232 :header-rows: 0
233 :stub-columns: 0
234
235
236 - .. row 1
237
238 - int fd
239
240 - File descriptor returned by a previous call to open().
241
242 - .. row 2
243
244 - int request
245
246 - Equals CA_GET_CAP for this command.
247
248 - .. row 3
249
250 - ca_caps_t *
251
252 - Undocumented.
253
254
255 Return Value
256 ------------
257
258 On success 0 is returned, on error -1 and the ``errno`` variable is set
259 appropriately. The generic error codes are described at the
260 :ref:`Generic Error Codes <gen-errors>` chapter.
261
262
263 .. _CA_GET_SLOT_INFO:
264
265 CA_GET_SLOT_INFO
266 ================
267
268 Description
269 -----------
270
271 This ioctl is undocumented. Documentation is welcome.
272
273 Synopsis
274 --------
275
276 .. cpp:function:: int ioctl(fd, int request = CA_GET_SLOT_INFO, ca_slot_info_t *)
277
278 Arguments
279 ----------
280
281
282
283 .. flat-table::
284 :header-rows: 0
285 :stub-columns: 0
286
287
288 - .. row 1
289
290 - int fd
291
292 - File descriptor returned by a previous call to open().
293
294 - .. row 2
295
296 - int request
297
298 - Equals CA_GET_SLOT_INFO for this command.
299
300 - .. row 3
301
302 - ca_slot_info_t \*
303
304 - Undocumented.
305
306
307 Return Value
308 ------------
309
310 On success 0 is returned, on error -1 and the ``errno`` variable is set
311 appropriately. The generic error codes are described at the
312 :ref:`Generic Error Codes <gen-errors>` chapter.
313
314
315 .. _CA_GET_DESCR_INFO:
316
317 CA_GET_DESCR_INFO
318 =================
319
320 Description
321 -----------
322
323 This ioctl is undocumented. Documentation is welcome.
324
325 Synopsis
326 --------
327
328 .. cpp:function:: int ioctl(fd, int request = CA_GET_DESCR_INFO, ca_descr_info_t *)
329
330 Arguments
331 ----------
332
333
334
335 .. flat-table::
336 :header-rows: 0
337 :stub-columns: 0
338
339
340 - .. row 1
341
342 - int fd
343
344 - File descriptor returned by a previous call to open().
345
346 - .. row 2
347
348 - int request
349
350 - Equals CA_GET_DESCR_INFO for this command.
351
352 - .. row 3
353
354 - ca_descr_info_t \*
355
356 - Undocumented.
357
358
359 Return Value
360 ------------
361
362 On success 0 is returned, on error -1 and the ``errno`` variable is set
363 appropriately. The generic error codes are described at the
364 :ref:`Generic Error Codes <gen-errors>` chapter.
365
366
367 .. _CA_GET_MSG:
368
369 CA_GET_MSG
370 ==========
371
372 Description
373 -----------
374
375 This ioctl is undocumented. Documentation is welcome.
376
377 Synopsis
378 --------
379
380 .. cpp:function:: int ioctl(fd, int request = CA_GET_MSG, ca_msg_t *)
381
382 Arguments
383 ----------
384
385
386
387 .. flat-table::
388 :header-rows: 0
389 :stub-columns: 0
390
391
392 - .. row 1
393
394 - int fd
395
396 - File descriptor returned by a previous call to open().
397
398 - .. row 2
399
400 - int request
401
402 - Equals CA_GET_MSG for this command.
403
404 - .. row 3
405
406 - ca_msg_t \*
407
408 - Undocumented.
409
410
411 Return Value
412 ------------
413
414 On success 0 is returned, on error -1 and the ``errno`` variable is set
415 appropriately. The generic error codes are described at the
416 :ref:`Generic Error Codes <gen-errors>` chapter.
417
418
419 .. _CA_SEND_MSG:
420
421 CA_SEND_MSG
422 ===========
423
424 Description
425 -----------
426
427 This ioctl is undocumented. Documentation is welcome.
428
429 Synopsis
430 --------
431
432 .. cpp:function:: int ioctl(fd, int request = CA_SEND_MSG, ca_msg_t *)
433
434 Arguments
435 ----------
436
437
438
439 .. flat-table::
440 :header-rows: 0
441 :stub-columns: 0
442
443
444 - .. row 1
445
446 - int fd
447
448 - File descriptor returned by a previous call to open().
449
450 - .. row 2
451
452 - int request
453
454 - Equals CA_SEND_MSG for this command.
455
456 - .. row 3
457
458 - ca_msg_t \*
459
460 - Undocumented.
461
462
463 Return Value
464 ------------
465
466 On success 0 is returned, on error -1 and the ``errno`` variable is set
467 appropriately. The generic error codes are described at the
468 :ref:`Generic Error Codes <gen-errors>` chapter.
469
470
471 .. _CA_SET_DESCR:
472
473 CA_SET_DESCR
474 ============
475
476 Description
477 -----------
478
479 This ioctl is undocumented. Documentation is welcome.
480
481 Synopsis
482 --------
483
484 .. cpp:function:: int ioctl(fd, int request = CA_SET_DESCR, ca_descr_t *)
485
486 Arguments
487 ----------
488
489
490
491 .. flat-table::
492 :header-rows: 0
493 :stub-columns: 0
494
495
496 - .. row 1
497
498 - int fd
499
500 - File descriptor returned by a previous call to open().
501
502 - .. row 2
503
504 - int request
505
506 - Equals CA_SET_DESCR for this command.
507
508 - .. row 3
509
510 - ca_descr_t \*
511
512 - Undocumented.
513
514
515 Return Value
516 ------------
517
518 On success 0 is returned, on error -1 and the ``errno`` variable is set
519 appropriately. The generic error codes are described at the
520 :ref:`Generic Error Codes <gen-errors>` chapter.
521
522
523 .. _CA_SET_PID:
524
525 CA_SET_PID
526 ==========
527
528 Description
529 -----------
530
531 This ioctl is undocumented. Documentation is welcome.
532
533 Synopsis
534 --------
535
536 .. cpp:function:: int ioctl(fd, int request = CA_SET_PID, ca_pid_t *)
537
538 Arguments
539 ----------
540
541
542
543 .. flat-table::
544 :header-rows: 0
545 :stub-columns: 0
546
547
548 - .. row 1
549
550 - int fd
551
552 - File descriptor returned by a previous call to open().
553
554 - .. row 2
555
556 - int request
557
558 - Equals CA_SET_PID for this command.
559
560 - .. row 3
561
562 - ca_pid_t \*
563
564 - Undocumented.
565
566
567 Return Value
568 ------------
569
570 On success 0 is returned, on error -1 and the ``errno`` variable is set
571 appropriately. The generic error codes are described at the
572 :ref:`Generic Error Codes <gen-errors>` chapter.
This page took 0.044313 seconds and 5 git commands to generate.