diff options
-rw-r--r-- | utils/cec-compliance/cec-test-power.cpp | 2 | ||||
-rw-r--r-- | utils/cec-compliance/cec-test.cpp | 2 | ||||
-rw-r--r-- | utils/cec-follower/cec-processing.cpp | 18 |
3 files changed, 11 insertions, 11 deletions
diff --git a/utils/cec-compliance/cec-test-power.cpp b/utils/cec-compliance/cec-test-power.cpp index 26b0c65c..e82e419a 100644 --- a/utils/cec-compliance/cec-test-power.cpp +++ b/utils/cec-compliance/cec-test-power.cpp @@ -428,7 +428,7 @@ static int wakeup_rc(struct node *node, unsigned me, unsigned la) /* Todo: A release should be sent after this */ cec_msg_init(&msg, me, la); - rc_press.ui_cmd = 0x6D; /* Power On Function */ + rc_press.ui_cmd = CEC_OP_UI_CMD_POWER_ON_FUNCTION; cec_msg_user_control_pressed(&msg, &rc_press); fail_on_test(!transmit_timeout(node, &msg)); fail_on_test(cec_msg_status_is_abort(&msg)); diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp index aece546c..017d1ef8 100644 --- a/utils/cec-compliance/cec-test.cpp +++ b/utils/cec-compliance/cec-test.cpp @@ -537,7 +537,7 @@ static int rc_passthrough_user_ctrl_pressed(struct node *node, unsigned me, unsi struct cec_op_ui_command rc_press; cec_msg_init(&msg, me, la); - rc_press.ui_cmd = 0x41; // Volume up key (the key is not crucial here) + rc_press.ui_cmd = CEC_OP_UI_CMD_VOLUME_UP; // Volume up key (the key is not crucial here) cec_msg_user_control_pressed(&msg, &rc_press); fail_on_test(!transmit_timeout(node, &msg)); /* Mandatory for all except devices which have taken logical address 15 */ diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp index 5b4a744f..8157b81b 100644 --- a/utils/cec-follower/cec-processing.cpp +++ b/utils/cec-follower/cec-processing.cpp @@ -410,35 +410,35 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me) node->state.rc_press_rx_ts = msg.rx_ts; switch (rc_press.ui_cmd) { - case 0x41: + case CEC_OP_UI_CMD_VOLUME_UP: if (node->state.volume < VOLUME_MAX) node->state.volume++; break; - case 0x42: + case CEC_OP_UI_CMD_VOLUME_DOWN: if (node->state.volume > VOLUME_MIN) node->state.volume--; break; - case 0x43: + case CEC_OP_UI_CMD_MUTE: node->state.mute = !node->state.mute; break; - case 0x65: + case CEC_OP_UI_CMD_MUTE_FUNCTION: node->state.mute = true; break; - case 0x66: + case CEC_OP_UI_CMD_RESTORE_VOLUME_FUNCTION: node->state.mute = false; break; - case 0x6B: + case CEC_OP_UI_CMD_POWER_TOGGLE_FUNCTION: if (!enter_standby(node)) exit_standby(node); break; - case 0x6C: + case CEC_OP_UI_CMD_POWER_OFF_FUNCTION: enter_standby(node); break; - case 0x6D: + case CEC_OP_UI_CMD_POWER_ON_FUNCTION: exit_standby(node); break; } - if (rc_press.ui_cmd >= 0x41 && rc_press.ui_cmd <= 0x43) { + if (rc_press.ui_cmd >= CEC_OP_UI_CMD_VOLUME_UP && rc_press.ui_cmd <= CEC_OP_UI_CMD_MUTE) { dev_info("Volume: %d%s\n", node->state.volume, node->state.mute ? ", muted" : ""); cec_msg_set_reply_to(&msg, &msg); cec_msg_report_audio_status(&msg, node->state.mute ? 1 : 0, node->state.volume); |