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-ctl: add support for CEC_MSG_FL_REPLY_VENDOR_ID
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Thu Jul 25 13:52:09 2024 +0200

Add support for the new CEC_MSG_FL_REPLY_VENDOR_ID flag and the
new CEC_CAP_REPLY_VENDOR_ID capability.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/cec-ctl/cec-ctl.cpp      | 9 +++++++--
 utils/libcecutil/cec-info.cpp  | 2 ++
 utils/libcecutil/cec-parse.cpp | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=12ab0a1da4c02cc9b438fdaf3d5d9323e569f61d
diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index f7ba7409dbb7..eec16377cb38 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -2609,6 +2609,7 @@ int main(int argc, char **argv)
                case OptVendorCommandWithID: {
                        static constexpr const char *arg_names[] = {
                                "vendor-id",
+                               "reply",
                                "cmd",
                                nullptr
                        };
@@ -2623,6 +2624,10 @@ int main(int argc, char **argv)
                                        vendor_id = strtol(value, nullptr, 0);
                                        break;
                                case 1:
+                                       msg.reply = strtol(value, &endptr, 0L);
+                                       msg.flags = CEC_MSG_FL_REPLY_VENDOR_ID;
+                                       break;
+                               case 2:
                                        while (size < sizeof(bytes)) {
                                                bytes[size++] = strtol(value, 
&endptr, 0L);
                                                if (endptr == value) {
@@ -3164,9 +3169,9 @@ int main(int argc, char **argv)
                to = msg.msg[0] & 0xf;
                printf("\nTransmit from %s to %s (%d to %d):\n",
                       cec_la2s(from), to == 0xf ? "all" : cec_la2s(to), from, 
to);
-               msg.flags = options[OptReplyToFollowers] ? 
CEC_MSG_FL_REPLY_TO_FOLLOWERS : 0;
+               msg.flags |= options[OptReplyToFollowers] ? 
CEC_MSG_FL_REPLY_TO_FOLLOWERS : 0;
                msg.flags |= options[OptRawMsg] ? CEC_MSG_FL_RAW : 0;
-               msg.timeout = msg.reply ? timeout : 0;
+               msg.timeout = (msg.flags & CEC_MSG_FL_REPLY_VENDOR_ID) || 
msg.reply ? timeout : 0;
                cec_log_msg(&msg);
                if (doioctl(&node, CEC_TRANSMIT, &msg))
                        continue;
diff --git a/utils/libcecutil/cec-info.cpp b/utils/libcecutil/cec-info.cpp
index dce7effd38a7..bc2a0ca67e57 100644
--- a/utils/libcecutil/cec-info.cpp
+++ b/utils/libcecutil/cec-info.cpp
@@ -64,6 +64,8 @@ static std::string caps2s(unsigned caps)
                s += "\t\tMonitor Pin\n";
        if (caps & CEC_CAP_CONNECTOR_INFO)
                s += "\t\tConnector Info\n";
+       if (caps & CEC_CAP_REPLY_VENDOR_ID)
+               s += "\t\tReply Vendor ID\n";
        return s;
 }
 
diff --git a/utils/libcecutil/cec-parse.cpp b/utils/libcecutil/cec-parse.cpp
index aa7031369791..f78a8f8a3e94 100644
--- a/utils/libcecutil/cec-parse.cpp
+++ b/utils/libcecutil/cec-parse.cpp
@@ -208,7 +208,7 @@ static unsigned parse_latency(const char *value)
 #define VENDOR_EXTRA \
        "  --vendor-command payload=<byte>[:<byte>]*\n" \
        "                                  Send VENDOR_COMMAND message (" 
xstr(CEC_MSG_VENDOR_COMMAND) ")\n" \
-       "  --vendor-command-with-id vendor-id=<val>,cmd=<byte>[:<byte>]*\n" \
+       "  --vendor-command-with-id 
vendor-id=<val>,[reply=<reply>,]cmd=<byte>[:<byte>]*\n" \
        "                                  Send VENDOR_COMMAND_WITH_ID message 
(" xstr(CEC_MSG_VENDOR_COMMAND_WITH_ID) ")\n" \
        "  --vendor-remote-button-down rc-code=<byte>[:<byte>]*\n" \
        "                                  Send VENDOR_REMOTE_BUTTON_DOWN 
message (" xstr(CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN) ")\n"

Reply via email to