aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-follower/cec-processing.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-22 14:40:40 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-22 14:48:44 +0200
commit915f16a570fba9b1559dec575dd301d41d7b1508 (patch)
treee06527336596c890b931f897b9b5c55719c8b056 /utils/cec-follower/cec-processing.cpp
parenta5063d689ac85473ce8b236991ed2a7334e90d27 (diff)
cec-follower: add support for Status Request
The Give Deck Status and Give Tuner Device Status messages carry a Status Request field (On/Off/Once) that, when set to On, will cause status changes to be automatically reported. This was never implemented in the follower, so add this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/cec-follower/cec-processing.cpp')
-rw-r--r--utils/cec-follower/cec-processing.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index c6e2c770..bc714764 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -512,6 +512,19 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
case CEC_MSG_GIVE_DECK_STATUS:
if (node->has_deck_ctl) {
+ __u8 status_req;
+
+ cec_ops_give_deck_status(&msg, &status_req);
+ if (status_req < CEC_OP_STATUS_REQ_ON ||
+ status_req > CEC_OP_STATUS_REQ_ONCE) {
+ reply_feature_abort(node, &msg, CEC_OP_ABORT_INVALID_OP);
+ return;
+ }
+ if (status_req != CEC_OP_STATUS_REQ_ONCE)
+ node->state.deck_report_changes =
+ status_req == CEC_OP_STATUS_REQ_ON;
+ if (status_req == CEC_OP_STATUS_REQ_OFF)
+ return;
cec_msg_set_reply_to(&msg, &msg);
cec_msg_deck_status(&msg, CEC_OP_DECK_INFO_STOP);
transmit(node, &msg);

Privacy Policy