aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJiunn Chang <c0d1n61at3@gmail.com>2019-09-19 12:47:00 -0500
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-09-20 10:39:04 +0200
commita42e008316600b79e6833420612afcb8fc4a2171 (patch)
tree6def234a4a2ca204c2f568b202c634193b346b1d /utils
parenta32b00d715f48c6aa8c889a1aabd3fcdcee22b0f (diff)
cec-follower: fix cec-tuner.cpp
Remove static from reply_feature_abort() in cec-processing.cpp so it can be used in cec-tuner.cpp. This is to maintain testing logic for PRESUMED_OK which replies on the feature abort message. Also needed is a boolean for broadcast messages that should not be aborted. Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils')
-rw-r--r--utils/cec-follower/cec-follower.h2
-rw-r--r--utils/cec-follower/cec-processing.cpp6
-rw-r--r--utils/cec-follower/cec-tuner.cpp7
3 files changed, 12 insertions, 3 deletions
diff --git a/utils/cec-follower/cec-follower.h b/utils/cec-follower/cec-follower.h
index 9f5f1be4..954e001f 100644
--- a/utils/cec-follower/cec-follower.h
+++ b/utils/cec-follower/cec-follower.h
@@ -223,6 +223,8 @@ void sad_encode(const struct short_audio_desc *sad, __u32 *descriptor);
void process_tuner_record_timer_msgs(struct node *node, struct cec_msg &msg, unsigned me);
// CEC processing
+void reply_feature_abort(struct node *node, struct cec_msg *msg,
+ __u8 reason = CEC_OP_ABORT_UNRECOGNIZED_OP);
void testProcessing(struct node *node, bool wallclock);
// cec-log.c
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index 15cedddf..3db88f1a 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -211,7 +211,7 @@ static void log_event(struct cec_event &ev, bool wallclock)
printf("\tTimestamp: %s\n", ts2s(ev.ts, wallclock).c_str());
}
-static void reply_feature_abort(struct node *node, struct cec_msg *msg, __u8 reason = CEC_OP_ABORT_UNRECOGNIZED_OP)
+void reply_feature_abort(struct node *node, struct cec_msg *msg, __u8 reason)
{
unsigned la = cec_msg_initiator(msg);
__u8 opcode = cec_msg_opcode(msg);
@@ -608,7 +608,7 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
case CEC_MSG_DECK_STATUS:
return;
- /* Tuner Centric Messages */
+ /* Tuner/Record/Timer Messages */
case CEC_MSG_GIVE_TUNER_DEVICE_STATUS:
case CEC_MSG_TUNER_DEVICE_STATUS:
@@ -630,7 +630,7 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
case CEC_MSG_TIMER_CLEARED_STATUS:
case CEC_MSG_TIMER_STATUS:
process_tuner_record_timer_msgs(node, msg, me);
- break;
+ return;
/* Dynamic Auto Lipsync */
diff --git a/utils/cec-follower/cec-tuner.cpp b/utils/cec-follower/cec-tuner.cpp
index 5e794d71..a1e349bd 100644
--- a/utils/cec-follower/cec-tuner.cpp
+++ b/utils/cec-follower/cec-tuner.cpp
@@ -9,6 +9,8 @@
void process_tuner_record_timer_msgs(struct node *node, struct cec_msg &msg, unsigned me)
{
+ bool is_bcast = cec_msg_is_broadcast(&msg);
+
switch (msg.msg[1]) {
@@ -136,4 +138,9 @@ void process_tuner_record_timer_msgs(struct node *node, struct cec_msg &msg, uns
default:
break;
}
+
+ if (is_bcast)
+ return;
+
+ reply_feature_abort(node, &msg);
}

Privacy Policy