aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-03-26 11:51:17 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-03-26 11:51:17 +0100
commit81e45d957c4db39397f893100b3d2729ef39b052 (patch)
tree3234b97be71ac7951c4137f3ae2730fa7e71153b
parente0d08d6958cfc8d2fbe3fcd482861de93dba8030 (diff)
cec-follower: check both CEC_CAP_PHYS_ADDR and _CONNECTOR_INFO
cec-follower bails out if the physical address is invalid and CEC_CAP_PHYS_ADDR is set. But it should also check that CEC_CAP_CONNECTOR_INFO is not set. If both capabilities are set than the device receives the physical address from the corresponding connector. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-follower/cec-follower.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp
index 95813586..c9cd18d1 100644
--- a/utils/cec-follower/cec-follower.cpp
+++ b/utils/cec-follower/cec-follower.cpp
@@ -519,7 +519,9 @@ int main(int argc, char **argv)
}
printf("\n");
- bool missing_pa = node.phys_addr == CEC_PHYS_ADDR_INVALID && (node.caps & CEC_CAP_PHYS_ADDR);
+ bool missing_pa = node.phys_addr == CEC_PHYS_ADDR_INVALID &&
+ (node.caps & CEC_CAP_PHYS_ADDR) &&
+ !(node.caps & CEC_CAP_CONNECTOR_INFO);
bool missing_la = laddrs.num_log_addrs == 0 && (node.caps & CEC_CAP_LOG_ADDRS);
if (missing_la || missing_pa)

Privacy Policy