aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-compliance/cec-test-adapter.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-02-16 12:01:07 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2017-02-22 12:22:53 -0800
commit27b8492c4b9e33f2080a69364ebe9a1a4e92601d (patch)
treeb8e7609f8859eea0263eb740685caf25016496da /utils/cec-compliance/cec-test-adapter.cpp
parentbffb0f1448db4e3c20bc82b2118174cea10d87c4 (diff)
cec: fix wrong initiator of poll messages
The initiator of a poll message should be the current logical address, not 0xf. Note: due to a bug in the CEC framework in kernels 4.8 and 4.9 this fails for those kernels. Starting with kernel 4.10 (when the CEC framework was moved out of staging) this has been fixed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/cec-compliance/cec-test-adapter.cpp')
-rw-r--r--utils/cec-compliance/cec-test-adapter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/cec-compliance/cec-test-adapter.cpp b/utils/cec-compliance/cec-test-adapter.cpp
index 8d0408cd..7e2bd48c 100644
--- a/utils/cec-compliance/cec-test-adapter.cpp
+++ b/utils/cec-compliance/cec-test-adapter.cpp
@@ -239,28 +239,28 @@ int testTransmit(struct node *node)
bool tested_invalid_la = false;
if (!(node->caps & CEC_CAP_TRANSMIT)) {
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, la, 0);
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != ENOTTY);
return NOTSUPPORTED;
}
/* Check invalid messages */
- cec_msg_init(&msg, 0xf, 0xf);
+ cec_msg_init(&msg, la, 0xf);
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != EINVAL);
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, la, 0);
msg.timeout = 1000;
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != EINVAL);
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, la, 0);
msg.len = 0;
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != EINVAL);
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, la, 0);
msg.len = CEC_MAX_MSG_SIZE + 1;
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != EINVAL);
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, la, 0);
msg.reply = CEC_MSG_CEC_VERSION;
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg) != EINVAL);
@@ -474,7 +474,7 @@ int testNonBlocking(struct node *node)
fail_on_test(doioctl(node, CEC_RECEIVE, &msg) != EAGAIN);
- cec_msg_init(&msg, 0xf, la);
+ cec_msg_init(&msg, la, la);
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg));
fail_on_test(msg.tx_status != (CEC_TX_STATUS_NACK | CEC_TX_STATUS_MAX_RETRIES));
@@ -686,7 +686,7 @@ int testModes(struct node *node, struct node *node2)
}
}
- cec_msg_init(&msg, 0xf, 0);
+ cec_msg_init(&msg, me, 0);
fail_on_test(doioctl(node, CEC_TRANSMIT, &msg));
fail_on_test(doioctl(node2, CEC_TRANSMIT, &msg));

Privacy Policy