summaryrefslogtreecommitdiff
path: root/Documentation/DocBook/media/v4l/cec-ioc-adap-g-caps.xml
blob: 3523ef2259b1ff3f82792b45e70f26f80e6a071d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<refentry id="cec-ioc-adap-g-caps">
  <refmeta>
    <refentrytitle>ioctl CEC_ADAP_G_CAPS</refentrytitle>
    &manvol;
  </refmeta>

  <refnamediv>
    <refname>CEC_ADAP_G_CAPS</refname>
    <refpurpose>Query device capabilities</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <funcsynopsis>
      <funcprototype>
	<funcdef>int <function>ioctl</function></funcdef>
	<paramdef>int <parameter>fd</parameter></paramdef>
	<paramdef>int <parameter>request</parameter></paramdef>
	<paramdef>struct cec_caps *<parameter>argp</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Arguments</title>

    <variablelist>
      <varlistentry>
	<term><parameter>fd</parameter></term>
	<listitem>
	  <para>File descriptor returned by
	  <link linkend='cec-func-open'><function>open()</function></link>.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>request</parameter></term>
	<listitem>
	  <para>CEC_ADAP_G_CAPS</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>argp</parameter></term>
	<listitem>
	  <para></para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>
      Note: this documents the proposed CEC API. This API is not yet finalized and
      is currently only available as a staging kernel module.
    </para>

    <para>All cec devices must support the <constant>CEC_ADAP_G_CAPS</constant>
    ioctl. To query device information, applications call the ioctl with a
    pointer to a &cec-caps;. The driver fills the structure and returns
    the information to the application.
    The ioctl never fails.</para>

    <table pgwide="1" frame="none" id="cec-caps">
      <title>struct <structname>cec_caps</structname></title>
      <tgroup cols="3">
	&cs-str;
	<tbody valign="top">
	  <row>
	    <entry>char</entry>
	    <entry><structfield>driver[32]</structfield></entry>
	    <entry>The name of the cec adapter driver.</entry>
	  </row>
	  <row>
	    <entry>char</entry>
	    <entry><structfield>name[32]</structfield></entry>
	    <entry>The name of this CEC adapter. The combination <structfield>driver</structfield>
	    and <structfield>name</structfield> must be unique.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>capabilities</structfield></entry>
	    <entry>The capabilities of the CEC adapter, see <xref
		linkend="cec-capabilities" />.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>version</structfield></entry>
	    <entry>CEC Framework API version, formatted with the
	    <constant>KERNEL_VERSION()</constant> macro.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="cec-capabilities">
      <title>CEC Capabilities Flags</title>
      <tgroup cols="3">
	&cs-def;
	<tbody valign="top">
	  <row>
	    <entry><constant>CEC_CAP_PHYS_ADDR</constant></entry>
	    <entry>0x00000001</entry>
	    <entry>Userspace has to configure the physical address by
	    calling &CEC-ADAP-S-PHYS-ADDR;. If this capability isn't set,
	    then setting the physical address is handled by the kernel
	    whenever the EDID is set (for an HDMI receiver) or read (for
	    an HDMI transmitter).</entry>
	  </row>
	  <row>
	    <entry><constant>CEC_CAP_LOG_ADDRS</constant></entry>
	    <entry>0x00000002</entry>
	    <entry>Userspace has to configure the logical addresses by
	    calling &CEC-ADAP-S-LOG-ADDRS;. If this capability isn't set,
	    then the kernel will have configured this.</entry>
	  </row>
	  <row>
	    <entry><constant>CEC_CAP_TRANSMIT</constant></entry>
	    <entry>0x00000004</entry>
	    <entry>Userspace can transmit CEC messages by calling &CEC-TRANSMIT;. This
	    implies that userspace can be a follower as well, since being able to
	    transmit messages is a prerequisite of becoming a follower. If this
	    capability isn't set, then the kernel will handle all CEC transmits
	    and process all CEC messages it receives.
	    </entry>
	  </row>
	  <row>
	    <entry><constant>CEC_CAP_PASSTHROUGH</constant></entry>
	    <entry>0x00000008</entry>
	    <entry>Userspace can use the passthrough mode by
	    calling &CEC-S-MODE;.</entry>
	  </row>
	  <row>
	    <entry><constant>CEC_CAP_RC</constant></entry>
	    <entry>0x00000010</entry>
	    <entry>This adapter supports the remote control protocol.</entry>
	  </row>
	  <row>
	    <entry><constant>CEC_CAP_MONITOR_ALL</constant></entry>
	    <entry>0x00000020</entry>
	    <entry>The CEC hardware can monitor all messages, not just directed and
	    broadcast messages.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
  </refsect1>

  <refsect1>
    &return-value;
  </refsect1>
</refentry>