]> asedeno.scripts.mit.edu Git - linux.git/blob - Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst
PM / QoS: Remove global notifiers
[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 .. note::
33
34    This documents the proposed CEC API. This API is not yet finalized
35    and is currently only available as a staging kernel module.
36
37 All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
38 device information, applications call the ioctl with a pointer to a
39 struct :c:type:`cec_caps`. The driver fills the structure and
40 returns the information to the application. The ioctl never fails.
41
42 .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
43
44 .. c:type:: cec_caps
45
46 .. flat-table:: struct cec_caps
47     :header-rows:  0
48     :stub-columns: 0
49     :widths:       1 1 16
50
51     * - char
52       - ``driver[32]``
53       - The name of the cec adapter driver.
54     * - char
55       - ``name[32]``
56       - The name of this CEC adapter. The combination ``driver`` and
57         ``name`` must be unique.
58     * - __u32
59       - ``capabilities``
60       - The capabilities of the CEC adapter, see
61         :ref:`cec-capabilities`.
62     * - __u32
63       - ``version``
64       - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
65         macro.
66
67
68 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}|
69
70 .. _cec-capabilities:
71
72 .. flat-table:: CEC Capabilities Flags
73     :header-rows:  0
74     :stub-columns: 0
75     :widths:       3 1 8
76
77     * .. _`CEC-CAP-PHYS-ADDR`:
78
79       - ``CEC_CAP_PHYS_ADDR``
80       - 0x00000001
81       - Userspace has to configure the physical address by calling
82         :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
83         this capability isn't set, then setting the physical address is
84         handled by the kernel whenever the EDID is set (for an HDMI
85         receiver) or read (for an HDMI transmitter).
86     * .. _`CEC-CAP-LOG-ADDRS`:
87
88       - ``CEC_CAP_LOG_ADDRS``
89       - 0x00000002
90       - Userspace has to configure the logical addresses by calling
91         :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
92         this capability isn't set, then the kernel will have configured
93         this.
94     * .. _`CEC-CAP-TRANSMIT`:
95
96       - ``CEC_CAP_TRANSMIT``
97       - 0x00000004
98       - Userspace can transmit CEC messages by calling
99         :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
100         userspace can be a follower as well, since being able to transmit
101         messages is a prerequisite of becoming a follower. If this
102         capability isn't set, then the kernel will handle all CEC
103         transmits and process all CEC messages it receives.
104     * .. _`CEC-CAP-PASSTHROUGH`:
105
106       - ``CEC_CAP_PASSTHROUGH``
107       - 0x00000008
108       - Userspace can use the passthrough mode by calling
109         :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
110     * .. _`CEC-CAP-RC`:
111
112       - ``CEC_CAP_RC``
113       - 0x00000010
114       - This adapter supports the remote control protocol.
115     * .. _`CEC-CAP-MONITOR-ALL`:
116
117       - ``CEC_CAP_MONITOR_ALL``
118       - 0x00000020
119       - The CEC hardware can monitor all messages, not just directed and
120         broadcast messages.
121
122
123
124 Return Value
125 ============
126
127 On success 0 is returned, on error -1 and the ``errno`` variable is set
128 appropriately. The generic error codes are described at the
129 :ref:`Generic Error Codes <gen-errors>` chapter.