]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst
Merge tag 'renesas-fixes4-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / Documentation / media / uapi / cec / cec-ioc-adap-g-caps.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _CEC_ADAP_G_CAPS:
4
5 *********************
6 ioctl CEC_ADAP_G_CAPS
7 *********************
8
9 Name
10 ====
11
12 CEC_ADAP_G_CAPS - Query device capabilities
13
14 Synopsis
15 ========
16
17 .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp )
18     :name: CEC_ADAP_G_CAPS
19
20 Arguments
21 =========
22
23 ``fd``
24     File descriptor returned by :ref:`open() <cec-func-open>`.
25
26 ``argp``
27
28
29 Description
30 ===========
31
32 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
33 device information, applications call the ioctl with a pointer to a
34 struct :c:type:`cec_caps`. The driver fills the structure and
35 returns the information to the application. The ioctl never fails.
36
37 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
38
39 .. c:type:: cec_caps
40
41 .. flat-table:: struct cec_caps
42     :header-rows:  0
43     :stub-columns: 0
44     :widths:       1 1 16
45
46     * - char
47       - ``driver[32]``
48       - The name of the cec adapter driver.
49     * - char
50       - ``name[32]``
51       - The name of this CEC adapter. The combination ``driver`` and
52         ``name`` must be unique.
53     * - __u32
54       - ``capabilities``
55       - The capabilities of the CEC adapter, see
56         :ref:`cec-capabilities`.
57     * - __u32
58       - ``version``
59       - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
60         macro.
61
62
63 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
64
65 .. _cec-capabilities:
66
67 .. flat-table:: CEC Capabilities Flags
68     :header-rows:  0
69     :stub-columns: 0
70     :widths:       3 1 8
71
72     * .. _`CEC-CAP-PHYS-ADDR`:
73
74       - ``CEC_CAP_PHYS_ADDR``
75       - 0x00000001
76       - Userspace has to configure the physical address by calling
77         :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
78         this capability isn't set, then setting the physical address is
79         handled by the kernel whenever the EDID is set (for an HDMI
80         receiver) or read (for an HDMI transmitter).
81     * .. _`CEC-CAP-LOG-ADDRS`:
82
83       - ``CEC_CAP_LOG_ADDRS``
84       - 0x00000002
85       - Userspace has to configure the logical addresses by calling
86         :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
87         this capability isn't set, then the kernel will have configured
88         this.
89     * .. _`CEC-CAP-TRANSMIT`:
90
91       - ``CEC_CAP_TRANSMIT``
92       - 0x00000004
93       - Userspace can transmit CEC messages by calling
94         :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
95         userspace can be a follower as well, since being able to transmit
96         messages is a prerequisite of becoming a follower. If this
97         capability isn't set, then the kernel will handle all CEC
98         transmits and process all CEC messages it receives.
99     * .. _`CEC-CAP-PASSTHROUGH`:
100
101       - ``CEC_CAP_PASSTHROUGH``
102       - 0x00000008
103       - Userspace can use the passthrough mode by calling
104         :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
105     * .. _`CEC-CAP-RC`:
106
107       - ``CEC_CAP_RC``
108       - 0x00000010
109       - This adapter supports the remote control protocol.
110     * .. _`CEC-CAP-MONITOR-ALL`:
111
112       - ``CEC_CAP_MONITOR_ALL``
113       - 0x00000020
114       - The CEC hardware can monitor all messages, not just directed and
115         broadcast messages.
116     * .. _`CEC-CAP-NEEDS-HPD`:
117
118       - ``CEC_CAP_NEEDS_HPD``
119       - 0x00000040
120       - The CEC hardware is only active if the HDMI Hotplug Detect pin is
121         high. This makes it impossible to use CEC to wake up displays that
122         set the HPD pin low when in standby mode, but keep the CEC bus
123         alive.
124
125
126
127 Return Value
128 ============
129
130 On success 0 is returned, on error -1 and the ``errno`` variable is set
131 appropriately. The generic error codes are described at the
132 :ref:`Generic Error Codes <gen-errors>` chapter.