aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Fjeldtvedt <jaffe1@gmail.com>2016-08-09 15:06:37 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2016-08-10 09:06:35 +0200
commit3d8a5930a029b5b57ec4c1ccda7e8a6bd11e379f (patch)
treea914114ba9091f187c4db376a1e2d6ac69e1d666
parent8bfcbe5014f5c9938c54592295fc2cb7f4bdb404 (diff)
add comments to new tests
The new tests for the remaining features are basic and should be expanded on later. This adds some comments about that and some TODO suggestions for the most obvious improvements. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-compliance/cec-test-audio.cpp4
-rw-r--r--utils/cec-compliance/cec-test.cpp34
-rw-r--r--utils/cec-follower/cec-processing.cpp39
3 files changed, 71 insertions, 6 deletions
diff --git a/utils/cec-compliance/cec-test-audio.cpp b/utils/cec-compliance/cec-test-audio.cpp
index 27d3d7f4..df998c61 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -721,6 +721,10 @@ const unsigned sac_subtests_size = ARRAY_SIZE(sac_subtests);
/* Audio Rate Control */
+/*
+ TODO: These are very rudimentary tests which should be expanded.
+ */
+
static int audio_rate_ctl_set_audio_rate(struct node *node, unsigned me, unsigned la, bool interactive)
{
struct cec_msg msg = {};
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index 34c0d63b..2ff6b6bd 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -528,6 +528,10 @@ static struct remote_subtest rc_passthrough_subtests[] = {
/* Device Menu Control */
+/*
+ TODO: These are very rudimentary tests which should be expanded.
+ */
+
static int dev_menu_ctl_request(struct node *node, unsigned me, unsigned la, bool interactive)
{
struct cec_msg msg = {};
@@ -567,6 +571,10 @@ static struct remote_subtest dev_menu_ctl_subtests[] = {
/* Deck Control */
+/*
+ TODO: These are very rudimentary tests which should be expanded.
+ */
+
static int deck_ctl_give_status(struct node *node, unsigned me, unsigned la, bool interactive)
{
struct cec_msg msg = {};
@@ -578,7 +586,7 @@ static int deck_ctl_give_status(struct node *node, unsigned me, unsigned la, boo
fail_on_test_v2(node->remote[la].cec_version, node->remote[la].has_deck_ctl &&
cec_msg_status_is_abort(&msg));
fail_on_test_v2(node->remote[la].cec_version, !node->remote[la].has_deck_ctl);
- if (cec_msg_status_is_abort(&msg))
+ if (unrecognized_op(&msg))
return NOTSUPPORTED;
return 0;
@@ -649,6 +657,10 @@ static struct remote_subtest deck_ctl_subtests[] = {
/* Tuner Control */
+/*
+ TODO: These are very rudimentary tests which should be expanded.
+ */
+
static int tuner_ctl_give_status(struct node *node, unsigned me, unsigned la, bool interactive)
{
struct cec_msg msg = {};
@@ -795,8 +807,22 @@ static struct remote_subtest tuner_ctl_subtests[] = {
/* One Touch Record */
+/*
+ TODO: These are very rudimentary tests which should be expanded.
+
+ - The HDMI CEC 1.4b spec details that Standby shall not be acted upon while the
+ device is recording, but it should remember that it received Standby.
+ */
+
static int one_touch_rec_tv_screen(struct node *node, unsigned me, unsigned la, bool interactive)
{
+ /*
+ TODO:
+ - Page 36 in HDMI CEC 1.4b spec lists additional behaviors that should be
+ checked for.
+ - The TV should ignore this message when received from other LA than Recording or
+ Reserved.
+ */
struct cec_msg msg = {};
cec_msg_init(&msg, me, la);
@@ -814,6 +840,10 @@ static int one_touch_rec_tv_screen(struct node *node, unsigned me, unsigned la,
static int one_touch_rec_on(struct node *node, unsigned me, unsigned la, bool interactive)
{
+ /*
+ TODO: Page 36 in HDMI CEC 1.4b spec lists additional behaviors that should be
+ checked for.
+ */
struct cec_msg msg = {};
struct cec_op_record_src rec_src = {};
@@ -921,7 +951,7 @@ static struct remote_test tests[] = {
test_case("Tuner Control feature",
TAG_TUNER_CONTROL,
tuner_ctl_subtests),
- test_case("One Touch Record",
+ test_case("One Touch Record feature",
TAG_ONE_TOUCH_RECORD,
one_touch_rec_subtests),
test_case_ext("Dynamic Auto Lipsync feature",
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index c51b9c57..c5b9d837 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -502,7 +502,14 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
break;
- /* Deck Control */
+ /*
+ Deck Control
+
+ This is only a basic implementation.
+
+ TODO: Device state should reflect whether we are playing,
+ fast forwarding, etc.
+ */
case CEC_MSG_GIVE_DECK_STATUS:
if (node->has_deck_ctl) {
@@ -524,7 +531,13 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
return;
- /* Tuner Control */
+ /*
+ Tuner Control
+
+ This is only a basic implementation.
+
+ TODO: Device state should change when selecting services etc.
+ */
case CEC_MSG_GIVE_TUNER_DEVICE_STATUS: {
if (!cec_has_tuner(1 << me))
@@ -558,7 +571,18 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
return;
- /* One Touch Record */
+ /*
+ One Touch Record
+
+ This is only a basic implementation.
+
+ TODO:
+ - If we are a TV, we should only send Record On if the
+ remote end is a Recording device or Reserved. Otherwise ignore.
+
+ - Device state should reflect whether we are recording, etc. In
+ recording mode we should ignore Standby messages.
+ */
case CEC_MSG_RECORD_TV_SCREEN: {
if (!node->has_rec_tv)
@@ -794,7 +818,14 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
return;
- /* Audio Rate Control */
+ /*
+ Audio Rate Control
+
+ This is only a basic implementation.
+
+ TODO: Set Audio Rate shall be sent at least every 2 seconds by
+ the controlling device. This should be checked and kept track of.
+ */
case CEC_MSG_SET_AUDIO_RATE:
if (node->has_aud_rate)

Privacy Policy