1CEC-CTL(1)                       User Commands                      CEC-CTL(1)
2
3
4

NAME

6       cec-ctl - An application to control cec devices
7

SYNOPSIS

9       cec-ctl [-h] [-d <dev>] [many other options]
10

DESCRIPTION

12       The  cec-ctl tool is used to control cec devices. It is able to control
13       almost any aspect of such devices covering the full CEC API.
14
15       The easiest way to quickly test a CEC adapter of an HDMI output is:
16
17            cec-ctl -d/dev/cecX --playback -S
18
19       And for an HDMI input:
20
21            cec-ctl -d/dev/cecX --tv -S
22
23       Both commands configure the CEC adapter and show the CEC topology.
24
25       To put a display to standby use:
26
27            cec-ctl -d/dev/cecX --to 0 --standby
28
29       To wake up the display:
30
31            cec-ctl -d/dev/cecX --to 0 --image-view-on
32
33       To switch the TV to our HDMI output (replace the physical address  with
34       what cec-ctl -d/dev/cecX reported):
35
36            cec-ctl -d/dev/cecX --to 0 --active-source phys-addr=1.0.0.0
37
38       Instead of '-d/dev/cecX' you can also write this as '-dX'.  And instead
39       of '--to 0' you can also write this as '-t0'.
40
41

OPTIONS

