This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: cec-compliance/follower: use new CEC_OP_UI_CMD defines
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Wed Oct 2 11:40:33 2019 +0200

Some more places were these UI commands are hardcoded. Use the new
CEC_OP_UI_CMD defines instead.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/cec-compliance/cec-test-power.cpp |  2 +-
 utils/cec-compliance/cec-test.cpp       |  2 +-
 utils/cec-follower/cec-processing.cpp   | 18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=ba9395c025e297a9aa953481663fd4fb75a64a1d
diff --git a/utils/cec-compliance/cec-test-power.cpp 
b/utils/cec-compliance/cec-test-power.cpp
index 26b0c65ca682..e82e419a1ba5 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 aece546c9aa6..017d1ef8398b 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 5b4a744f5ee8..8157b81bd81d 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);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to