Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh #44 Initial L3 C-Test Code generation. #45

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

srinivasgtl
Copy link
Contributor

Issue #44 - Initial L3 low spec document for hdmi cec sink module.

@srinivasgtl srinivasgtl self-assigned this Jul 19, 2024
@srinivasgtl srinivasgtl linked an issue Jul 19, 2024 that may be closed by this pull request
@srinivasgtl srinivasgtl added the L3 Work Element L3 Development work. label Jul 19, 2024
Copy link
Contributor

@Ulrond Ulrond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs re-doing.

We need to have a meeting to discuss the high level requirement, which this doesn't meet.

The tests are platform-agnostic, and also will not know about the CEC Adaptor.

The test will run on both the vDevice and all platforms real or with CEC Adaptors, and must be platform agnostic and device Agnostic.

There will be no changes to the test to swap to vDevice, Platforms with CEC Adaptors or not.

A[Pulse-Eight CEC Adaptor ] <--> |HDMI| B[TV]
```

### Pulse-Eight CEC Adaptor tool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulse-Eight CEC Adaptor tool, you can remove this completely.

You can state that the rack will have a CEC device supported via Python Raft, and you will be talking to that to control your testing.

But anything where you're talking about controlling it specifically or sending yoru commands is to be removed.

The RAFT interface will have to be defined, for any sort of CEC Device now and in the future, and the one we're currently using will be the Pulse-Eight, RAFT will support this one + any more we add...

That makes the Test Component adnostic.

That's a raft module and will be completely hidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the Pulse-Eight reference and mention as a CEC adaptor rather than saying "CEC device", else any person who is using this may raise a concern on the type of CEC device he needs to use.

When we say "any sort of CEC Device", what does it mean? Do we have any scope for this? Do we need to control any sort of Source devices, TV panels, AV Amplifiers, Repeaters, switches etc?

- To Tx data: `cec-client -s -t 1 --data <command>` or `echo "tx <data>" | cec-client -s` Eg:`echo "tx 10:36" | cec-client -s`
- To check the last received data use `cec-client -m | grep '>>' | tail -n 1`. `cec-client -m` shall monitor the data continuously

**Prerequisite Test to make sure all the CEC Adaptors are connected**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a list of requirements only, with hardware setup to be defined by the rack slot.


#### Message Transmission and Reception Test
Note: All the below tests should be carried out on all the available HMDI ports.
- Transmit an HDMI CEC basic command (GetCECVersion) from the DUT to receive a reply from the connected CEC Adaptor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct.

ut-control message will be sent to test GETCEC Version, these messages are already defined by vDevice, and you would use them in the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetCEC Version is a CEC Command that we need to frame and send to the connected device here and wait to get the reply from the connected device. They are defined in the test yaml file.

#### Message Transmission and Reception Test
Note: All the below tests should be carried out on all the available HMDI ports.
- Transmit an HDMI CEC basic command (GetCECVersion) from the DUT to receive a reply from the connected CEC Adaptor.
- Receive an HDMI OSD Command with a string of maximum length (14 bytes) from the CEC Adaptor and acknowledge it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a function requirement for the raft module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RAFT Should ask to send this command from a source device that is connected to the DUT


#### Message Broadcast and Receive broadcast
Note: All the below tests should be carried out on all the available HMDI ports.
- Broadcast an HDMI CEC Command from the DUT and verify that this command has been received on the CEC Adaptor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broadcast an HDMI CEC Command from the DUT and verify that this command has been received on the CEC Adaptor.

cannot be achieved unless the API supports this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any API with a logical address with 0xF should be read as a broadcast command. So when any device is connected to HDMI network receives these CEC frames should able to realize this address and consider the data.

1. `DUT` shall broadcast a standby command to the connected devices and RAFT/user should validate this received command on the CEC Adaptor.
2. `DUT` shall receive a standby command as a broadcast command from the CEC Adaptor. RAFT/user to initiate and command the Test.

| Title | Details |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs re-doing.

participant DUT
participant CEC Adaptor
participant RAFT/user
RAFT/user->>CEC Adaptor: Read and validate LA and PA (device ready)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not valid.

test:
tx:
#CEC GET Version command
- command:
Copy link
Contributor

@Ulrond Ulrond Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not correct as per the vDevice setup.

How the control messages work and the data sent is set up by vDevice, and must match what we're going to-do..


| Title | Details |
|-------------------------------|--------------------------------------------------|
| Function Name | `test_l3_hdmi_cec_sink_hw_fault_test` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

way down the line test and an edge case for much later in the project.

# Test 3: Stress Test

Functionality:
1. `DUT` shall respond to a CEC OSD command received from the CEC Adaptor repeatedly for 10 times with different strings and validate.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not enough information to figure out what should happen here.

Where's the yaml message that will work for both the vDevice & the platform code.

And the CEC adaptor is adnostic to the testing suite.

Copy link
Contributor Author

@srinivasgtl srinivasgtl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss more on the design.

A[Pulse-Eight CEC Adaptor ] <--> |HDMI| B[TV]
```

