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#100: dsVideoPort: Add L1 and L2 Test cases for ALLM APIs #129

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/pages/ds-video-port_High-Level_TestSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
- [Check HDR Capability](#check-hdr-capability)
- [HDCP Management](#hdcp-management)
- [Color Capabilities](#color-capabilities)
- [ALLM Status](#allm-status)

## Acronyms, Terms and Abbreviations

- `HAL` - Hardware Abstraction Layer
- `API` - Caller Programming Interface
- `DS` - Device Settings
- `ALLM` - Auto Low Latency Mode
- `HDMI` - High-Definition Multimedia Interface
- `HDCP` - High-bandwidth Digital Content Protection
- `HDR` - High Dynamic Range
Expand Down Expand Up @@ -195,3 +197,22 @@ Playback the pre-define streams
#### Control Plane Requirements-Color Capabilities

Verify the Color Space,Color Depth,QuantizationRange,MatrixCoefficients,Background Color with analyzer/external device

### ALLM Status

|Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements|
|------------------|-----------|---------|--|--|------|----|--------------------------|
|Check `ALLM` Status|Enable/Disable `ALLM` feature and verify with get function|dsSetAllmEnabled(), dsGetAllmEnabled()|`Y`|`NA`|`Y`|`N`|`NA`|
||Enable/Disable `ALLM` feature and verify with video playback|dsSetAllmEnabled(), dsGetAllmEnabled()|`NA`|`Y`|`Y`|`N`|`Y`|

#### Test Startup Requirement-ALLM Status

Playback the pre-define streams

#### Emulator Requirements-ALLM Status

[Emulator Requirements](#emulator-requirements)

#### Control Plane Requirements-ALLM Status

Verify the `ALLM` Status with analyzer/external device
56 changes: 52 additions & 4 deletions docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ This document describes the L2 Low Level Test Specification and Procedure Docume

### Acronyms, Terms and Abbreviations

- `HAL` \- Hardware Abstraction Layer, may include some common components
- `UT` \- Unit Test(s)
- `OEM` \- Original Equipment Manufacture
- `SoC` \- System on a Chip
- `HAL` \- Hardware Abstraction Layer, may include some common components
- `UT` \- Unit Test(s)
- `OEM` \- Original Equipment Manufacture
- `SoC` \- System on a Chip
- `HDMI` \- High-Definition Multimedia Interface
- `HDCP` \- High-bandwidth Digital Content Protection
- `ALLM` \- Auto Low Latency Mode

### Definitions

Expand Down Expand Up @@ -679,3 +680,50 @@ graph TB
Step6 -- dsERR_NONE --> End[Test Case Success]
Step6 -- Not dsERR_NONE --> Fail6[Test Case Fail]
```

### Test 16

|Title|Details|
|-----|-------|
|Function Name|`test_l2_dsVideoPort_CheckALLMStatus_source`|
|Description|Set `ALLM` Status for HDMI port and compare with get function|
|Test Group|02|
|Test Case ID|016|
|Priority|High|

**Pre-Conditions :**
None

**Dependencies :**
None

**User Interaction :**
If user chose to run the test in interactive mode, then the test case has to be selected via console.

#### Test Procedure - Test 16

|Variation / Steps|Description|Test Data|Expected Result|Notes|
|-----------------|-----------|---------|---------------|-----|
|01|Initialize video port using `dsVideoPortInit`|None|`dsERR_NONE`|Should be successful|
|02|Loop through all supported ports and get video port handle for HDMI using `dsGetVideoPort`|type = `dsVIDEOPORT_TYPE_HDMI` and index = supported index|`dsERR_NONE`|Should be successful|
|03|Enable `ALLM` using `dsSetAllmEnabled`|handle = from step 02, enabled = `true`|`dsERR_NONE`|Should be successful|
|04|Get `ALLM` Status using `dsGetAllmEnabled`|handle = from step 02, enabled|`dsERR_NONE`|Should be successful|
|05|Compare `ALLM` status|enabled = `true`|`ALLM` Status should be `true`|Should be successful|
|06|Disable `ALLM` using `dsSetAllmEnabled`|handle = from step 02, enabled = `false`|`dsERR_NONE`|Should be successful|
|07|Get `ALLM` Status using `dsGetAllmEnabled`|handle = from step 02, enabled|`dsERR_NONE`|Should be successful|
|08|Compare `ALLM` status|enabled = `false`|`ALLM` Status should be `false`|Should be successful|
|09|Terminate video port using `dsVideoPortTerm`|None|`dsERR_NONE`|Should be successful|

```mermaid
graph TB
Step1[Call dsVideoPortInit] -->|dsERR_NONE| Step2{For each supported<br> type and index <br> call dsGetVideoPort}
Step1 -- "Not dsERR_NONE" --> Fail1[Test Case Failed]
Step2 -->|dsERR_NONE and valid handle|Step3[Call dsSetAllmEnabled API]
Step3 -->|dsERR_NONE|Step4[Call dsGetAllmEnabled API]
Step4 -->|dsERR_NONE|Step5[Compare ALLM Status]
Step5 -->|loop through | Step2
Step5 -- "Status doesn't match" --> Fail6[Test Case Failed]
Step2 -->|End of Iteration|Step7[Call dsVideoPortTerm API]
Step7 -->|dsERR_NONE|End[Test Case success]
Step7 -->|Failure|TestcaseFail6[Testcase Fail]
```
15 changes: 15 additions & 0 deletions skeletons/src/dsVideoPort.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,18 @@ dsError_t dsSetPreferredColorDepth(intptr_t handle, dsDisplayColorDepth_t colorD
return (dsError_t)0;
}

dsError_t dsSetAllmEnabled (intptr_t handle, bool enabled)
{
/*TODO: Implement Me!*/
(void)handle;
(void)enabled;
return (dsError_t)0;
}

dsError_t dsGetAllmEnabled (intptr_t handle, bool *enabled)
{
/*TODO: Implement Me!*/
(void)handle;
(void)enabled;
return (dsError_t)0;
}
Loading