aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-ctl/cec-ctl.1.in
blob: 783f29239d871dc00bae525199ab78db8ee79eb0 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
.TH "CEC-CTL" "1" "August 2016" "v4l-utils @PACKAGE_VERSION@" "User Commands"
.SH NAME
cec-ctl - An application to control cec devices
.SH SYNOPSIS
.B cec-ctl
[\fI\-h\fR] [\fI\-d <dev>\fR] [many other options]
.SH DESCRIPTION
The cec-ctl tool is used to control cec devices. It is able to control almost
any aspect of such devices covering the full CEC API.

The easiest way to quickly test a CEC adapter of an HDMI output is:

	cec-ctl -d/dev/cecX --playback -S

And for an HDMI input:

	cec-ctl -d/dev/cecX --tv -S

Both commands configure the CEC adapter and show the CEC topology.

To put a display to standby use:

	cec-ctl -d/dev/cecX --to 0 --standby

To wake up the display:

	cec-ctl -d/dev/cecX --to 0 --image-view-on

Instead of '-d/dev/cecX' you can also write this as '-dX'.
And instead of '--to 0' you can also write this as '-t0'.

.SH OPTIONS
.TP
\fB\-d\fR, \fB\-\-device\fR \fI<dev>\fR
Use device <dev> as the CEC device. If <dev> is a number, then /dev/cec<dev> is used.
.TP
\fB\-D\fR, \fB\-\-driver\fR \fI<drv>\fR
Use a cec device that has driver name \fI<drv>\fR, as returned by the CEC_ADAP_G_CAPS ioctl.
This option can be combined with \fB\-a\fR to uniquely identify a CEC device without
having to rely on the device node number.
.TP
\fB\-a\fR, \fB\-\-adapter\fR \fI<adap-name>\fR
Use a cec device that has adapter name \fI<adap-name>\fR, as returned by the CEC_ADAP_G_CAPS ioctl.
This option can be combined with \fB\-D\fR to uniquely identify a CEC device without
having to rely on the device node number.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Turn on verbose reporting.
.TP
\fB\-w\fR, \fB\-\-wall\-clock\fR
Show timestamps as wall-clock time. This also turns on verbose reporting. 
.TP
\fB\-h\fR, \fB\-\-help\fR
Prints the help message.
.TP
\fB\-p\fR, \fB\-\-phys\-addr\fR \fI<addr>\fR
Use this physical address. The address can be a number (e.g. 0 or 0x11b1)
or formatted as a.b.c.d where each component is a hex value from 0-f
(e.g. 0.0.0.0 or 1.1.b.1).
.TP
\fB\-o\fR, \fB\-\-osd\-name\fR \fI<name>\fR
Use this OSD name. The maximum length is 14 characters.
.TP
\fB\-V\fR, \fB\-\-vendor\-id\fR \fI<id>\fR
Use this vendor ID. The vendor ID is a number from 0x0 to 0xffffff.
.TP
\fB\-l\fR, \fB\-\-logical\-address\fR
Show first configured logical address or nothing if the device is unconfigured.
Useful for scripts, e.g.: la=`cec-ctl -s -l`
.TP
\fB\-L\fR, \fB\-\-logical\-addresses\fR
Show all configured logical addresses or nothing if the device is unconfigured.
Useful for scripts, e.g.: las=`cec-ctl -s -L`
.TP
\fB\-C\fR, \fB\-\-clear\fR
Clear all logical addresses, leaving the CEC device unconfigured.
.TP
\fB\-n\fR, \fB\-\-no\-reply\fR
By default when sending a CEC message that expects a reply this utility will
wait for that reply. With this option it will just send it without waiting
for the reply. This option applies to the messages following this option.
It acts as a toggle, so after you specify it a second time then the following
messages will wait for a reply again. 
.TP
\fB\-N\fR, \fB\-\-non\-blocking\fR
Transmit messages in non-blocking mode.
.TP
\fB\-t\fR, \fB\-\-to\fR \fI<la>\fR
Send the message to the given logical address (0-15).
.TP
\fB\-f\fR, \fB\-\-from\fR \fI<la>\fR
Send message from the given logical address. It is only necessary to use this
option if multiple logical addresses are claimed. By default the first assigned
logical address will be used.
.TP
\fB\-r\fR, \fB\-\-show\-raw\fR
Show the raw CEC message in hex.
.TP
\fB\-s\fR, \fB\-\-skip\-info\fR
Skip the Driver Info output section.
.TP
\fB\-S\fR, \fB\-\-show\-topology\fR
Show the CEC topology, detecting which other CEC devices are on the CEC bus.
.TP
\fB\-P\fR, \fB\-\-poll\fR
Send a poll message.
.TP
\fB\-T\fR, \fB\-\-trace\fR
Trace all called ioctls. Useful for debugging.
.TP
\fB\-\-cec\-version\-1.4\fR
Use CEC Version 1.4 instead of 2.0 (the default).
.TP
\fB\-\-allow\-unreg\-fallback\fR
Allow fallback to Unregistered if all logical addresses are claimed.
By default the adapter will remain unconfigured.
.TP
\fB\-\-no\-rc\-passthrough\fR
Disable the RC passthrough. By default remote control CEC messages are
passed on as input keystrokes (the \fBCEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU\fR
flag is set when calling the \fBCEC_ADAP_S_LOG_ADDRS\fR ioctl), but this
can be blocked by using this option.
.TP
\fB\-\-reply\-to\-followers\fR
The reply will be sent to followers as well. By default the reply will only
go to the follower that initiated the CEC message. But if you have other
followers running as well, then by giving this option they will also receive
the reply.
.TP
\fB\-\-timeout\fR \fI<ms>\fR
Set the reply timeout in milliseconds (default is 1000 ms).
.TP
\fB\-\-list\-ui\-commands\fR
List all UI commands that can be used with option \fB\-\-control\-pressed\fR.
.TP
\fB\-\-tv\fR
Configure the CEC adapter as a TV.
.TP
\fB\-\-record\fR
Configure the CEC adapter as a recording and playback device.
.TP
\fB\-\-tuner\fR
Configure the CEC adapter as a tuner device.
.TP
\fB\-\-playback\fR
Configure the CEC adapter as a playback device.
.TP
\fB\-\-audio\fR
Configure the CEC adapter as an audio system device.
.TP
\fB\-\-processor\fR
Configure the CEC adapter as a processor device.
.TP
\fB\-\-switch\fR
Configure the CEC adapter as a pure CEC switch.
.TP
\fB\-\-cdc\-only\fR
Configure the CEC adapter as a CDC-only device.
.TP
\fB\-\-unregistered\fR
Configure the CEC adapter as an unregistered device.
\fB\-\-feat\-record\-tv\-screen\fR
Signal the Record TV Screen feature.
.TP
\fB\-\-feat\-set\-osd\-string\fR
Signal the Set OSD String feature.
.TP
\fB\-\-feat\-deck\-control\fR
Signal the Deck Control feature.
.TP
\fB\-\-feat\-set\-audio\-rate\fR
Signal the Set Audio Rate feature.
.TP
\fB\-\-feat\-sink\-has\-arc\-tx\fR
Signal the sink ARC Tx feature.
.TP
\fB\-\-feat\-source\-has\-arc\-rx\fR
Signal the source ARC Rx feature.
.TP
\fB\-\-rc\-tv\-profile\-1\fR
Signal RC TV Profile 1.
.TP
\fB\-\-rc\-tv\-profile\-2\fR
Signal RC TV Profile 2.
.TP
\fB\-\-rc\-tv\-profile\-3\fR
Signal RC TV Profile 3.
.TP
\fB\-\-rc\-tv\-profile\-4\fR
Signal RC TV Profile 4.
.TP
\fB\-\-rc\-src\-dev\-root\fR
Signal that the RC source has a Dev Root Menu.
.TP
\fB\-\-rc\-src\-dev\-setup\fR
Signal that the RC source has a Dev Setup Menu.
.TP
\fB\-\-rc\-src\-contents\fR
Signal that the RC source has a Contents Menu.
.TP
\fB\-\-rc\-src\-media\-top\fR
Signal that the RC source has a Media Top Menu.
.TP
\fB\-\-rc\-src\-media\-context\fR
Signal that the RC source has a Media Context Menu.
.TP
\fB\-m\fR, \fB\-\-monitor\fR
Start monitoring CEC traffic. This will monitor broadcast messages,
messages directed to this CEC adapter and messages transmitted by this
CEC adapter. Directed messages between other CEC devices are not
monitored. This option requires root.
.TP
\fB\-M\fR, \fB\-\-monitor\-all\fR
Start monitoring all CEC traffic. This will monitor all CEC messages,
including directed messages between other CEC devices. This option requires root.
Not all CEC devices support this monitoring mode. It will fallback to regular
monitoring mode if it is not supported.
.TP
\fB\-\-monitor\-pin\fR
Start monitoring and analyzing the low-level CEC pin transitions. This is only
possible if the device has the CEC_CAP_MONITOR_PIN capability. This option requires root.
When in pin monitoring mode all 0->1 and 1->0 CEC pin transitions are monitored and
analysed. This is effectively a cheap CEC bus analyzer.
.TP
\fB\-\-monitor\-time\fR \fI<secs>\fR
Monitor for the given number of seconds, then exit. The default (0) is to monitor
forever.
.TP
\fB\-\-ignore\fR \fI<la>\fR,\fI<opcode>\fR
Ignore messages from logical address <la> and opcode <opcode> when monitoring.
"all" can be used for <la> or <opcode> to match all logical addresses or opcodes.
To ignore poll messages use "poll" as <opcode>.
.TP
\fB\-\-store\-pin\fR \fI<to>\fR
Store the CEC pin events to the given file. This can be read and analyzed later
via the \fB\-\-analyze\-pin\fR option. Use \- to write to stdout instead of to a file.
.TP
\fB\-\-analyze\-pin\fR \fI<from>\fR
Read and analyze the CEC pin events from the given file. Use \- to read from stdin
instead of from a file.
.TP
\fB\-\-stress\-test\-power\-cycle\fR \fI<count>\fR
This option performs a stress test for a display: it powercycles the display \fI<count>\fR
times using the CEC Standby and Image View On commands. If \fI<count>\fR is 0, then never stop.
.TP
\fB\-\-help\-all\fR
Prints the help message for all options.
.TP
\fB\-\-help\-audio\-rate\-control\fR
Show help for the Audio Rate Control feature.
.TP
\fB\-\-help\-audio\-return\-channel\-control\fR
Show help for the Audio Return Channel Control feature.
.TP
\fB\-\-help\-capability\-discovery\-and\-control\fR
Show help for the Capability Discovery and Control feature.
.TP
\fB\-\-help\-deck\-control\fR
Show help for the Deck Control feature.
.TP
\fB\-\-help\-device\-menu\-control\fR
Show help for the Device Menu Control feature.
.TP
\fB\-\-help\-device\-osd\-transfer\fR
Show help for the Device OSD Transfer feature.
.TP
\fB\-\-help\-dynamic\-audio\-lipsync\fR
Show help for the Dynamic Audio Lipsync feature.
.TP
\fB\-\-help\-htng\fR
Show help for the Hospitality Profile Next Generation feature.
This is an optional CEC extension for Hotel displays and is not
generally available for regular displays. See http://www.htng.org
for more information.
.TP
\fB\-\-help\-osd\-display\fR
Show help for the OSD Display feature.
.TP
\fB\-\-help\-one\-touch\-play\fR
Show help for the One Touch Play feature.
.TP
\fB\-\-help\-one\-touch\-record\fR
Show help for the One Touch Record feature.
.TP
\fB\-\-help\-power\-status\fR
Show help for the Power Status feature.
.TP
\fB\-\-help\-remote\-control\-passthrough\fR
Show help for the Remote Control Passthrough feature.
.TP
\fB\-\-help\-routing\-control\fR
Show help for the Routing Control feature.
.TP
\fB\-\-help\-standby\fR
Show help for the Standby feature.
.TP
\fB\-\-help\-system\-audio\-control\fR
Show help for the System Audio Control feature.
.TP
\fB\-\-help\-system\-information\fR
Show help for the System Information feature.
.TP
\fB\-\-help\-timer\-programming\fR
Show help for the Timer Programming feature.
.TP
\fB\-\-help\-tuner\-control\fR
Show help for the Tuner Control feature.
.TP
\fB\-\-help\-vendor\-specific\-commands\fR
Show help for the Vendor Specific Commands feature.
.SH EXIT STATUS
On success, it returns 0. Otherwise, it will return the error code.
.SH BUGS
This manual page is a work in progress.

Bug reports or questions about this utility should be sent to the linux-media@vger.kernel.org
mailinglist.

Privacy Policy