Skip to contentSkip to conversation

cec-compliance: system audio control

PATCH New Jiunn Chang 2 participants 5 messages Sep 9, 2019 – Sep 11, 2019 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cec-compliance: system audio control

Add comment block documenting tests not included from section 13.15 of the HDMI CEC 1.4b specification. This section outlines the System Audio Control feature.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test-audio.cpp | 30 +++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
utils/cec-compliance/cec-test-audio.cpp +30 -0
index 2bc24daf..e0cdb9dc 100644
@@ -309,6 +309,36 @@ const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests);
 
 /* System Audio Control */
 
+/**
+ * The following scenarios defined in section 13.15 of the HDMI CEC 1.4b
+ * specification are not currently tested:
+ *
+ * 1.  Amplifier initiated <System Audio Mode Request> and active source
+ *     discovery with a <Request Active Source> broadcast plus the
+ *     <Active Source> response.
+ * 2.  Post discovery, amplifier subsequent <Set System Audio Mode> [On]
+ *     and System Audio Control feature support confirmation with TV if
+ *     present.
+ * 3.  Amplifier broadcasts <Set System Audio Mode> [On] to mute the TV and
+ *     unmute amplifier.
+ * 4.  Amplifier broadcasts <Set System Audio Mode> [Off] to unmute the TV
+ *     and mute the amplifier.
+ * 5.  When System Audio Mode is On, muting and unmuting an amplifier sends
+ *     a <Report Audio Status> message to the TV.
+ * 6.  When System Audio Mode is On, the amplifier sends a <Set System Audio
+ *     Mode> [Off] to unmute the TV before going into standby.
+ * 7.  When System Audio Mode is On, only the amplifier can control system
+ *     volume.
+ * 8.  Optional features defined in subsection 13.15.4 of the HDMI CEC 1.4b
+ *     specifictation.
+ * 9.  <Request Audio Descriptor> message is new since HDMI CEC 1.4 so 1.3a
+ *     or earlier devices report <Feature Abort> for this feature.
+ * 10. <Report Audio Descriptor> message is new since HDMI CEC 1.4 so 1.3a
+ *     or earlier devices report <Feature Abort> for this feature.
+ * 11. System Audio Control is new since HDMI CEC 1.3a so 1.3 and earlier
+ *     devices report <Feature Abort> for this feature.
+ */
+
 static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bool interactive)
 {
 	struct cec_msg msg = {};
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 cec-compliance: system audio control

Quoted 14 lines · Jiunn Chang

Add comment block documenting tests not included from section 13.15 of the HDMI CEC 1.4b specification. This section outlines the System Audio Control feature.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test-audio.cpp | 30 +++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
utils/cec-compliance/cec-test-audio.cpp +0 -0
index 2bc24daf..e0cdb9dc 100644

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 312

Quoted 4 lines
utils/cec-compliance/cec-test-audio.cpp +1 -0
@@ -309,6 +309,36 @@ const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests);
 
 /* System Audio Control */
 
