doc-rst: linux_tv: don't simplify VIDIOC_G_foo references
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / vidioc-g-input.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _VIDIOC_G_INPUT:
4
5 ************************************
6 ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
7 ************************************
8
9 *man VIDIOC_G_INPUT(2)*
10
11 VIDIOC_S_INPUT
12 Query or select the current video input
13
14
15 Synopsis
16 ========
17
18 .. c:function:: int ioctl( int fd, int request, int *argp )
19
20 Arguments
21 =========
22
23 ``fd``
24 File descriptor returned by :ref:`open() <func-open>`.
25
26 ``request``
27 VIDIOC_G_INPUT, VIDIOC_S_INPUT
28
29 ``argp``
30
31
32 Description
33 ===========
34
35 To query the current video input applications call the
36 :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
37 stores the number of the input, as in the struct
38 :ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
39 only when there are no video inputs, returning EINVAL.
40
41 To select a video input applications store the number of the desired
42 input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
43 to this integer. Side effects are possible. For example inputs may
44 support different video standards, so the driver may implicitly switch
45 the current standard. Because of these possible side effects
46 applications must select an input before querying or negotiating any
47 other parameters.
48
49 Information about video inputs is available using the
50 :ref:`VIDIOC_ENUMINPUT` ioctl.
51
52
53 Return Value
54 ============
55
56 On success 0 is returned, on error -1 and the ``errno`` variable is set
57 appropriately. The generic error codes are described at the
58 :ref:`Generic Error Codes <gen-errors>` chapter.
59
60 EINVAL
61 The number of the video input is out of bounds.
62
63
64 .. ------------------------------------------------------------------------------
65 .. This file was automatically converted from DocBook-XML with the dbxml
66 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
67 .. from the linux kernel, refer to:
68 ..
69 .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
70 .. ------------------------------------------------------------------------------
This page took 0.049391 seconds and 5 git commands to generate.