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: system audio control tests
Author:  Jiunn Chang <c0d1n61...@gmail.com>
Date:    Thu Sep 5 22:51:29 2019 -0500

The HDMI CEC specification defines deterministic operands for
User Control Pressed that mute or unmute system audio.

Those being:
 - Mute Function for mute on
 - Restore Volume Function for mute off

This is different from the operand Mute which is a toggle.

This patch adds tests for these User Control Pressed operands.

Signed-off-by: Jiunn Chang <c0d1n61...@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/cec-compliance/cec-test-audio.cpp | 32 ++++++++++++++++++++++++++++++++
 utils/cec-follower/cec-processing.cpp   |  6 ++++++
 2 files changed, 38 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=de6dc05eb5a97b89b1d702f015bf5464a9fe0ba3
diff --git a/utils/cec-compliance/cec-test-audio.cpp 
b/utils/cec-compliance/cec-test-audio.cpp
index 8611350e77cb..872bb9ad1956 100644
--- a/utils/cec-compliance/cec-test-audio.cpp
+++ b/utils/cec-compliance/cec-test-audio.cpp
@@ -673,6 +673,32 @@ static int sac_user_control_press_mute(struct node *node, 
unsigned me, unsigned
        return 0;
 }
 
+static int sac_user_control_press_mute_function(struct node *node, unsigned 
me, unsigned la, bool interactive)
+{
+       __u8 ret;
+
+       if ((ret = sac_util_send_user_control_press(node, me, la, 0x65)))
+               return ret;
+       fail_on_test_v2(node->remote[la].cec_version,
+                       la == CEC_LOG_ADDR_AUDIOSYSTEM &&
+                       node->remote[la].mute == CEC_OP_AUD_MUTE_STATUS_ON);
+
+       return 0;
+}
+
+static int sac_user_control_press_restore_volume_function(struct node *node, 
unsigned me, unsigned la, bool interactive)
+{
+       __u8 ret;
+
+       if ((ret = sac_util_send_user_control_press(node, me, la, 0x66)))
+               return ret;
+       fail_on_test_v2(node->remote[la].cec_version,
+                       la == CEC_LOG_ADDR_AUDIOSYSTEM &&
+                       node->remote[la].mute == CEC_OP_AUD_MUTE_STATUS_OFF);
+
+       return 0;
+}
+
 static int sac_user_control_release(struct node *node, unsigned me, unsigned 
la, bool interactive)
 {
        struct cec_msg msg = {};
@@ -763,6 +789,12 @@ struct remote_subtest sac_subtests[] = {
        { "User Control Pressed (Mute)",
          CEC_LOG_ADDR_MASK_AUDIOSYSTEM | CEC_LOG_ADDR_MASK_TV,
          sac_user_control_press_mute },
+       { "User Control Pressed (Restore Volume Function)",
+         CEC_LOG_ADDR_MASK_AUDIOSYSTEM | CEC_LOG_ADDR_MASK_TV,
+         sac_user_control_press_restore_volume_function },
+       { "User Control Pressed (Mute Function)",
+         CEC_LOG_ADDR_MASK_AUDIOSYSTEM | CEC_LOG_ADDR_MASK_TV,
+         sac_user_control_press_mute_function },
        { "User Control Released",
          CEC_LOG_ADDR_MASK_AUDIOSYSTEM | CEC_LOG_ADDR_MASK_TV,
          sac_user_control_release },
diff --git a/utils/cec-follower/cec-processing.cpp 
b/utils/cec-follower/cec-processing.cpp
index 271725600206..a38f664bfe51 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -516,6 +516,12 @@ static void processMsg(struct node *node, struct cec_msg 
&msg, unsigned me)
                case 0x43:
                        node->state.mute = !node->state.mute;
                        break;
+               case 0x65:
+                       node->state.mute = true;
+                       break;
+               case 0x66:
+                       node->state.mute = false;
+                       break;
                case 0x6B:
                        if (!enter_standby(node))
                                exit_standby(node);

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

Reply via email to