1 <refentry id="cec-ioc-adap-g-caps">
3 <refentrytitle>ioctl CEC_ADAP_G_CAPS</refentrytitle>
8 <refname>CEC_ADAP_G_CAPS</refname>
9 <refpurpose>Query device capabilities</refpurpose>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct cec_caps *<parameter>argp</parameter></paramdef>
24 <title>Arguments</title>
28 <term><parameter>fd</parameter></term>
30 <para>File descriptor returned by
31 <link linkend='cec-func-open'><function>open()</function></link>.</para>
35 <term><parameter>request</parameter></term>
37 <para>CEC_ADAP_G_CAPS</para>
41 <term><parameter>argp</parameter></term>
50 <title>Description</title>
53 Note: this documents the proposed CEC API. This API is not yet finalized and
54 is currently only available as a staging kernel module.
57 <para>All cec devices must support the <constant>CEC_ADAP_G_CAPS</constant>
58 ioctl. To query device information, applications call the ioctl with a
59 pointer to a &cec-caps;. The driver fills the structure and returns
60 the information to the application.
61 The ioctl never fails.</para>
63 <table pgwide="1" frame="none" id="cec-caps">
64 <title>struct <structname>cec_caps</structname></title>
70 <entry><structfield>driver[32]</structfield></entry>
71 <entry>The name of the cec adapter driver.</entry>
75 <entry><structfield>name[32]</structfield></entry>
76 <entry>The name of this CEC adapter. The combination <structfield>driver</structfield>
77 and <structfield>name</structfield> must be unique.</entry>
81 <entry><structfield>capabilities</structfield></entry>
82 <entry>The capabilities of the CEC adapter, see <xref
83 linkend="cec-capabilities" />.</entry>
87 <entry><structfield>version</structfield></entry>
88 <entry>CEC Framework API version, formatted with the
89 <constant>KERNEL_VERSION()</constant> macro.</entry>
95 <table pgwide="1" frame="none" id="cec-capabilities">
96 <title>CEC Capabilities Flags</title>
101 <entry><constant>CEC_CAP_PHYS_ADDR</constant></entry>
102 <entry>0x00000001</entry>
103 <entry>Userspace has to configure the physical address by
104 calling &CEC-ADAP-S-PHYS-ADDR;. If this capability isn't set,
105 then setting the physical address is handled by the kernel
106 whenever the EDID is set (for an HDMI receiver) or read (for
107 an HDMI transmitter).</entry>
110 <entry><constant>CEC_CAP_LOG_ADDRS</constant></entry>
111 <entry>0x00000002</entry>
112 <entry>Userspace has to configure the logical addresses by
113 calling &CEC-ADAP-S-LOG-ADDRS;. If this capability isn't set,
114 then the kernel will have configured this.</entry>
117 <entry><constant>CEC_CAP_TRANSMIT</constant></entry>
118 <entry>0x00000004</entry>
119 <entry>Userspace can transmit CEC messages by calling &CEC-TRANSMIT;. This
120 implies that userspace can be a follower as well, since being able to
121 transmit messages is a prerequisite of becoming a follower. If this
122 capability isn't set, then the kernel will handle all CEC transmits
123 and process all CEC messages it receives.
127 <entry><constant>CEC_CAP_PASSTHROUGH</constant></entry>
128 <entry>0x00000008</entry>
129 <entry>Userspace can use the passthrough mode by
130 calling &CEC-S-MODE;.</entry>
133 <entry><constant>CEC_CAP_RC</constant></entry>
134 <entry>0x00000010</entry>
135 <entry>This adapter supports the remote control protocol.</entry>
138 <entry><constant>CEC_CAP_MONITOR_ALL</constant></entry>
139 <entry>0x00000020</entry>
140 <entry>The CEC hardware can monitor all messages, not just directed and
141 broadcast messages.</entry>