media: cec: core: add new CEC_MSG_FL_REPLY_VENDOR_ID flag

If this flag is set, then the reply is expected to consist of
the CEC_MSG_VENDOR_COMMAND_WITH_ID opcode followed by the Vendor ID (as
used in bytes 1-4 of the message), followed by the struct cec_msg reply
field.

Note that this assumes that the byte after the Vendor ID is a
vendor-specific opcode.

This flag makes it easier to wait for replies to vendor commands,
using the same CEC framework support for waiting for regular replies.

Support for this flag is indicated by setting the new
CEC_CAP_REPLY_VENDOR_ID capability.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Hans Verkuil
2024-07-04 11:01:51 +02:00
committed by Mauro Carvalho Chehab
parent 2c25dcc236
commit 613f21505b
6 changed files with 64 additions and 16 deletions
@@ -137,6 +137,12 @@ returns the information to the application. The ioctl never fails.
- 0x00000100
- If this capability is set, then :ref:`CEC_ADAP_G_CONNECTOR_INFO` can
be used.
* .. _`CEC-CAP-REPLY-VENDOR-ID`:
- ``CEC_CAP_REPLY_VENDOR_ID``
- 0x00000200
- If this capability is set, then
:ref:`CEC_MSG_FL_REPLY_VENDOR_ID <cec-msg-flags>` can be used.
Return Value
============
@@ -232,6 +232,21 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
capability. If that is not set, then the ``EPERM`` error code is
returned.
* .. _`CEC-MSG-FL-REPLY-VENDOR-ID`:
- ``CEC_MSG_FL_REPLY_VENDOR_ID``
- 4
- This flag is only available if the ``CEC_CAP_REPLY_VENDOR_ID`` capability
is set. If this flag is set, then the reply is expected to consist of
the ``CEC_MSG_VENDOR_COMMAND_WITH_ID`` opcode followed by the Vendor ID
(in bytes 1-4 of the message), followed by the ``struct cec_msg``
``reply`` field.
Note that this assumes that the byte after the Vendor ID is a
vendor-specific opcode.
This flag makes it easier to wait for replies to vendor commands.
.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{10.8cm}|
.. _cec-tx-status: