This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: cec-compliance: fix Vendor Command With ID vivid tests
Author:  Hans Verkuil <[email protected]>
Date:    Mon Sep 8 08:51:43 2025 +0200

The vivid driver handled <Vendor Command With ID> incorrectly
if an unknown Vendor ID was used. This is now fixed, but as a
result the adapter tests in cec-compliance also have to be fixed.

According to the spec, if the given Vendor ID is unknown, then,
if it is a broadcast message, the command must be ignored, and
if it is a directed message, then it should be Feature Aborted.

This patch adds a test for the case of a broadcast message, and
fixes the test for a directed message, checking for Feature Abort
instead of expecting it to be ignored.

Signed-off-by: Hans Verkuil <[email protected]>

 utils/cec-compliance/cec-test-adapter.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=192b5bd9a6838fd5e4a8134c8ade9e535e9989f7
diff --git a/utils/cec-compliance/cec-test-adapter.cpp 
b/utils/cec-compliance/cec-test-adapter.cpp
index 0743b9b3d1bc..18b2a065f951 100644
--- a/utils/cec-compliance/cec-test-adapter.cpp
+++ b/utils/cec-compliance/cec-test-adapter.cpp
@@ -420,8 +420,8 @@ static int testTransmit(struct node *node)
                                const __u8 *vendor_data;
                                __u8 vendor_cmd = 0x11;
 
-                               // Test that an invalid vendor ID is ignored
-                               cec_msg_init(&msg, la, i);
+                               // Test that a broadcast of an invalid vendor 
ID is ignored
+                               cec_msg_init(&msg, la, CEC_LOG_ADDR_BROADCAST);
                                cec_msg_vendor_command_with_id(&msg, 
node->vendor_id + 1, 1, &vendor_cmd);
                                msg.flags = CEC_MSG_FL_REPLY_VENDOR_ID;
                                msg.reply = vendor_cmd + 2;
@@ -429,6 +429,15 @@ static int testTransmit(struct node *node)
                                fail_on_test(!(msg.rx_status & 
CEC_RX_STATUS_TIMEOUT));
                                fail_on_test(!(msg.flags & 
CEC_MSG_FL_REPLY_VENDOR_ID));
 
+                               // Test that an invalid vendor ID is feature 
aborted
+                               cec_msg_init(&msg, la, i);
+                               cec_msg_vendor_command_with_id(&msg, 
node->vendor_id + 1, 1, &vendor_cmd);
+                               msg.flags = CEC_MSG_FL_REPLY_VENDOR_ID;
+                               msg.reply = vendor_cmd + 2;
+                               fail_on_test(doioctl(node, CEC_TRANSMIT, &msg));
+                               fail_on_test(!(msg.rx_status & 
CEC_RX_STATUS_FEATURE_ABORT));
+                               fail_on_test(!(msg.flags & 
CEC_MSG_FL_REPLY_VENDOR_ID));
+
                                // The vivid driver will reply with value 
vendor_cmd + 1, so
                                // waiting for different reply must time out
                                cec_msg_init(&msg, la, i);

Reply via email to