### Pulse-Eight CEC Adaptor tool:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the Pulse-Eight reference and mention as a CEC adaptor rather than saying "CEC device", else any person who is using this may raise a concern on the type of CEC device he needs to use.

When we say "any sort of CEC Device", what does it mean? Do we have any scope for this? Do we need to control any sort of Source devices, TV panels, AV Amplifiers, Repeaters, switches etc?

- libcec tools: https://www.pulse-eight.com/Download/Get/51

**Libraries and tools required for RAFT**
- libcec should be installed on the PC where the Pulse-Eight CEC Adaptor is connected.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libcec is the main software used to control the adaptor. Else, we should specify what one needs to install here.


**Libraries and tools required for RAFT**
- libcec should be installed on the PC where the Pulse-Eight CEC Adaptor is connected.
- python-cec will be used to control the `CEC` adaptor.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yaml can define only the CEC messages, but how will these messages sent from a device connected to the DUT or received from the DUT? We already have a basic yaml file that defines the command.


**cec-ctrl Commands used in Manual Mode**
- libcec should be installed on the PC where the Pulse-Eight CEC Adaptor is connected.
- To get the logical and physical address: `cec-client -s -d 4`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are few messages defined in the https://github.com/rdkcentral/rdk-halif-test-hdmi_cec/blob/feature/gh44_hdmicec_l3_sink_tests/profiles/sink/sink_hdmiCEC_test.yml. But the CEC unicast commands should also use a logical address of the source device and we need to make sure that it uses the same address every time, else the test will fail. Any idea on this?


#### Message Transmission and Reception Test
Note: All the below tests should be carried out on all the available HMDI ports.
- Transmit an HDMI CEC basic command (GetCECVersion) from the DUT to receive a reply from the connected CEC Adaptor.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetCEC Version is a CEC Command that we need to frame and send to the connected device here and wait to get the reply from the connected device. They are defined in the test yaml file.

#### Message Transmission and Reception Test
Note: All the below tests should be carried out on all the available HMDI ports.
- Transmit an HDMI CEC basic command (GetCECVersion) from the DUT to receive a reply from the connected CEC Adaptor.
- Receive an HDMI OSD Command with a string of maximum length (14 bytes) from the CEC Adaptor and acknowledge it.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RAFT Should ask to send this command from a source device that is connected to the DUT


#### Message Broadcast and Receive broadcast
Note: All the below tests should be carried out on all the available HMDI ports.
- Broadcast an HDMI CEC Command from the DUT and verify that this command has been received on the CEC Adaptor.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any API with a logical address with 0xF should be read as a broadcast command. So when any device is connected to HDMI network receives these CEC frames should able to realize this address and consider the data.

@Ulrond Ulrond added the documentation Improvements or additions to documentation label Jul 29, 2024
@srinivasgtl srinivasgtl force-pushed the feature/gh44_hdmicec_l3_sink_tests branch from a298360 to b4197d2 Compare August 6, 2024 17:00
@srinivasgtl srinivasgtl changed the title gh #44 Initial L3 Low level desig document for the hdmi cec sink device gh #44 Initial L3 C-Test Code generation. Sep 4, 2024
@CLAassistant
Copy link

CLAassistant commented Nov 24, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ bhanucbp
✅ srinivasgtl
❌ Bhanu Prakash


Bhanu Prakash seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -0,0 +1,346 @@
# HDMI CEC L3 Test Document for Sink Devices.

## Table of Contents

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please list the overview as well in Table of Contents.

Copy link

@ishthiyaqahmed ishthiyaqahmed Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any references like high level test spec? if so we need to include that as well.

Note: The below-shown prerequisites should be met before starting the test on the platforms.
- All the devices used in the test setup should support the `HDMI` `CEC` feature during the entire test duration.
- HDMI drivers should be up and running on the platform before running this test.
- For now, it is suggested not to connect multiple CEC Adaptors onto a single PC as there is no proper support on libcec for multiple devices.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so currently we are testing on pc , is there any way to test on panels and set of boxes which supports CEC?

Copy link
Contributor Author

@srinivasgtl srinivasgtl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check for the return and status while tx. return ack will differ between tx and broadcst.

src/test_l3_hdmi_cec_sink_driver.c Outdated Show resolved Hide resolved
src/test_l3_hdmi_cec_sink_driver.c Outdated Show resolved Hide resolved
src/test_l3_hdmi_cec_sink_driver.c Outdated Show resolved Hide resolved
srinivasgtl and others added 7 commits December 17, 2024 14:27
Updated c test and python code to read the commands from yaml file
Updated the code with comments and cleanup
Added python file to run all tests
Used monitor function to get the adaptor logs
Updated with review comments
@bhanucbp bhanucbp force-pushed the feature/gh44_hdmicec_l3_sink_tests branch from 20fe937 to 2ce8ce1 Compare December 17, 2024 14:27
Bhanu Prakash and others added 3 commits December 17, 2024 17:38
Updated test for source devices
Updated tests with new raft implementation
Initialized global handle with correct value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation L3 Work Element L3 Development work.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

L3 C-Test code - HDMI CEC - Sink device
5 participants