aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-01-09 20:23:08 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2017-01-09 20:23:08 +0100
commit7715d870ab8da6436ac97eeb11f0780fbb99fade (patch)
tree62fc9781fb321b926028e8a8b2aeb76dccbf9a4b
parent951c4878a93f4722146f8bc6515a47fba6470bb3 (diff)
cec-ctl: the PA should be set before configuring the LAs
cec-ctl -p 0.0.0.0 --tv would set the LA to 14 if the physical address before calling this command was != 0.0.0.0. The problem was that the physical address was set after the adapter was configured to a TV, and the CEC adapter will select LA 14 instead of 0 if the physical address is != 0.0.0.0. So first set the physical address, then claim the logical address(es). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-ctl/cec-ctl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index d70841bd..c1375ee8 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1851,12 +1851,6 @@ int main(int argc, char **argv)
printf("\tAvailable Logical Addresses: %u\n",
caps.available_log_addrs);
- if ((node.caps & CEC_CAP_LOG_ADDRS) && options[OptClear]) {
- struct cec_log_addrs laddrs = { };
-
- doioctl(&node, CEC_ADAP_S_LOG_ADDRS, &laddrs);
- }
-
if ((node.caps & CEC_CAP_PHYS_ADDR) && options[OptPhysAddr])
doioctl(&node, CEC_ADAP_S_PHYS_ADDR, &phys_addr);
doioctl(&node, CEC_ADAP_G_PHYS_ADDR, &phys_addr);
@@ -1867,6 +1861,12 @@ int main(int argc, char **argv)
(node.caps & CEC_CAP_PHYS_ADDR))
printf("Perhaps you should use option --phys-addr?\n");
+ if ((node.caps & CEC_CAP_LOG_ADDRS) && options[OptClear]) {
+ struct cec_log_addrs laddrs = { };
+
+ doioctl(&node, CEC_ADAP_S_LOG_ADDRS, &laddrs);
+ }
+
if ((node.caps & CEC_CAP_LOG_ADDRS) && flags) {
struct cec_log_addrs laddrs = {};
__u8 all_dev_types = 0;

Privacy Policy