Skip to contentSkip to conversation

cec-compliance: system information give features

PATCH New c0d1n61at3 at gmail.com (Jiunn Chang) 2 participants 2 messages Sep 6, 2019 – Sep 9, 2019 Media (V4L/DVB)

lore
Share & tools
lore

c0d1n61at3 at gmail.com (Jiunn Chang)

#0 lore raw

PATCH 1/1 cec-compliance: system information give features

For devices on a HDMI ARC link, sinks can only support transmitter devices and sources can only support receiver devices.

Add two checks:
- Playback devices can only have has_arc_rx
- TVs can only have has_arc_tx

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test.cpp | 4 ++++
 1 file changed, 4 insertions(+)
utils/cec-compliance/cec-test.cpp +4 -0
index bbd13989..839c0fb9 100644
@@ -172,6 +172,10 @@ int system_info_give_features(struct node *node, unsigned me, unsigned la, bool
 		return fail("Only Playback and Recording devices shall set the Supports Deck Control bit\n");
 	if (!cec_has_tv(1 << la) && node->remote[la].has_rec_tv)
 		return fail("Only TVs shall set the Record TV Screen bit\n");
+	if (!cec_has_playback(1 << la) && node->remote[la].has_arc_rx)
+		return fail("Only Playback devices shall set the Source Supports ARC Rx bit\n");
+	if (!cec_has_tv(1 << la) && node->remote[la].has_arc_tx)
+		return fail("Only TVs shall set the Sink Supports ARC Tx bit\n");
 
 	fail_on_test(node->remote[la].rc_profile != *rc_profile);
 	fail_on_test(node->remote[la].dev_features != *dev_features);
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 cec-compliance: system information give features

Quoted 17 lines · Jiunn Chang

For devices on a HDMI ARC link, sinks can only support transmitter devices and sources can only support receiver devices.

Add two checks:
- Playback devices can only have has_arc_rx
- TVs can only have has_arc_tx

Signed-off-by Jiunn Chang <c0d1n61at3 at gmail.com>
---
 utils/cec-compliance/cec-test.cpp | 4 ++++
 1 file changed, 4 insertions(+)
utils/cec-compliance/cec-test.cpp +0 -0
index bbd13989..839c0fb9 100644

utils/cec-compliance/cec-test.cpp int system_info_give_features(struct node *node, unsigned me, unsigned la, bool · line 176

Quoted 5 lines
utils/cec-compliance/cec-test.cpp +2 -0
@@ -172,6 +172,10 @@ int system_info_give_features(struct node *node, unsigned me, unsigned la, bool
 		return fail("Only Playback and Recording devices shall set the Supports Deck Control bit\n");
 	if (!cec_has_tv(1 << la) && node->remote[la].has_rec_tv)
 		return fail("Only TVs shall set the Record TV Screen bit\n");
+	if (!cec_has_playback(1 << la) && node->remote[la].has_arc_rx)
+		return fail("Only Playback devices shall set the Source Supports ARC Rx bit\n");

Actually, this test should be inverted: the test is that has_arc_tx can't be used by Playback devices.

utils/cec-compliance/cec-test.cpp int system_info_give_features(struct node *node, unsigned me, unsigned la, bool · line 178

Quoted 2 lines
utils/cec-compliance/cec-test.cpp +2 -0
+	if (!cec_has_tv(1 << la) && node->remote[la].has_arc_tx)
+		return fail("Only TVs shall set the Sink Supports ARC Tx bit\n");

Same here.

Right now this would fail for e.g. Audio Systems since in theory those can have ARC for both rx and tx.

I also think that the has_arc_tx/rx fields should be renamed in a preceding patch to 'source_has_arc_rx' and 'sink_has_arc_tx'. That makes these fields easier to understand, and they match better with the CEC_OP_FEAT_DEV_ defines.

Regards,

Hans

Quoted 4 lines
utils/cec-compliance/cec-test.cpp +0 -0
 	fail_on_test(node->remote[la].rc_profile != *rc_profile);
 	fail_on_test(node->remote[la].dev_features != *dev_features);