aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-22 11:03:19 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-22 14:48:44 +0200
commita5063d689ac85473ce8b236991ed2a7334e90d27 (patch)
tree5cbdf92e4d70e11060eea4b55d0764b7e0a1cf2e
parent143985f7d759ddf7fa703f8b12647e7460b1e7a5 (diff)
cec-compliance: remove old tuner tests
The old tuner tests are superseded by the new tuner_ctl_test(), so remove them. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-test.cpp168
1 files changed, 0 insertions, 168 deletions
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index fad331b0..7cce8141 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -959,176 +959,8 @@ static int tuner_ctl_test(struct node *node, unsigned me, unsigned la, bool inte
return 0;
}
-static int tuner_ctl_give_status(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
-
- cec_msg_init(&msg, me, la);
- cec_msg_give_tuner_device_status(&msg, true, CEC_OP_STATUS_REQ_ONCE);
- fail_on_test(!transmit_timeout(node, &msg));
- fail_on_test(timed_out(&msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (refused(&msg))
- return REFUSED;
- if (cec_msg_status_is_abort(&msg))
- return PRESUMED_OK;
-
- return 0;
-}
-
-static int tuner_ctl_sel_analog_service(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
-
- node->remote[la].bcast_sys = ~0;
- for (unsigned sys = 0; sys <= 8; sys++) {
- cec_msg_init(&msg, me, la);
- cec_msg_select_analogue_service(&msg, CEC_OP_ANA_BCAST_TYPE_CABLE,
- 7668, sys); // 479.25 MHz analog frequency
- fail_on_test(!transmit_timeout(node, &msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (abort_reason(&msg) == CEC_OP_ABORT_INVALID_OP) {
- info("Tuner supports %s, but cannot select that service.\n",
- bcast_system2s(sys));
- node->remote[la].bcast_sys = sys;
- continue;
- }
- if (cec_msg_status_is_abort(&msg))
- continue;
- info("Tuner supports %s\n", bcast_system2s(sys));
- node->remote[la].bcast_sys = sys;
- }
-
- if (node->remote[la].bcast_sys == (__u8)~0)
- warn("No analog broadcast format supported\n");
- else
- return 0;
-
- return PRESUMED_OK;
-}
-
-static int tuner_ctl_sel_digital_service(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
- struct cec_op_digital_service_id digital_service_id = {};
-
- digital_service_id.service_id_method = CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL;
- digital_service_id.channel.channel_number_fmt = CEC_OP_CHANNEL_NUMBER_FMT_1_PART;
- digital_service_id.channel.minor = 1;
-
- __u8 bcast_systems[] = {
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_GEN,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_GEN,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_GEN,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_BS,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_CS,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ARIB_T,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_CABLE,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_SAT,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_ATSC_T,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_C,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_S,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_S2,
- CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_T,
- };
-
- node->remote[la].dig_bcast_sys = ~0;
- for (unsigned i = 0; i < ARRAY_SIZE(bcast_systems); i++) {
- __u8 sys = bcast_systems[i];
-
- digital_service_id.dig_bcast_system = sys;
- cec_msg_init(&msg, me, la);
- cec_msg_select_digital_service(&msg, &digital_service_id);
- fail_on_test(!transmit_timeout(node, &msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (abort_reason(&msg) == CEC_OP_ABORT_INVALID_OP) {
- info("Tuner supports %s, but cannot select that service.\n",
- dig_bcast_system2s(sys));
- node->remote[la].dig_bcast_sys = sys;
- continue;
- }
- if (cec_msg_status_is_abort(&msg))
- continue;
- info("Tuner supports %s\n", dig_bcast_system2s(sys));
- node->remote[la].dig_bcast_sys = sys;
- }
-
- if (node->remote[la].dig_bcast_sys == (__u8)~0)
- warn("No digital broadcast system supported\n");
- else
- return 0;
-
- return PRESUMED_OK;
-}
-
-static int tuner_ctl_tuner_dev_status(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
- struct cec_op_tuner_device_info tuner_dev_info = {};
-
- tuner_dev_info.rec_flag = CEC_OP_REC_FLAG_NOT_USED;
- tuner_dev_info.tuner_display_info = CEC_OP_TUNER_DISPLAY_INFO_NONE;
- tuner_dev_info.is_analog = false;
- tuner_dev_info.digital.service_id_method = CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL;
- tuner_dev_info.digital.dig_bcast_system = CEC_OP_DIG_SERVICE_BCAST_SYSTEM_DVB_C;
- tuner_dev_info.digital.channel.channel_number_fmt = CEC_OP_CHANNEL_NUMBER_FMT_1_PART;
- tuner_dev_info.digital.channel.minor = 1;
-
- cec_msg_init(&msg, me, la);
-
- cec_msg_tuner_device_status(&msg, &tuner_dev_info);
- fail_on_test(!transmit_timeout(node, &msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (refused(&msg))
- return REFUSED;
- if (cec_msg_status_is_abort(&msg))
- return PRESUMED_OK;
-
- return 0;
-}
-
-static int tuner_ctl_step_dec(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
-
- cec_msg_init(&msg, me, la);
- cec_msg_tuner_step_decrement(&msg);
- fail_on_test(!transmit_timeout(node, &msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (refused(&msg))
- return REFUSED;
-
- return PRESUMED_OK;
-}
-
-static int tuner_ctl_step_inc(struct node *node, unsigned me, unsigned la, bool interactive)
-{
- struct cec_msg msg = {};
-
- cec_msg_init(&msg, me, la);
- cec_msg_tuner_step_increment(&msg);
- fail_on_test(!transmit_timeout(node, &msg));
- if (unrecognized_op(&msg))
- return NOTSUPPORTED;
- if (refused(&msg))
- return REFUSED;
-
- return PRESUMED_OK;
-}
-
static struct remote_subtest tuner_ctl_subtests[] = {
{ "Tuner Control", CEC_LOG_ADDR_MASK_TUNER | CEC_LOG_ADDR_MASK_TV, tuner_ctl_test },
- { "Give Tuner Device Status", CEC_LOG_ADDR_MASK_TUNER, tuner_ctl_give_status },
- { "Select Analogue Service", CEC_LOG_ADDR_MASK_TUNER, tuner_ctl_sel_analog_service },
- { "Select Digital Service", CEC_LOG_ADDR_MASK_TUNER, tuner_ctl_sel_digital_service },
- { "Tuner Device Status", CEC_LOG_ADDR_MASK_ALL, tuner_ctl_tuner_dev_status },
- { "Tuner Step Decrement", CEC_LOG_ADDR_MASK_TUNER, tuner_ctl_step_dec },
- { "Tuner Step Increment", CEC_LOG_ADDR_MASK_TUNER, tuner_ctl_step_inc },
};

Privacy Policy