43       -d, --device <dev>
44              Use device <dev> as the CEC device. If <dev> is a  number,  then
45              /dev/cec<dev> is used.
46
47       -D, --driver <drv>
48              Use  a cec device that has driver name <drv>, as returned by the
49              CEC_ADAP_G_CAPS ioctl.  This option can be combined with  -a  to
50              uniquely  identify  a  CEC  device without having to rely on the
51              device node number.
52
53       -a, --adapter <adap-name>
54              Use a cec device that has adapter name <adap-name>, as  returned
55              by  the CEC_ADAP_G_CAPS ioctl.  This option can be combined with
56              -D to uniquely identify a CEC device without having to  rely  on
57              the device node number.
58
59       -v, --verbose
60              Turn on verbose reporting.
61
62       -w, --wall-clock
63              Show  timestamps  as wall-clock time. This also turns on verbose
64              reporting.
65
66       -h, --help
67              Prints the help message.
68
69       -p, --phys-addr <addr>
70              Use this physical address. The address can be a number  (e.g.  0
71              or 0x11b1) or formatted as a.b.c.d where each component is a hex
72              value from 0-f (e.g. 0.0.0.0 or 1.1.b.1).
73
74       -o, --osd-name <name>
75              Use this OSD name. The maximum length is 14 characters.
76
77       -V, --vendor-id <id>
78              Use this vendor ID. The vendor  ID  is  a  number  from  0x0  to
79              0xffffff.
80
81       -l, --logical-address
82              Show  first  configured logical address or nothing if the device
83              is unconfigured.  Useful for scripts, e.g.: la=`cec-ctl -s -l`
84
85       -L, --logical-addresses
86              Show all configured logical addresses or nothing if  the  device
87              is unconfigured.  Useful for scripts, e.g.: las=`cec-ctl -s -L`
88
89       -C, --clear
90              Clear  all  logical  addresses, leaving the CEC device unconfig‐
91              ured.
92
93       -n, --no-reply
94              By default when sending a CEC message that expects a reply  this
95              utility  will wait for that reply. With this option it will just
96              send it without waiting for the reply. This  option  applies  to
97              the  messages  following  this  option.  It acts as a toggle, so
98              after you specify it a second time then the  following  messages
99              will wait for a reply again.
100
101       -N, --non-blocking
102              Transmit messages in non-blocking mode.
103
104       -t, --to <la>
105              Send the message to the given logical address (0-15).
106
107       -f, --from <la>
108              Send  message  from the given logical address. It is only neces‐
109              sary to use  this  option  if  multiple  logical  addresses  are
110              claimed.  By  default the first assigned logical address will be
111              used.
112
113       -r, --show-raw
114              Show the raw CEC message in hex.
115
116       -s, --skip-info
117              Skip the Driver Info output section.
118
119       -S, --show-topology
120              Show the CEC topology, detecting which other CEC devices are  on
121              the CEC bus.
122
123       -P, --poll
124              Send a poll message.
125
126       -T, --trace
127              Trace all called ioctls. Useful for debugging.
128
129       --cec-version-1.4
130              Use CEC Version 1.4 instead of 2.0 (the default).
131
132       --allow-unreg-fallback
133              Allow  fallback  to  Unregistered  if  all logical addresses are
134              claimed.  By default the adapter will remain unconfigured.
135
136       --no-rc-passthrough
137              Disable the RC passthrough. By default remote control  CEC  mes‐
138              sages    are    passed    on    as    input    keystrokes   (the
139              CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU flag is set when calling  the
140              CEC_ADAP_S_LOG_ADDRS  ioctl),  but  this can be blocked by using
141              this option.
142
143       --reply-to-followers
144              The reply will be sent to followers  as  well.  By  default  the
145              reply  will  only go to the follower that initiated the CEC mes‐
146              sage. But if you have other followers running as well,  then  by
147              giving this option they will also receive the reply.
148
149       --timeout <ms>
150              Set the reply timeout in milliseconds (default is 1000 ms).
151
152       --list-ui-commands
153              List  all  UI  commands  that  can  be  used  with option --con‐
154              trol-pressed.
155
156       --tv   Configure the CEC adapter as a TV.
157
158       --record
159              Configure the CEC adapter as a recording and playback device.
160
161       --tuner
162              Configure the CEC adapter as a tuner device.
163
164       --playback
165              Configure the CEC adapter as a playback device.
166
167       --audio
168              Configure the CEC adapter as an audio system device.
169
170       --processor
171              Configure the CEC adapter as a processor device.
172
173       --switch
174              Configure the CEC adapter as a pure CEC switch.
175
176       --cdc-only
177              Configure the CEC adapter as a CDC-only device.
178
179       --unregistered
180              Configure  the  CEC   adapter   as   an   unregistered   device.
181              --feat-record-tv-screen Signal the Record TV Screen feature.
182
183       --feat-set-osd-string
184              Signal the Set OSD String feature.
185
186       --feat-deck-control
187              Signal the Deck Control feature.
188
189       --feat-set-audio-rate
190              Signal the Set Audio Rate feature.
191
192       --feat-sink-has-arc-tx
193              Signal the sink ARC Tx feature.
194
195       --feat-source-has-arc-rx
196              Signal the source ARC Rx feature.
197
198       --rc-tv-profile-1
199              Signal RC TV Profile 1.
200
201       --rc-tv-profile-2
202              Signal RC TV Profile 2.
203
204       --rc-tv-profile-3
205              Signal RC TV Profile 3.
206
207       --rc-tv-profile-4
208              Signal RC TV Profile 4.
209
210       --rc-src-dev-root
211              Signal that the RC source has a Dev Root Menu.
212
213       --rc-src-dev-setup
214              Signal that the RC source has a Dev Setup Menu.
215
216       --rc-src-contents
217              Signal that the RC source has a Contents Menu.
218
219       --rc-src-media-top
220              Signal that the RC source has a Media Top Menu.
221
222       --rc-src-media-context
223              Signal that the RC source has a Media Context Menu.
224
225       -m, --monitor
226              Start  monitoring  CEC traffic. This will monitor broadcast mes‐
227              sages, messages directed to this CEC adapter and messages trans‐
228              mitted  by this CEC adapter. Directed messages between other CEC
229              devices are not monitored. This option requires root.
230
231       -M, --monitor-all
232              Start monitoring all CEC traffic. This will monitor all CEC mes‐
233              sages,  including  directed  messages between other CEC devices.
234              This option requires root.  Not all  CEC  devices  support  this
235              monitoring  mode. It will fallback to regular monitoring mode if
236              it is not supported.
237
238       --monitor-pin
239              Start monitoring and analyzing the  low-level  CEC  pin  transi‐
240              tions. This is only possible if the device has the CEC_CAP_MONI‐
241              TOR_PIN capability. This option requires root.  When in pin mon‐
242              itoring mode all 0->1 and 1->0 CEC pin transitions are monitored
243              and analysed. This is effectively a cheap CEC bus analyzer.
244
245       --monitor-time <secs>
246              Monitor for the given number of seconds, then exit. The  default
247              (0) is to monitor forever.
248
249       --ignore <la>,<opcode>
250              Ignore  messages  from  logical address <la> and opcode <opcode>
251              when monitoring.  "all" can be used  for  <la>  or  <opcode>  to
252              match all logical addresses or opcodes.  To ignore poll messages
253              use "poll" as <opcode>.
254
255       --store-pin <to>
256              Store the CEC pin events to the given file. This can be read and
257              analyzed  later  via the --analyze-pin option. Use - to write to
258              stdout instead of to a file.
259
260       --analyze-pin <from>
261              Read and analyze the CEC pin events from the given file.  Use  -
262              to read from stdin instead of from a file.
263
264       --test-power-cycle
265              This option tests the power cycle behavior of the display.
266
267       --stress-test-power-cycle cnt=<count> max-sleep=<secs>
268              This  option  performs  a  stress  test  for a display: it power
269              cycles the display <count> times using the CEC Standby and Image
270              View  On  commands. If <count> is 0, then never stop.  If <secs>
271              is non-zero (0 is the default), then sleep for a  random  number
272              of  seconds  between  0  and <secs> before each Standby or Image
273              View On message.
274
275       --help-all
276              Prints the help message for all options.
277
278       --help-audio-rate-control
279              Show help for the Audio Rate Control feature.
280
281       --help-audio-return-channel-control
282              Show help for the Audio Return Channel Control feature.
283
284       --help-capability-discovery-and-control
285              Show help for the Capability Discovery and Control feature.
286
287       --help-deck-control
288              Show help for the Deck Control feature.
289
290       --help-device-menu-control
291              Show help for the Device Menu Control feature.
292
293       --help-device-osd-transfer
294              Show help for the Device OSD Transfer feature.
295
296       --help-dynamic-audio-lipsync
297              Show help for the Dynamic Audio Lipsync feature.
298
299       --help-htng
300              Show help for the Hospitality Profile Next  Generation  feature.
301              This  is an optional CEC extension for Hotel displays and is not
302              generally    available     for     regular     displays.     See
303              http://www.htng.org for more information.
304
305       --help-osd-display
306              Show help for the OSD Display feature.
307
308       --help-one-touch-play
309              Show help for the One Touch Play feature.
310
311       --help-one-touch-record
312              Show help for the One Touch Record feature.
313
314       --help-power-status
315              Show help for the Power Status feature.
316
317       --help-remote-control-passthrough
318              Show help for the Remote Control Passthrough feature.
319
320       --help-routing-control
321              Show help for the Routing Control feature.
322
323       --help-standby
324              Show help for the Standby feature.
325
326       --help-system-audio-control
327              Show help for the System Audio Control feature.
328
329       --help-system-information
330              Show help for the System Information feature.
331
332       --help-timer-programming
333              Show help for the Timer Programming feature.
334
335       --help-tuner-control
336              Show help for the Tuner Control feature.
337
338       --help-vendor-specific-commands
339              Show help for the Vendor Specific Commands feature.
340

EXIT STATUS

342       On success, it returns 0. Otherwise, it will return the error code.
343

BUGS

345       This manual page is a work in progress.
346
347       Bug  reports  or  questions  about  this  utility should be sent to the
348       linux-media@vger.kernel.org mailinglist.
349
350
351
352v4l-utils 1.18.0                  August 2016                       CEC-CTL(1)
Impressum