+/**

Just use /*. This doesn't have to end up in DocBook documentation.

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 314

Quoted 2 lines
utils/cec-compliance/cec-test-audio.cpp +2 -0
+ * The following scenarios defined in section 13.15 of the HDMI CEC 1.4b
+ * specification are not currently tested:

Which of these tests require three CEC devices? That's a good reason for not implementing the test. But I think some of these tests can be done if the CEC adapter is configured as an Audio System, and you test against a TV.

Quoted 9 lines
utils/cec-compliance/cec-test-audio.cpp +9 -0
+ *
+ * 1.  Amplifier initiated <System Audio Mode Request> and active source
+ *     discovery with a <Request Active Source> broadcast plus the
+ *     <Active Source> response.
+ * 2.  Post discovery, amplifier subsequent <Set System Audio Mode> [On]
+ *     and System Audio Control feature support confirmation with TV if
+ *     present.
+ * 3.  Amplifier broadcasts <Set System Audio Mode> [On] to mute the TV and
+ *     unmute amplifier.

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 333

Quoted 10 lines
utils/cec-compliance/cec-test-audio.cpp +10 -0
+ * 4.  Amplifier broadcasts <Set System Audio Mode> [Off] to unmute the TV
+ *     and mute the amplifier.
+ * 5.  When System Audio Mode is On, muting and unmuting an amplifier sends
+ *     a <Report Audio Status> message to the TV.
+ * 6.  When System Audio Mode is On, the amplifier sends a <Set System Audio
+ *     Mode> [Off] to unmute the TV before going into standby.
+ * 7.  When System Audio Mode is On, only the amplifier can control system
+ *     volume.
+ * 8.  Optional features defined in subsection 13.15.4 of the HDMI CEC 1.4b
+ *     specifictation.

typo: specification

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 338

Quoted 5 lines
utils/cec-compliance/cec-test-audio.cpp +5 -0
+ * 9.  <Request Audio Descriptor> message is new since HDMI CEC 1.4 so 1.3a
+ *     or earlier devices report <Feature Abort> for this feature.
+ * 10. <Report Audio Descriptor> message is new since HDMI CEC 1.4 so 1.3a
+ *     or earlier devices report <Feature Abort> for this feature.
+ * 11. System Audio Control is new since HDMI CEC 1.3a so 1.3 and earlier

1.3 -> 1.3a

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 344

Quoted 7 lines
utils/cec-compliance/cec-test-audio.cpp +3 -0
+ *     devices report <Feature Abort> for this feature.
+ */
+
 static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bool interactive)
 {
 	struct cec_msg msg = {};

Regards,

Hans

#2 lore raw

PATCH v2 1/1 cec-compliance: system audio control

In reply to Jiunn Chang

Add comment block documenting tests not included from section 13.15 of the CEC 1.4b specification. This section outlines the System Audio Control feature.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test-audio.cpp | 29 +++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
utils/cec-compliance/cec-test-audio.cpp +29 -0
index 2bc24daf..14f1d122 100644
@@ -309,6 +309,35 @@ const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests);
 
 /* System Audio Control */
 
+/*
+ * The following scenarios are defined in section 13.15 of the CEC 1.4b
+ * specification where the amplifier provides the audio for a source that
+ * is being displayed on a TV.
+ *
+ * 1.  Amplifier initiated <System Audio Mode Request> and active source
+ *     discovery with a <Request Active Source> broadcast plus the
+ *     <Active Source> response.
+ * 2.  Post discovery, subsequent amplifier <Set System Audio Mode> [On]
+ *     and System Audio Control feature confirmation with TV.
+ * 3.  Amplifier broadcasts <Set System Audio Mode> [On] to mute the TV and
+ *     unmute amplifier.
+ * 4.  Amplifier broadcasts <Set System Audio Mode> [Off] to unmute the TV
+ *     and mute the amplifier.
+ * 5.  When System Audio Mode is On, muting and unmuting an amplifier sends
+ *     a <Report Audio Status> message to the TV.
+ * 6.  When System Audio Mode is On, the amplifier sends a <Set System Audio
+ *     Mode> [Off] to unmute the TV before going into standby.
+ * 7.  When System Audio Mode is On, only the amplifier can control system
+ *     volume.
+ * 8.  Optional features in subsection 13.15.4 of version 1.4b.
+ * 9.  <Request Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 10. <Report Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 11. System Audio Control is from version 1.3a so older versions report
+ *     <Feature Abort>.
+ */
+
 static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bool interactive)
 {
 	struct cec_msg msg = {};
Signature · 1 line
2.23.0
#3 lore raw

PATCH v2 1/1 cec-compliance: system audio control

Hi Jiunn,

A few nitpicks below:

Quoted 14 lines · Jiunn Chang

Add comment block documenting tests not included from section 13.15 of the CEC 1.4b specification. This section outlines the System Audio Control feature.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test-audio.cpp | 29 +++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
utils/cec-compliance/cec-test-audio.cpp +0 -0
index 2bc24daf..14f1d122 100644

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 313

Quoted 5 lines
utils/cec-compliance/cec-test-audio.cpp +2 -0
@@ -309,6 +309,35 @@ const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests);
 
 /* System Audio Control */
 
