* [PATCH] cec-compliance: system information give features
@ 2019-09-06 16:44 Jiunn Chang
2019-09-09 8:05 ` Hans Verkuil
0 siblings, 1 reply; 3+ messages in thread
From: Jiunn Chang @ 2019-09-06 16:44 UTC (permalink / raw)
To: linux-media, linux-kernel-mentees; +Cc: hverkuil
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@gmail.com>
---
utils/cec-compliance/cec-test.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index bbd13989..839c0fb9 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -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);
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cec-compliance: system information give features
2019-09-06 16:44 [PATCH] cec-compliance: system information give features Jiunn Chang
@ 2019-09-09 8:05 ` Hans Verkuil
0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-09-09 8:05 UTC (permalink / raw)
To: Jiunn Chang, linux-media, linux-kernel-mentees
On 9/6/19 6:44 PM, Jiunn Chang wrote:
> 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@gmail.com>
> ---
> utils/cec-compliance/cec-test.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
> index bbd13989..839c0fb9 100644
> --- a/utils/cec-compliance/cec-test.cpp
> +++ b/utils/cec-compliance/cec-test.cpp
> @@ -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.
> + 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
>
> fail_on_test(node->remote[la].rc_profile != *rc_profile);
> fail_on_test(node->remote[la].dev_features != *dev_features);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] cec-compliance: system information give features
@ 2019-09-09 15:07 Jiunn Chang
0 siblings, 0 replies; 3+ messages in thread
From: Jiunn Chang @ 2019-09-09 15:07 UTC (permalink / raw)
To: linux-media, linux-kernel-mentees; +Cc: hverkuil
For devices on a HDMI ARC link, sources can only receive ARC
and sinks can only transmit ARC.
Add two checks:
- Playback devices can only receive ARC, i.e. source_has_arc_rx
- TVs can only transmit ARC, i.e. sink_has_arc_tx
Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com>
---
utils/cec-compliance/cec-test.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/cec-compliance/cec-test.cpp b/utils/cec-compliance/cec-test.cpp
index bbd13989..aece546c 100644
--- a/utils/cec-compliance/cec-test.cpp
+++ b/utils/cec-compliance/cec-test.cpp
@@ -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].sink_has_arc_tx)
+ return fail("A Playback device cannot set the Sink Supports ARC Tx bit\n");
+ if (cec_has_tv(1 << la) && node->remote[la].source_has_arc_rx)
+ return fail("A TV cannot set the Source Supports ARC Rx bit\n");
fail_on_test(node->remote[la].rc_profile != *rc_profile);
fail_on_test(node->remote[la].dev_features != *dev_features);
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-09 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 16:44 [PATCH] cec-compliance: system information give features Jiunn Chang
2019-09-09 8:05 ` Hans Verkuil
2019-09-09 15:07 Jiunn Chang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).