doc-rst: linux_tv: don't simplify VIDIOC_G_foo references
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / vidioc-g-input.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
af4a4d0d 3.. _VIDIOC_G_INPUT:
5377d91f
MH
4
5************************************
6ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
7************************************
8
9*man VIDIOC_G_INPUT(2)*
10
11VIDIOC_S_INPUT
12Query or select the current video input
13
14
15Synopsis
16========
17
18.. c:function:: int ioctl( int fd, int request, int *argp )
19
20Arguments
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
32Description
33===========
34
35To query the current video input applications call the
4e03cb76 36:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
5377d91f
MH
37stores the number of the input, as in the struct
38:ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
39only when there are no video inputs, returning EINVAL.
40
41To select a video input applications store the number of the desired
2212ff25 42input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
5377d91f
MH
43to this integer. Side effects are possible. For example inputs may
44support different video standards, so the driver may implicitly switch
45the current standard. Because of these possible side effects
46applications must select an input before querying or negotiating any
47other parameters.
48
49Information about video inputs is available using the
7347081e 50:ref:`VIDIOC_ENUMINPUT` ioctl.
5377d91f
MH
51
52
53Return Value
54============
55
56On success 0 is returned, on error -1 and the ``errno`` variable is set
57appropriately. The generic error codes are described at the
58:ref:`Generic Error Codes <gen-errors>` chapter.
59
60EINVAL
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.034801 seconds and 5 git commands to generate.