+/*
+ * The following scenarios are defined in section 13.15 of the CEC 1.4b

It's CEC 1.4, not 1.4b. The version number refers to the corresponding HDMI specification that first defined this CEC version, which was HDMI 1.4. Later small HDMI updates were releases (1.4a and 1.4b), but the CEC spec remained unchanged. So CEC 1.4 is the right CEC version number to use, and it applies to HDMI 1.4, 1.4a and 1.4b.

So replace 1.4b in this comment block with 1.4.

Quoted 15 lines
utils/cec-compliance/cec-test-audio.cpp +15 -0
+ * specification where the amplifier provides the audio for a source that
+ * is being displayed on a TV.
+ *
+ * 1.  Amplifier initiated <System Audio Mode Request> and active source
+ *     discovery with a <Request Active Source> broadcast plus the
+ *     <Active Source> response.
+ * 2.  Post discovery, subsequent amplifier <Set System Audio Mode> [On]
+ *     and System Audio Control feature confirmation with TV.
+ * 3.  Amplifier broadcasts <Set System Audio Mode> [On] to mute the TV and
+ *     unmute amplifier.
+ * 4.  Amplifier broadcasts <Set System Audio Mode> [Off] to unmute the TV
+ *     and mute the amplifier.
+ * 5.  When System Audio Mode is On, muting and unmuting an amplifier sends
+ *     a <Report Audio Status> message to the TV.
+ * 6.  When System Audio Mode is On, the amplifier sends a <Set System Audio

utils/cec-compliance/cec-test-audio.cpp const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests); · line 338

Quoted 10 lines
utils/cec-compliance/cec-test-audio.cpp +10 -0
+ *     Mode> [Off] to unmute the TV before going into standby.
+ * 7.  When System Audio Mode is On, only the amplifier can control system
+ *     volume.
+ * 8.  Optional features in subsection 13.15.4 of version 1.4b.
+ * 9.  <Request Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 10. <Report Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 11. System Audio Control is from version 1.3a so older versions report
+ *     <Feature Abort>.

I would like to see that the reason why these scenarios are not implemented is added as well.

For 1-7 I think that is because you need three CEC devices for testing. 9-11 deal with 1.3a or older versions and is not worth spending time on. 8 is because these are hard-to-test corner cases.

Regards,

Hans

Quoted 6 lines
utils/cec-compliance/cec-test-audio.cpp +2 -0
+ */
+
 static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bool interactive)
 {
 	struct cec_msg msg = {};
#4 lore raw

PATCH v3 1/1 cec-compliance: system audio control

In reply to c0d1n61at3 at gmail.com (Jiunn Chang)

Add comment block documenting tests not included from section 13.15 of the CEC 1.4b specification. This section outlines the System Audio Control feature.

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test-audio.cpp | 38 +++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
utils/cec-compliance/cec-test-audio.cpp +38 -0
index 2bc24daf..55315439 100644
@@ -309,6 +309,44 @@ const unsigned arc_subtests_size = ARRAY_SIZE(arc_subtests);
 
 /* System Audio Control */
 
+/*
+ * The following scenarios are defined in section 13.15 of the CEC 1.4
+ * specification.
+ *
+ * These are not tested as they need three CEC devices.  An amplifier
+ * provides the audio for a source that is being displayed on a TV.
+ *
+ * 1.  Amplifier initiated <System Audio Mode Request> and active source
+ *     discovery with a <Request Active Source> broadcast plus the
+ *     <Active Source> response.
+ * 2.  Post discovery, subsequent amplifier <Set System Audio Mode> [On]
+ *     and System Audio Control feature confirmation with TV.
+ * 3.  Amplifier broadcasts <Set System Audio Mode> [On] to mute the TV and
+ *     unmute amplifier.
+ * 4.  Amplifier broadcasts <Set System Audio Mode> [Off] to unmute the TV
+ *     and mute the amplifier.
+ * 5.  When System Audio Mode is On, muting and unmuting an amplifier sends
+ *     a <Report Audio Status> message to the TV.
+ * 6.  When System Audio Mode is On, the amplifier sends a <Set System Audio
+ *     Mode> [Off] to unmute the TV before going into standby.
+ * 7.  When System Audio Mode is On, only the amplifier can control system
+ *     volume.
+ *
+ * These are not tested as they are hard-to-test corner cases.
+ *
+ * 1.  Optional features in subsection 13.15.4 of version 1.4.
+ *
+ * These are not tested as they deal with 1.3a or older versions and is not
+ * worth spending time on.
+ *
+ * 1.  <Request Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 2.  <Report Audio Descriptor> message is from version 1.4 so older versions
+ *     report <Feature Abort>.
+ * 3.  System Audio Control is from version 1.3a so older versions report
+ *     <Feature Abort>.
+ */
+
 static int sac_request_sad_probe(struct node *node, unsigned me, unsigned la, bool interactive)
 {
 	struct cec_msg msg = {};
Signature · 1 line
2.23.0