From 7b94f110613806433a1bbdd12221dfabf9115085 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:40:43 +0000 Subject: [PATCH 01/64] updating the dsHost test spec --- docs/pages/dsHost_TestSpecification.md | 114 +++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 docs/pages/dsHost_TestSpecification.md diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md new file mode 100644 index 00000000..c39100df --- /dev/null +++ b/docs/pages/dsHost_TestSpecification.md @@ -0,0 +1,114 @@ +# HOST Test Document + +## Version History + +| Date(DD/MM/YY) | Comment | Version | +| -------------- | ------------- | ------- | +| 01/03/2024 | First Release | 1.0.0 | + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [References](#references) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + +## Acronyms, Terms and Abbreviations + +- `SoC` - System On a Chip +- `EDID` - Extended Display Identification +- `API` - Application programming interface +- `CPU` - Central processing unit +- `dsHost` - Device Settings Host +- `HDMI` - High-Definition Multimedia Interface + +## References + +- `EDID` specifications - [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) +- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://pypi.org/project/pyedid/) + +## Introduction + +This document provides an overview of the testing requirements for the `dsHost` module. +It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. + +Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h) + +## Module Description + +High level overview: + +- `dsHost` offers a range of `API`s for retrieving information about the platform. +- Data is retrieved from the `SoC` and `HDMI`. This data is passed to the caller. +- In order to retrieve `HDMI` information, an external device must be connected. + +## Testing Scope + +|#|Testing Scope|Description| +|-|------------------|----------------| +|1|[Retrieve CPU Temperature](#retrieve-cpu-temperature)|Test if the module correctly retrieves the `CPU` temperature.| +|2|[Obtain SOC ID](#obtain-soc-id)|Test if the module successfully obtains the 8-byte `SoC` ID programmed to the CHIP One Time Programmable area.| +|3|[Fetch Host EDID](#fetch-host-edid)|Test if the module fetches the host `EDID` along with its length| +----------- + +## Retrieve CPU Temperature + +|Description|L2|L3|Control Plane Requirements| +|-----------|--|--|--------------------------| +|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state.|Y|N|N| + +### Test Startup Requirement - Retrieve CPU Temperature + +None + +### Emulator Requirement - Retrieve CPU Temperature + +None + +### Control Plane Requirement - Retrieve CPU Temperature + +None + +## Obtain SoC ID + +|Description|L2|L3|Control Plane Requirements| +|-----------|--|--|--------------------------| +|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length.|Y|N|N| + +### Test Startup Requirement-Obtain SoC ID + +None + +### Emulator Requirement-Obtain SoC ID + +None + +### Control Plane Requirement-Obtain SoC ID + +None + +## Fetch Host EDID + +|Description|L2|L3|Control Plane Requirements| +|-----------|--|--|--------------------------| +|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device|Y|N|N| + +### Test Startup Requirement - Fetch Host EDID + +Launch the test with the predefined configuration set of results. + +### Emulator Requirement - Fetch Host EDID + +Emulator will boot with the `EDID` coming from the configuration file. + +|#|Description| +|-|-----------| +|1|`EDID` for a panel TV| + +TODO: Generate a list of sample list for 5 to 6 different TV's. +Generate a list of TV's from the office for the different `EDID`s and store the binaries of the test. It can use it as samples. + +### Control Plane Requirement - Fetch Host EDID + +None \ No newline at end of file From 6c0d8e2c8adfeecaa84c89bcbe0dc8d03ed1e1f9 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:57:03 +0000 Subject: [PATCH 02/64] gh #18 dsVideoDevice Test Specification Documentation --- docs/pages/ds-video-device_TestSpec.md | 132 +++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 docs/pages/ds-video-device_TestSpec.md diff --git a/docs/pages/ds-video-device_TestSpec.md b/docs/pages/ds-video-device_TestSpec.md new file mode 100644 index 00000000..e2514c55 --- /dev/null +++ b/docs/pages/ds-video-device_TestSpec.md @@ -0,0 +1,132 @@ +# Device Settings Video Device Test Specification Documentation + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + - [Emulator Requirements](#emulator-requirements) + - [Check the Zoom Control](#check-the-zoom-control) + - [Check the HDR Capability](#check-the-hdr-capability) + - [Check Video codec and Formats](#check-video-codec-and-formats) + - [Check the Display frame rate Capability](#check-the-display-frame-rate-capability) + +## Acronyms, Terms and Abbreviations + +- `HAL` - Hardware Abstraction Layer +- `API` - Caller Programming Interface +- `DS` - Device Settings +- `HDR` - High Dynamic Range +- `FPS` - Frames Per Second. +- `FRF` - Frame Rate Frequency +- `HEVC` - High Efficiency Video Coding + +## Introduction + +This document provides an overview of the testing requirements for the Device Settings Video Device module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. + +Interface of the test is available here: [dsVideoDevice HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDevice.h) + +## Module Description + +`DS` Video device `HAL` provides a set of `APIs` to initialize, query and set information about about the zoom mode, `HDR` capabilities, Video encoding formats and frame rate. + +## Testing Scope + +|#|Test Functionality|Description| +|-|------------------|-----------| +|1|[Check the Zoom Control](#check-the-zoom-control)|Verify setting and getting the zoom modes| +|2|[Check the HDR Capability](#check-the-hdr-capability)|Check the `HDR` Capability| +|3|[Check Video codec and Formats](#check-video-codec-and-formats)|Check supported video codec formats| +|4|[Check the Display frame rate Capability](#check-the-display-frame-rate-capability)|Check supported Display frame rates| + +### Emulator Requirements + +Boot configuration: Check video ports, encoding formats, profiles, frame rates, and device-supported zoom modes, along with the number of ports supported by each device. + +Supported Video encoding formats [dsVideoCodingFormat_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDeviceTypes.h#L165) + +Supported Video `HEVC` profiles [dsVideoCodecHevcProfiles_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDeviceTypes.h#L177) + +Supported Frame rates [dsVideoFrameRate_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L508) + +Supported Video formats [dsHDRStandard_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L625) + +Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDeviceTypes.h#L140) + +### Check the Zoom Control + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |Y|Y| + +#### Test Startup Requirement-Check the Zoom Control + +Playback the pre-define streams + +#### Emulator Requirements-Check the Zoom Control + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check the Zoom Control + +Set the supported zoom modes and verify the applied zoom mode during playback. + +### Check the HDR Capability + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check `HDR` Capability|Get the `HDR` capabilities and status|Y|`NA`| +||Set/Get force `HDR` disable with/without Video playback|Y|Y| + +#### Test Startup Requirement-Check the HDR Capability + +Playback the pre-define streams + +#### Emulator Requirements-Check the HDR Capability + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check the HDR Capability + +Disable `HDR` and playback the `HDR` stream and verify status. + +### Check Video codec and Formats + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check Video codec and Formats|Check the supported Video coding format |Y|`NA`| +||Gets the video codec information with/without Video playback|Y|Y| + +#### Test Startup Requirement-Check Video codec and Formats + +Playback the pre-define streams + +#### Emulator Requirements-Check Video codec and Formats + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check Video codec and Formats + +Play back the different HEVC profiles and verify. + +### Check the Display frame rate Capability + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|Y|`NA`| +||Check Display framerate pre change event|`NA`|Y| +||Check Display framerate post change event|`NA`|Y| + +#### Test Startup Requirement-Check the Display frame rate Capability + +Playback the pre-define streams + +#### Emulator Requirements-Check the Display frame rate Capability + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check the Display frame rate Capability + +Trigger an event for Display framerate change. From 630fba7911657505a7b24b9a7b0c70f3cbff696e Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:00:01 +0000 Subject: [PATCH 03/64] gh #14 dsVideoPort Test Specification Documentation --- docs/pages/ds-video-port_TestSpec.md | 179 +++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 docs/pages/ds-video-port_TestSpec.md diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md new file mode 100644 index 00000000..4d7021c6 --- /dev/null +++ b/docs/pages/ds-video-port_TestSpec.md @@ -0,0 +1,179 @@ +# Device Settings Video Port Test Specification Documentation + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + - [Emulator Requirements](#emulator-requirements) + - [Check the Video port status](#check-the-video-port-status) + - [Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability) + - [Check Video Resolution and HDMI Status](#check-video-resolution-and-hdmi-status) + - [HDCP and DTCP Management](#hdcp-and-dtcp-management) + - [Color Capabilities](#color-capabilities) + +## Acronyms, Terms and Abbreviations + +- `HAL` - Hardware Abstraction Layer +- `API` - Caller Programming Interface +- `DS` - Device Settings +- `HDMI` - High-Definition Multimedia Interface +- `DTCP` - Digital Transmission Content Protection +- `HDCP` - High-bandwidth Digital Content Protection +- `HDR` - High Dynamic Range +- `SDR` - Standard Dynamic Range +- `EDID` - Extended Display Identification Data +- `EOTF` - Electro-Optical Transfer Function + +## Introduction + +This document provides an overview of the testing requirements for the Device Settings Video Port module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. + +Interface of the test is available here: [dsVideoPort HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoPort.h) + +## Module Description + +`DS` Video Port `HAL` provides a set of `APIs` to initialize, query and set information about the Video ports like getting video port handle, fetching connected display information such as color depth, color space, matrix coefficients, quantization range, supported video resolutions using the video port handle. It also provides `APIs` to enable or disable content protection like `HDCP` and `DTCP`, to set the background color and preferred color depth of the video port. + +## Testing Scope + +|#|Test Functionality|Description| +|-|------------------|-----------| +|1|[Check the Video port status](#check-the-video-port-status)|Check the Video Port Access and Status | +|2|[Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability)|Check Video content Format and `HDR` Capability| +|3|[Check Video Resolution](#check-video-resolution)|Check Video resolution| +|4|[HDCP and DTCP Management](#hdcp-and-dtcp-management)|Check `HDCP` and `DTCP` Status| +|5|[Color Capabilities](#color-capabilities)|Check the color capabilities| + +### Emulator Requirements + +Boot configuration: Check video ports, formats, frame rates, and device-supported resolutions, along with the number of ports supported by each device. + +Supported Video Port [dsVideoPortType_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L132) + +Supported Video resolutions [dsTVResolution_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L489) + +Supported Frame rates [dsVideoFrameRate_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L508) + +Supported Video formats [dsHDRStandard_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L625) + +Supported Video background Color [dsVideoBackgroundColor_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L540) + +Supported Display Color Depth [dsDisplayColorDepth_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L758) + +Supported Display Color Space [dsDisplayColorSpace_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L733) + +Supported Display MatrixCoefficient [dsDisplayMatrixCoefficients_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L780) + +Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L745) + +### Check the video port status + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check the video port status|Get the video port handle,check the Video Port enable/disable|Y|`NA`| +||Verify display connected/disconnected status with/without video port connect|Y|Y| +||Verify the surround mode status and Capability with/without playback|Y|Y| +||Verify the Video port status(i.e. active or not) with/without video port connect|Y|Y| + +#### Test Startup Requirement-Check the video port status + +Playback the pre-define streams + +#### Emulator Requirements-Check the video port status + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check the video port status + +Unplug the Video port,Verify the surround mode + +### Check Video Content Format and HDR Capability + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|Y| +||Get the HDR capabilities and status|Y|`NA`| +||Set/Get Force Disable 4KSupport with/without playback|Y|Y| +||Reset the video output to SDR with/without playback|`NA`|Y| +||Check Video`EOTF` status|Y|Y| + +#### Test Startup Requirement-Check Video Content Format and HDR Capability + +Playback the pre-define streams + +#### Emulator Requirements-Check Video Content Format and HDR Capability + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check Video Content Format and HDR Capability + +Trigger an event for list of video format change and Verify the video profile formats + +### Check Video Resolution + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check Resolution with/without playback|set/get pixel resolution|Y|Y| +||set/get AspectRatio|Y|Y| +||set/get video Stereo Scopic modes|Y|Y| +||set/get video Frame rates|Y|Y| +||set/get interlaced/progressive|Y|Y| + +#### Test Startup Requirement-Check Video Resolution + +Playback the pre-define streams + +#### Emulator Requirements-Check Video Resolution + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Check Video Resolution + +Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. + +### HDCP and DTCP Management + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y| +||Check DTCP/HDCP status for valid port|Y|Y| +||Check HDCP protocol status|Y|Y| +||Check EDID status|Y|Y| +||Notify event if the HDCP status change|`NA`|Y| + +#### Test Startup Requirement-HDCP and DTCP Management + +Playback the pre-define streams + +#### Emulator Requirements-HDCP and DTCP Management + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-HDCP and DTCP Management + +Trigger an event HDCP status change. + +### Color Capabilities + +|Test Functionality|Description|L2|L3| +|------------------|-----------|--|--| +|Check Color Capabilities|Set/Get Color Space|Y|Y| +||Set/Get Color Depth Capabilities |Y|Y| +||Check QuantizationRange status|Y|Y| +||Check MatrixCoefficients status|Y|Y| +||Set Background Color|Y|Y| +||Get Current OutputSettings|Y|Y| + +#### Test Startup Requirement-Color Capabilities + +Playback the pre-define streams + +#### Emulator Requirements-Color Capabilities + +[Emulator Requirements](#emulator-requirements) + +#### Control Plane Requirements-Color Capabilities + +Verify the Color Space,Color Depth,QuantizationRange,MatrixCoefficients,Background Color From 104fce971c6bc59ef2eb3420d292a7972336b023 Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Wed, 3 Apr 2024 11:33:17 +0100 Subject: [PATCH 04/64] Updated with source/sink details --- docs/pages/ds-video-port_TestSpec.md | 74 ++++++++++++++-------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md index 4d7021c6..db547f95 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_TestSpec.md @@ -70,12 +70,13 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// ### Check the video port status -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check the video port status|Get the video port handle,check the Video Port enable/disable|Y|`NA`| -||Verify display connected/disconnected status with/without video port connect|Y|Y| -||Verify the surround mode status and Capability with/without playback|Y|Y| -||Verify the Video port status(i.e. active or not) with/without video port connect|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check the video port status|Get the video port handle,check the Video Port enable/disable|Y|`NA`|Y|Y| +||Verify display connected/disconnected status without video port connected|Y|`NA`|Y|Y| +||Verify display connected/disconnected status by connecting/disconnecting video port|`NA`|Y|Y|`NA`| +||Verify the surround mode capabilities with/without playback|Y|Y|Y|Y| +||Verify the surround mode capabilities of connected display with/without playback|Y|Y|Y|`NA`| #### Test Startup Requirement-Check the video port status @@ -91,13 +92,14 @@ Unplug the Video port,Verify the surround mode ### Check Video Content Format and HDR Capability -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|Y| -||Get the HDR capabilities and status|Y|`NA`| -||Set/Get Force Disable 4KSupport with/without playback|Y|Y| -||Reset the video output to SDR with/without playback|`NA`|Y| -||Check Video`EOTF` status|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|Y|Y|Y| +||Get the HDR capabilities and status|Y|`NA`|Y|Y| +||Set/Get Force Disable 4KSupport with/without playback|Y|Y|Y|Y| +||Disable 4KSupport with external analyzer|`NA`|Y|Y|`NA`| +||Reset the video output to SDR with/without playback|`NA`|Y|Y|Y| +||Reset the video output to SDR with external analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Check Video Content Format and HDR Capability @@ -109,17 +111,14 @@ Playback the pre-define streams #### Control Plane Requirements-Check Video Content Format and HDR Capability -Trigger an event for list of video format change and Verify the video profile formats +Check the port output resolutions and HDR with analyzer ### Check Video Resolution -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check Resolution with/without playback|set/get pixel resolution|Y|Y| -||set/get AspectRatio|Y|Y| -||set/get video Stereo Scopic modes|Y|Y| -||set/get video Frame rates|Y|Y| -||set/get interlaced/progressive|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check Resolution with/without playback|Set/Get Video properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|Y|Y|Y|Y| +||Check Video properties with external Analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Check Video Resolution @@ -135,13 +134,14 @@ Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/pr ### HDCP and DTCP Management -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y| -||Check DTCP/HDCP status for valid port|Y|Y| -||Check HDCP protocol status|Y|Y| -||Check EDID status|Y|Y| -||Notify event if the HDCP status change|`NA`|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y|Y|Y| +||Check DTCP/HDCP status for valid port|Y|Y|Y|Y| +||Check HDCP protocol status|Y|Y|Y|Y| +||Check EDID status|Y|Y|Y|Y| +||Notify event if the HDCP status change|`NA`|Y|Y|Y| +||Check HDCP/DTCP status with external analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-HDCP and DTCP Management @@ -153,18 +153,18 @@ Playback the pre-define streams #### Control Plane Requirements-HDCP and DTCP Management -Trigger an event HDCP status change. +Check the HDCP/DTCP status with external analyzer ### Color Capabilities -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check Color Capabilities|Set/Get Color Space|Y|Y| -||Set/Get Color Depth Capabilities |Y|Y| -||Check QuantizationRange status|Y|Y| -||Check MatrixCoefficients status|Y|Y| -||Set Background Color|Y|Y| -||Get Current OutputSettings|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check Color Capabilities|Set/Get Color Space|Y|Y|Y|Y| +||Set/Get Color Depth Capabilities |Y|Y|Y|Y| +||Check QuantizationRange status|Y|Y|Y|Y| +||Check MatrixCoefficients status|Y|Y|Y|Y| +||Set Background Color|Y|Y|Y|Y| +||Check the color space capabilities with analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Color Capabilities From e1e3c89bb2309c19188eb7b973c10414ce9937a9 Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Wed, 3 Apr 2024 12:21:03 +0100 Subject: [PATCH 05/64] Updated spec --- docs/pages/ds-video-port_TestSpec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md index db547f95..cc6847cb 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_TestSpec.md @@ -117,8 +117,8 @@ Check the port output resolutions and HDR with analyzer |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Resolution with/without playback|Set/Get Video properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|Y|Y|Y|Y| -||Check Video properties with external Analyzer|`NA`|Y|Y|`NA`| +|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|Y|Y|Y|Y| +||Check Video port properties with external Analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Check Video Resolution From 7965b796d8462d3bd04a828b5afc1fe3db34195e Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Wed, 3 Apr 2024 12:21:20 +0100 Subject: [PATCH 06/64] Updated spec --- docs/pages/ds-video-port_TestSpec.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md index cc6847cb..166107ea 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_TestSpec.md @@ -136,11 +136,11 @@ Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/pr |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y|Y|Y| -||Check DTCP/HDCP status for valid port|Y|Y|Y|Y| -||Check HDCP protocol status|Y|Y|Y|Y| -||Check EDID status|Y|Y|Y|Y| -||Notify event if the HDCP status change|`NA`|Y|Y|Y| +|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y|Y|`NA`| +||Check DTCP/HDCP status for valid port|Y|Y|Y|`NA`| +||Check HDCP protocol status|Y|Y|Y|`NA`| +||Check EDID status|Y|Y|Y|`NA`| +||Notify event if the HDCP status change|`NA`|Y|Y|`NA`| ||Check HDCP/DTCP status with external analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-HDCP and DTCP Management From 6265d58fd6e35f4d38dc122110578c9349ac8ad8 Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Wed, 3 Apr 2024 14:25:40 +0100 Subject: [PATCH 07/64] Updated the spec --- docs/pages/ds-video-device_TestSpec.md | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/pages/ds-video-device_TestSpec.md b/docs/pages/ds-video-device_TestSpec.md index e2514c55..9e7d1b16 100644 --- a/docs/pages/ds-video-device_TestSpec.md +++ b/docs/pages/ds-video-device_TestSpec.md @@ -57,9 +57,9 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali ### Check the Zoom Control -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |Y|Y|Y|`NA`| #### Test Startup Requirement-Check the Zoom Control @@ -71,14 +71,14 @@ Playback the pre-define streams #### Control Plane Requirements-Check the Zoom Control -Set the supported zoom modes and verify the applied zoom mode during playback. +Verify the applied zoom mode during playback with analyzer. ### Check the HDR Capability -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check `HDR` Capability|Get the `HDR` capabilities and status|Y|`NA`| -||Set/Get force `HDR` disable with/without Video playback|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check `HDR` Capability|Get the `HDR` capabilities and status|Y|`NA`|Y|Y| +||Force `HDR` disable with/without Video playback and verify|Y|Y|Y|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -90,14 +90,14 @@ Playback the pre-define streams #### Control Plane Requirements-Check the HDR Capability -Disable `HDR` and playback the `HDR` stream and verify status. +Verify the `HDR` status with analyzer. ### Check Video codec and Formats -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check Video codec and Formats|Check the supported Video coding format |Y|`NA`| -||Gets the video codec information with/without Video playback|Y|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check Video codec Formats and information|Check the supported Video coding format |Y|`NA`|Y|Y| +||Verify video codec format and information with/without Video playback using analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -109,15 +109,15 @@ Playback the pre-define streams #### Control Plane Requirements-Check Video codec and Formats -Play back the different HEVC profiles and verify. +Verify the codec formats with analyzer. ### Check the Display frame rate Capability -|Test Functionality|Description|L2|L3| -|------------------|-----------|--|--| -|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|Y|`NA`| -||Check Display framerate pre change event|`NA`|Y| -||Check Display framerate post change event|`NA`|Y| +|Test Functionality|Description|L2|L3|Source|Sink| +|------------------|-----------|--|--|------|----| +|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|Y|`NA`|Y|Y| +||Set the frame rate and check if callbacks are triggered|`NA`|Y|Y|Y| +||Set the frame rate and verify with analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Check the Display frame rate Capability @@ -129,4 +129,4 @@ Playback the pre-define streams #### Control Plane Requirements-Check the Display frame rate Capability -Trigger an event for Display framerate change. +Verify the frame rate with analyzer From c6709e1cba03bf7a60191fd3d436e73532ed0c0a Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Wed, 10 Apr 2024 18:16:14 +0100 Subject: [PATCH 08/64] Updated test specification --- docs/pages/ds-video-port_TestSpec.md | 55 +++++++++++++++------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md index 166107ea..0947d72e 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_TestSpec.md @@ -23,8 +23,10 @@ - `HDCP` - High-bandwidth Digital Content Protection - `HDR` - High Dynamic Range - `SDR` - Standard Dynamic Range -- `EDID` - Extended Display Identification Data -- `EOTF` - Electro-Optical Transfer Function +- `EDID` - Extended Display Identification Data +- `EOTF` - Electro-Optical Transfer Function +- `NA` - Not Applicable +- `Y` - Yes ## Introduction @@ -72,11 +74,11 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check the video port status|Get the video port handle,check the Video Port enable/disable|Y|`NA`|Y|Y| -||Verify display connected/disconnected status without video port connected|Y|`NA`|Y|Y| -||Verify display connected/disconnected status by connecting/disconnecting video port|`NA`|Y|Y|`NA`| -||Verify the surround mode capabilities with/without playback|Y|Y|Y|Y| -||Verify the surround mode capabilities of connected display with/without playback|Y|Y|Y|`NA`| +|Check the video port status|Get the video port handle,check the Video Port enable/disable|`Y`|`NA`|`Y`|`Y`| +||Verify display connected/disconnected status without video port connected|`Y`|`NA`|`Y`|`Y`| +||Verify display connected/disconnected status by connecting/disconnecting video port|`NA`|`Y`|`Y`|`NA`| +||Verify the surround mode capabilities with/without playback|`Y`|`Y`|`Y`|`Y`| +||Verify the surround mode capabilities of connected display with/without playback|`Y`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the video port status @@ -94,12 +96,12 @@ Unplug the Video port,Verify the surround mode |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|Y|Y|Y| -||Get the HDR capabilities and status|Y|`NA`|Y|Y| -||Set/Get Force Disable 4KSupport with/without playback|Y|Y|Y|Y| -||Disable 4KSupport with external analyzer|`NA`|Y|Y|`NA`| -||Reset the video output to SDR with/without playback|`NA`|Y|Y|Y| -||Reset the video output to SDR with external analyzer|`NA`|Y|Y|`NA`| +|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|`Y`|`Y`|`Y`| +||Get the HDR capabilities and status|Y|`NA`|`Y`|`Y`| +||Set/Get Force Disable 4KSupport with/without playback|`Y`|`Y`|`Y`|`Y`| +||Disable 4KSupport with external analyzer|`NA`|`Y`|`Y`|`NA`| +||Reset the video output to SDR with/without playback|`NA`|`Y`|`Y`|`Y`| +||Reset the video output to SDR with external analyzer|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video Content Format and HDR Capability @@ -117,8 +119,9 @@ Check the port output resolutions and HDR with analyzer |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|Y|Y|Y|Y| -||Check Video port properties with external Analyzer|`NA`|Y|Y|`NA`| +|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|`Y`|`Y`|`Y`|`NA`| +||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify|`Y`|`NA`|`NA`|`Y`| +||Check Video port properties with external Analyzer|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video Resolution @@ -136,12 +139,12 @@ Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/pr |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|Y|Y|Y|`NA`| -||Check DTCP/HDCP status for valid port|Y|Y|Y|`NA`| -||Check HDCP protocol status|Y|Y|Y|`NA`| -||Check EDID status|Y|Y|Y|`NA`| -||Notify event if the HDCP status change|`NA`|Y|Y|`NA`| -||Check HDCP/DTCP status with external analyzer|`NA`|Y|Y|`NA`| +|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|`Y`|`Y`|`Y`|`NA`| +||Check DTCP/HDCP status for valid port|`Y`|`Y`|`Y`|`Y`| +||Check HDCP protocol status|`Y`|`Y`|`Y`|`Y`| +||Check EDID status|`Y`|`Y`|`Y`|`Y`| +||Notify event if the HDCP status change|`NA`|`Y`|`Y`|`NA`| +||Check HDCP/DTCP status with external analyzer|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-HDCP and DTCP Management @@ -159,11 +162,11 @@ Check the HDCP/DTCP status with external analyzer |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Color Capabilities|Set/Get Color Space|Y|Y|Y|Y| -||Set/Get Color Depth Capabilities |Y|Y|Y|Y| -||Check QuantizationRange status|Y|Y|Y|Y| -||Check MatrixCoefficients status|Y|Y|Y|Y| -||Set Background Color|Y|Y|Y|Y| +|Check Color Capabilities|Set/Get Color Space|`Y`|`Y`|`Y`|`Y`| +||Set/Get Color Depth Capabilities |`Y`|`Y`|`Y`|`Y`| +||Check QuantizationRange status|`Y`|`Y`|`Y`|`Y`| +||Check MatrixCoefficients status|`Y`|`Y`|`Y`|`Y`| +||Set Background Color|`Y`|`Y`|`Y`|`NA`| ||Check the color space capabilities with analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Color Capabilities From c8130d0d2fa40263b8d8e3af14dc52743b260054 Mon Sep 17 00:00:00 2001 From: bhanucbp Date: Thu, 11 Apr 2024 15:51:38 +0100 Subject: [PATCH 09/64] Updated the test specification --- docs/pages/ds-video-device_TestSpec.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/pages/ds-video-device_TestSpec.md b/docs/pages/ds-video-device_TestSpec.md index 9e7d1b16..6a430a23 100644 --- a/docs/pages/ds-video-device_TestSpec.md +++ b/docs/pages/ds-video-device_TestSpec.md @@ -21,6 +21,8 @@ - `FPS` - Frames Per Second. - `FRF` - Frame Rate Frequency - `HEVC` - High Efficiency Video Coding +- `NA` - Not Applicable +- `Y` - Yes ## Introduction @@ -59,7 +61,7 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |Y|Y|Y|`NA`| +|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |`Y`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the Zoom Control @@ -77,8 +79,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check `HDR` Capability|Get the `HDR` capabilities and status|Y|`NA`|Y|Y| -||Force `HDR` disable with/without Video playback and verify|Y|Y|Y|`NA`| +|Check `HDR` Capability|Get the `HDR` capabilities and status|`Y`|`NA`|`Y`|`Y`| +||Force `HDR` disable with/without Video playback and verify|`Y`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -96,8 +98,8 @@ Verify the `HDR` status with analyzer. |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Video codec Formats and information|Check the supported Video coding format |Y|`NA`|Y|Y| -||Verify video codec format and information with/without Video playback using analyzer|`NA`|Y|Y|`NA`| +|Check Video codec Formats and information|Check the supported Video coding format |`Y`|`NA`|`Y`|`Y`| +||Verify video codec format and information with/without Video playback using analyzer|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -115,9 +117,8 @@ Verify the codec formats with analyzer. |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|Y|`NA`|Y|Y| -||Set the frame rate and check if callbacks are triggered|`NA`|Y|Y|Y| -||Set the frame rate and verify with analyzer|`NA`|Y|Y|`NA`| +|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|`Y`|`NA`|`NA`|Y| +||Set the frame rate and check if callbacks are triggered|`NA`|`Y`|`NA`|`Y`| #### Test Startup Requirement-Check the Display frame rate Capability From 6d56a83a968109f0b5451a939e8b791e362ce017 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:09:50 +0100 Subject: [PATCH 10/64] update hal apis to the spec --- docs/pages/dsDisplay_TestSpecificaion.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index 2b55d90b..54a2612c 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -57,7 +57,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink| |-----------|--------|--|--|------|----| |The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID,dsGetEDIDBytes|N|Y|Y|Y| -|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID ||Y|N|Y|Y| +|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |dsGetEDID,dsGetEDIDBytes|Y|N|Y|Y| ### Test Startup Requirement - Get EDID Information @@ -83,7 +83,7 @@ None |Description|L2|L3|HAL APIs|Source|Sink| |-----------|--|--|--------|------|----| |Test the aspect ratio returned by the dsGetDisplayAspectRatio() function for the specified display device handle.|dsGetDisplayAspectRatio|N|Y|Y|N -|Adjust and test the aspect ratio to ensure it is providing the expected aspect ratio.||N|Y|Y|N| +|Adjust and test the aspect ratio to ensure it is providing the expected aspect ratio.|dsGetDisplayAspectRatio|N|Y|Y|N| ### Test Startup Requirement - Get Aspect Ratio @@ -101,11 +101,11 @@ Maintains the configuration of various aspect ratios and provides them whenever |Description|L2|L3|HAL APIs|Source|Sink| |-----------|--|--|--------|------|----| -|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback,dsDisplayEventCallback_t|N|Y|Y|Y| -|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event||N|Y|Y|N| -|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected||N|Y|Y|N| -|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected||N|Y|Y|N| -|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change||N|Y|Y|N| +|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|Y| +|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|N| +|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N| +|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N| +|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change|dsRegisterDisplayEventCallback|N|Y|Y|N| ### Test Startup Requirement -Callback Registration for Display Related Events From a9f16628c31873b83aafb07f0c288c8466949d56 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:13:36 +0100 Subject: [PATCH 11/64] update hal apis to the spec --- docs/pages/dsDisplay_TestSpecificaion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index 54a2612c..e26eced3 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -57,7 +57,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink| |-----------|--------|--|--|------|----| |The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID,dsGetEDIDBytes|N|Y|Y|Y| -|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |dsGetEDID,dsGetEDIDBytes|Y|N|Y|Y| +|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |dsGetEDID, dsGetEDIDBytes|Y|N|Y|Y| ### Test Startup Requirement - Get EDID Information From 80554bcb9f0a8fddcfa89511863f5918c0613ba4 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:14:39 +0100 Subject: [PATCH 12/64] update hal apis to the spec --- docs/pages/dsDisplay_TestSpecificaion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index e26eced3..5c8243a7 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -56,7 +56,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink| |-----------|--------|--|--|------|----| -|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID,dsGetEDIDBytes|N|Y|Y|Y| +|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID, dsGetEDIDBytes|N|Y|Y|Y| |For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |dsGetEDID, dsGetEDIDBytes|Y|N|Y|Y| ### Test Startup Requirement - Get EDID Information From 1adcb15dcafcfdaf0b49457acc8ff4727d9cd35d Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:15:40 +0100 Subject: [PATCH 13/64] update hal apis to the spec --- docs/pages/dsDisplay_TestSpecificaion.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index 5c8243a7..77fa88d3 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -99,8 +99,8 @@ Maintains the configuration of various aspect ratios and provides them whenever ## Callback Registration for Display Related Events -|Description|L2|L3|HAL APIs|Source|Sink| -|-----------|--|--|--------|------|----| +|Description|HAL APIs|L2|L3|Source|Sink| +|-----------|--------|--|--|------|----| |Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|Y| |Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|N| |Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N| From b4724e7526541dd17d2d01db87be7d97735b7648 Mon Sep 17 00:00:00 2001 From: Anbu Kannadhasan Date: Wed, 27 Mar 2024 21:25:42 +0000 Subject: [PATCH 14/64] update hdmi test spec --- docs/pages/dsHdmiIn_test_spec.md | 436 +++++++++++++++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100644 docs/pages/dsHdmiIn_test_spec.md diff --git a/docs/pages/dsHdmiIn_test_spec.md b/docs/pages/dsHdmiIn_test_spec.md new file mode 100644 index 00000000..e1c5fb75 --- /dev/null +++ b/docs/pages/dsHdmiIn_test_spec.md @@ -0,0 +1,436 @@ +# HdmiIn Test Document + +## Version History + +| Date(DD/MM/YY) | Comment | Version | +| -------------- | ------------- | ------- | +| 27/03/2024 | First Release | 1.0.0 | + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + +## Acronyms, Terms and Abbreviations + +- `EDID` - Extended Display Identification +- `API` - Application programming interface +- `HDMI` - High-Definition Multimedia Interface +- `dsHdmiIn` - Device Settings High-Definition Multimedia Interface Input +- `SPD` - Source Product Descriptor +- `ALLM` - Auto Low Latency Mode + +## Introduction + +This document provides an overview of the testing requirements for the `dsHdmiIn` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. + +Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) + +## Module Description + +High level overview: + +- `dsHdmiIn` provides a variety of `API`s for accessing information regarding the `HDMI` Inputs on sink devices and source devices that has an input port. +- It facilitates interaction with `HDMI` Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. +- For the sink and source devices, to retrieve the available `HDMI` Input information, an external device must be connected. + +## Testing Scope + +|#|Test Functionality|Test Description| +|-|------------------|----------------| +|1|[Get Number of Inputs](#get-number-of-inputs)|The test aims to verify and validate the number of HDMI Input ports available on the platform.| +|2|[Get the Input Status](#get-the-input-status)|The test is to verify the status of all HDMI Input ports available on the platform.| +|3|[Set the `HDMI` port](#set-the-hdmi-port)|The test is to set and verify the HDMI Input port for Presentation| +|4|[Scale the `HDMI` Input Video](#scale-the-hdmi-input-video)|The test aims to verify and validate the video size and coordinates of the HMDI Input Video.| +|5|[Select Zoom Mode](#select-zoom-mode)|The test aims to verify the zoom mode functionality of the module.| +|6|[Get Current Video Mode](#get-current-video-mode)|The test is to get current HDMI input video mode from active port.| +|7|[Callback for connection Status](#callback-for-connection-status)|The test aims to verify whether it notifies applications when the HDMI input port connection status changes| +|8|[Callback for Signal Change](#callback-for-signal-change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the `HDMI` In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| +|9|[Callback for Status Change](#callback-for-status-change)|The test validates the functionality of the callback function designed to notify applications of `HDMI` Input status change events.(Port,IsPresented flag status)| +|9|[Callback for Video Mode Change](#callback-for-video-mode-change)|The test validates the functionality of the callback function designed to notify when there is a change in the video resolution| +|10|[Callback for `ALLM` Mode Change](#callback-for-allm-mode-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input `ALLM` mode changes| +|11|[Callback for AV Latency Change](#callback-for-av-latency-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input AV latency changes| +|12|[Callback for AVI Content Type Change](#callback-for-avi-content-type-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input AVI content type changes| +|13|[Check `HDMI` ARC Port](#check-hdmi-arc-port)|The test verifies whether the given port is an `HDMI` ARC port or not| +|14|[Set and Get `EDID` Information](#set-and-get-edid-information)|The test is to validate by setting and getting the `EDID` bytes information and `EDID` version| +|15|[Get `HDMI` `SPD` Info](#get-hdmi-spd-info)|The test is to get and verify the `SPD` information.| +|16|[Get Supported Game Feature List](#get-supported-game-feature-list)|The test verifies by getting the all supported game features in the list.| +|17|[Get AV latency](#get-av-latency)|The test validates by getting the current av latency.| +|18|[Get `ALLM` status](#get-allm-status)|The test aims to verify that `ALLM` status is enabled or disabled for the specific `HDMI` input port.| +|19|[Get and Set `EDID` to all `ALLM` Support](#get-and-set-edid-to-all-allm-support)|The test aims to verfiy by setting and getting the `EDID` `ALLM` support.| +----------- + +## Get Number of Inputs + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the function returns the expected `HDMI` Input ports.|Y|N|Y|Y| + +### Test Startup Requirement - Get Number of Inputs + +The test begins with the configured `HDMI` input port details. + +### Emulator Requirement - Get Number of Inputs + +Emulator will boot with the port informations coming from the configuration file. + +### Control Plane Requirement - Get Number of Inputs + +None + +## Get the Input Status + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify the status of the `HDMI` Input by ensuring it is in disable status.|Y|N|Y|Y| +|Verify the status of the `HDMI` Input by ensuring it is enabled/disabled, connected to the source, and that the `HDMI` input port is active.|N|Y|Y|Y| + +### Test Startup Requirement - Get the Input Status + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Get the Input Status + +Emulator will boot with the port informations coming from the configuration file. + +### Control Plane Requirement - Get the Input Status + +The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. + +## Set the `HDMI` port + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the function successfully sets the specified `HDMI` Input port as active for presentation and check the port information using "Get status".|Y|Y|Y|Y| +|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y|Y|Y| +|Set the Audio Mix to be enable and disable|N|Y|N|Y| +|Verify the `HDMI` input with the video plane in both primary and secondary. Additionally, validate the topmost flag.|N|Y|N|Y| + +### Test Startup Requirement - Set the `HDMI` port + +The test begins with the configured `HDMI` input port numbers, video plane types. + +### Emulator Requirement - Set the `HDMI` port + +Emulator will boot with the port informations coming from the configuration file. + +### Control Plane Requirement - Set the `HDMI` port + +The Control Plane must monitor the external device (Video analyzer) to detect any video glitches and other audio mix, video plane functionalities. + +## Scale the `HDMI` Input Video + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the function successfully scales the `HDMI` input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y|Y|Y| + +### Test Startup Requirement - Scale the `HDMI` Input Video + +The test begins by setting up the video analyzer, and the video should be played. + +### Emulator Requirement - Scale the `HDMI` Input Video + +Emulator will boot with the port informations coming from the configuration file. Predefined coordinates and dimesions to compare. + +### Control Plane Requirement - Scale the `HDMI` Input Video + +Control plane to validate the coordinates and dimensions by the video analyzers. + +## Select Zoom Mode + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the function successfully updates the video zoom on the active `HDMI` input using the provided zoom mode|N|Y|Y|N| + +### Test Startup Requirement - Select Zoom Mode + +The test begins by setting up the video analyzer, and the video should be played. + +### Emulator Requirement - Select Zoom Mode + +Emulator will boot with the zoom modes in the configuration file. + +### Control Plane Requirement - Select Zoom Mode + +Changing the zoom modes by the Control Plane. + +## Get Current Video Mode + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the function successfully updates the current `HDMI` input video modes like Pixel resolution, frame rate and interlaced information of the active port|N|Y|Y|Y| + +### Test Startup Requirement - Get Current Video Mode + +The test begins by setting up the video analyzer, and the video should be played. + +### Emulator Requirement - Get Current Video Mode + +Emulator will boot with the all video mode related information in the configuration file. + +### Control Plane Requirement - Get Current Video Mode + +None + +## Callback for connection Status + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly notifies the application when a `HDMI` Input port is connected or disconnected.|N|Y|Y|Y| +|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y|Y|Y| +|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t if the connected port is active and presents video after being connected.|N|Y|Y|Y| + +### Test Startup Requirement - Callback for connection Status + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Callback for connection Status + +Emulator will boot with the port information coming from the configuration file. + +### Control Plane Requirement - Callback for connection Status + +The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. + +## Callback for Signal Change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y|N|Y| +|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y|N|Y| + +### Test Startup Requirement - Callback for Signal Change + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Callback for Signal Change + +Emulator will boot with the port informations coming from the configuration file. + +### Control Plane Requirement - Callback for Signal Change + +The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. +Provide resolution changes or configurations changes on the connected device that affects the output signal. + +## Callback for Status Change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly notifies the application of the `HDMI` Input status change event.|N|Y|N|Y| +|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y|N|Y| +|Verify that the callback function properly triggers whenever the dsHdmiInStatus_t is updated|N|Y|N|Y| + +### Test Startup Requirement - Callback for Status Change + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Callback for Status Change + +Emulator will boot with the port informations coming from the configuration file. + +### Control Plane Requirement - Callback for Status Change + +The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. + +## Callback for Video Mode Change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly notifies the application whenever there is resolution and other video mode changes.|N|Y|N|Y| + +### Test Startup Requirement - Callback for Video Mode Change + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Callback for Video Mode Change + +Emulator will boot with the video resolutions and other video modes from the configuration file. + +### Control Plane Requirement - Callback for Video Mode Change + +Changing of the video resolution by control Plane. + +## Callback for `ALLM` mode change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly notifies the application whenever there is `ALLM` mode and Dolby Vison Mode change.|N|Y|N|Y| + +### Test Startup Requirement - Callback for `ALLM` mode change + +Connection of the source device/compatible gaming console devices with the `HDMI` Input. + +### Emulator Requirement - Callback for `ALLM` mode change + +Emulator will boot with the `HDMI` input port numbers and `ALLM` mode information. + +### Control Plane Requirement - Callback for `ALLM` mode change + +Changing of the `ALLM` mode by control Plane. + +## Callback for AV Latency Change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function notifies the `HDMI` input Audio and Video latency within its Max and Min ranges.|N|Y|N|Y| + +### Test Startup Requirement - Callback for AV Latency Change + +Connection of the source device with the `HDMI` Input and video analyzer to check the AV latency. + +### Emulator Requirement - Callback for AV Latency Change + +Emulator will boot with the AV latency information. + +### Control Plane Requirement - Callback for AV Latency Change + +Control Plane changes the AV latency + +## Callback for AVI Content Type Change + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify that the callback function properly notifies the application whenever there is a change in the AVI content type.|N|Y|N|Y| + +### Test Startup Requirement - Callback for AVI Content Type Change + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Callback for AVI Content Type Change + +Emulator will boot with the AVI content type information. + +### Control Plane Requirement - Callback for AVI Content Type Change + +Changing AVI content type by control Plane. + +## Check `HDMI` ARC Port + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Verify whether given port is an `HDMI` ARC port or not.|Y|N|N|Y| + +### Test Startup Requirement - Check `HDMI` ARC Port + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Check `HDMI` ARC Port + +Emulator will boot with the `HDMI` ARC port information. + +### Control Plane Requirement - Check `HDMI` ARC Port + +Changing of the port with `HDMI` ARC by control Plane. + +## Set and Get `EDID` Information + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Setting the `EDID` version for a given port|Y|Y|N|Y| +|Get the `EDID` version and length for a given port and compare with the Set value|Y|Y|N|Y| +|This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|N|Y|N|Y| + +### Test Startup Requirement - Set and Get `EDID` Information + +Launch the test with the predefined configuration set of results. + +### Emulator Requirement - Set and Get `EDID` Information + +Emulator will boot with the `EDID` coming from the configuration file. + +### Control Plane Requirement - Set and Get `EDID` Information + +None + +## Get `HDMI` `SPD` Info + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Test to get the `HDMI` `SPD` Info. Check whether it gets the spd info frame information properly.|N|Y|N|Y| + +### Test Startup Requirement - Get `HDMI` `SPD` Info + +Connection of the source device with the `HDMI` Input. Expected predefined data to compare the information. + +### Emulator Requirement - Get `HDMI` `SPD` Info + +Emulator will boot with the `HDMI` SPD information from the configuration file. + +### Control Plane Requirement - Get `HDMI` `SPD` Info + +None + +## Get Supported Game Feature List + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Make sure that the functionality can list and get the count of all the game features that are supported.|Y|N|N|Y| + +### Test Startup Requirement - Get Supported Game Feature List + +Connection of the source device/game supported device with the `HDMI` Input. + +### Emulator Requirement - Get Supported Game Feature List + +Emulator will boot with the game supported features in the configuration. + +### Control Plane Requirement - Get Supported Game Feature List + +None + +## Get AV latency + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Test verifies to get the current AV latency connected when there is a change in the AV content. eg., Shifting from FilmMaker mode to any other mode|N|Y|N|Y| + +### Test Startup Requirement - Get AV latency + +Connection of the source device with the `HDMI` Input. + +### Emulator Requirement - Get AV latency + +Emulator will boot with the av latency information in configuration file. + +### Control Plane Requirement - Get AV latency + +None. + +## Get `ALLM` Status + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Gets the `ALLM` status of the designated `HDMI` input port. The status information indicates whether `ALLM` is enabled or disabled|Y|N|N|Y| + +### Test Startup Requirement - Get `ALLM` status + +Connection of the Game console source devce with the `HDMI` Input with game playback. + +### Emulator Requirement - Get `ALLM` status + +Emulator will boot with the `ALLM` configuration details. + +### Control Plane Requirement - Get `ALLM` status + +None + +## Get and Set `EDID` to all `ALLM` Support + +|Description|L2|L3|Source|Sink| +|-----------|--|--|------|----| +|Set the `ALLM` support to `EDID` Version 2.0. Check by enable and disable the support.|N|Y|N|Y| +|Get the `ALLM` support to `EDID` Version 2.0. Check whether it is enabled or disabled. |N|Y|N|Y| + +### Test Startup Requirement - Get and Set `EDID` to all `ALLM` Support + +Connection of the Game console source device with the `HDMI` Input. + +### Emulator Requirement - Get and Set `EDID` to all `ALLM` Support + +Emulator will boot with the `ALLM` support information. + +### Control Plane Requirement - Get and Set `EDID` to all `ALLM` Support + +None From 925780f90ecd022ee7b2b690de8ce5943764582d Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:42:17 +0100 Subject: [PATCH 15/64] Updated the changes on the spec --- docs/pages/ds-video-port_TestSpec.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_TestSpec.md index 0947d72e..1dc429df 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_TestSpec.md @@ -98,7 +98,7 @@ Unplug the Video port,Verify the surround mode |------------------|-----------|--|--|------|----| |Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|`Y`|`Y`|`Y`| ||Get the HDR capabilities and status|Y|`NA`|`Y`|`Y`| -||Set/Get Force Disable 4KSupport with/without playback|`Y`|`Y`|`Y`|`Y`| +||Set Force Disable 4KSupport with/without playback|`Y`|`Y`|`Y`|`Y`| ||Disable 4KSupport with external analyzer|`NA`|`Y`|`Y`|`NA`| ||Reset the video output to SDR with/without playback|`NA`|`Y`|`Y`|`Y`| ||Reset the video output to SDR with external analyzer|`NA`|`Y`|`Y`|`NA`| @@ -142,7 +142,7 @@ Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/pr |Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|`Y`|`Y`|`Y`|`NA`| ||Check DTCP/HDCP status for valid port|`Y`|`Y`|`Y`|`Y`| ||Check HDCP protocol status|`Y`|`Y`|`Y`|`Y`| -||Check EDID status|`Y`|`Y`|`Y`|`Y`| +||Ignore EDID status|`N`|`Y`|`Y`|`NA`| ||Notify event if the HDCP status change|`NA`|`Y`|`Y`|`NA`| ||Check HDCP/DTCP status with external analyzer|`NA`|`Y`|`Y`|`NA`| @@ -162,11 +162,11 @@ Check the HDCP/DTCP status with external analyzer |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Color Capabilities|Set/Get Color Space|`Y`|`Y`|`Y`|`Y`| -||Set/Get Color Depth Capabilities |`Y`|`Y`|`Y`|`Y`| +|Check Color Capabilities|Set/Get Color Space and compare with the configuration file|`Y`|`Y`|`Y`|`Y`| +||Set/Get Color Depth Capabilities and compare with the configuration file|`Y`|`Y`|`Y`|`Y`| ||Check QuantizationRange status|`Y`|`Y`|`Y`|`Y`| ||Check MatrixCoefficients status|`Y`|`Y`|`Y`|`Y`| -||Set Background Color|`Y`|`Y`|`Y`|`NA`| +||Set Background Color|`N`|`Y`|`Y`|`NA`| ||Check the color space capabilities with analyzer|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Color Capabilities From 963b8c3b5b7a203cdaeda5edcd764c1e367f771d Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:48:14 +0100 Subject: [PATCH 16/64] update the changes in the spec --- docs/pages/ds-video-device_TestSpec.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/pages/ds-video-device_TestSpec.md b/docs/pages/ds-video-device_TestSpec.md index 6a430a23..5a25e019 100644 --- a/docs/pages/ds-video-device_TestSpec.md +++ b/docs/pages/ds-video-device_TestSpec.md @@ -80,7 +80,6 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| |Check `HDR` Capability|Get the `HDR` capabilities and status|`Y`|`NA`|`Y`|`Y`| -||Force `HDR` disable with/without Video playback and verify|`Y`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -99,7 +98,6 @@ Verify the `HDR` status with analyzer. |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| |Check Video codec Formats and information|Check the supported Video coding format |`Y`|`NA`|`Y`|`Y`| -||Verify video codec format and information with/without Video playback using analyzer|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -111,7 +109,7 @@ Playback the pre-define streams #### Control Plane Requirements-Check Video codec and Formats -Verify the codec formats with analyzer. +None ### Check the Display frame rate Capability From 1aafad5cf82ea2bbf8ca6ff9d3443e0a32f98963 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:39:42 +0100 Subject: [PATCH 17/64] gh #18 Updated the file name --- ...-device_TestSpec.md => ds-video-device_High-Level_TestSpec.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/pages/{ds-video-device_TestSpec.md => ds-video-device_High-Level_TestSpec.md} (100%) diff --git a/docs/pages/ds-video-device_TestSpec.md b/docs/pages/ds-video-device_High-Level_TestSpec.md similarity index 100% rename from docs/pages/ds-video-device_TestSpec.md rename to docs/pages/ds-video-device_High-Level_TestSpec.md From 705449c3de1891909e1b65793e4da511b28b9675 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:23:22 +0100 Subject: [PATCH 18/64] gh #14 Updated the file name, review comments and removed DTDC test cases info --- ...d => ds-video-port_High-Level_TestSpec.md} | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename docs/pages/{ds-video-port_TestSpec.md => ds-video-port_High-Level_TestSpec.md} (81%) diff --git a/docs/pages/ds-video-port_TestSpec.md b/docs/pages/ds-video-port_High-Level_TestSpec.md similarity index 81% rename from docs/pages/ds-video-port_TestSpec.md rename to docs/pages/ds-video-port_High-Level_TestSpec.md index 1dc429df..ff0f276c 100644 --- a/docs/pages/ds-video-port_TestSpec.md +++ b/docs/pages/ds-video-port_High-Level_TestSpec.md @@ -1,4 +1,4 @@ -# Device Settings Video Port Test Specification Documentation +# Device Settings Video Port High Level Test Specification Documentation ## Table of Contents @@ -9,8 +9,8 @@ - [Emulator Requirements](#emulator-requirements) - [Check the Video port status](#check-the-video-port-status) - [Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability) - - [Check Video Resolution and HDMI Status](#check-video-resolution-and-hdmi-status) - - [HDCP and DTCP Management](#hdcp-and-dtcp-management) + - [Check Video Resolution](#check-video-resolution) + - [HDCP Management](#hdcp-management) - [Color Capabilities](#color-capabilities) ## Acronyms, Terms and Abbreviations @@ -19,7 +19,6 @@ - `API` - Caller Programming Interface - `DS` - Device Settings - `HDMI` - High-Definition Multimedia Interface -- `DTCP` - Digital Transmission Content Protection - `HDCP` - High-bandwidth Digital Content Protection - `HDR` - High Dynamic Range - `SDR` - Standard Dynamic Range @@ -30,13 +29,15 @@ ## Introduction -This document provides an overview of the testing requirements for the Device Settings Video Port module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. +This document provides an overview of the High Level testing requirements for the Device Settings Video Port module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. -Interface of the test is available here: [dsVideoPort HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoPort.h) +Interface header is available here: [dsVideoPort HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoPort.h) ## Module Description -`DS` Video Port `HAL` provides a set of `APIs` to initialize, query and set information about the Video ports like getting video port handle, fetching connected display information such as color depth, color space, matrix coefficients, quantization range, supported video resolutions using the video port handle. It also provides `APIs` to enable or disable content protection like `HDCP` and `DTCP`, to set the background color and preferred color depth of the video port. +`DS` Video Port `HAL` provides a set of `APIs` to initialize, query and set information about the Video ports like getting video port handle, fetching connected display information such as color depth, color space, matrix coefficients, quantization range, supported video resolutions using the video port handle. It also provides `APIs` to enable or disable content protection like `HDCP`, to set the background color and preferred color depth of the video port. + +Interface specification is available here: [dsVideoPort HAL Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-video-port_halSpec.md) ## Testing Scope @@ -45,7 +46,7 @@ Interface of the test is available here: [dsVideoPort HAL header](https://github |1|[Check the Video port status](#check-the-video-port-status)|Check the Video Port Access and Status | |2|[Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability)|Check Video content Format and `HDR` Capability| |3|[Check Video Resolution](#check-video-resolution)|Check Video resolution| -|4|[HDCP and DTCP Management](#hdcp-and-dtcp-management)|Check `HDCP` and `DTCP` Status| +|4|[HDCP Management](#hdcp-management)|Check `HDCP` Status| |5|[Color Capabilities](#color-capabilities)|Check the color capabilities| ### Emulator Requirements @@ -74,7 +75,7 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check the video port status|Get the video port handle,check the Video Port enable/disable|`Y`|`NA`|`Y`|`Y`| +|Check the video port status|Get the video port handle,check the Video Port enable/disable|`Y`|`Y`|`Y`|`Y`| ||Verify display connected/disconnected status without video port connected|`Y`|`NA`|`Y`|`Y`| ||Verify display connected/disconnected status by connecting/disconnecting video port|`NA`|`Y`|`Y`|`NA`| ||Verify the surround mode capabilities with/without playback|`Y`|`Y`|`Y`|`Y`| @@ -135,37 +136,37 @@ Playback the pre-define streams Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. -### HDCP and DTCP Management +### HDCP Management |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check HDCP and DTCP Management|Check enable/disable the DTCP/HDCP for the specified video port|`Y`|`Y`|`Y`|`NA`| -||Check DTCP/HDCP status for valid port|`Y`|`Y`|`Y`|`Y`| +|Check HDCP status|Check enable/disable the HDCP for the specified video port|`Y`|`Y`|`Y`|`NA`| +||Check HDCP status for valid port|`Y`|`Y`|`Y`|`Y`| ||Check HDCP protocol status|`Y`|`Y`|`Y`|`Y`| ||Ignore EDID status|`N`|`Y`|`Y`|`NA`| ||Notify event if the HDCP status change|`NA`|`Y`|`Y`|`NA`| -||Check HDCP/DTCP status with external analyzer|`NA`|`Y`|`Y`|`NA`| +||Check HDCP status with external analyzer|`NA`|`Y`|`Y`|`NA`| -#### Test Startup Requirement-HDCP and DTCP Management +#### Test Startup Requirement-HDCP Management Playback the pre-define streams -#### Emulator Requirements-HDCP and DTCP Management +#### Emulator Requirements-HDCP Management [Emulator Requirements](#emulator-requirements) -#### Control Plane Requirements-HDCP and DTCP Management +#### Control Plane Requirements-HDCP Management -Check the HDCP/DTCP status with external analyzer +Check the HDCP status with external analyzer ### Color Capabilities |Test Functionality|Description|L2|L3|Source|Sink| |------------------|-----------|--|--|------|----| -|Check Color Capabilities|Set/Get Color Space and compare with the configuration file|`Y`|`Y`|`Y`|`Y`| -||Set/Get Color Depth Capabilities and compare with the configuration file|`Y`|`Y`|`Y`|`Y`| +|Check Color Capabilities|Get Color Space, compare with the configuration file and with/without video|`Y`|`Y`|`Y`|`Y`| +||Set/Get Color Depth Capabilities, compare with the configuration file and with/without video|`Y`|`Y`|`Y`|`Y`| ||Check QuantizationRange status|`Y`|`Y`|`Y`|`Y`| -||Check MatrixCoefficients status|`Y`|`Y`|`Y`|`Y`| +||Check MatrixCoefficients status with/without video |`Y`|`Y`|`Y`|`Y`| ||Set Background Color|`N`|`Y`|`Y`|`NA`| ||Check the color space capabilities with analyzer|`NA`|Y|Y|`NA`| From ad9c6008246b532ef95f313d297550a8a9d1ff2c Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 3 May 2024 17:33:00 +0100 Subject: [PATCH 19/64] Updated HAL API's --- .../ds-video-port_High-Level_TestSpec.md | 78 ++++++++++--------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/docs/pages/ds-video-port_High-Level_TestSpec.md b/docs/pages/ds-video-port_High-Level_TestSpec.md index ff0f276c..e1bc7a06 100644 --- a/docs/pages/ds-video-port_High-Level_TestSpec.md +++ b/docs/pages/ds-video-port_High-Level_TestSpec.md @@ -46,7 +46,7 @@ Interface specification is available here: [dsVideoPort HAL Spec](https://github |1|[Check the Video port status](#check-the-video-port-status)|Check the Video Port Access and Status | |2|[Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability)|Check Video content Format and `HDR` Capability| |3|[Check Video Resolution](#check-video-resolution)|Check Video resolution| -|4|[HDCP Management](#hdcp-management)|Check `HDCP` Status| +|4|[HDCP and HDMI Management](#hdcp-and-hdmi-management)|Check `HDCP` and `HDMI` Status| |5|[Color Capabilities](#color-capabilities)|Check the color capabilities| ### Emulator Requirements @@ -73,13 +73,13 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// ### Check the video port status -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check the video port status|Get the video port handle,check the Video Port enable/disable|`Y`|`Y`|`Y`|`Y`| -||Verify display connected/disconnected status without video port connected|`Y`|`NA`|`Y`|`Y`| -||Verify display connected/disconnected status by connecting/disconnecting video port|`NA`|`Y`|`Y`|`NA`| -||Verify the surround mode capabilities with/without playback|`Y`|`Y`|`Y`|`Y`| -||Verify the surround mode capabilities of connected display with/without playback|`Y`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink| +|------------------|-----------|--------|--|--|------|----| +|Check the video port status|Get the video port handle,check the Video Port enable/disable|dsGetVideoPort(), dsIsVideoPortEnabled(), dsIsVideoPortActive(), dsEnableVideoPort()|`Y`|`Y`|`Y`|`Y`| +||Verify display connected/disconnected status without video port connected|dsIsDisplayConnected()|`Y`|`NA`|`Y`|`Y`| +||Verify display connected/disconnected status by connecting/disconnecting video port|dsIsDisplayConnected()|`NA`|`Y`|`Y`|`NA`| +||Verify the surround mode capabilities with/without playback|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`Y`|`Y`|`Y`| +||Verify the surround mode capabilities of connected display with/without playback|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the video port status @@ -95,14 +95,14 @@ Unplug the Video port,Verify the surround mode ### Check Video Content Format and HDR Capability -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|`NA`|`Y`|`Y`|`Y`| -||Get the HDR capabilities and status|Y|`NA`|`Y`|`Y`| -||Set Force Disable 4KSupport with/without playback|`Y`|`Y`|`Y`|`Y`| -||Disable 4KSupport with external analyzer|`NA`|`Y`|`Y`|`NA`| -||Reset the video output to SDR with/without playback|`NA`|`Y`|`Y`|`Y`| -||Reset the video output to SDR with external analyzer|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| +|------------------|-----------|---------|--|--|------|----| +|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|dsVideoFormatUpdateRegisterCB()|`NA`|`Y`|`Y`|`Y`| +||Get the HDR capabilities and status|dsIsOutputHDR(), dsGetTVHDRCapabilities()|`Y`|`NA`|`Y`|`Y`| +||Set Force Disable 4KSupport with/without playback|dsSetForceHDRMode()|`Y`|`Y`|`Y`|`Y`| +||Disable 4KSupport with external analyzer|dsSetForceHDRMode()|`NA`|`Y`|`Y`|`NA`| +||Reset the video output to SDR with/without playback|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`Y`| +||Reset the video output to SDR with external analyzer|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video Content Format and HDR Capability @@ -118,11 +118,11 @@ Check the port output resolutions and HDR with analyzer ### Check Video Resolution -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|`Y`|`Y`|`Y`|`NA`| -||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify|`Y`|`NA`|`NA`|`Y`| -||Check Video port properties with external Analyzer|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| +|------------------|-----------|---------|--|--|------|----| +|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|dsSetResolution(), dsGetResolution()|`Y`|`Y`|`Y`|`NA`| +||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify|dsGetResolution()|`Y`|`NA`|`NA`|`Y`| +||Check Video port properties with external Analyzer|dsSetResolution(), dsGetResolution()|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check Video Resolution @@ -136,16 +136,18 @@ Playback the pre-define streams Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. -### HDCP Management +### HDCP and HDMI Management -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check HDCP status|Check enable/disable the HDCP for the specified video port|`Y`|`Y`|`Y`|`NA`| -||Check HDCP status for valid port|`Y`|`Y`|`Y`|`Y`| -||Check HDCP protocol status|`Y`|`Y`|`Y`|`Y`| -||Ignore EDID status|`N`|`Y`|`Y`|`NA`| -||Notify event if the HDCP status change|`NA`|`Y`|`Y`|`NA`| -||Check HDCP status with external analyzer|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| +|------------------|-----------|---------|--|--|------|----| +|Check HDCP and HDMI status|Check enable/disable the HDCP for the specified video port|dsEnableHDCP(),dsIsHDCPEnabled()|`Y`|`Y`|`Y`|`NA`| +||Check HDCP status for valid port|dsGetHDCPStatus()|`Y`|`Y`|`Y`|`Y`| +||Check HDCP protocol Status|dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`Y`|`Y`|`Y`|`Y`| +||Check HDCP Receiver protocol|dsGetHDCPReceiverProtocol(),|`NA`|`Y`|`Y`|`NA`| +||Ignore EDID status|dsGetIgnoreEDIDStatus()|`N`|`Y`|`Y`|`NA`| +||set/get preferred HDMI Protocol|dsSetHdmiPreference(), dsGetHdmiPreference()|`Y`|`Y`|`Y`|`Y`| +||Notify event if the HDCP status change|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`| +||Check HDCP status with external analyzer|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-HDCP Management @@ -161,14 +163,14 @@ Check the HDCP status with external analyzer ### Color Capabilities -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check Color Capabilities|Get Color Space, compare with the configuration file and with/without video|`Y`|`Y`|`Y`|`Y`| -||Set/Get Color Depth Capabilities, compare with the configuration file and with/without video|`Y`|`Y`|`Y`|`Y`| -||Check QuantizationRange status|`Y`|`Y`|`Y`|`Y`| -||Check MatrixCoefficients status with/without video |`Y`|`Y`|`Y`|`Y`| -||Set Background Color|`N`|`Y`|`Y`|`NA`| -||Check the color space capabilities with analyzer|`NA`|Y|Y|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| +|------------------|-----------|---------|--|--|------|----| +|Check Color Capabilities|Get Color Space, compare with the configuration file and with/without video|dsGetColorSpace()|`Y`|`Y`|`Y`|`Y`| +||Set/Get Color Depth Capabilities, compare with the configuration file and with/without video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(),dsSetPreferredColorDepth()|`Y`|`Y`|`Y`|`Y`| +||Check QuantizationRange status|dsGetQuantizationRange()|`Y`|`Y`|`Y`|`Y`| +||Check MatrixCoefficients status with/without video |dsGetMatrixCoefficients()|`Y`|`Y`|`Y`|`Y`| +||Set Background Color|dsSetBackgroundColor()|`N`|`Y`|`Y`|`NA`| +||Check the color space capabilities with analyzer|dsGetColorSpace()|`NA`|Y|Y|`NA`| #### Test Startup Requirement-Color Capabilities From aa4fedf32f78e2f3c6444374a9cac03bc3a4a10a Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Tue, 7 May 2024 09:35:20 +0100 Subject: [PATCH 20/64] gh #14 updated the Control plane requirements --- .../ds-video-port_High-Level_TestSpec.md | 121 ++++++++++-------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/docs/pages/ds-video-port_High-Level_TestSpec.md b/docs/pages/ds-video-port_High-Level_TestSpec.md index e1bc7a06..26ff25d5 100644 --- a/docs/pages/ds-video-port_High-Level_TestSpec.md +++ b/docs/pages/ds-video-port_High-Level_TestSpec.md @@ -8,8 +8,8 @@ - [Testing Scope](#testing-scope) - [Emulator Requirements](#emulator-requirements) - [Check the Video port status](#check-the-video-port-status) - - [Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability) - - [Check Video Resolution](#check-video-resolution) + - [Check Video Content Format and Resolution](#check-video-content-format-and-resolution) + - [Check HDR Capability](#check-hdr-capability) - [HDCP Management](#hdcp-management) - [Color Capabilities](#color-capabilities) @@ -44,9 +44,9 @@ Interface specification is available here: [dsVideoPort HAL Spec](https://github |#|Test Functionality|Description| |-|------------------|-----------| |1|[Check the Video port status](#check-the-video-port-status)|Check the Video Port Access and Status | -|2|[Check Video Content Format and HDR Capability](#check-video-content-format-and-hdr-capability)|Check Video content Format and `HDR` Capability| -|3|[Check Video Resolution](#check-video-resolution)|Check Video resolution| -|4|[HDCP and HDMI Management](#hdcp-and-hdmi-management)|Check `HDCP` and `HDMI` Status| +|2|[Check Video Content Format and Resolution](#check-video-content-format-and-resolution)|Check Video content Format and Resolution| +|3|[Check HDR Capability](#check-hdr-capability)|Check `HDR` Capability| +|4|[HDCP Management](#hdcp-management)|Check `HDCP` Status| |5|[Color Capabilities](#color-capabilities)|Check the color capabilities| ### Emulator Requirements @@ -73,17 +73,17 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// ### Check the video port status -|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink| -|------------------|-----------|--------|--|--|------|----| -|Check the video port status|Get the video port handle,check the Video Port enable/disable|dsGetVideoPort(), dsIsVideoPortEnabled(), dsIsVideoPortActive(), dsEnableVideoPort()|`Y`|`Y`|`Y`|`Y`| -||Verify display connected/disconnected status without video port connected|dsIsDisplayConnected()|`Y`|`NA`|`Y`|`Y`| -||Verify display connected/disconnected status by connecting/disconnecting video port|dsIsDisplayConnected()|`NA`|`Y`|`Y`|`NA`| -||Verify the surround mode capabilities with/without playback|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`Y`|`Y`|`Y`| -||Verify the surround mode capabilities of connected display with/without playback|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check the each video port status |Get the video port handle,check Video Port enable/disable if port disabled, enable port and check the each port status. |dsGetVideoPort(), dsIsVideoPortEnabled(), dsEnableVideoPort() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Verify display connected/disconnected status without video port connected|dsIsDisplayConnected(), dsIsVideoPortActive()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Verify display connected/disconnected status by connecting/disconnecting video port|dsIsDisplayConnected(), dsIsVideoPortActive()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Get the surround mode capabilities and verify with configuration file|dsIsDisplaySurround()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Verify the surround mode capabilities of connected display and verify with configuration file|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check the video port status -Playback the pre-define streams +`NA` #### Emulator Requirements-Check the video port status @@ -91,63 +91,69 @@ Playback the pre-define streams #### Control Plane Requirements-Check the video port status -Unplug the Video port,Verify the surround mode +plug/Unplug the Video port,Verify with edid info, is surround mode supported -### Check Video Content Format and HDR Capability +### Check Video Content Format and Resolution -|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| -|------------------|-----------|---------|--|--|------|----| -|Check Video Format Content and HDR Capability|Notify an event when the list of video Format changes|dsVideoFormatUpdateRegisterCB()|`NA`|`Y`|`Y`|`Y`| -||Get the HDR capabilities and status|dsIsOutputHDR(), dsGetTVHDRCapabilities()|`Y`|`NA`|`Y`|`Y`| -||Set Force Disable 4KSupport with/without playback|dsSetForceHDRMode()|`Y`|`Y`|`Y`|`Y`| -||Disable 4KSupport with external analyzer|dsSetForceHDRMode()|`NA`|`Y`|`Y`|`NA`| -||Reset the video output to SDR with/without playback|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`Y`| -||Reset the video output to SDR with external analyzer|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|---------|--|--|------|----|--------------------------| +|Check Video Format Content and Resolution|Register callback for the Video Format update event,change the video formate and check whether callback is Triggered or not|dsVideoFormatUpdateRegisterCB()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Set Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates & scan modes and looping through with supported values of each video port, Verify using get function |dsSetResolution(), dsGetResolution()|`Y`|`NA`|`Y`|`NA`|`NA`| +||Set Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates & scan modes and looping through with supported values of each video port and verify external Analyzer with video playback |dsSetResolution(), dsGetResolution()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Gets the supported resolutions of TV and verify with the configuration file |dsSupportedTvResolutions()|`Y`|`NA`|`Y`|`Y`|`Y`| +||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify with the configuration file|dsGetResolution()|`Y`|`NA`|`NA`|`Y`|`NA`| -#### Test Startup Requirement-Check Video Content Format and HDR Capability +#### Test Startup Requirement-Check Video Content Format and Resolution Playback the pre-define streams -#### Emulator Requirements-Check Video Content Format and HDR Capability +#### Emulator Requirements-Check Video Content Format and Resolution [Emulator Requirements](#emulator-requirements) -#### Control Plane Requirements-Check Video Content Format and HDR Capability +#### Control Plane Requirements-Check Video Content Format and Resolution -Check the port output resolutions and HDR with analyzer +Check the port output resolutions and Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. -### Check Video Resolution +### Check HDR Capability -|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| -|------------------|-----------|---------|--|--|------|----| -|Check Resolution with/without playback|Set/Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes|dsSetResolution(), dsGetResolution()|`Y`|`Y`|`Y`|`NA`| -||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify|dsGetResolution()|`Y`|`NA`|`NA`|`Y`| -||Check Video port properties with external Analyzer|dsSetResolution(), dsGetResolution()|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|---------|--|--|------|----|--------------------------| +|Check HDR Capability|Get the HDR capabilities & verify with the configuration file and check the status|dsGetTVHDRCapabilities(), dsGetVideoEOTF()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Checks video output is HDR with different HDR/SDR streams and verify with external analyzer|dsIsOutputHDR()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Set and get Force Disable 4KSupport without playback|dsSetForceDisable4KSupport(), dsGetForceDisable4KSupport()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Set and get Force Disable 4KSupport with playback|dsSetForceDisable4KSupport(), dsGetForceDisable4KSupport()|`NA`|`Y`|`Y`|`Y`|`NA`| +||Disable 4K Support with external analyzer|dsSetForceHDRMode()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Reset the video output to SDR with playback|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`Y`|`NA`| +||Reset the video output to SDR with external analyzer|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`NA`|`Y`| -#### Test Startup Requirement-Check Video Resolution +#### Test Startup Requirement-Check HDR Capability Playback the pre-define streams -#### Emulator Requirements-Check Video Resolution +#### Emulator Requirements-Check HDR Capability [Emulator Requirements](#emulator-requirements) -#### Control Plane Requirements-Check Video Resolution +#### Control Plane Requirements-Check HDR Capability -Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. +Check HDR enable/disabled and is video reset to SDR with analyzer -### HDCP and HDMI Management +### HDCP Management -|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| -|------------------|-----------|---------|--|--|------|----| -|Check HDCP and HDMI status|Check enable/disable the HDCP for the specified video port|dsEnableHDCP(),dsIsHDCPEnabled()|`Y`|`Y`|`Y`|`NA`| -||Check HDCP status for valid port|dsGetHDCPStatus()|`Y`|`Y`|`Y`|`Y`| -||Check HDCP protocol Status|dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`Y`|`Y`|`Y`|`Y`| -||Check HDCP Receiver protocol|dsGetHDCPReceiverProtocol(),|`NA`|`Y`|`Y`|`NA`| -||Ignore EDID status|dsGetIgnoreEDIDStatus()|`N`|`Y`|`Y`|`NA`| -||set/get preferred HDMI Protocol|dsSetHdmiPreference(), dsGetHdmiPreference()|`Y`|`Y`|`Y`|`Y`| -||Notify event if the HDCP status change|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`| -||Check HDCP status with external analyzer|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|---------|--|--|------|----|--------------------------| +|Check HDCP status|Check enable/disable the HDCP(1.x & 2.x) for the specified video port with playback |dsEnableHDCP(), dsIsHDCPEnabled()|`NA`|`Y`|`Y`|`NA`|`NA`| +||Check HDCP status for valid port and verify with the configuration file|dsGetHDCPStatus()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Check HDCP status for valid port and verify with the configuration file and check with connected device|dsGetHDCPStatus() |`NA`|`Y`|`Y`|`NA`|`NA`| +||Check HDCP protocol Status and verify with the configuration file|dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Check HDCP protocol Status with connected device |dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Check HDCP Receiver protocol |dsGetHDCPReceiverProtocol(),|`NA`|`Y`|`Y`|`NA`|`Y`| +||Ignore EDID status|dsGetIgnoreEDIDStatus()|`N`|`Y`|`Y`|`NA`|`Y`| +||set/get preferred HDCP Protocol|dsSetHdmiPreference(), dsGetHdmiPreference()|`Y`|`NA`|`Y`|`Y`|`NA`| +||set/get preferred HDCP Protocol with connected device |dsSetHdmiPreference(), dsGetHdmiPreference()|`NA`|`Y`|`Y`|`NA`|`NA`| +||Notify event if the HDCP status change and check the timing info for hdcp authentication |dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Check HDCP status with external analyzer|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-HDCP Management @@ -163,14 +169,17 @@ Check the HDCP status with external analyzer ### Color Capabilities -|Test Functionality|Description|HAL API's|L2|L3|Source|Sink| -|------------------|-----------|---------|--|--|------|----| -|Check Color Capabilities|Get Color Space, compare with the configuration file and with/without video|dsGetColorSpace()|`Y`|`Y`|`Y`|`Y`| -||Set/Get Color Depth Capabilities, compare with the configuration file and with/without video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(),dsSetPreferredColorDepth()|`Y`|`Y`|`Y`|`Y`| -||Check QuantizationRange status|dsGetQuantizationRange()|`Y`|`Y`|`Y`|`Y`| -||Check MatrixCoefficients status with/without video |dsGetMatrixCoefficients()|`Y`|`Y`|`Y`|`Y`| -||Set Background Color|dsSetBackgroundColor()|`N`|`Y`|`Y`|`NA`| -||Check the color space capabilities with analyzer|dsGetColorSpace()|`NA`|Y|Y|`NA`| +|Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|---------|--|--|------|----|--------------------------| +|Check Color |Get Color Space, compare with the configuration file and without video|dsGetColorSpace()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Get Color Space with video playback|dsGetColorSpace()|`NA`|`Y`|`Y`|`Y`|`NA`| +||Set/Get Color Depth Capabilities, compare with the configuration file and without video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(), dsSetPreferredColorDepth()|`Y`|`Y`|`Y`|`Y`|| +||Set/Get Color Depth Capabilities, compare with the configuration file and with video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(), dsSetPreferredColorDepth()|`NA`|`Y`|`Y`|`Y`|| +||Check QuantizationRange status|dsGetQuantizationRange()|`Y`|`NA`|`Y`|`Y`|| +||Check MatrixCoefficients status |dsGetMatrixCoefficients()|`Y`|`NA`|`Y`|`Y`|| +||Check MatrixCoefficients status with video |dsGetMatrixCoefficients()|`NA`|`Y`|`Y`|`Y`|| +||Set Background Color|dsSetBackgroundColor()|`N`|`Y`|`Y`|`NA`|| +||Check the color space capabilities with analyzer|dsGetColorSpace()|`NA`|`Y`|`Y`|`NA`|| #### Test Startup Requirement-Color Capabilities From 0e7c8fd1ef81720f68f80682480e8e4fcb2632d2 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Fri, 3 May 2024 12:23:20 +0100 Subject: [PATCH 21/64] gh #24 updating the High test spec API list --- docs/pages/dsComposite_test_spec.md | 185 ------------ docs/pages/dsDisplay_TestSpecificaion.md | 121 -------- docs/pages/dsHdmiIn_test_spec.md | 269 ++++++++---------- .../include/ReferencePanel_AVInput_Info.yaml | 9 + .../include/ReferencePanel_EDID_Info.yaml | 46 +++ 5 files changed, 181 insertions(+), 449 deletions(-) delete mode 100644 docs/pages/dsComposite_test_spec.md delete mode 100644 docs/pages/dsDisplay_TestSpecificaion.md create mode 100644 profiles/include/ReferencePanel_AVInput_Info.yaml create mode 100644 profiles/include/ReferencePanel_EDID_Info.yaml diff --git a/docs/pages/dsComposite_test_spec.md b/docs/pages/dsComposite_test_spec.md deleted file mode 100644 index 37488e1b..00000000 --- a/docs/pages/dsComposite_test_spec.md +++ /dev/null @@ -1,185 +0,0 @@ -# CompositeIn Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 18/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#testing-scope) - -## Acronyms, Terms and Abbreviations - -- `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `RDK` - Reference Design Kit -- `dsComposite` - Device Settings Composite - -## Introduction - -This document provides an overview of the testing requirements for the `dsComposite` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) - -## Module Description - -High level overview: - -- `dsComposite` provides a variety of APIs for accessing information regarding the Composite Inputs on sink devices. -- It facilitates interaction with Composite Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. -- For the sink devices, to retrieve the available Composite Input information, an external device must be connected. - -## Testing Scope - -|#|Test Functionality|Test Description| -|-|------------------|----------------| -|1|[Get Number of Inputs](#get_number_of_inputs)|The test aims to verify the availability of Composite Input ports by confirming the number present.| -|2|[Get the Input Status](#get_the_input_status)|The test is to verify the status of all Composite Input Status| -|3|[Set the Composite port](#set_the_composite_port)|The test is to set the Composite Input port for Presentation| -|4|[Scale the Composite Input Video](#scale_the_composite_input_video)|The test scales the COMPOSITE input video, ensuring that the width and height, determined by the x and y coordinates respectively, do not surpass the current resolution limits of the device.| -|5|[Callback for connection Status](#callback_for_connection_status)|The test aims to verify the Callback function used for notifying applications of the COMPOSITE In hot plug status.| -|6|[Callback for Signal Change](#callback_for_signal_change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the Composite In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| -|7|[Callback for Status Change](#callback_for_status_change)|The test validates the functionality of the callback function designed to notify applications of Composite Input status change events.(Port,IsPresented flag status)| ------------ - -## Get Number of Inputs - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function returns the expected COMPOSITE Input ports.|Y|N| - -### Test Startup Requirement - Get Number of Inputs - -The test begins with the configured composite input port details. - -### Emulator Requirement - Get Number of Inputs - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get Number of Inputs - -None - -## Get the Input Status - -|Description|L2|L3| -|-----------|--|--| -|Verify the status of the Composite Input by ensuring it is in disable status.|Y|N| -|Verify the status of the Composite Input by ensuring it is enabled, connected to the source, and that the composite input port is active.|N|Y| - -### Test Startup Requirement - Get the Input Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Get the Input Status - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get the Input Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Set the Composite port - -|Description|L2|L3| -|-----------|--|--| -|verify that the function successfully sets the specified COMPOSITE Input port as active for presentation and check the port information using "Get status".|Y|Y| -|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y| - -### Test Startup Requirement - Set the Composite port - -The test begins with the configured composite input port numbers. - -### Emulator Requirement - Set the Composite port - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Set the Composite port - -The Control Plane must monitor the external device (Video analyzer) to detect any video glitches. - -## Scale the Composite Input Video - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function successfully scales the COMPOSITE input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y| - -### Test Startup Requirement - Scale the Composite Input Video - -The test begins by setting up the video analyzer, and the video should be played. - -### Emulator Requirement - Scale the Composite Input Video - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Scale the Composite Input Video - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for connection Status - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application when a COMPOSITE Input port is connected or disconnected.|N|Y| -|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y| -|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t if the connected port is active and presents video after being connected.|N|Y| - -### Test Startup Requirement - Callback for connection Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for connection Status - -Emulator will boot with the port information coming from the configuration file. - -### Control Plane Requirement - Callback for connection Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for Signal Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y| -|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y| - -### Test Startup Requirement - Callback for Signal Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Signal Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Signal Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. -Provide resolution changes or configurations changes on the connected device that affects the output signal. - -## Callback for Status Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application of the Composite Input status change event.|N|Y| -|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y| -|Verify that the callback function properly triggers whenever the dsCompositeInStatus_t is updated|N|Y| - -### Test Startup Requirement - Callback for Status Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Status Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Status Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md deleted file mode 100644 index c0e8da8e..00000000 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ /dev/null @@ -1,121 +0,0 @@ -# Display Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 05/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [References](#references) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#test-scope) - -## Acronyms, Terms and Abbreviations - -- `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `RDK` - Reference Design Kit -- `dsDisplay` - Device Settings Display - -## References - -- `EDID` Specifications [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) -- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) - -## Introduction - -This document provides an overview of the testing requirements for the dsDisplay module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h) - -## Module Description - -High level overview: - -- `dsDisplay` offers a range of APIs for retrieving information about the Display Device. -- Data is retrieved from the Display Device and HDMI. This data is passed to the caller. -- In order to retrieve HDMI information, an external device must be connected. - -## Testing Scope - -|#|Test Functionality|Test Description| -|-|------------------|----------------| -|1|[Get EDID Information](#get-edid-information)|Test validates the accuracy and functionality of the display device module's functions (dsGetEDID and dsGetEDIDBytes) in retrieving the Extended Display Identification Data (EDID) from connected display devices| -|2|[Get Aspect Ratio](#get-aspect-ratio)| Test provides the aspect ratio of the display device| -|3|[Callback Registration for Display Related Events](#callback-registration-for-display-related-events)|To verify the callback registration for display related events. The display events are Dislay connected event, Display disconnected event, Rx Sense ON event, Rx Sense OFF event, HDCP protocol version change event| ------------ - -## Get EDID Information - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|N|Y|Y|Y| -|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |Y|N|Y|Y| - -### Test Startup Requirement - Get EDID Information - -Launch the test with the predefined configuration set of results. - -### Emulator Requirement - Get EDID Information - -Emulator will boot with the EDID coming from the configuration file. - -|#|Description| -|-|-----------| -|1|EDID for a panel TV| - -TODO: Generate a list of sample list for 5 to 6 different TV's. -Generate a list of TV's from the office for the different EDIDs and store the binaries of the test. It can use it as samples. - -### Control Plane Requirement - Get EDID Information - -None - -## Get Aspect Ratio - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test the aspect ratio returned by the dsGetDisplayAspectRatio() function for the specified display device handle.|N|Y|Y|N -|Adjust and test the aspect ratio to ensure it is providing the expected aspect ratio.|N|Y|Y|N| - -### Test Startup Requirement - Get Aspect Ratio - -Launch the test with the predefined configuration set of results. - -### Emulator Requirement - Get Aspect Ratio - -Emulator will boot with the Aspect ratio coming from the configuration file. - -### Control Plane Requirement - Get Aspect Ratio - -Maintains the configuration of various aspect ratios and provides them whenever a user is supposed to make a change. - -## Callback Registration for Display Related Events - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|N|Y|Y|Y| -|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|N|Y|Y|N| -|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|N|Y|Y|N| -|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected|N|Y|Y|N| -|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change.|N|Y|Y|N| - - -### Test Startup Requirement -Callback Registration for Display Related Events - -Launch the test with the predefined set of configured HDCP 1.x and HDCP 2.x keys. - -### Emulator Requirement - Callback Registration for Display Related Events - -Emulator will boot with the HDCP keys coming from the configuration file. - -### Control Plane Requirement - Callback Registration for Display Related Events - -The control plane will generate events for HDMI connection and disconnection. It also supplies signals to the receiving devices to initiate the Rx Sense ON/Rx Sense OFF events. \ No newline at end of file diff --git a/docs/pages/dsHdmiIn_test_spec.md b/docs/pages/dsHdmiIn_test_spec.md index efb4299a..9d992ea1 100644 --- a/docs/pages/dsHdmiIn_test_spec.md +++ b/docs/pages/dsHdmiIn_test_spec.md @@ -1,10 +1,4 @@ -# HdmiIn Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 27/03/2024 | First Release | 1.0.0 | +# HdmiIn High Level Test Specification Document ## Table of Contents @@ -15,18 +9,22 @@ ## Acronyms, Terms and Abbreviations -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `HDMI` - High-Definition Multimedia Interface +- `EDID` - Extended Display Identification Data +- `API` - Application programming interface +- `HDMI` - High-Definition Multimedia Interface - `dsHdmiIn` - Device Settings High-Definition Multimedia Interface Input -- `SPD` - Source Product Descriptor -- `ALLM` - Auto Low Latency Mode +- `SPD` - Source Product Descriptor +- `ALLM` - Auto Low Latency Mode +- `AVI` - Audio Video Interleave +- `Y` - Yes +- `N` - No +- `NA` - Not Applicable ## Introduction This document provides an overview of the testing requirements for the `dsHdmiIn` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) +- Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) ## Module Description @@ -36,23 +34,24 @@ High level overview: - It facilitates interaction with `HDMI` Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. - For the sink and source devices, to retrieve the available `HDMI` Input information, an external device must be connected. +- `HAL` specification in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-hdmi-in_halSpec.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-hdmi-in_halSpec.md) + ## Testing Scope |#|Test Functionality|Test Description| |-|------------------|----------------| |1|[Get Number of Inputs](#get-number-of-inputs)|The test aims to verify and validate the number of HDMI Input ports available on the platform.| -|2|[Get the Input Status](#get-the-input-status)|The test is to verify the status of all HDMI Input ports available on the platform.| -|3|[Set the `HDMI` port](#set-the-hdmi-port)|The test is to set and verify the HDMI Input port for Presentation| -|4|[Scale the `HDMI` Input Video](#scale-the-hdmi-input-video)|The test aims to verify and validate the video size and coordinates of the HMDI Input Video.| -|5|[Select Zoom Mode](#select-zoom-mode)|The test aims to verify the zoom mode functionality of the module.| -|6|[Get Current Video Mode](#get-current-video-mode)|The test is to get current HDMI input video mode from active port.| -|7|[Callback for connection Status](#callback-for-connection-status)|The test aims to verify whether it notifies applications when the HDMI input port connection status changes| -|8|[Callback for Signal Change](#callback-for-signal-change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the `HDMI` In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| -|9|[Callback for Status Change](#callback-for-status-change)|The test validates the functionality of the callback function designed to notify applications of `HDMI` Input status change events.(Port,IsPresented flag status)| +|2|[Set and Get the `HDMI` Input port Status](#set-and-get-the-hdmi-input-port-status)|The test is to verify by selecting the HDMI input and getting the status of HDMI Input ports available on the platform.| +|3|[Scale the `HDMI` Input Video](#scale-the-hdmi-input-video)|The test aims to verify and validate the video size and coordinates of the HMDI Input Video.| +|4|[Select Zoom Mode](#select-zoom-mode)|The test aims to verify the zoom mode functionality of the module.| +|5|[Get Current Video Mode](#get-current-video-mode)|The test is to get current HDMI input video mode from active port.| +|6|[Callback for connection Status](#callback-for-connection-status)|The test aims to verify whether it notifies applications when the HDMI input port connection status changes| +|7|[Callback for Signal Change](#callback-for-signal-change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the `HDMI` In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| +|8|[Callback for Status Change](#callback-for-status-change)|The test validates the functionality of the callback function designed to notify applications of `HDMI` Input status change events.(Port,IsPresented flag status)| |9|[Callback for Video Mode Change](#callback-for-video-mode-change)|The test validates the functionality of the callback function designed to notify when there is a change in the video resolution| |10|[Callback for `ALLM` Mode Change](#callback-for-allm-mode-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input `ALLM` mode changes| |11|[Callback for AV Latency Change](#callback-for-av-latency-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input AV latency changes| -|12|[Callback for AVI Content Type Change](#callback-for-avi-content-type-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input AVI content type changes| +|12|[Callback for `AVI` Content Type Change](#callback-for-avi-content-type-change)|The test validates the functionality of the callback function designed to notify when `HDMI` input AVI content type changes| |13|[Check `HDMI` ARC Port](#check-hdmi-arc-port)|The test verifies whether the given port is an `HDMI` ARC port or not| |14|[Set and Get `EDID` Information](#set-and-get-edid-information)|The test is to validate by setting and getting the `EDID` bytes information and `EDID` version| |15|[Get `HDMI` `SPD` Info](#get-hdmi-spd-info)|The test is to get and verify the `SPD` information.| @@ -64,9 +63,9 @@ High level overview: ## Get Number of Inputs -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the function returns the expected `HDMI` Input ports.|Y|N|Y|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file 'ReferencePanel_AVInput_Info.yaml'.|dsHdmiInGetNumberOfInputs|`Y`|`N`|`Y`|`Y`|`NA`| ### Test Startup Requirement - Get Number of Inputs @@ -80,51 +79,35 @@ Emulator will boot with the port informations coming from the configuration file None -## Get the Input Status - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify the status of the `HDMI` Input by ensuring it is in disable status.|Y|N|Y|Y| -|Verify the status of the `HDMI` Input by ensuring it is enabled/disabled, connected to the source, and that the `HDMI` input port is active.|N|Y|Y|Y| - -### Test Startup Requirement - Get the Input Status - -Connection of the source device with the `HDMI` Input. - -### Emulator Requirement - Get the Input Status - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get the Input Status +## Set and Get the `HDMI` Input port Status -The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify the HDMI port with the 'Get status' function when it is disabled, without selecting any port, and without any external devices.|dsHdmiInGetStatus|`Y`|`N`|`Y`|`Y`|`NA`| +|Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port without any external device connection and "Get status" to check the active port is false, port connected is false and presentation is false.|dsHdmiInGetNumberOfInputs, dsHdmiInSelectPort, dsHdmiInGetStatus|`Y`|`N`|`Y`|`Y`|`NA`| +|Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port as active for presentation and check the port information is valid using "Get status".|dsHdmiInGetNumberOfInputs, dsHdmiInSelectPort, dsHdmiInGetStatus|`N`|`Y`|`Y`|`Y`|`Y`| +|On the active HDMI port, set the Audio Mix to be enable and disable|dsHdmiInSelectPort|`N`|`Y`|`N`|`Y`|`Y`| +|On the active HDMI port, verify the `HDMI` input with the video plane in both primary and secondary. Additionally, validate the topmost flag.|dsHdmiInSelectPort|`N`|`Y`|`N`|`Y`|`Y`| -## Set the `HDMI` port +### Test Startup Requirement - Set and Get the `HDMI` Input port Status -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the function successfully sets the specified `HDMI` Input port as active for presentation and check the port information using "Get status".|Y|Y|Y|Y| -|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y|Y|Y| -|Set the Audio Mix to be enable and disable|N|Y|N|Y| -|Verify the `HDMI` input with the video plane in both primary and secondary. Additionally, validate the topmost flag.|N|Y|N|Y| +- The test begins with the configured `HDMI` input port numbers. +- Connection of the source device with the `HDMI` Input. -### Test Startup Requirement - Set the `HDMI` port - -The test begins with the configured `HDMI` input port numbers, video plane types. - -### Emulator Requirement - Set the `HDMI` port +### Emulator Requirement - Set and Get the `HDMI` Input port Status Emulator will boot with the port informations coming from the configuration file. -### Control Plane Requirement - Set the `HDMI` port +### Control Plane Requirement - Set and Get the `HDMI` Input port Status -The Control Plane must monitor the external device (Video analyzer) to detect any video glitches and other audio mix, video plane functionalities. +- Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. +- Validate the Audio mix and Video plane by the analyzers. ## Scale the `HDMI` Input Video -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the function successfully scales the `HDMI` input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y|Y|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the function successfully scales the `HDMI` input video when valid coordinates and dimensions are provided within the resolution limits. Based on video resolution need to check whether the coordinates are in range|dsHdmiInScaleVideo|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Scale the `HDMI` Input Video @@ -140,9 +123,9 @@ Control plane to validate the coordinates and dimensions by the video analyzers. ## Select Zoom Mode -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the function successfully updates the video zoom on the active `HDMI` input using the provided zoom mode|N|Y|Y|N| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the function successfully updates the video zoom on the active `HDMI` input using the provided zoom mode|dsHdmiInSelectZoomMode|`N`|`Y`|`Y`|`N`|`Y`| ### Test Startup Requirement - Select Zoom Mode @@ -154,13 +137,13 @@ Emulator will boot with the zoom modes in the configuration file. ### Control Plane Requirement - Select Zoom Mode -Changing the zoom modes by the Control Plane. +Changing the zoom modes by the Control Plane. Validates the zoom mode by analyzers. ## Get Current Video Mode -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the function successfully updates the current `HDMI` input video modes like Pixel resolution, frame rate and interlaced information of the active port|N|Y|Y|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the function successfully updates the current `HDMI` input video modes like Pixel resolution, frame rate and interlaced information of the active port|dsHdmiInGetCurrentVideoMode|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Get Current Video Mode @@ -172,15 +155,14 @@ Emulator will boot with the all video mode related information in the configurat ### Control Plane Requirement - Get Current Video Mode -None +Control plane validates the current mode by the analyzers. ## Callback for connection Status -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly notifies the application when a `HDMI` Input port is connected or disconnected.|N|Y|Y|Y| -|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y|Y|Y| -|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t if the connected port is active and presents video after being connected.|N|Y|Y|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a `HDMI` Input port is connected or disconnected.|dsHdmiInRegisterConnectCB|`N`|`Y`|`Y`|`Y`|`Y`| +|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t, if the connected port is active and presents video after being connected.|dsHdmiInRegisterConnectCB|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Callback for connection Status @@ -192,14 +174,13 @@ Emulator will boot with the port information coming from the configuration file. ### Control Plane Requirement - Callback for connection Status -The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. +Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. ## Callback for Signal Change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y|N|Y| -|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly notifies the application whenever there is a change in the signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) for the `HDMI` Input port.|dsHdmiInRegisterSignalChangeCB|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Signal Change @@ -211,16 +192,14 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Callback for Signal Change -The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. -Provide resolution changes or configurations changes on the connected device that affects the output signal. +- Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. +- Provide resolution changes or configurations changes on the connected device that affects the output signal. ## Callback for Status Change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly notifies the application of the `HDMI` Input status change event.|N|Y|N|Y| -|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y|N|Y| -|Verify that the callback function properly triggers whenever the dsHdmiInStatus_t is updated|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly triggers whenever the dsHdmiInStatus_t is updated and notifies the application of the `HDMI` Input status change event.|dsHdmiInRegisterStatusChangeCB|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Status Change @@ -232,13 +211,13 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Callback for Status Change -The handling of connecting and disconnecting source devices in the `HDMI` Input will be managed by the Control Plane. +Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. ## Callback for Video Mode Change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly notifies the application whenever there is resolution and other video mode changes.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly notifies the application whenever there is resolution and other video mode changes.|dsHdmiInRegisterVideoModeUpdateCB|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Video Mode Change @@ -250,13 +229,13 @@ Emulator will boot with the video resolutions and other video modes from the con ### Control Plane Requirement - Callback for Video Mode Change -Changing of the video resolution by control Plane. +Changing of the video resolution by control Plane. ## Callback for `ALLM` mode change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly notifies the application whenever there is `ALLM` mode and Dolby Vison Mode change.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly notifies the application whenever there is `ALLM` mode change.|dsHdmiInRegisterAllmChangeCB|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for `ALLM` mode change @@ -268,17 +247,18 @@ Emulator will boot with the `HDMI` input port numbers and `ALLM` mode informatio ### Control Plane Requirement - Callback for `ALLM` mode change -Changing of the `ALLM` mode by control Plane. +Changing of the `ALLM` mode by control Plane. ## Callback for AV Latency Change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function notifies the `HDMI` input Audio and Video latency within its Max and Min ranges.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function notifies the application whenever there is a change in the `HDMI` input Audio and Video latency within its Max(500ms) and Min(0) ranges.|dsHdmiInRegisterAVLatencyChangeCB|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for AV Latency Change -Connection of the source device with the `HDMI` Input and video analyzer to check the AV latency. +- Connection of the source device with the `HDMI` Input. +- Test starts with the video playback with different modes ( Film Maker, Cinema mode ) ### Emulator Requirement - Callback for AV Latency Change @@ -286,35 +266,36 @@ Emulator will boot with the AV latency information. ### Control Plane Requirement - Callback for AV Latency Change -Control Plane changes the AV latency +Control plane signals the source device to play the content ( Cinema mode to Film Maker mode ). -## Callback for AVI Content Type Change +## Callback for `AVI` Content Type Change -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify that the callback function properly notifies the application whenever there is a change in the AVI content type.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify that the callback function properly notifies the application whenever there is a change in the `AVI` content type.|dsHdmiInRegisterAviContentTypeChangeCB|`N`|`Y`|`N`|`Y`|`Y`| -### Test Startup Requirement - Callback for AVI Content Type Change +### Test Startup Requirement - Callback for `AVI` Content Type Change -Connection of the source device with the `HDMI` Input. +- Connection of the source device with the `HDMI` Input. +- Test starts with the video playback. -### Emulator Requirement - Callback for AVI Content Type Change +### Emulator Requirement - Callback for `AVI` Content Type Change -Emulator will boot with the AVI content type information. +Emulator will boot with the `AVI` content type information. -### Control Plane Requirement - Callback for AVI Content Type Change +### Control Plane Requirement - Callback for `AVI` Content Type Change -Changing AVI content type by control Plane. +Changing `AVI` content type by control Plane.. ## Check `HDMI` ARC Port -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Verify whether given port is an `HDMI` ARC port or not.|Y|N|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through all the ports and verify whether the given port is an HDMI ARC port by comparing it with the 'ReferencePanel_AVInput_Info.yaml' configuration file.|dsIsHdmiARCPort|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Check `HDMI` ARC Port -Connection of the source device with the `HDMI` Input. +Test starts with the number of ports and ARC port from the configuration file. ### Emulator Requirement - Check `HDMI` ARC Port @@ -322,19 +303,19 @@ Emulator will boot with the `HDMI` ARC port information. ### Control Plane Requirement - Check `HDMI` ARC Port -Changing of the port with `HDMI` ARC by control Plane. +None ## Set and Get `EDID` Information -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Setting the `EDID` version for a given port|Y|N|N|Y| -|Get the `EDID` version and length for a given port and compare with the Set value|Y|N|N|Y| -|This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value. Also, validate the EDID length for a given port. Compare the EDID length values by parsing the configuration YAML file 'ReferencePanel_EDID_Info.yaml'.|dsSetEdidVersion, dsGetEdidVersion, dsGetEDIDBytesInfo|`Y`|`N`|`N`|`Y`|`NA`| +|This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|dsGetEdidVersion, dsGetEDIDBytesInfo|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Set and Get `EDID` Information -Launch the test with the predefined configuration set of results. +- Connection of the source device with the `HDMI` Input and video analyzer to check the display capabilities. +- Test starts with the predefined EDID length information coming from the configuration file. ### Emulator Requirement - Set and Get `EDID` Information @@ -342,17 +323,17 @@ Emulator will boot with the `EDID` coming from the configuration file. ### Control Plane Requirement - Set and Get `EDID` Information -None +Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. ## Get `HDMI` `SPD` Info -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test to get the `HDMI` `SPD` Info. Check whether it gets the spd info frame information properly.|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Test to get the `HDMI` `SPD` Info. Check whether it gets the spd info frame information properly.|dsGetHDMISPDInfo|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get `HDMI` `SPD` Info -Connection of the source device with the `HDMI` Input. Expected predefined data to compare the information. +Connection of the source device with the `HDMI` Input. ### Emulator Requirement - Get `HDMI` `SPD` Info @@ -360,17 +341,17 @@ Emulator will boot with the `HDMI` SPD information from the configuration file. ### Control Plane Requirement - Get `HDMI` `SPD` Info -None +Connecting and disconnecting source devices in the `HDMI` Input will be handled by the Control Plane. Check the SPD info frame - Vendor name by the Analyzers. ## Get Supported Game Feature List -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Make sure that the functionality can list and get the count of all the game features that are supported.|Y|N|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file 'ReferencePanel_AVInput_Info.yaml'.|dsGetSupportedGameFeaturesList|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Get Supported Game Feature List -Connection of the source device/game supported device with the `HDMI` Input. +Connection of the source device/game supported device with the `HDMI` Input. Test boots with the game feature list and count in the configuration file to compare the results. ### Emulator Requirement - Get Supported Game Feature List @@ -382,13 +363,14 @@ None ## Get AV latency -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test verifies to get the current AV latency connected when there is a change in the AV content. eg., Shifting from FilmMaker mode to any other mode|N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|The test gets the current AV latency connected to the source device. Also, It checks the AV latency after changing the AV content, such as switching from FilmMaker mode to any other mode.|dsGetAVLatency|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get AV latency -Connection of the source device with the `HDMI` Input. +- Connection of the source device with the `HDMI` Input. +- Test starts up with the video playback content of different modes ( Film Maker mode, Cinema mode ) ### Emulator Requirement - Get AV latency @@ -396,17 +378,18 @@ Emulator will boot with the av latency information in configuration file. ### Control Plane Requirement - Get AV latency -None. +- Control plane handles the switch between the modes ( Film Maker modes and Cinema modes ). +- Control Plane to test the content with post processing and without post processing. ## Get `ALLM` Status -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Gets the `ALLM` status of the designated `HDMI` input port. The status information indicates whether `ALLM` is enabled or disabled|Y|N|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Gets the `ALLM` status of the designated `HDMI` input port. The status information indicates whether `ALLM` is enabled or disabled|dsGetAllmStatus|`N`|`Y`|`N`|`Y`|`NA`| ### Test Startup Requirement - Get `ALLM` status -Connection of the Game console source devce with the `HDMI` Input with game playback. +Connection of the Game console source devce with the `HDMI` Input with game playback. ### Emulator Requirement - Get `ALLM` status @@ -418,10 +401,10 @@ None ## Get and Set `EDID` to all `ALLM` Support -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Set the `ALLM` support to `EDID` Version 2.0. Check by enable and disable the support.|N|Y|N|Y| -|Get the `ALLM` support to `EDID` Version 2.0. Check whether it is enabled or disabled. |N|Y|N|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Set and Get the `ALLM` support to `EDID` version 2.0 without connecting any source devices.|dsSetEdid2AllmSupport, dsGetEdid2AllmSupport|`Y`|`N`|`N`|`Y`|`NA`| +|Set and Get `ALLM` support to `EDID` Version 2.0 with the connected external source device|dsSetEdid2AllmSupport, dsGetEdid2AllmSupport|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get and Set `EDID` to all `ALLM` Support @@ -433,4 +416,4 @@ Emulator will boot with the `ALLM` support information. ### Control Plane Requirement - Get and Set `EDID` to all `ALLM` Support -None +Control plane connects/ disconnects the external devices. Validates the ALLM by analyzers. diff --git a/profiles/include/ReferencePanel_AVInput_Info.yaml b/profiles/include/ReferencePanel_AVInput_Info.yaml new file mode 100644 index 00000000..d664cf5b --- /dev/null +++ b/profiles/include/ReferencePanel_AVInput_Info.yaml @@ -0,0 +1,9 @@ +compositeInputPort: + numberOfPorts: 1 +HdmiInputPort: + numberOfPorts: 3 +HdmiArcPort: + portNumber: 2 +gameFeatures: + - feature: "allm" + count: 1 \ No newline at end of file diff --git a/profiles/include/ReferencePanel_EDID_Info.yaml b/profiles/include/ReferencePanel_EDID_Info.yaml new file mode 100644 index 00000000..bf51a798 --- /dev/null +++ b/profiles/include/ReferencePanel_EDID_Info.yaml @@ -0,0 +1,46 @@ +EDID_Reference_Data: + productCode: HEC + serialNumber: 16843009 + manufactureYear: 2021 + manufactureWeek: 25 + hdmiDeviceType: true + isRepeater: false + physicalAddressA: 1 + physicalAddressB: 0 + physicalAddressC: 0 + physicalAddressD: 0 + numOfSupportedResolution: 4 + suppResolutionList: + - Resolution: "1920x1080" + SupportedModes: + - Mode: "Progressive" + - Mode: "Interlaced" + - Resolution: "1280x720" + SupportedModes: + - Mode: "Progressive" + - Resolution: "3840x2160" + SupportedModes: + - Mode: "Progressive" + - Resolution: "2560x1440" + SupportedModes: + - Mode: "Progressive" + monitorName: "A6GX" + edidBytes: | + 00 ff ff ff ff ff ff 00 20 a3 01 00 01 01 01 01 + ff 1f 01 03 80 5e 36 78 0a ee 91 a3 54 4c 99 26 + 0f 50 54 a1 08 00 31 40 45 40 61 40 71 40 81 80 + 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 + 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 + 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 + 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc + 00 41 36 47 58 0a 20 20 20 20 20 20 20 20 01 14 + + 02 03 59 f1 53 61 60 10 1f 04 13 05 14 03 02 12 + 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 + 07 00 67 7e 00 67 03 0c 00 10 00 38 3c 68 d8 5d + c4 01 78 88 03 02 e2 00 cf e3 05 c0 00 e3 06 0d + 01 e4 0f 03 00 00 eb 01 46 d0 00 4a 67 32 a2 3c + 26 ce e6 11 46 d0 00 00 00 66 21 50 b0 51 00 1b + 30 40 70 36 00 40 84 63 00 00 1e 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9d + edidBytesLength: 272 \ No newline at end of file From 9efe47057615273932d86f6493b8114bc1773999 Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Mon, 25 Mar 2024 20:56:28 +0000 Subject: [PATCH 22/64] gh #23 dsFPD Test Specification Document --- docs/pages/ds-fpd_TestSpec.md | 205 ++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 docs/pages/ds-fpd_TestSpec.md diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md new file mode 100644 index 00000000..1e9ecf01 --- /dev/null +++ b/docs/pages/ds-fpd_TestSpec.md @@ -0,0 +1,205 @@ +# Device Settings Front Panel Display Test Document + +## Version History + +| Date(DD/MM/YY) | Comment | Version | +| -------------- | ------------- | ------- | +| 20/03/2024 | First Release | 1.0.0 | + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + +## Acronyms, Terms and Abbreviations + +- `HAL` - Hardware Abstraction layer +- `SOC` - System On a Chip +- `FP` - Front Panel +- `FPD` - Front Panel Display +- `ds` - Device Settings. +- `LED` - Light Emiting Devices +- `dsFPD` - Device Settings Front Panel Display + +## Introduction + +This document provides an overview of the testing requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. + +Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) + +## Module Description + +High level overview: + +- `dsFPD` provides a set of APIs to control the `FP`.discrete `LED`s and 7-segment `LED`s existing on a platform. +- It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. + +## Testing Scope + +|#|Test Functionality|Test Description| +|-|------------------|----------------| +|1|[Discrete `LED` Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify Brightness of the discrete LEDs supported on the platform.| +|2|[Discrete `LED` Blink Control](#discrete_led_blink_control)|The test aims to set and verify the blink activity of the discrete LEDs supported on the platform| +|3|[Discrete `LED` Color Control](#discrete_led_color_control)|The test aims to set and verify the color control activities of the discrete LEDs supported on the platform| +|4|[Discrete Power `LED` Control](#discrete_power_led_control)|The test aims to set and verify the discrete Power `LED` supported on the platform| +|5|[`FPD` Text Display Control](#fpd_text_display_control)|The test aims to set and verify the text display and its brightness on the 7-Segment LED Display supported on the platform| +|6|[`FPD` Text Mode and Scroll control](#fpd_text_mode_and_scroll_control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| +|7|[`FPD` Clock/Time display control ](#fpd_clock_display_control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment LED Display supported on the platform| +----------- + +## Discrete `LED` Brightness Control + +|Description|L2|L3| +|-----------|--|--| +|Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness + +### Test Startup Requirement +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. +Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. + +### Emulator Requirement + +Emulator will boot with the `LED` configurations that should include +1. Number of discrete `LED`s, available +2. Max and Min value of Brightness. +3. Default brightness of each discrete `LED` + +### Control Plane Requirement +Read the brightness intensity of the `LED` when set to a different level and compare with the previous intensity value. + +## Discrete `LED` blink control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Validate the blink functionality of discrete `LED` available on the platform |N|Y| Read the `LED` blink rate + +### Test Startup Requirement +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. +Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. + +### Emulator Requirement + +Emulator should able to emulate the blink property of the discrete`LED`s available on the platform. + +### Control Plane Requirement + +Read the Blink interval from the `LED` detector device. + +## Discrete `LED` color control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Validate the color functionality of discrete `LED` available by setting and getting different colours supported by the discrete `LED` |Y|Y| Read the `LED` Color + +### Test Startup Requirement + +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. + +Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. + +The supported discrete `LED` colors should be read from the setting files to set and get during the validation. + +### Emulator Requirement + +Emulator shall be capable of setting different `LED` colors to perform this test. + +### Control Plane Requirement + +The control panel should able to read the color of the LED through the specialised devices that shall identify the `LED` color and shall provide the same information to the control panel. + +## Discrete Power `LED` control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated agains the different supported states on the platform |Y|Y|NA + +### Test Startup Requirement + +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. + +Prior to the test, the test shall get the supported LED states on the platform using the `API` dsFPGetSupportedLEDStates() + +Note: The behavior of `LED` is platform dependent and it is defined as part of platform requirement. + +### Emulator Requirement + +Due to the platform specific requirement of `LED` behaviour, Emulator may not be required in this case. + +### Control Plane Requirement + +Due to platform specific requirement, it may not be possible to capture the `LED` behaviour is each state. + +## Frontpanel Display Text Display and Brightness Control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" +|Set the `FPD` mode to "Any" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" +|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using appropriate Set API and validate it Get API |Y|Y|Read the Brightness + +### Test Startup Requirement + +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. + +Before the test begins, the Test must ensure that the `FPD` mode is set correctly. + +The supported `FPD` configurations shall be read from the settings files to set and get during the validation. + +### Emulator Requirement + +Emulator will support the 7-Segment display and shall control the brightness + +### Control Plane Requirement + +Control Panel should able read the data from the tool that shall recorgnize the text display and brightness level. This data should be validated to declare the test result. + +## Frontpanel Display Text Mode and Scroll control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Set the `FPD` mode to "Text" mode, "Any" mode and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text" +|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate +|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate + +### Test Startup Requirement + +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. + +Before the test begins, the Test must ensure that the `FPD` mode is set correctly. + +The supported `FPD` configurations shall be read from the settings file. + +### Emulator Requirement + +Emulator will support the 7-Segment display and shall support the "Text" scroll activity. + +### Control Plane Requirement + +Control Panel should able read the data from the tool that shall recorgnize the text display and validate the scroll activity. This data should be validated to declare the test result. + +## Frontpanel Display Clock/Time Control + +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| +|Set the `FPD` Time Format using set `API` and validate the same with get `API` |Y|N|NA +|Set the `FPD` Time with supported formats. |N|Y|Read the Time and Time Format +|Enable the `FPD` Clock display and validate|N|Y|Read the Time and Time Format +|Disable the `FPD` Clock display and validate |N|Y|validate that NO Time is displayed + +### Test Startup Requirement + +Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. + +Before the test begins, the Test must ensure that the `FPD` mode is set correctly. + +The supported `FPD` configurations shall be read from the settings file. + +### Emulator Requirement + +Emulator will support the 7-Segment display and shall support the "Time" display. + +### Control Plane Requirement + +Control Panel should able read the data from the tool that shall recognize the "Time" display and validate. This data should be read and validated to declare the test result. From 5717d6e711bdde9da112c62eb89bcabb2a047b0c Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:05:16 +0000 Subject: [PATCH 23/64] gh #23 Updated the document with identation --- docs/pages/ds-fpd_TestSpec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 1e9ecf01..09fb424f 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -51,8 +51,8 @@ High level overview: ## Discrete `LED` Brightness Control -|Description|L2|L3| -|-----------|--|--| +|Description|L2|L3|Control Plane| +|-----------|--|--|-------------| |Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness ### Test Startup Requirement From a9d5596ceb42672b3cbc6cfa19b1fdb10a9a0391 Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Tue, 26 Mar 2024 20:45:43 +0000 Subject: [PATCH 24/64] gh #23 Updated the document with Test requirement, Emulation and Control Plane requirement after review --- docs/pages/ds-fpd_TestSpec.md | 77 +++++++++++++++-------------------- 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 09fb424f..77e6a119 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -33,20 +33,20 @@ Interface of the test is available in this link - [https://github.com/rdkcentra High level overview: -- `dsFPD` provides a set of APIs to control the `FP`.discrete `LED`s and 7-segment `LED`s existing on a platform. +- `dsFPD` provides a set of APIs to control the `FP`discrete `LED`s and 7-segment `LED`s existing on a platform. - It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. ## Testing Scope |#|Test Functionality|Test Description| |-|------------------|----------------| -|1|[Discrete `LED` Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify Brightness of the discrete LEDs supported on the platform.| -|2|[Discrete `LED` Blink Control](#discrete_led_blink_control)|The test aims to set and verify the blink activity of the discrete LEDs supported on the platform| -|3|[Discrete `LED` Color Control](#discrete_led_color_control)|The test aims to set and verify the color control activities of the discrete LEDs supported on the platform| +|1|[Discrete `LED` Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify Brightness of the discrete `LED`s supported on the platform.| +|2|[Discrete `LED` Blink Control](#discrete_led_blink_control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| +|3|[Discrete `LED` Color Control](#discrete_led_color_control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| |4|[Discrete Power `LED` Control](#discrete_power_led_control)|The test aims to set and verify the discrete Power `LED` supported on the platform| -|5|[`FPD` Text Display Control](#fpd_text_display_control)|The test aims to set and verify the text display and its brightness on the 7-Segment LED Display supported on the platform| +|5|[`FPD` Text Display Control](#fpd_text_display_control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| |6|[`FPD` Text Mode and Scroll control](#fpd_text_mode_and_scroll_control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| -|7|[`FPD` Clock/Time display control ](#fpd_clock_display_control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment LED Display supported on the platform| +|7|[`FPD` Clock/Time display control ](#fpd_clock_display_control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ----------- ## Discrete `LED` Brightness Control @@ -56,8 +56,8 @@ High level overview: |Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. -Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. + +NA ### Emulator Requirement @@ -76,12 +76,14 @@ Read the brightness intensity of the `LED` when set to a different level and com |Validate the blink functionality of discrete `LED` available on the platform |N|Y| Read the `LED` blink rate ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. -Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. + +NA ### Emulator Requirement -Emulator should able to emulate the blink property of the discrete`LED`s available on the platform. +Emulator will boot with the `LED` configurations that should include +1. Number of discrete `LED`s, available + ### Control Plane Requirement @@ -95,19 +97,18 @@ Read the Blink interval from the `LED` detector device. ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. - -Before the test begins, the Test must ensure that the state of all FP LEDs is set to ON. - -The supported discrete `LED` colors should be read from the setting files to set and get during the validation. +NA ### Emulator Requirement -Emulator shall be capable of setting different `LED` colors to perform this test. +Emulator will boot with the `LED` configurations that should include +1. Number of discrete `LED`s, available +2. Supported colors for each `LED` + ### Control Plane Requirement -The control panel should able to read the color of the LED through the specialised devices that shall identify the `LED` color and shall provide the same information to the control panel. +The control panel should able to read the color of the `LED` through the specialised devices that shall identify the `LED` color and shall provide the same information to the control panel. ## Discrete Power `LED` control @@ -117,15 +118,12 @@ The control panel should able to read the color of the LED through the specialis ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. - -Prior to the test, the test shall get the supported LED states on the platform using the `API` dsFPGetSupportedLEDStates() - -Note: The behavior of `LED` is platform dependent and it is defined as part of platform requirement. +NA ### Emulator Requirement -Due to the platform specific requirement of `LED` behaviour, Emulator may not be required in this case. +Emulator will boot with the `LED` configurations that should include +1. Provide the configuration of Power `LED` states supported. ### Control Plane Requirement @@ -141,19 +139,16 @@ Due to platform specific requirement, it may not be possible to capture the `LED ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. - -Before the test begins, the Test must ensure that the `FPD` mode is set correctly. - -The supported `FPD` configurations shall be read from the settings files to set and get during the validation. +NA ### Emulator Requirement +Emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. -Emulator will support the 7-Segment display and shall control the brightness ### Control Plane Requirement -Control Panel should able read the data from the tool that shall recorgnize the text display and brightness level. This data should be validated to declare the test result. +Control Panel should able read the data from the tool that shall recognize the text display and brightness level. This data should be validated to declare the test result. ## Frontpanel Display Text Mode and Scroll control @@ -165,19 +160,16 @@ Control Panel should able read the data from the tool that shall recorgnize the ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. - -Before the test begins, the Test must ensure that the `FPD` mode is set correctly. - -The supported `FPD` configurations shall be read from the settings file. +NA ### Emulator Requirement -Emulator will support the 7-Segment display and shall support the "Text" scroll activity. +Emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement -Control Panel should able read the data from the tool that shall recorgnize the text display and validate the scroll activity. This data should be validated to declare the test result. +Control Panel should able read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. ## Frontpanel Display Clock/Time Control @@ -190,15 +182,12 @@ Control Panel should able read the data from the tool that shall recorgnize the ### Test Startup Requirement -Prior to commencing the test, it is necessary for the Test to initialize all FP LEDs. - -Before the test begins, the Test must ensure that the `FPD` mode is set correctly. - -The supported `FPD` configurations shall be read from the settings file. +NA ### Emulator Requirement -Emulator will support the 7-Segment display and shall support the "Time" display. +Emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement From 40539426ef94351067af1e68f083050921cdf477 Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:11:47 +0000 Subject: [PATCH 25/64] gh #23 Minor updates from the review --- docs/pages/ds-fpd_TestSpec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 77e6a119..9548205a 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -67,7 +67,7 @@ Emulator will boot with the `LED` configurations that should include 3. Default brightness of each discrete `LED` ### Control Plane Requirement -Read the brightness intensity of the `LED` when set to a different level and compare with the previous intensity value. +Read the brightness intensity of the `LED` when set to a different level and compare with the previous intensity value using a `LED` detector device. ## Discrete `LED` blink control @@ -143,7 +143,7 @@ NA ### Emulator Requirement Emulator will boot with the configurations that should include -1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. +1. 7-seg `FPD` Text/Clock mode, Brightness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement From 57ad1c3756cdb0ed67266c1ab61523112ed3dcb6 Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:15:19 +0100 Subject: [PATCH 26/64] Update ds-fpd_TestSpec.md Updating the links --- docs/pages/ds-fpd_TestSpec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 9548205a..e4c34e7e 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -40,7 +40,7 @@ High level overview: |#|Test Functionality|Test Description| |-|------------------|----------------| -|1|[Discrete `LED` Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify Brightness of the discrete `LED`s supported on the platform.| +|1|[Discrete LED Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify the Brightness of the discrete `LED`s supported on the platform.| |2|[Discrete `LED` Blink Control](#discrete_led_blink_control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| |3|[Discrete `LED` Color Control](#discrete_led_color_control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| |4|[Discrete Power `LED` Control](#discrete_power_led_control)|The test aims to set and verify the discrete Power `LED` supported on the platform| From eab976dae4a5d746274559247e0b920b66600b0b Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:21:03 +0100 Subject: [PATCH 27/64] Update ds-fpd_TestSpec.md updated with spell corrections. --- docs/pages/ds-fpd_TestSpec.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index e4c34e7e..f757ea86 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -25,9 +25,9 @@ ## Introduction -This document provides an overview of the testing requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. +This document provides an overview of the testing requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements, and expected deliverables. -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) +The interface of the test is available at this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) ## Module Description @@ -49,7 +49,7 @@ High level overview: |7|[`FPD` Clock/Time display control ](#fpd_clock_display_control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ----------- -## Discrete `LED` Brightness Control +## Discrete LED Brightness Control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| @@ -61,13 +61,13 @@ NA ### Emulator Requirement -Emulator will boot with the `LED` configurations that should include +The emulator will boot with the `LED` configurations that should include 1. Number of discrete `LED`s, available 2. Max and Min value of Brightness. 3. Default brightness of each discrete `LED` ### Control Plane Requirement -Read the brightness intensity of the `LED` when set to a different level and compare with the previous intensity value using a `LED` detector device. +Read the brightness intensity of the `LED` when set to a different level and compare it with the previous intensity value using a `LED` detector device. ## Discrete `LED` blink control @@ -81,7 +81,7 @@ NA ### Emulator Requirement -Emulator will boot with the `LED` configurations that should include +The emulator will boot with the `LED` configurations that should include 1. Number of discrete `LED`s, available @@ -93,7 +93,7 @@ Read the Blink interval from the `LED` detector device. |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Validate the color functionality of discrete `LED` available by setting and getting different colours supported by the discrete `LED` |Y|Y| Read the `LED` Color +|Validate the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |Y|Y| Read the `LED` Color ### Test Startup Requirement @@ -101,20 +101,20 @@ NA ### Emulator Requirement -Emulator will boot with the `LED` configurations that should include +The emulator will boot with the `LED` configurations that should include 1. Number of discrete `LED`s, available 2. Supported colors for each `LED` ### Control Plane Requirement -The control panel should able to read the color of the `LED` through the specialised devices that shall identify the `LED` color and shall provide the same information to the control panel. +The control panel should be able to read the color of the `LED` through the specialized devices that shall identify the `LED` color and provide the same information to the control panel. ## Discrete Power `LED` control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated agains the different supported states on the platform |Y|Y|NA +|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated against the different supported states on the platform |Y|Y|NA ### Test Startup Requirement @@ -122,12 +122,12 @@ NA ### Emulator Requirement -Emulator will boot with the `LED` configurations that should include +The emulator will boot with the `LED` configurations that should include 1. Provide the configuration of Power `LED` states supported. ### Control Plane Requirement -Due to platform specific requirement, it may not be possible to capture the `LED` behaviour is each state. +Due to platform-specific requirements, it may not be possible to capture the `LED` behavior is each state. ## Frontpanel Display Text Display and Brightness Control @@ -135,28 +135,28 @@ Due to platform specific requirement, it may not be possible to capture the `LED |-----------|--|--|-------------| |Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" |Set the `FPD` mode to "Any" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" -|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using appropriate Set API and validate it Get API |Y|Y|Read the Brightness +|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using the appropriate Set API and validate it Get API |Y|Y|Read the Brightness ### Test Startup Requirement NA ### Emulator Requirement -Emulator will boot with the configurations that should include -1. 7-seg `FPD` Text/Clock mode, Brightness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. +The emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement -Control Panel should able read the data from the tool that shall recognize the text display and brightness level. This data should be validated to declare the test result. +The control Panel should be able to read the data from the tool that can recognizes the text display and brightness level. This data should be validated to declare the test result. ## Frontpanel Display Text Mode and Scroll control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Set the `FPD` mode to "Text" mode, "Any" mode and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text" -|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate -|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate +|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text" +|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate +|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate ### Test Startup Requirement @@ -164,12 +164,12 @@ NA ### Emulator Requirement -Emulator will boot with the configurations that should include -1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. +The emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brightness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement -Control Panel should able read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. +The control Panel should be able to read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. ## Frontpanel Display Clock/Time Control @@ -186,9 +186,9 @@ NA ### Emulator Requirement -Emulator will boot with the configurations that should include -1. 7-seg `FPD` Text/Clock mode, Brighness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. +The emulator will boot with the configurations that should include +1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. ### Control Plane Requirement -Control Panel should able read the data from the tool that shall recognize the "Time" display and validate. This data should be read and validated to declare the test result. +The control Panel should be able to read the data from the tool that shall recognize the "Time" display and validate. This data should be read and validated to declare the test result. From 064813c9d6ae7253847d87795d4333b106f3cf9f Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:31:07 +0100 Subject: [PATCH 28/64] Update ds-fpd_TestSpec.md Hyper link updates. --- docs/pages/ds-fpd_TestSpec.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index f757ea86..eecd5a7c 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -31,7 +31,7 @@ The interface of the test is available at this link - [https://github.com/rdkce ## Module Description -High level overview: +High-level overview: - `dsFPD` provides a set of APIs to control the `FP`discrete `LED`s and 7-segment `LED`s existing on a platform. - It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. @@ -40,16 +40,16 @@ High level overview: |#|Test Functionality|Test Description| |-|------------------|----------------| -|1|[Discrete LED Brightness Control](#discrete_led_brightness_control)|The test aims to set and verify the Brightness of the discrete `LED`s supported on the platform.| -|2|[Discrete `LED` Blink Control](#discrete_led_blink_control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| -|3|[Discrete `LED` Color Control](#discrete_led_color_control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| -|4|[Discrete Power `LED` Control](#discrete_power_led_control)|The test aims to set and verify the discrete Power `LED` supported on the platform| -|5|[`FPD` Text Display Control](#fpd_text_display_control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| -|6|[`FPD` Text Mode and Scroll control](#fpd_text_mode_and_scroll_control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| -|7|[`FPD` Clock/Time display control ](#fpd_clock_display_control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| +|1|[Discrete `LED` Brightness Control](#discrete-leds-brightness-control)|The test aims to set and verify the Brightness of the discrete `LED`s supported on the platform.| +|2|[Discrete `LED` Blink Control](#discrete-led-blink-control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| +|3|[Discrete `LED` Color Control](#discrete-led-color-control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| +|4|[Discrete Power `LED` Control](#discrete-power-led-control)|The test aims to set and verify the discrete Power `LED` supported on the platform| +|5|[`FPD` Text Display Control](#fpd-text-display-control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| +|6|[`FPD` Text Mode and Scroll control](#fpd-text-mode-and-scroll-control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| +|7|[`FPD` Clock/Time display control ](#fpd-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ----------- -## Discrete LED Brightness Control +## Discrete `LED` Brightness Control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| From 6be8e0529c3f91e79299b02c833482da061a5128 Mon Sep 17 00:00:00 2001 From: srinivasgtl <71806084+srinivasgtl@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:45:48 +0100 Subject: [PATCH 29/64] Update ds-fpd_TestSpec.md Hyperlink issues fixed --- docs/pages/ds-fpd_TestSpec.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index eecd5a7c..343048fd 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -20,7 +20,7 @@ - `FP` - Front Panel - `FPD` - Front Panel Display - `ds` - Device Settings. -- `LED` - Light Emiting Devices +- `LED` - Light Emitting Devices - `dsFPD` - Device Settings Front Panel Display ## Introduction @@ -40,13 +40,13 @@ High-level overview: |#|Test Functionality|Test Description| |-|------------------|----------------| -|1|[Discrete `LED` Brightness Control](#discrete-leds-brightness-control)|The test aims to set and verify the Brightness of the discrete `LED`s supported on the platform.| +|1|[Discrete `LED` Brightness Control](#discrete-led-brightness-control)|The test aims to set and verify the Brightness of the discrete `LED`s supported on the platform.| |2|[Discrete `LED` Blink Control](#discrete-led-blink-control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| |3|[Discrete `LED` Color Control](#discrete-led-color-control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| |4|[Discrete Power `LED` Control](#discrete-power-led-control)|The test aims to set and verify the discrete Power `LED` supported on the platform| -|5|[`FPD` Text Display Control](#fpd-text-display-control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| -|6|[`FPD` Text Mode and Scroll control](#fpd-text-mode-and-scroll-control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| -|7|[`FPD` Clock/Time display control ](#fpd-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| +|5|[FrontPanel Text and Brightness Display Control](#frontpanel-text-and-brightness-display-control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| +|6|[FrontPanel Display Text Mode and Scroll control](#frontpanel-display-text-mode-and-scroll-control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| +|7|[FrontPanel Clock display control ](#frontpanel-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ----------- ## Discrete `LED` Brightness Control @@ -127,9 +127,9 @@ The emulator will boot with the `LED` configurations that should include ### Control Plane Requirement -Due to platform-specific requirements, it may not be possible to capture the `LED` behavior is each state. +Due to platform-specific requirements, it may not be possible to capture the `LED` behavior in each state. -## Frontpanel Display Text Display and Brightness Control +## Frontpanel Text and Brightness Display Control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| @@ -148,7 +148,7 @@ The emulator will boot with the configurations that should include ### Control Plane Requirement -The control Panel should be able to read the data from the tool that can recognizes the text display and brightness level. This data should be validated to declare the test result. +The control Panel should be able to read the data from the tool that can recognize the text display and brightness level. This data should be validated to declare the test result. ## Frontpanel Display Text Mode and Scroll control @@ -171,7 +171,7 @@ The emulator will boot with the configurations that should include The control Panel should be able to read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. -## Frontpanel Display Clock/Time Control +## Frontpanel Clock Display Control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| From 7339b5b93e8f0c12c2f8647f7c81c1dc92e727fd Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:22:51 +0100 Subject: [PATCH 30/64] gh #10 update hal apis to the spec --- docs/pages/dsComposite_test_spec.md | 104 ++++++++---------- .../include/sink/Panel_CompositeInput.yaml | 12 ++ 2 files changed, 57 insertions(+), 59 deletions(-) create mode 100644 profiles/include/sink/Panel_CompositeInput.yaml diff --git a/docs/pages/dsComposite_test_spec.md b/docs/pages/dsComposite_test_spec.md index 37488e1b..e2a74c90 100644 --- a/docs/pages/dsComposite_test_spec.md +++ b/docs/pages/dsComposite_test_spec.md @@ -1,10 +1,4 @@ -# CompositeIn Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 18/03/2024 | First Release | 1.0.0 | +# Device Settings CompositeIn High Level Test Specification Document ## Table of Contents @@ -16,18 +10,16 @@ ## Acronyms, Terms and Abbreviations - `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification - `API` - Application programming interface -- `CPU` - Central processing unit - `RDK` - Reference Design Kit - `dsComposite` - Device Settings Composite ## Introduction -This document provides an overview of the testing requirements for the `dsComposite` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. +This document provides an overview of the high level testing requirements for the `dsComposite` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) +- Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) +- Hal Specification in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-composite-in_halSpec.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-composite-in_halSpec.md) ## Module Description @@ -41,24 +33,20 @@ High level overview: |#|Test Functionality|Test Description| |-|------------------|----------------| -|1|[Get Number of Inputs](#get_number_of_inputs)|The test aims to verify the availability of Composite Input ports by confirming the number present.| -|2|[Get the Input Status](#get_the_input_status)|The test is to verify the status of all Composite Input Status| -|3|[Set the Composite port](#set_the_composite_port)|The test is to set the Composite Input port for Presentation| -|4|[Scale the Composite Input Video](#scale_the_composite_input_video)|The test scales the COMPOSITE input video, ensuring that the width and height, determined by the x and y coordinates respectively, do not surpass the current resolution limits of the device.| -|5|[Callback for connection Status](#callback_for_connection_status)|The test aims to verify the Callback function used for notifying applications of the COMPOSITE In hot plug status.| -|6|[Callback for Signal Change](#callback_for_signal_change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the Composite In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| -|7|[Callback for Status Change](#callback_for_status_change)|The test validates the functionality of the callback function designed to notify applications of Composite Input status change events.(Port,IsPresented flag status)| +|1|[Get Number of Inputs](#get-number-of-inputs)|The test aims to verify the availability of Composite Input ports by confirming the number present.| +|2|[Get the Input Status](#get-the-input-status)|The test is to verify the status of all Composite Input ports| +|3|[Set the Composite port](#set-the-composite-port)|The test is to set the Composite Input port for Presentation| +|4|[Scale the Composite Input Video](#scale-the-composite-input-video)|The test scales the COMPOSITE input video, ensuring that the width and height, determined by the x and y coordinates respectively, do not surpass the current resolution limits of the device.| +|5|[Callback for connection Status](#callback-for-connection-status)|The test aims to verify the Callback function used for notifying applications of the COMPOSITE In hot plug/unplug status.| +|6|[Callback for Signal Change](#callback-for-signal-change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the Composite In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| +|7|[Callback for Status Change](#callback-for-status-change)|The test validates the functionality of the callback function designed to notify applications of Composite Input status change events.(Port,IsPresented flag status)| ----------- ## Get Number of Inputs -|Description|L2|L3| -|-----------|--|--| -|Verify that the function returns the expected COMPOSITE Input ports.|Y|N| - -### Test Startup Requirement - Get Number of Inputs - -The test begins with the configured composite input port details. +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Ensure that the function returns the expected number of COMPOSITE input ports by comparing the input port values parsed from the configuration YAML file 'Panel_CompositeInput.yaml'. The value to be retrieved from the YAML is 'composite_input_configurations.number_of_ports'. |dsCompositeInGetNumberOfInputs|Y|N|N| ### Emulator Requirement - Get Number of Inputs @@ -70,10 +58,10 @@ None ## Get the Input Status -|Description|L2|L3| -|-----------|--|--| -|Verify the status of the Composite Input by ensuring it is in disable status.|Y|N| -|Verify the status of the Composite Input by ensuring it is enabled, connected to the source, and that the composite input port is active.|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Verify the status of the Composite Input by ensuring it is in disable status.|dsCompositeInGetStatus|Y|N|N| +|Verify the status of the Composite Input by ensuring it is enabled, connected to the source, and that the composite input port is active.|dsCompositeInGetStatus|N|Y|Y| ### Test Startup Requirement - Get the Input Status @@ -85,18 +73,18 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Get the Input Status -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. +Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. ## Set the Composite port -|Description|L2|L3| -|-----------|--|--| -|verify that the function successfully sets the specified COMPOSITE Input port as active for presentation and check the port information using "Get status".|Y|Y| -|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Loop through the all composite ports, verify that the function successfully sets the specified COMPOSITE Input port when there is no connection of source device, and check the disable status of the port information using "Get status".|dsCompositeInSelectPort, dsCompositeInGetStatus|Y|N|N| +|Loop through the all composite ports, verify that the function successfully sets the specified COMPOSITE Input port as active for presentation, and check the port information using "Get status".|dsCompositeInSelectPort, dsCompositeInGetStatus|N|Y|Y| ### Test Startup Requirement - Set the Composite port -The test begins with the configured composite input port numbers. +Connection of the source device with the CompositeIn. ### Emulator Requirement - Set the Composite port @@ -104,13 +92,13 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Set the Composite port -The Control Plane must monitor the external device (Video analyzer) to detect any video glitches. +- Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. ## Scale the Composite Input Video -|Description|L2|L3| -|-----------|--|--| -|Verify that the function successfully scales the COMPOSITE input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Verify that the function successfully scales the COMPOSITE input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|dsCompositeInSelectPort(), dsCompositeInScaleVideo()|N|Y|Y| ### Test Startup Requirement - Scale the Composite Input Video @@ -122,15 +110,16 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Scale the Composite Input Video -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. +- Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. +- The Control Plane handles the changing of various resolutions. +- The Control Plane checks and validates the coordinates and dimensions by comparing the values from the video analyzer. ## Callback for connection Status -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application when a COMPOSITE Input port is connected or disconnected.|N|Y| -|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y| -|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t if the connected port is active and presents video after being connected.|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a COMPOSITE Input port is connected or disconnected.|dsCompositeInRegisterConnectCB|N|Y|Y| +|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t, if the connected port is active and presents video after being connected.|dsCompositeInRegisterConnectCB|N|Y|Y| ### Test Startup Requirement - Callback for connection Status @@ -142,14 +131,13 @@ Emulator will boot with the port information coming from the configuration file. ### Control Plane Requirement - Callback for connection Status -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. +Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. ## Callback for Signal Change -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y| -|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Verify that the callback function properly notifies the application whenever there is a change in the signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) for the composite Input port.|dsCompositeInRegisterSignalChangeCB|N|Y|Y| ### Test Startup Requirement - Callback for Signal Change @@ -161,16 +149,14 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Callback for Signal Change -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. -Provide resolution changes or configurations changes on the connected device that affects the output signal. +- Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. +- Provide resolution changes or configurations changes on the connected device that affects the output signal. ## Callback for Status Change -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application of the Composite Input status change event.|N|Y| -|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y| -|Verify that the callback function properly triggers whenever the dsCompositeInStatus_t is updated|N|Y| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Verify that the callback function properly triggers whenever the dsCompositeInStatus_t is updated and notifies the application of the Composite Input Status Change event.|dsCompositeInRegisterStatusChangeCB|N|Y|Y| ### Test Startup Requirement - Callback for Status Change @@ -182,4 +168,4 @@ Emulator will boot with the port informations coming from the configuration file ### Control Plane Requirement - Callback for Status Change -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. +Connecting and disconnecting source devices in the CompositeIn will be handled by the Control Plane. \ No newline at end of file diff --git a/profiles/include/sink/Panel_CompositeInput.yaml b/profiles/include/sink/Panel_CompositeInput.yaml new file mode 100644 index 00000000..808a66ca --- /dev/null +++ b/profiles/include/sink/Panel_CompositeInput.yaml @@ -0,0 +1,12 @@ +Device: + Type: sink + Name: element + +composite_input_configurations: + #dsCOMPOSITE_IN_PORT_NONE = -1, ///< No composite port. + #dsCOMPOSITE_IN_PORT_0, ///< Composite port index 0. + #dsCOMPOSITE_IN_PORT_1, ///< Composite port index 1. + #dsCOMPOSITE_IN_PORT_MAX ///< Out of range + number_of_ports: 1 # Port 0 + ports: + - 0 # dsCOMPOSITE_IN_PORT_0 \ No newline at end of file From 16dcbcd030dd75d54fccfa29a8b295a03bddf9bf Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:16:24 +0100 Subject: [PATCH 31/64] gh #11 update hal apis to the spec --- docs/pages/dsComposite_test_spec.md | 185 ------------------- docs/pages/dsDisplay_TestSpecificaion.md | 66 +++---- profiles/include/sink/Panel_4K_Display.yaml | 47 +++++ profiles/include/source/Puck_4K_Display.yaml | 8 + 4 files changed, 83 insertions(+), 223 deletions(-) delete mode 100644 docs/pages/dsComposite_test_spec.md create mode 100644 profiles/include/sink/Panel_4K_Display.yaml create mode 100644 profiles/include/source/Puck_4K_Display.yaml diff --git a/docs/pages/dsComposite_test_spec.md b/docs/pages/dsComposite_test_spec.md deleted file mode 100644 index 37488e1b..00000000 --- a/docs/pages/dsComposite_test_spec.md +++ /dev/null @@ -1,185 +0,0 @@ -# CompositeIn Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 18/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#testing-scope) - -## Acronyms, Terms and Abbreviations - -- `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `RDK` - Reference Design Kit -- `dsComposite` - Device Settings Composite - -## Introduction - -This document provides an overview of the testing requirements for the `dsComposite` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) - -## Module Description - -High level overview: - -- `dsComposite` provides a variety of APIs for accessing information regarding the Composite Inputs on sink devices. -- It facilitates interaction with Composite Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. -- For the sink devices, to retrieve the available Composite Input information, an external device must be connected. - -## Testing Scope - -|#|Test Functionality|Test Description| -|-|------------------|----------------| -|1|[Get Number of Inputs](#get_number_of_inputs)|The test aims to verify the availability of Composite Input ports by confirming the number present.| -|2|[Get the Input Status](#get_the_input_status)|The test is to verify the status of all Composite Input Status| -|3|[Set the Composite port](#set_the_composite_port)|The test is to set the Composite Input port for Presentation| -|4|[Scale the Composite Input Video](#scale_the_composite_input_video)|The test scales the COMPOSITE input video, ensuring that the width and height, determined by the x and y coordinates respectively, do not surpass the current resolution limits of the device.| -|5|[Callback for connection Status](#callback_for_connection_status)|The test aims to verify the Callback function used for notifying applications of the COMPOSITE In hot plug status.| -|6|[Callback for Signal Change](#callback_for_signal_change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the Composite In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| -|7|[Callback for Status Change](#callback_for_status_change)|The test validates the functionality of the callback function designed to notify applications of Composite Input status change events.(Port,IsPresented flag status)| ------------ - -## Get Number of Inputs - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function returns the expected COMPOSITE Input ports.|Y|N| - -### Test Startup Requirement - Get Number of Inputs - -The test begins with the configured composite input port details. - -### Emulator Requirement - Get Number of Inputs - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get Number of Inputs - -None - -## Get the Input Status - -|Description|L2|L3| -|-----------|--|--| -|Verify the status of the Composite Input by ensuring it is in disable status.|Y|N| -|Verify the status of the Composite Input by ensuring it is enabled, connected to the source, and that the composite input port is active.|N|Y| - -### Test Startup Requirement - Get the Input Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Get the Input Status - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get the Input Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Set the Composite port - -|Description|L2|L3| -|-----------|--|--| -|verify that the function successfully sets the specified COMPOSITE Input port as active for presentation and check the port information using "Get status".|Y|Y| -|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y| - -### Test Startup Requirement - Set the Composite port - -The test begins with the configured composite input port numbers. - -### Emulator Requirement - Set the Composite port - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Set the Composite port - -The Control Plane must monitor the external device (Video analyzer) to detect any video glitches. - -## Scale the Composite Input Video - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function successfully scales the COMPOSITE input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y| - -### Test Startup Requirement - Scale the Composite Input Video - -The test begins by setting up the video analyzer, and the video should be played. - -### Emulator Requirement - Scale the Composite Input Video - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Scale the Composite Input Video - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for connection Status - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application when a COMPOSITE Input port is connected or disconnected.|N|Y| -|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y| -|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t if the connected port is active and presents video after being connected.|N|Y| - -### Test Startup Requirement - Callback for connection Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for connection Status - -Emulator will boot with the port information coming from the configuration file. - -### Control Plane Requirement - Callback for connection Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for Signal Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y| -|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y| - -### Test Startup Requirement - Callback for Signal Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Signal Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Signal Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. -Provide resolution changes or configurations changes on the connected device that affects the output signal. - -## Callback for Status Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application of the Composite Input status change event.|N|Y| -|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y| -|Verify that the callback function properly triggers whenever the dsCompositeInStatus_t is updated|N|Y| - -### Test Startup Requirement - Callback for Status Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Status Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Status Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index 77fa88d3..2d355322 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -1,10 +1,4 @@ -# Display Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 05/03/2024 | First Release | 1.0.0 | +# Device Settings Display High Level Test Specification Document ## Table of Contents @@ -17,7 +11,6 @@ ## Acronyms, Terms and Abbreviations - `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip - `EDID` - Extended Display Identification - `API` - Application programming interface - `CPU` - Central processing unit @@ -26,14 +19,15 @@ ## References -- `EDID` Specifications [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) -- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) +- `EDID` Specifications - [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) +- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://pypi.org/project/pyedid/) ## Introduction -This document provides an overview of the testing requirements for the dsDisplay module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. +This document provides an overview of the high level testing requirements for the dsDisplay module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h) +- Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h) +- `HAL` Specification in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-display_halSpec.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-display_halSpec.md) ## Module Description @@ -49,15 +43,15 @@ High level overview: |-|------------------|----------------| |1|[Get EDID Information](#get-edid-information)|Test validates the accuracy and functionality of the display device module's functions (dsGetEDID and dsGetEDIDBytes) in retrieving the Extended Display Identification Data (EDID) from connected display devices| |2|[Get Aspect Ratio](#get-aspect-ratio)| Test provides the aspect ratio of the display device| -|3|[Callback Registration for Display Related Events](#callback-registration-for-display-related-events)|To verify the callback registration for display related events. The display events are Dislay connected event, Display disconnected event, Rx Sense ON event, Rx Sense OFF event, HDCP protocol version change event| +|3|[Callback Registration for Display Related Events](#callback-registration-for-display-related-events)|To verify the callback registration for display related events. The display events are Display connected event, Display disconnected event, Rx Sense ON event, Rx Sense OFF event, HDCP protocol version change event| ----------- ## Get EDID Information -|Description|HAL APIs|L2|L3|Source|Sink| -|-----------|--------|--|--|------|----| -|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID, dsGetEDIDBytes|N|Y|Y|Y| -|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |dsGetEDID, dsGetEDIDBytes|Y|N|Y|Y| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID(), dsGetEDIDBytes()|N|Y|Y|N|N| +|For the sink device, retrieve EDID information for the 'dsVIDEOPORT_TYPE_INTERNAL' type using GetEDID and GetEDIDBytes, then validate the values against the data available in the profile file. The values to be validated are the 'productCode' for GetEDID and the 'Manufacturer ID' at bytes 8 and 9 against the values available in the profile file "Panel_4K_Display.yaml" for GetEDIDBytes|dsGetEDID(), dsGetEDIDBytes()|Y|N|N|Y|N| ### Test Startup Requirement - Get EDID Information @@ -76,18 +70,14 @@ Generate a list of TV's from the office for the different EDIDs and store the bi ### Control Plane Requirement - Get EDID Information -None +Switching between the EDIDs of multiple TVs controlled by the control plane ## Get Aspect Ratio -|Description|L2|L3|HAL APIs|Source|Sink| -|-----------|--|--|--------|------|----| -|Test the aspect ratio returned by the dsGetDisplayAspectRatio() function for the specified display device handle.|dsGetDisplayAspectRatio|N|Y|Y|N -|Adjust and test the aspect ratio to ensure it is providing the expected aspect ratio.|dsGetDisplayAspectRatio|N|Y|Y|N| - -### Test Startup Requirement - Get Aspect Ratio - -Launch the test with the predefined configuration set of results. +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Test the default aspect ratio (16:9) without any TV connected.|dsGetDisplayAspectRatio()|Y|N|Y|N|N| +|Adjust and test the different aspect ratios (4:3, 16:9) to ensure they provide the expected aspect ratio.|dsGetDisplayAspectRatio()|N|Y|Y|N|Y| ### Emulator Requirement - Get Aspect Ratio @@ -99,23 +89,23 @@ Maintains the configuration of various aspect ratios and provides them whenever ## Callback Registration for Display Related Events -|Description|HAL APIs|L2|L3|Source|Sink| -|-----------|--------|--|--|------|----| -|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|Y| -|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback|N|Y|Y|N| -|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N| -|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N| -|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change|dsRegisterDisplayEventCallback|N|Y|Y|N| - +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback()|N|Y|Y|Y|Y| +|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|dsRegisterDisplayEventCallback()|N|Y|Y|N|Y| +|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback()|N|Y|Y|N|Y| +|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected|dsRegisterDisplayEventCallback|N|Y|Y|N|Y| +|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change|dsRegisterDisplayEventCallback()|N|Y|Y|N|N| -### Test Startup Requirement -Callback Registration for Display Related Events +### Test Startup Requirement - Callback Registration for Display Related Events -Launch the test with the predefined set of configured HDCP 1.x and HDCP 2.x keys. +Launch the test with the configured HDCP 1.x and HDCP 2.x keys. ### Emulator Requirement - Callback Registration for Display Related Events -Emulator will boot with the HDCP keys coming from the configuration file. +Emulator will boot with the predefined set of HDCP keys coming from the configuration file. ### Control Plane Requirement - Callback Registration for Display Related Events -The control plane will generate events for HDMI connection and disconnection. It also supplies signals to the receiving devices to initiate the Rx Sense ON/Rx Sense OFF events. \ No newline at end of file +- The control plane will generate events for HDMI connection and disconnection. It also supplies signals to the receiving devices to initiate the Rx Sense ON/Rx Sense OFF events. +- The Control Plane will handle connection/disconnection, measuring the timing between both and ensuring it meets the expected time. \ No newline at end of file diff --git a/profiles/include/sink/Panel_4K_Display.yaml b/profiles/include/sink/Panel_4K_Display.yaml new file mode 100644 index 00000000..72519999 --- /dev/null +++ b/profiles/include/sink/Panel_4K_Display.yaml @@ -0,0 +1,47 @@ +Device: + Type: sink + Name: element + +EDID_Data: + # Product code of the display device of the type int32_t + productCode: 0x2A1B + # Serial number of the display device of the type int32_t + serialNumber: 0x01010101 + # Year of manufacture of the display device of the type int32_t + manufactureYear: 2022 + # Week of manufacture of the display device of the type int32_t + manufactureWeek: 1 + # Device type ( @a true if HDMI, @a false if DVI ) of the type bool + hdmiDeviceType: true + # Receiver is a repeater ( @a true if Repeater, @a false if connected Receiver is not a repeater) of the type bool + isRepeater: false + # Physical Address for HDMI node A of the type uint8_t + physicalAddressA: 1 + # Physical Address for HDMI node B of the type uint8_t + physicalAddressB: 0 + # Physical Address for HDMI node C of the type uint8_t + physicalAddressC: 0 + # Physical Address for HDMI node D of the type uint8_t + physicalAddressD: 0 + # Connected Display Monitor Name of the type char. Max length of the string is dsEEDID_MAX_MON_NAME_LENGTH ( 14 ) + monitorName: "element TV" + # edid bytes data + edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 + ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 + 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 + 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 + 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 + 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 + 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc + 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f + + 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 + 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 + 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 + 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 + 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 + 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 + 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 + 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" + # length of the edid bytes + edidbytesLength: 256 \ No newline at end of file diff --git a/profiles/include/source/Puck_4K_Display.yaml b/profiles/include/source/Puck_4K_Display.yaml new file mode 100644 index 00000000..1ea11e62 --- /dev/null +++ b/profiles/include/source/Puck_4K_Display.yaml @@ -0,0 +1,8 @@ +Device: + Type: source + Name: xione + +# dsVIDEO_ASPECT_RATIO_4x3 = 0x00, ///< 4:3 aspect ratio +# dsVIDEO_ASPECT_RATIO_16x9 = 0x01, ///< 16:9 aspect ratio +# dsVIDEO_ASPECT_RATIO_MAX = 0xFF ///< Out of range +Aspect Ratio: 0x01 # 16:9 \ No newline at end of file From 4d564011bafc5a33a7288a30b9e66928bf35b558 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Sat, 11 May 2024 15:23:33 +0100 Subject: [PATCH 32/64] gh #18 add HAL API's and Control plane requirements --- .../ds-video-device_High-Level_TestSpec.md | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/pages/ds-video-device_High-Level_TestSpec.md b/docs/pages/ds-video-device_High-Level_TestSpec.md index 5a25e019..045322ec 100644 --- a/docs/pages/ds-video-device_High-Level_TestSpec.md +++ b/docs/pages/ds-video-device_High-Level_TestSpec.md @@ -1,4 +1,4 @@ -# Device Settings Video Device Test Specification Documentation +# Device Settings Video Device High Level Test Specification Documentation ## Table of Contents @@ -26,7 +26,7 @@ ## Introduction -This document provides an overview of the testing requirements for the Device Settings Video Device module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. +This document provides an overview of the High Level testing requirements for the Device Settings Video Device module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. Interface of the test is available here: [dsVideoDevice HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDevice.h) @@ -34,6 +34,8 @@ Interface of the test is available here: [dsVideoDevice HAL header](https://gith `DS` Video device `HAL` provides a set of `APIs` to initialize, query and set information about about the zoom mode, `HDR` capabilities, Video encoding formats and frame rate. +Interface specification is available here: [dsVideoPort HAL Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-video-device_halSpec.md) + ## Testing Scope |#|Test Functionality|Description| @@ -59,9 +61,10 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali ### Check the Zoom Control -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check the zoom mode status|Ensure that the video device can be retrieved and the zoom mode can be set, retrieved and verify successfully with/without Video playback |`Y`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check the zoom mode status|Ensure that the each video device can be retrieved and the zoom mode can be set using configuration file and verify using get|dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| +||Ensure that the each video device can be retrieved and the zoom mode can be set using configuration file and verify using get with Video playback & connected device |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-Check the Zoom Control @@ -77,13 +80,13 @@ Verify the applied zoom mode during playback with analyzer. ### Check the HDR Capability -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check `HDR` Capability|Get the `HDR` capabilities and status|`Y`|`NA`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check `HDR` Capability|Get the `HDR` capabilities for each port and verify with the configuration file|dsGetHDRCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability -Playback the pre-define streams +`NA` #### Emulator Requirements-Check the HDR Capability @@ -91,17 +94,18 @@ Playback the pre-define streams #### Control Plane Requirements-Check the HDR Capability -Verify the `HDR` status with analyzer. +`NA` ### Check Video codec and Formats -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check Video codec Formats and information|Check the supported Video coding format |`Y`|`NA`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check Video coding Formats and information|Check each video device the supported Video coding format and verify the with configuration file or profile|dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Check the supported Video codec information for each port and verify the with configuration file or profile|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check Video codec and Formats -Playback the pre-define streams +`NA` #### Emulator Requirements-Check Video codec and Formats @@ -109,14 +113,14 @@ Playback the pre-define streams #### Control Plane Requirements-Check Video codec and Formats -None +`NA` ### Check the Display frame rate Capability -|Test Functionality|Description|L2|L3|Source|Sink| -|------------------|-----------|--|--|------|----| -|Check the Display frame rate Capability|set, retrieved and verify the display framerate successfully|`Y`|`NA`|`NA`|Y| -||Set the frame rate and check if callbacks are triggered|`NA`|`Y`|`NA`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check the Display frame rate Capability|Set the supported display frame rate using configuration file and verify using get|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Set the supported display frame rate using configuration file and check if callbacks are triggered|dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| #### Test Startup Requirement-Check the Display frame rate Capability From 83a5f60e66e8c81038aeca5485b4c54d45c48752 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:35:15 +0100 Subject: [PATCH 33/64] gh #24 update yaml info --- docs/pages/dsHdmiIn_test_spec.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/dsHdmiIn_test_spec.md b/docs/pages/dsHdmiIn_test_spec.md index 9d992ea1..75743a1e 100644 --- a/docs/pages/dsHdmiIn_test_spec.md +++ b/docs/pages/dsHdmiIn_test_spec.md @@ -14,7 +14,7 @@ - `HDMI` - High-Definition Multimedia Interface - `dsHdmiIn` - Device Settings High-Definition Multimedia Interface Input - `SPD` - Source Product Descriptor -- `ALLM` - Auto Low Latency Mode +- `ALLM` - Auto Low Latency Mode - `AVI` - Audio Video Interleave - `Y` - Yes - `N` - No @@ -65,7 +65,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file 'ReferencePanel_AVInput_Info.yaml'.|dsHdmiInGetNumberOfInputs|`Y`|`N`|`Y`|`Y`|`NA`| +|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file `ReferencePanel_AVInput_Info.yaml (HdmiInputPort/numberOfPorts)`|dsHdmiInGetNumberOfInputs|`Y`|`N`|`Y`|`Y`|`NA`| ### Test Startup Requirement - Get Number of Inputs @@ -291,7 +291,7 @@ Changing `AVI` content type by control Plane.. |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Loop through all the ports and verify whether the given port is an HDMI ARC port by comparing it with the 'ReferencePanel_AVInput_Info.yaml' configuration file.|dsIsHdmiARCPort|`Y`|`N`|`N`|`Y`|`NA`| +|Loop through all the ports and verify whether the given port is an HDMI ARC port by comparing it with the `ReferencePanel_AVInput_Info.yaml (HdmiArcPort/numberOfPorts)` configuration file.|dsIsHdmiARCPort|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Check `HDMI` ARC Port @@ -309,7 +309,7 @@ None |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value. Also, validate the EDID length for a given port. Compare the EDID length values by parsing the configuration YAML file 'ReferencePanel_EDID_Info.yaml'.|dsSetEdidVersion, dsGetEdidVersion, dsGetEDIDBytesInfo|`Y`|`N`|`N`|`Y`|`NA`| +|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value. Also, validate the EDID length for a given port. Compare the EDID length values by parsing the configuration YAML file `ReferencePanel_EDID_Info.yaml (EDID_Reference_Data/edidBytesLength)`.|dsSetEdidVersion, dsGetEdidVersion, dsGetEDIDBytesInfo|`Y`|`N`|`N`|`Y`|`NA`| |This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|dsGetEdidVersion, dsGetEDIDBytesInfo|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Set and Get `EDID` Information @@ -347,7 +347,7 @@ Connecting and disconnecting source devices in the `HDMI` Input will be handled |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file 'ReferencePanel_AVInput_Info.yaml'.|dsGetSupportedGameFeaturesList|`Y`|`N`|`N`|`Y`|`NA`| +|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file `ReferencePanel_AVInput_Info.yaml(gameFeatures/count)`.|dsGetSupportedGameFeaturesList|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Get Supported Game Feature List From 013905e5a11f807f480e60daeecda41015554d70 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Thu, 23 May 2024 11:19:13 +0100 Subject: [PATCH 34/64] gh #14 updated comments --- .../ds-video-port_High-Level_TestSpec.md | 80 ++-- profiles/sink/Sink_4K_VideoPort.yaml | 143 +++++++ profiles/source/Source_4K_VideoPort.yaml | 387 ++++++++++++++++++ 3 files changed, 572 insertions(+), 38 deletions(-) create mode 100644 profiles/sink/Sink_4K_VideoPort.yaml create mode 100644 profiles/source/Source_4K_VideoPort.yaml diff --git a/docs/pages/ds-video-port_High-Level_TestSpec.md b/docs/pages/ds-video-port_High-Level_TestSpec.md index 26ff25d5..3d7cd245 100644 --- a/docs/pages/ds-video-port_High-Level_TestSpec.md +++ b/docs/pages/ds-video-port_High-Level_TestSpec.md @@ -75,11 +75,11 @@ Supported Display QuantizationRange [dsDisplayQuantizationRange_t link](https:// |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the each video port status |Get the video port handle,check Video Port enable/disable if port disabled, enable port and check the each port status. |dsGetVideoPort(), dsIsVideoPortEnabled(), dsEnableVideoPort() |`Y`|`NA`|`Y`|`Y`|`NA`| -||Verify display connected/disconnected status without video port connected|dsIsDisplayConnected(), dsIsVideoPortActive()|`Y`|`NA`|`Y`|`Y`|`NA`| -||Verify display connected/disconnected status by connecting/disconnecting video port|dsIsDisplayConnected(), dsIsVideoPortActive()|`NA`|`Y`|`Y`|`NA`|`Y`| -||Get the surround mode capabilities and verify with configuration file|dsIsDisplaySurround()|`Y`|`NA`|`NA`|`Y`|`NA`| -||Verify the surround mode capabilities of connected display and verify with configuration file|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`NA`|`Y`|`NA`|`NA`| +|Check the each video port status |Get the handle for each video port, check the status of each video port to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port. |dsGetVideoPort(), dsIsVideoPortEnabled(), dsEnableVideoPort() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Verify the connected/disconnected status of each port's display when no video port is connected.|dsIsDisplayConnected(), dsIsVideoPortActive()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Verify the connected/disconnected status of each port's display by connecting/disconnecting the video port|dsIsDisplayConnected(), dsIsVideoPortActive()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Retrieve the surround mode capabilities of each port and verify them with the configuration YAML file. If it is a sink device, retrieve the value from 'Sink_4K_VideoPort.yaml' using the path "Ports/1/Display_surround" since the sink device has only an INTERNAL port. It is not supported for the source devices|dsIsDisplaySurround()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Verify the each port surround mode capabilities of connected display and verify with configuration file. It is not supported of Sink devices. If it is a source devices, the value has to be retrieved from the "Source_4K_VideoPort.yaml" using the path "Ports/1/Display_surround" supported by the HDMI device.|dsIsDisplaySurround(), dsGetSurroundMode()|`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check the video port status @@ -98,10 +98,10 @@ plug/Unplug the Video port,Verify with edid info, is surround mode supported |Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|---------|--|--|------|----|--------------------------| |Check Video Format Content and Resolution|Register callback for the Video Format update event,change the video formate and check whether callback is Triggered or not|dsVideoFormatUpdateRegisterCB()|`NA`|`Y`|`Y`|`Y`|`Y`| -||Set Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates & scan modes and looping through with supported values of each video port, Verify using get function |dsSetResolution(), dsGetResolution()|`Y`|`NA`|`Y`|`NA`|`NA`| -||Set Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates & scan modes and looping through with supported values of each video port and verify external Analyzer with video playback |dsSetResolution(), dsGetResolution()|`NA`|`Y`|`Y`|`NA`|`Y`| -||Gets the supported resolutions of TV and verify with the configuration file |dsSupportedTvResolutions()|`Y`|`NA`|`Y`|`Y`|`Y`| -||Get Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates and scan modes and verify with the configuration file|dsGetResolution()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Set properties for each video port, including pixel resolution, aspect ratio, stereoscopic modes, frame rates, and scan modes, looping through supported values. Verify the settings using the get function |dsSetResolution(), dsGetResolution()|`Y`|`NA`|`Y`|`NA`|`NA`| +||Set current active Video port properties like pixel resolution, Aspect ratio, Stereo Scopic modes, frame rates & scan modes and looping through with supported values and verify external Analyzer with video playback |dsIsVideoPortActive(), dsSetResolution(), dsGetResolution()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Gets the each port supported resolutions of TV and verify with the configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path "Ports/1/Supported_tv_resolutions_capabilities", supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path "Ports/1/Supported_tv_resolutions_capabilities", supported by HDMI port.|dsSupportedTvResolutions()|`Y`|`NA`|`Y`|`Y`|`Y`| +||Get the current active Video port resolution and verify with the external device|dsIsVideoPortActive(), dsGetResolution()|`NA`|`Y`|`Y`|`Y`|`Y`| #### Test Startup Requirement-Check Video Content Format and Resolution @@ -113,19 +113,20 @@ Playback the pre-define streams #### Control Plane Requirements-Check Video Content Format and Resolution -Check the port output resolutions and Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. +Check the each port output resolutions and Verify the AspectRatio,video Stereo Scopic modes,video Frame rates,interlaced/progressive. ### Check HDR Capability |Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|---------|--|--|------|----|--------------------------| -|Check HDR Capability|Get the HDR capabilities & verify with the configuration file and check the status|dsGetTVHDRCapabilities(), dsGetVideoEOTF()|`Y`|`NA`|`Y`|`Y`|`NA`| -||Checks video output is HDR with different HDR/SDR streams and verify with external analyzer|dsIsOutputHDR()|`NA`|`Y`|`Y`|`Y`|`Y`| -||Set and get Force Disable 4KSupport without playback|dsSetForceDisable4KSupport(), dsGetForceDisable4KSupport()|`Y`|`NA`|`Y`|`Y`|`NA`| -||Set and get Force Disable 4KSupport with playback|dsSetForceDisable4KSupport(), dsGetForceDisable4KSupport()|`NA`|`Y`|`Y`|`Y`|`NA`| -||Disable 4K Support with external analyzer|dsSetForceHDRMode()|`NA`|`Y`|`Y`|`NA`|`Y`| -||Reset the video output to SDR with playback|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`Y`|`NA`| -||Reset the video output to SDR with external analyzer|dsResetOutputToSDR()|`NA`|`Y`|`Y`|`NA`|`Y`| +|Check HDR Capability|Get the each port HDR capabilities & verify with the configuration YAML file YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path "Ports/1/hdr_capabilities", supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path "Ports/1/hdr_capabilities", supported only by HDMI port.|dsGetTVHDRCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +||get the HDR format current active video port and verify with external analyzer|dsIsVideoPortActive(), dsGetVideoEOTF()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Checks current active video port output is HDR with different HDR/SDR streams and verify with external analyzer|dsIsVideoPortActive(), dsIsOutputHDR()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Set/Reset force HDR mode for the current active video port and verify with external analyzer is HDR mode is set/reset|dsIsVideoPortActive(), dsSetForceHDRMode()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Reset the current active video port output to SDR and verify with external analyzer|dsIsVideoPortActive(), dsResetOutputToSDR()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Set Force-disable 4K support for each port and verify it using the get function.|dsSetForceDisable4KSupport(), dsGetForceDisable4KSupport()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Set Force Disable 4KSupport for active port on playback and verify with analyzer|dsIsVideoPortActive(), dsSetForceDisable4KSupport()|`NA`|`Y`|`Y`|`Y`|`NA`| + #### Test Startup Requirement-Check HDR Capability @@ -137,23 +138,23 @@ Playback the pre-define streams #### Control Plane Requirements-Check HDR Capability -Check HDR enable/disabled and is video reset to SDR with analyzer +Check video out is HDR or SDR and verify with analyzer ### HDCP Management |Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|---------|--|--|------|----|--------------------------| -|Check HDCP status|Check enable/disable the HDCP(1.x & 2.x) for the specified video port with playback |dsEnableHDCP(), dsIsHDCPEnabled()|`NA`|`Y`|`Y`|`NA`|`NA`| -||Check HDCP status for valid port and verify with the configuration file|dsGetHDCPStatus()|`Y`|`NA`|`Y`|`Y`|`NA`| -||Check HDCP status for valid port and verify with the configuration file and check with connected device|dsGetHDCPStatus() |`NA`|`Y`|`Y`|`NA`|`NA`| -||Check HDCP protocol Status and verify with the configuration file|dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`Y`|`NA`|`NA`|`Y`|`NA`| -||Check HDCP protocol Status with connected device |dsGetHDCPProtocol(), dsGetHDCPCurrentProtocol()|`NA`|`Y`|`Y`|`NA`|`Y`| -||Check HDCP Receiver protocol |dsGetHDCPReceiverProtocol(),|`NA`|`Y`|`Y`|`NA`|`Y`| -||Ignore EDID status|dsGetIgnoreEDIDStatus()|`N`|`Y`|`Y`|`NA`|`Y`| -||set/get preferred HDCP Protocol|dsSetHdmiPreference(), dsGetHdmiPreference()|`Y`|`NA`|`Y`|`Y`|`NA`| -||set/get preferred HDCP Protocol with connected device |dsSetHdmiPreference(), dsGetHdmiPreference()|`NA`|`Y`|`Y`|`NA`|`NA`| +|Check HDCP status|Check enable/disable the HDCP(1.x & 2.x) for the current active video port with playback |dsIsVideoPortActive(), dsEnableHDCP(), dsIsHDCPEnabled()|`NA`|`Y`|`Y`|`NA`|`NA`| +||Check the HDCP status of each port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks, and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources. |dsGetHDCPStatus()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Check current active port HDCP status and check with connected device|dsIsVideoPortActive(), dsGetHDCPStatus() |`NA`|`Y`|`Y`|`NA`|`NA`| +||Check the HDCP protocol status of each port and verify it with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "Ports/1/hdcp_protocol_version" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/hdcp_protocol_version" supported by HDMI port.|dsGetHDCPProtocol()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Check current active port HDCP protocol Status with connected device |dsIsVideoPortActive(), dsGetHDCPCurrentProtocol()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Check active port HDCP Receiver protocol version with connected device|dsIsVideoPortActive(), dsGetHDCPReceiverProtocol(),|`NA`|`Y`|`Y`|`NA`|`Y`| +||Ignore EDID status for active port with connected device|dsIsVideoPortActive(), dsGetIgnoreEDIDStatus()|`N`|`Y`|`Y`|`NA`|`Y`| +||Set the preferred HDCP Protocol version for each valid port and verify it using the get function.|dsSetHdmiPreference(), dsGetHdmiPreference()|`Y`|`NA`|`Y`|`Y`|`NA`| +||set/get preferred HDCP Protocol version for active port with connected device |dsIsVideoPortActive(), dsSetHdmiPreference(), dsGetHdmiPreference()|`NA`|`Y`|`Y`|`NA`|`NA`| ||Notify event if the HDCP status change and check the timing info for hdcp authentication |dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`|`Y`| -||Check HDCP status with external analyzer|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Check HDCP status for active port and verify with external analyzer|dsRegisterHdcpStatusCallback()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-HDCP Management @@ -171,15 +172,18 @@ Check the HDCP status with external analyzer |Test Functionality|Description|HAL API's|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|---------|--|--|------|----|--------------------------| -|Check Color |Get Color Space, compare with the configuration file and without video|dsGetColorSpace()|`Y`|`NA`|`Y`|`Y`|`NA`| -||Get Color Space with video playback|dsGetColorSpace()|`NA`|`Y`|`Y`|`Y`|`NA`| -||Set/Get Color Depth Capabilities, compare with the configuration file and without video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(), dsSetPreferredColorDepth()|`Y`|`Y`|`Y`|`Y`|| -||Set/Get Color Depth Capabilities, compare with the configuration file and with video|dsGetColorDepth(), dsColorDepthCapabilities(), dsGetPreferredColorDepth(), dsSetPreferredColorDepth()|`NA`|`Y`|`Y`|`Y`|| -||Check QuantizationRange status|dsGetQuantizationRange()|`Y`|`NA`|`Y`|`Y`|| -||Check MatrixCoefficients status |dsGetMatrixCoefficients()|`Y`|`NA`|`Y`|`Y`|| -||Check MatrixCoefficients status with video |dsGetMatrixCoefficients()|`NA`|`Y`|`Y`|`Y`|| -||Set Background Color|dsSetBackgroundColor()|`N`|`Y`|`Y`|`NA`|| -||Check the color space capabilities with analyzer|dsGetColorSpace()|`NA`|`Y`|`Y`|`NA`|| +|Check Color information |Get each port Color Space, compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "Ports/1/colorspaces" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/colorspaces" supported by HDMI port.|dsGetColorSpace()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Get Color Space of active port with video playback|dsIsVideoPortActive(), dsGetColorSpace()|`NA`|`Y`|`Y`|`Y`|`NA`| +||Check each port Color Depth Capabilities and compare with the configuration YAML file . If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the pat "Ports/1/Supported_color_depth_capabilities" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/Supported_color_depth_capabilities" supported by HDMI port.|dsColorDepthCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Get each port Color Depth and verify with the configuration YAML file . If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "color_depth" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "color_depth" supported by HDMI port.|dsGetColorDepth()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Get active port Color Depth and verify with the analyzer|dsIsVideoPortActive(), dsGetColorDepth()|`NA`|`Y`|`Y`|`Y`|`Y`| +||Set preferred color depth for each port and compare get function |dsSetPreferredColorDepth(), dsGetPreferredColorDepth()|`Y`|`NA`|`Y`|`NA`|`NA`| +||Set preferred color depth for current active port and verify with the analyzer |dsIsVideoPortActive(), dsSetPreferredColorDepth()|`NA`|`Y`|`Y`|`NA`|`Y`| +||Get each port QuantizationRange status and verify with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "Ports/1/quantization_ranges" supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/quantization_ranges" supported by HDMI port. |dsGetQuantizationRange()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Get each port MatrixCoefficients status and verify return dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN for source and with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "Ports/1/matrix_coefficients" supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/matrix_coefficients" supported by HDMI port.|dsGetMatrixCoefficients()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Check active port MatrixCoefficients status with video playback and verify with analyzer|dsIsVideoPortActive(), dsGetMatrixCoefficients()|`NA`|`Y`|`Y`|`Y`|`NA`| +||Set Background Color for active port with video playback and verify with analyzer/external device |dsIsVideoPortActive(), dsSetBackgroundColor()|`N`|`Y`|`Y`|`NA`|`Y`| +||Gets current color space setting, color depth, matrix coefficients, HDR type,quantization range in one call of the active video port and verify with analyzer/external device|dsIsVideoPortActive(), dsGetCurrentOutputSettings()|`NA`|`Y`|`Y`|`Y`|`Y`| #### Test Startup Requirement-Color Capabilities @@ -191,4 +195,4 @@ Playback the pre-define streams #### Control Plane Requirements-Color Capabilities -Verify the Color Space,Color Depth,QuantizationRange,MatrixCoefficients,Background Color +Verify the Color Space,Color Depth,QuantizationRange,MatrixCoefficients,Background Color with analyzer/external device diff --git a/profiles/sink/Sink_4K_VideoPort.yaml b/profiles/sink/Sink_4K_VideoPort.yaml new file mode 100644 index 00000000..15350388 --- /dev/null +++ b/profiles/sink/Sink_4K_VideoPort.yaml @@ -0,0 +1,143 @@ +Device: + Type: sink + Name: element + +Number_of_ports: 1 + +Port_types: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + - 0x08 #INTERNAL + +# 8-Bit, 10-bit and 12 bit +color_depth: 10 + +Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "INTERNAL" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connected_audio_ports: {type: 0x03, index: 0} # dsAUDIOPORT_TYPE_SPEAKER + defaultResolution: "1080i50" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x01 # RGB + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + Display_surrond: true + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + hdcp_protocol_version: 0x01 #VERSION_2X + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL + \ No newline at end of file diff --git a/profiles/source/Source_4K_VideoPort.yaml b/profiles/source/Source_4K_VideoPort.yaml new file mode 100644 index 00000000..6022052a --- /dev/null +++ b/profiles/source/Source_4K_VideoPort.yaml @@ -0,0 +1,387 @@ +Device: + Type: source + Name: xione + +Number_of_ports: 3 + +Port_types: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + - 0x06 # HDMI + - 0x00 # RF + - 0x01 # BB + +# 8-Bit, 10-bit and 12 bit +color_depth: 10 + +Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x06 # HDMI + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "HDMI" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + defaultResolution: "720p" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x01 # RGB + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + Display_surrond: true + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x01 #VERSION_2X + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL + + 2: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x00 # dsVIDEOPORT_TYPE_RF + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "RF" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: false + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + defaultResolution: "480p" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x00 # UNKNOWN + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + Display_surrond: false + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x0 # NONE + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x02 #OUT OF RANGE + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x0 #UNKNOWN + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x00 #UNKNOWN + + 3: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x01 # dsVIDEOPORT_TYPE_BB + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "BB" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: false + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + defaultResolution: "480p" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x00 # UNKNOWN + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + Display_surrond: false + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x0 # NONE + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x02 #OUT OF RANGE + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x0 #UNKNOWN + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x00 #UNKNOWN \ No newline at end of file From e7f284ecef0e284b1d4ea50be0293e2bed787a22 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:34:33 +0100 Subject: [PATCH 35/64] gh #23 Updated the test spec --- docs/pages/ds-fpd_TestSpec.md | 99 ++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 343048fd..326fac18 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -1,11 +1,5 @@ # Device Settings Front Panel Display Test Document -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 20/03/2024 | First Release | 1.0.0 | - ## Table of Contents - [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) @@ -27,14 +21,15 @@ This document provides an overview of the testing requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements, and expected deliverables. -The interface of the test is available at this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) +The interface of the test is available here: [ds-fdp HAl Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) ## Module Description High-level overview: - `dsFPD` provides a set of APIs to control the `FP`discrete `LED`s and 7-segment `LED`s existing on a platform. -- It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. +- It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. +Interface specification is available here: [ds-fdp HAl Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-front-panel-display_halSpec.md) ## Testing Scope @@ -46,46 +41,48 @@ High-level overview: |4|[Discrete Power `LED` Control](#discrete-power-led-control)|The test aims to set and verify the discrete Power `LED` supported on the platform| |5|[FrontPanel Text and Brightness Display Control](#frontpanel-text-and-brightness-display-control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| |6|[FrontPanel Display Text Mode and Scroll control](#frontpanel-display-text-mode-and-scroll-control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| -|7|[FrontPanel Clock display control ](#frontpanel-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| +|7|[FrontPanel Clock display control](#frontpanel-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ----------- ## Discrete `LED` Brightness Control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness +|Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness| -### Test Startup Requirement +### Test Startup Requirement-Discrete `LED` Brightness Control NA -### Emulator Requirement +### Emulator Requirement-Discrete `LED` Brightness Control + +The emulator will boot with the `LED` configurations that should include -The emulator will boot with the `LED` configurations that should include -1. Number of discrete `LED`s, available +1. Number of discrete `LED`s, available 2. Max and Min value of Brightness. 3. Default brightness of each discrete `LED` -### Control Plane Requirement +### Control Plane Requirement-Discrete `LED` Brightness Control + Read the brightness intensity of the `LED` when set to a different level and compare it with the previous intensity value using a `LED` detector device. ## Discrete `LED` blink control |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Validate the blink functionality of discrete `LED` available on the platform |N|Y| Read the `LED` blink rate +|Validate the blink functionality of discrete `LED` available on the platform |N|Y| Read the `LED` blink rate| -### Test Startup Requirement +### Test Startup Requirement-Discrete `LED` blink control NA -### Emulator Requirement +### Emulator Requirement-Discrete `LED` blink control The emulator will boot with the `LED` configurations that should include -1. Number of discrete `LED`s, available +1. Number of discrete `LED`s, available -### Control Plane Requirement +### Control Plane Requirement-Discrete `LED` blink control Read the Blink interval from the `LED` detector device. @@ -93,20 +90,20 @@ Read the Blink interval from the `LED` detector device. |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Validate the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |Y|Y| Read the `LED` Color +|Validate the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |Y|Y| Read the `LED` Color| -### Test Startup Requirement +### Test Startup Requirement-Discrete `LED` color control NA -### Emulator Requirement +### Emulator Requirement-Discrete `LED` color control The emulator will boot with the `LED` configurations that should include + 1. Number of discrete `LED`s, available 2. Supported colors for each `LED` - -### Control Plane Requirement +### Control Plane Requirement-Discrete `LED` color control The control panel should be able to read the color of the `LED` through the specialized devices that shall identify the `LED` color and provide the same information to the control panel. @@ -114,18 +111,19 @@ The control panel should be able to read the color of the `LED` through the spec |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated against the different supported states on the platform |Y|Y|NA +|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated against the different supported states on the platform |Y|Y|NA| -### Test Startup Requirement +### Test Startup Requirement-Discrete Power `LED` control NA -### Emulator Requirement +### Emulator Requirement-Discrete Power `LED` control The emulator will boot with the `LED` configurations that should include + 1. Provide the configuration of Power `LED` states supported. -### Control Plane Requirement +### Control Plane Requirement-Discrete Power `LED` control Due to platform-specific requirements, it may not be possible to capture the `LED` behavior in each state. @@ -133,20 +131,21 @@ Due to platform-specific requirements, it may not be possible to capture the `LE |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" -|Set the `FPD` mode to "Any" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text" -|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using the appropriate Set API and validate it Get API |Y|Y|Read the Brightness +|Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text"| +|Set the `FPD` mode to "Any" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text"| +|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using the appropriate Set API and validate it Get API |Y|Y|Read the Brightness| -### Test Startup Requirement +### Test Startup Requirement-Frontpanel Text and Brightness Display Control NA -### Emulator Requirement +### Emulator Requirement-Frontpanel Text and Brightness Display Control + The emulator will boot with the configurations that should include -1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. +1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. -### Control Plane Requirement +### Control Plane Requirement-Frontpanel Text and Brightness Display Control The control Panel should be able to read the data from the tool that can recognize the text display and brightness level. This data should be validated to declare the test result. @@ -154,20 +153,21 @@ The control Panel should be able to read the data from the tool that can recogni |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text" -|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate -|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate +|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text"| +|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate| +|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate| -### Test Startup Requirement +### Test Startup Requirement-Frontpanel Display Text Mode and Scroll control NA -### Emulator Requirement +### Emulator Requirement-Frontpanel Display Text Mode and Scroll control The emulator will boot with the configurations that should include + 1. 7-seg `FPD` Text/Clock mode, Brightness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. -### Control Plane Requirement +### Control Plane Requirement-Frontpanel Display Text Mode and Scroll control The control Panel should be able to read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. @@ -175,20 +175,21 @@ The control Panel should be able to read the data from the tool that shall recog |Description|L2|L3|Control Plane| |-----------|--|--|-------------| -|Set the `FPD` Time Format using set `API` and validate the same with get `API` |Y|N|NA -|Set the `FPD` Time with supported formats. |N|Y|Read the Time and Time Format -|Enable the `FPD` Clock display and validate|N|Y|Read the Time and Time Format -|Disable the `FPD` Clock display and validate |N|Y|validate that NO Time is displayed +|Set the `FPD` Time Format using set `API` and validate the same with get `API` |Y|N|NA| +|Set the `FPD` Time with supported formats. |N|Y|Read the Time and Time Format| +|Enable the `FPD` Clock display and validate|N|Y|Read the Time and Time Format| +|Disable the `FPD` Clock display and validate |N|Y|validate that NO Time is displayed| -### Test Startup Requirement +### Test Startup Requirement-Frontpanel Clock Display Control NA -### Emulator Requirement +### Emulator Requirement-Frontpanel Clock Display Control The emulator will boot with the configurations that should include + 1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. -### Control Plane Requirement +### Control Plane Requirement-Frontpanel Clock Display Control The control Panel should be able to read the data from the tool that shall recognize the "Time" display and validate. This data should be read and validated to declare the test result. From e3b4eabc974851e564e3d58aa839f337feec2b55 Mon Sep 17 00:00:00 2001 From: hgfell683 <107510770+hgfell683@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:52:31 -0400 Subject: [PATCH 36/64] dsHost L2 test documentation --- docs/pages/dsHost_TestSpecification.md | 27 ++++++++++---------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md index c39100df..f9b42592 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/dsHost_TestSpecification.md @@ -54,9 +54,9 @@ High level overview: ## Retrieve CPU Temperature -|Description|L2|L3|Control Plane Requirements| -|-----------|--|--|--------------------------| -|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state.|Y|N|N| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state.|dsGetCPUTemperature|Y|N|N| ### Test Startup Requirement - Retrieve CPU Temperature @@ -72,9 +72,9 @@ None ## Obtain SoC ID -|Description|L2|L3|Control Plane Requirements| -|-----------|--|--|--------------------------| -|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length.|Y|N|N| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length.|dsGetSocIDFromSDK|Y|N|N| ### Test Startup Requirement-Obtain SoC ID @@ -90,9 +90,9 @@ None ## Fetch Host EDID -|Description|L2|L3|Control Plane Requirements| -|-----------|--|--|--------------------------| -|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device|Y|N|N| +|Description|HAL APIs|L2|L3|Control plane requirements| +|-----------|--------|--|--|--------------------------| +|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device. Each device will have it's own EDID that is supports. I.E. Two pioneer tvs with the same resolution and size will have the same EDID values, but if those two pioneer tvs are of different sizes their EDID values will be different.|dsGetHostEDID|Y|N|N| ### Test Startup Requirement - Fetch Host EDID @@ -100,14 +100,7 @@ Launch the test with the predefined configuration set of results. ### Emulator Requirement - Fetch Host EDID -Emulator will boot with the `EDID` coming from the configuration file. - -|#|Description| -|-|-----------| -|1|`EDID` for a panel TV| - -TODO: Generate a list of sample list for 5 to 6 different TV's. -Generate a list of TV's from the office for the different `EDID`s and store the binaries of the test. It can use it as samples. +Emulator will boot with the `EDID` coming from the configuration file. Each ### Control Plane Requirement - Fetch Host EDID From fb9fa8798774d84f05e0927820e83759b4ab0609 Mon Sep 17 00:00:00 2001 From: hgfell683 <107510770+hgfell683@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:45:40 -0400 Subject: [PATCH 37/64] Update based on review comments --- docs/pages/dsHost_TestSpecification.md | 5 +++-- profiles/edidExample.yaml | 0 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 profiles/edidExample.yaml diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md index f9b42592..405b95e0 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/dsHost_TestSpecification.md @@ -57,6 +57,7 @@ High level overview: |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| |Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state.|dsGetCPUTemperature|Y|N|N| +|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information while within abnormal temperatures|dsGetCPUTemperature|N|Y|N| ### Test Startup Requirement - Retrieve CPU Temperature @@ -74,7 +75,7 @@ None |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| -|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length.|dsGetSocIDFromSDK|Y|N|N| +|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length based on the configuration file.|dsGetSocIDFromSDK|Y|N|N| ### Test Startup Requirement-Obtain SoC ID @@ -92,7 +93,7 @@ None |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| -|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device. Each device will have it's own EDID that is supports. I.E. Two pioneer tvs with the same resolution and size will have the same EDID values, but if those two pioneer tvs are of different sizes their EDID values will be different.|dsGetHostEDID|Y|N|N| +|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device. Each device will have it's own `EDID` that is supports. I.E. Two devices with the same resolution and size will have the same `EDID` values. If the devices are not the same size, resolution, and device type they will not have the same `EDID` value. The retrieved `EDID` values will be compared against those within the configuration file.|dsGetHostEDID|Y|N|N| ### Test Startup Requirement - Fetch Host EDID diff --git a/profiles/edidExample.yaml b/profiles/edidExample.yaml new file mode 100644 index 00000000..e69de29b From 8eea9ab790ccc04d93110acf11167bda25067cc4 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:42:58 +0100 Subject: [PATCH 38/64] gh #23 Updated the test spec with HAL API's --- docs/pages/ds-fpd_TestSpec.md | 78 ++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-fpd_TestSpec.md index 326fac18..80de543b 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-fpd_TestSpec.md @@ -11,11 +11,11 @@ - `HAL` - Hardware Abstraction layer - `SOC` - System On a Chip -- `FP` - Front Panel +- `FP` - Front Panel - `FPD` - Front Panel Display -- `ds` - Device Settings. +- `ds` - Device Settings. - `LED` - Light Emitting Devices -- `dsFPD` - Device Settings Front Panel Display +- `dsFPD` - Device Settings Front Panel Display ## Introduction @@ -46,13 +46,15 @@ Interface specification is available here: [ds-fdp HAl Spec](https://github.com/ ## Discrete `LED` Brightness Control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Verify the Discrete `LED`s Brightness using Set and Get functions.|Y|Y|Read the `LED` Brightness| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness(), dsGetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` Brightness Control -NA +`NA` ### Emulator Requirement-Discrete `LED` Brightness Control @@ -68,13 +70,14 @@ Read the brightness intensity of the `LED` when set to a different level and com ## Discrete `LED` blink control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Validate the blink functionality of discrete `LED` available on the platform |N|Y| Read the `LED` blink rate| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the blink functionality of discrete `LED` and verify Blink interval with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`Y`|`NA`|`Y`|`Y`|`NA`| ### Test Startup Requirement-Discrete `LED` blink control -NA +`NA` ### Emulator Requirement-Discrete `LED` blink control @@ -88,13 +91,16 @@ Read the Blink interval from the `LED` detector device. ## Discrete `LED` color control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Validate the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |Y|Y| Read the `LED` Color| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |dsGetFPState(), dsSetFPState(), dsSetFPColor(), dsGetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. if the indicator is `multi-colored`, set it to `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the color functionality of discrete `LED` available by setting and verify Blink interval with help of control plane. |dsGetFPState(), dsSetFPState(), dsSetFPColor()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` color control -NA +`NA` ### Emulator Requirement-Discrete `LED` color control @@ -109,9 +115,10 @@ The control panel should be able to read the color of the `LED` through the spec ## Discrete Power `LED` control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Validate the functionality of discrete Power `LED` available on the platform in different states by set and get `API`s. The `LED` functionality should be validated against the different supported states on the platform |Y|Y|NA| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.|dsFPGetSupportedLEDStates(), dsFPSetLEDState(), dsFPGetLEDState()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state with control plane. 4. Ensure each state transition is valid.|dsFPGetSupportedLEDStates(), dsFPSetLEDState()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete Power `LED` control @@ -129,11 +136,14 @@ Due to platform-specific requirements, it may not be possible to capture the `LE ## Frontpanel Text and Brightness Display Control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text"| -|Set the `FPD` mode to "Any" mode and set the valid "Text" using dsSetFPText `API`. Validate the displayed "Text" |N|Y|Read the "Text"| -|Set the `FPD` mode to "Text" mode and set the "Text" to display. Now set the brightness of the `FPD` using the appropriate Set API and validate it Get API |Y|Y|Read the Brightness| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|if the device supports a 7-Segment `LED` display, Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). Validate the displayed "Text" with help of the control plane |dsSetFPDMode(), dsSetFPText()|`N`|`Y`|`Y`|`Y`|`Y`| +|if the device supports a 7-Segment `LED` display, Set the `FPD` mode to "ANY" mode and set the valid "Text" using dsSetFPText(). Validate the displayed "Text" with help of the control plane |dsSetFPDMode(), dsSetFPText()|`N`|`Y`|||`Y`| +|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3.Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). 4.Set the brightness of the `LED` within the specified range (min-max) using dsSetFPTextBrightness() and verify using get function dsGetFPTextBrightness()|dsGetFPState(), dsSetFPState(), dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness(), dsGetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3.Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). 4. Set the brightness of the `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(),dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3.Set the `FPD` mode to "ANY" mode and set the valid "Text" using dsSetFPText(). 4.Set the brightness of the `LED` within the specified range (min-max) using dsSetFPTextBrightness() and verify using get function dsGetFPTextBrightness()|dsGetFPState(), dsSetFPState(), dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness(), dsGetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Frontpanel Text and Brightness Display Control @@ -151,11 +161,11 @@ The control Panel should be able to read the data from the tool that can recogni ## Frontpanel Display Text Mode and Scroll control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set |Y|Y|Read the "Text"| -|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate| -|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` |N|Y|Read the scroll rate| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set ||Y|Y|||Read the "Text"| +|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` ||N|Y|||Read the scroll rate| +|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` ||N|Y|||Read the scroll rate| ### Test Startup Requirement-Frontpanel Display Text Mode and Scroll control @@ -173,12 +183,12 @@ The control Panel should be able to read the data from the tool that shall recog ## Frontpanel Clock Display Control -|Description|L2|L3|Control Plane| -|-----------|--|--|-------------| -|Set the `FPD` Time Format using set `API` and validate the same with get `API` |Y|N|NA| -|Set the `FPD` Time with supported formats. |N|Y|Read the Time and Time Format| -|Enable the `FPD` Clock display and validate|N|Y|Read the Time and Time Format| -|Disable the `FPD` Clock display and validate |N|Y|validate that NO Time is displayed| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Set the `FPD` Time Format using set `API` and validate the same with get `API` ||Y|N|||NA| +|Set the `FPD` Time with supported formats. ||N|Y|||Read the Time and Time Format| +|Enable the `FPD` Clock display and validate||N|Y|||Read the Time and Time Format| +|Disable the `FPD` Clock display and validate ||N|Y|||validate that NO Time is displayed| ### Test Startup Requirement-Frontpanel Clock Display Control From d6786bc82289beff4f4a2f3e2ed470c7d2160073 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:09:02 +0100 Subject: [PATCH 39/64] gh #24 update yaml info --- docs/pages/dsHdmiIn_test_spec.md | 147 +++++++++--------- .../include/ReferencePanel_AVInput_Info.yaml | 9 -- .../include/ReferencePanel_EDID_Info.yaml | 46 ------ profiles/sink/Sink_EDID_Info.yaml | 46 ++++++ profiles/sink/Sink_HDMIIN.yaml | 15 ++ profiles/source/Source_HDMIIN.yaml | 10 ++ 6 files changed, 144 insertions(+), 129 deletions(-) delete mode 100644 profiles/include/ReferencePanel_AVInput_Info.yaml delete mode 100644 profiles/include/ReferencePanel_EDID_Info.yaml create mode 100644 profiles/sink/Sink_EDID_Info.yaml create mode 100644 profiles/sink/Sink_HDMIIN.yaml create mode 100644 profiles/source/Source_HDMIIN.yaml diff --git a/docs/pages/dsHdmiIn_test_spec.md b/docs/pages/dsHdmiIn_test_spec.md index 75743a1e..d12f9aec 100644 --- a/docs/pages/dsHdmiIn_test_spec.md +++ b/docs/pages/dsHdmiIn_test_spec.md @@ -22,9 +22,9 @@ ## Introduction -This document provides an overview of the testing requirements for the `dsHdmiIn` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. +This document provides an overview of the high level testing requirements for the `dsHdmiIn` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. -- Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) +- Interface of the test is available in this link - [Interface header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) ## Module Description @@ -34,7 +34,7 @@ High level overview: - It facilitates interaction with `HDMI` Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. - For the sink and source devices, to retrieve the available `HDMI` Input information, an external device must be connected. -- `HAL` specification in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-hdmi-in_halSpec.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-hdmi-in_halSpec.md) +- `HAL` specification : [ds-hdmiIn HAL Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-hdmi-in_halSpec.md) ## Testing Scope @@ -63,9 +63,9 @@ High level overview: ## Get Number of Inputs -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file `ReferencePanel_AVInput_Info.yaml (HdmiInputPort/numberOfPorts)`|dsHdmiInGetNumberOfInputs|`Y`|`N`|`Y`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get Number of Inputs|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file for sink is `Sink_HDMIIN.yaml (HDMIIN/HdmiInputPort/numberOfPorts)` and source is `Source_HDMIIN.yaml(HDMIIN/HdmiInputPort/numberOfPorts)`|dsHdmiInGetNumberOfInputs()|`Y`|`N`|`Y`|`Y`|`NA`| ### Test Startup Requirement - Get Number of Inputs @@ -73,7 +73,7 @@ The test begins with the configured `HDMI` input port details. ### Emulator Requirement - Get Number of Inputs -Emulator will boot with the port informations coming from the configuration file. +Emulator will boot with the port information's coming from the configuration file. ### Control Plane Requirement - Get Number of Inputs @@ -81,13 +81,12 @@ None ## Set and Get the `HDMI` Input port Status -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify the HDMI port with the 'Get status' function when it is disabled, without selecting any port, and without any external devices.|dsHdmiInGetStatus|`Y`|`N`|`Y`|`Y`|`NA`| -|Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port without any external device connection and "Get status" to check the active port is false, port connected is false and presentation is false.|dsHdmiInGetNumberOfInputs, dsHdmiInSelectPort, dsHdmiInGetStatus|`Y`|`N`|`Y`|`Y`|`NA`| -|Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port as active for presentation and check the port information is valid using "Get status".|dsHdmiInGetNumberOfInputs, dsHdmiInSelectPort, dsHdmiInGetStatus|`N`|`Y`|`Y`|`Y`|`Y`| -|On the active HDMI port, set the Audio Mix to be enable and disable|dsHdmiInSelectPort|`N`|`Y`|`N`|`Y`|`Y`| -|On the active HDMI port, verify the `HDMI` input with the video plane in both primary and secondary. Additionally, validate the topmost flag.|dsHdmiInSelectPort|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Set and Get the `HDMI` Input port Status|Loop through supported `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port without any external device connection and "Get status" to check the active port is false, port connected is false and presentation is false. Note:supported `HDMI` Input port, Check profile file for sink is `Sink_HDMIIN.yaml (HDMIIN/HdmiInputPort/numberOfPorts)` and source is `Source_HDMIIN.yaml(HDMIIN/HdmiInputPort/numberOfPorts)`|dsHdmiInGetNumberOfInputs(), dsHdmiInSelectPort(), dsHdmiInGetStatus()|`Y`|`N`|`Y`|`Y`|`NA`| +||Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port as active for presentation and check the port information is valid using "Get status".Note:supported `HDMI` Input port, Check profile file for sink is `Sink_HDMIIN.yaml (HDMIIN/HdmiInputPort/numberOfPorts)` and source is `Source_HDMIIN.yaml(HDMIIN/HdmiInputPort/numberOfPorts)`|dsHdmiInGetNumberOfInput(), dsHdmiInSelectPort(), dsHdmiInGetStatus()|`N`|`Y`|`Y`|`Y`|`Y`| +||On the active HDMI port, set the Audio Mix to be enable and disable|dsHdmiInSelectPort()|`N`|`Y`|`N`|`Y`|`Y`| +||On the active HDMI port, verify the `HDMI` input with the video plane in both primary and secondary. Additionally, validate the topmost flag.|dsHdmiInSelectPort()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Set and Get the `HDMI` Input port Status @@ -96,7 +95,7 @@ None ### Emulator Requirement - Set and Get the `HDMI` Input port Status -Emulator will boot with the port informations coming from the configuration file. +Emulator will boot with the port information's coming from the configuration file. ### Control Plane Requirement - Set and Get the `HDMI` Input port Status @@ -105,9 +104,9 @@ Emulator will boot with the port informations coming from the configuration file ## Scale the `HDMI` Input Video -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the function successfully scales the `HDMI` input video when valid coordinates and dimensions are provided within the resolution limits. Based on video resolution need to check whether the coordinates are in range|dsHdmiInScaleVideo|`N`|`Y`|`Y`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Scale the `HDMI` Input Video|Verify that the function successfully scales the `HDMI` input video when valid coordinates and dimensions are provided within the resolution limits. Based on video resolution need to check whether the coordinates are in range|dsHdmiInScaleVideo()|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Scale the `HDMI` Input Video @@ -115,7 +114,7 @@ The test begins by setting up the video analyzer, and the video should be played ### Emulator Requirement - Scale the `HDMI` Input Video -Emulator will boot with the port informations coming from the configuration file. Predefined coordinates and dimesions to compare. +Emulator will boot with the port information's coming from the configuration file. Predefined coordinates and dimesions to compare. ### Control Plane Requirement - Scale the `HDMI` Input Video @@ -123,9 +122,9 @@ Control plane to validate the coordinates and dimensions by the video analyzers. ## Select Zoom Mode -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the function successfully updates the video zoom on the active `HDMI` input using the provided zoom mode|dsHdmiInSelectZoomMode|`N`|`Y`|`Y`|`N`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Select Zoom Mode|Verify that the function successfully updates the video zoom on the active `HDMI` input using the provided zoom mode|dsHdmiInSelectZoomMode()|`N`|`Y`|`Y`|`N`|`Y`| ### Test Startup Requirement - Select Zoom Mode @@ -141,9 +140,9 @@ Changing the zoom modes by the Control Plane. Validates the zoom mode by analyze ## Get Current Video Mode -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the function successfully updates the current `HDMI` input video modes like Pixel resolution, frame rate and interlaced information of the active port|dsHdmiInGetCurrentVideoMode|`N`|`Y`|`Y`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get Current Video Mode|Verify that the function successfully updates the current `HDMI` input video modes like Pixel resolution, frame rate and interlaced information of the active port|dsHdmiInGetCurrentVideoMode()|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Get Current Video Mode @@ -159,10 +158,10 @@ Control plane validates the current mode by the analyzers. ## Callback for connection Status -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a `HDMI` Input port is connected or disconnected.|dsHdmiInRegisterConnectCB|`N`|`Y`|`Y`|`Y`|`Y`| -|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t, if the connected port is active and presents video after being connected.|dsHdmiInRegisterConnectCB|`N`|`Y`|`Y`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for connection Status|Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a `HDMI` Input port is connected or disconnected.|dsHdmiInRegisterConnectCB()|`N`|`Y`|`Y`|`Y`|`Y`| +|Callback for connection Status|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t, if the connected port is active and presents video after being connected.|dsHdmiInRegisterConnectCB()|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Callback for connection Status @@ -178,9 +177,9 @@ Connecting and disconnecting source devices in the `HDMI` Input will be handled ## Callback for Signal Change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly notifies the application whenever there is a change in the signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) for the `HDMI` Input port.|dsHdmiInRegisterSignalChangeCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for Signal Change|Verify that the callback function properly notifies the application whenever there is a change in the signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) for the `HDMI` Input port.|dsHdmiInRegisterSignalChangeCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Signal Change @@ -188,7 +187,7 @@ Connection of the source device with the `HDMI` Input. ### Emulator Requirement - Callback for Signal Change -Emulator will boot with the port informations coming from the configuration file. +Emulator will boot with the port information's coming from the configuration file. ### Control Plane Requirement - Callback for Signal Change @@ -197,9 +196,9 @@ Emulator will boot with the port informations coming from the configuration file ## Callback for Status Change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly triggers whenever the dsHdmiInStatus_t is updated and notifies the application of the `HDMI` Input status change event.|dsHdmiInRegisterStatusChangeCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for Status Change|Verify that the callback function properly triggers whenever the dsHdmiInStatus_t is updated and notifies the application of the `HDMI` Input status change event.|dsHdmiInRegisterStatusChangeCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Status Change @@ -207,7 +206,7 @@ Connection of the source device with the `HDMI` Input. ### Emulator Requirement - Callback for Status Change -Emulator will boot with the port informations coming from the configuration file. +Emulator will boot with the port information's coming from the configuration file. ### Control Plane Requirement - Callback for Status Change @@ -215,9 +214,9 @@ Connecting and disconnecting source devices in the `HDMI` Input will be handled ## Callback for Video Mode Change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly notifies the application whenever there is resolution and other video mode changes.|dsHdmiInRegisterVideoModeUpdateCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for Video Mode Change|Verify that the callback function properly notifies the application whenever there is resolution and other video mode changes.|dsHdmiInRegisterVideoModeUpdateCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for Video Mode Change @@ -233,9 +232,9 @@ Changing of the video resolution by control Plane. ## Callback for `ALLM` mode change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly notifies the application whenever there is `ALLM` mode change.|dsHdmiInRegisterAllmChangeCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for `ALLM` mode change|Verify that the callback function properly notifies the application whenever there is `ALLM` mode change.|dsHdmiInRegisterAllmChangeCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for `ALLM` mode change @@ -247,13 +246,13 @@ Emulator will boot with the `HDMI` input port numbers and `ALLM` mode informatio ### Control Plane Requirement - Callback for `ALLM` mode change -Changing of the `ALLM` mode by control Plane. +Changing of the `ALLM` mode by control Plane. ## Callback for AV Latency Change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function notifies the application whenever there is a change in the `HDMI` input Audio and Video latency within its Max(500ms) and Min(0) ranges.|dsHdmiInRegisterAVLatencyChangeCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for AV Latency Change|Verify that the callback function notifies the application whenever there is a change in the `HDMI` input Audio and Video latency within its Max(500ms) and Min(0) ranges.|dsHdmiInRegisterAVLatencyChangeCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for AV Latency Change @@ -270,9 +269,9 @@ Control plane signals the source device to play the content ( Cinema mode to Fil ## Callback for `AVI` Content Type Change -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Verify that the callback function properly notifies the application whenever there is a change in the `AVI` content type.|dsHdmiInRegisterAviContentTypeChangeCB|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Callback for `AVI` Content Type Change|Verify that the callback function properly notifies the application whenever there is a change in the `AVI` content type.|dsHdmiInRegisterAviContentTypeChangeCB()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Callback for `AVI` Content Type Change @@ -289,9 +288,9 @@ Changing `AVI` content type by control Plane.. ## Check `HDMI` ARC Port -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Loop through all the ports and verify whether the given port is an HDMI ARC port by comparing it with the `ReferencePanel_AVInput_Info.yaml (HdmiArcPort/numberOfPorts)` configuration file.|dsIsHdmiARCPort|`Y`|`N`|`N`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Check `HDMI` ARC Port|Loop through supported `HDMI` Input port and verify whether the given port is an HDMI ARC port by comparing it with the `Sink_HDMIIN.yaml (HDMIIN/HdmiArcPort/portNumber)` configuration file.Note:supported `HDMI` Input port, Check profile file for sink is `Sink_HDMIIN.yaml (HDMIIN/HdmiInputPort/numberOfPorts)`|dsIsHdmiARCPort()|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Check `HDMI` ARC Port @@ -307,10 +306,10 @@ None ## Set and Get `EDID` Information -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value. Also, validate the EDID length for a given port. Compare the EDID length values by parsing the configuration YAML file `ReferencePanel_EDID_Info.yaml (EDID_Reference_Data/edidBytesLength)`.|dsSetEdidVersion, dsGetEdidVersion, dsGetEDIDBytesInfo|`Y`|`N`|`N`|`Y`|`NA`| -|This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|dsGetEdidVersion, dsGetEDIDBytesInfo|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Set and Get `EDID` Information|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value. Also, validate the EDID length for a given port. Compare the EDID length values by parsing the configuration YAML file `Sink_EDID_Info.yaml (HDMIIN/EDID_Data/edidBytesLength)`|dsSetEdidVersion(), dsGetEdidVersion(), dsGetEDIDBytesInfo()|`Y`|`N`|`N`|`Y`|`NA`| +||This test ensures that the module can accurately retrieve and interpret `EDID` information, providing essential data about the display's capabilities and characteristics.|dsGetEdidVersion(), dsGetEDIDBytesInfo()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Set and Get `EDID` Information @@ -327,9 +326,9 @@ Connecting and disconnecting source devices in the `HDMI` Input will be handled ## Get `HDMI` `SPD` Info -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Test to get the `HDMI` `SPD` Info. Check whether it gets the spd info frame information properly.|dsGetHDMISPDInfo|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get `HDMI` `SPD` Info|Test to get the `HDMI` `SPD` Info. Check whether it gets the spd info frame information properly.|dsGetHDMISPDInfo()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get `HDMI` `SPD` Info @@ -345,9 +344,9 @@ Connecting and disconnecting source devices in the `HDMI` Input will be handled ## Get Supported Game Feature List -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file `ReferencePanel_AVInput_Info.yaml(gameFeatures/count)`.|dsGetSupportedGameFeaturesList|`Y`|`N`|`N`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get Supported Game Feature List|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file `Sink_HDMIIN.yaml(HDMIIN/gameFeatures/count)`|dsGetSupportedGameFeaturesList()|`Y`|`N`|`N`|`Y`|`NA`| ### Test Startup Requirement - Get Supported Game Feature List @@ -363,9 +362,9 @@ None ## Get AV latency -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|The test gets the current AV latency connected to the source device. Also, It checks the AV latency after changing the AV content, such as switching from FilmMaker mode to any other mode.|dsGetAVLatency|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get AV latency|The test gets the current AV latency connected to the source device. Also, It checks the AV latency after changing the AV content, such as switching from FilmMaker mode to any other mode.|dsGetAVLatency|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get AV latency @@ -383,9 +382,9 @@ Emulator will boot with the av latency information in configuration file. ## Get `ALLM` Status -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Gets the `ALLM` status of the designated `HDMI` input port. The status information indicates whether `ALLM` is enabled or disabled|dsGetAllmStatus|`N`|`Y`|`N`|`Y`|`NA`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get `ALLM` Status|Gets the `ALLM` status of the designated `HDMI` input port. The status information indicates whether `ALLM` is enabled or disabled|dsGetAllmStatus()|`N`|`Y`|`N`|`Y`|`NA`| ### Test Startup Requirement - Get `ALLM` status @@ -399,12 +398,12 @@ Emulator will boot with the `ALLM` configuration details. None -## Get and Set `EDID` to all `ALLM` Support +## Get and Set `EDID` to all `ALLM` Support -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Set and Get the `ALLM` support to `EDID` version 2.0 without connecting any source devices.|dsSetEdid2AllmSupport, dsGetEdid2AllmSupport|`Y`|`N`|`N`|`Y`|`NA`| -|Set and Get `ALLM` support to `EDID` Version 2.0 with the connected external source device|dsSetEdid2AllmSupport, dsGetEdid2AllmSupport|`N`|`Y`|`N`|`Y`|`Y`| +|Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|------------------|-----------|--------|--|--|------|----|--------------------------| +|Get and Set `EDID` to all `ALLM` Support|Set and Get the `ALLM` support to `EDID` version 2.0 without connecting any source devices.|dsSetEdid2AllmSupport(), dsGetEdid2AllmSupport()|`Y`|`N`|`N`|`Y`|`NA`| +||Set and Get `ALLM` support to `EDID` Version 2.0 with the connected external source device|dsSetEdid2AllmSupport(), dsGetEdid2AllmSupport()|`N`|`Y`|`N`|`Y`|`Y`| ### Test Startup Requirement - Get and Set `EDID` to all `ALLM` Support diff --git a/profiles/include/ReferencePanel_AVInput_Info.yaml b/profiles/include/ReferencePanel_AVInput_Info.yaml deleted file mode 100644 index d664cf5b..00000000 --- a/profiles/include/ReferencePanel_AVInput_Info.yaml +++ /dev/null @@ -1,9 +0,0 @@ -compositeInputPort: - numberOfPorts: 1 -HdmiInputPort: - numberOfPorts: 3 -HdmiArcPort: - portNumber: 2 -gameFeatures: - - feature: "allm" - count: 1 \ No newline at end of file diff --git a/profiles/include/ReferencePanel_EDID_Info.yaml b/profiles/include/ReferencePanel_EDID_Info.yaml deleted file mode 100644 index bf51a798..00000000 --- a/profiles/include/ReferencePanel_EDID_Info.yaml +++ /dev/null @@ -1,46 +0,0 @@ -EDID_Reference_Data: - productCode: HEC - serialNumber: 16843009 - manufactureYear: 2021 - manufactureWeek: 25 - hdmiDeviceType: true - isRepeater: false - physicalAddressA: 1 - physicalAddressB: 0 - physicalAddressC: 0 - physicalAddressD: 0 - numOfSupportedResolution: 4 - suppResolutionList: - - Resolution: "1920x1080" - SupportedModes: - - Mode: "Progressive" - - Mode: "Interlaced" - - Resolution: "1280x720" - SupportedModes: - - Mode: "Progressive" - - Resolution: "3840x2160" - SupportedModes: - - Mode: "Progressive" - - Resolution: "2560x1440" - SupportedModes: - - Mode: "Progressive" - monitorName: "A6GX" - edidBytes: | - 00 ff ff ff ff ff ff 00 20 a3 01 00 01 01 01 01 - ff 1f 01 03 80 5e 36 78 0a ee 91 a3 54 4c 99 26 - 0f 50 54 a1 08 00 31 40 45 40 61 40 71 40 81 80 - 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 - 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 - 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 - 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc - 00 41 36 47 58 0a 20 20 20 20 20 20 20 20 01 14 - - 02 03 59 f1 53 61 60 10 1f 04 13 05 14 03 02 12 - 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 - 07 00 67 7e 00 67 03 0c 00 10 00 38 3c 68 d8 5d - c4 01 78 88 03 02 e2 00 cf e3 05 c0 00 e3 06 0d - 01 e4 0f 03 00 00 eb 01 46 d0 00 4a 67 32 a2 3c - 26 ce e6 11 46 d0 00 00 00 66 21 50 b0 51 00 1b - 30 40 70 36 00 40 84 63 00 00 1e 00 00 00 00 00 - 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9d - edidBytesLength: 272 \ No newline at end of file diff --git a/profiles/sink/Sink_EDID_Info.yaml b/profiles/sink/Sink_EDID_Info.yaml new file mode 100644 index 00000000..4861754d --- /dev/null +++ b/profiles/sink/Sink_EDID_Info.yaml @@ -0,0 +1,46 @@ +HDMIIN: + Type: sink + Name: element + EDID_Data: + # Product code of the display device of the type int32_t + productCode: 0x2A1B + # Serial number of the display device of the type int32_t + serialNumber: 0x01010101 + # Year of manufacture of the display device of the type int32_t + manufactureYear: 2022 + # Week of manufacture of the display device of the type int32_t + manufactureWeek: 1 + # Device type ( @a true if HDMI, @a false if DVI ) of the type bool + hdmiDeviceType: true + # Receiver is a repeater ( @a true if Repeater, @a false if connected Receiver is not a repeater) of the type bool + isRepeater: false + # Physical Address for HDMI node A of the type uint8_t + physicalAddressA: 1 + # Physical Address for HDMI node B of the type uint8_t + physicalAddressB: 0 + # Physical Address for HDMI node C of the type uint8_t + physicalAddressC: 0 + # Physical Address for HDMI node D of the type uint8_t + physicalAddressD: 0 + # Connected Display Monitor Name of the type char. Max length of the string is dsEEDID_MAX_MON_NAME_LENGTH ( 14 ) + monitorName: "element TV" + # edid bytes data + edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 + ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 + 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 + 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 + 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 + 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 + 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc + 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f + + 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 + 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 + 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 + 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 + 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 + 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 + 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 + 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" + # length of the edid bytes + edidbytesLength: 256 \ No newline at end of file diff --git a/profiles/sink/Sink_HDMIIN.yaml b/profiles/sink/Sink_HDMIIN.yaml new file mode 100644 index 00000000..b9fd91bc --- /dev/null +++ b/profiles/sink/Sink_HDMIIN.yaml @@ -0,0 +1,15 @@ +HDMIIN: + Type: sink + Name: element + HdmiInputPort: + #dsHDMI_IN_PORT_NONE = -1, /*!< HDMI input port index for NONE */ + #dsHDMI_IN_PORT_0, /*!< HDMI input port index for PORT 0 */ + #dsHDMI_IN_PORT_1, /*!< HDMI input port index for PORT 1 */ + #dsHDMI_IN_PORT_2, /*!< HDMI input port index for PORT 2 */ + #dsHDMI_IN_PORT_MAX /*!< Out of range */ + numberOfPorts: 3 + HdmiArcPort: + portNumber: 1 + gameFeatures: + feature: "allm" + count: 1 \ No newline at end of file diff --git a/profiles/source/Source_HDMIIN.yaml b/profiles/source/Source_HDMIIN.yaml new file mode 100644 index 00000000..12797eda --- /dev/null +++ b/profiles/source/Source_HDMIIN.yaml @@ -0,0 +1,10 @@ +HDMIIN: + Type: source + Name: xi-one + compositeInputPort: + numberOfPorts: 0 + HdmiInputPort: + numberOfPorts: 0 + HdmiArcPort: + portNumber: 0 +gameFeatures: false From f910fd595d7d5f874bde32dfd0d143740c6822c2 Mon Sep 17 00:00:00 2001 From: hgfell683 <107510770+hgfell683@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:17:13 -0400 Subject: [PATCH 40/64] Update based on review comments --- docs/pages/dsHost_TestSpecification.md | 4 ++-- profiles/tempatureSettings.yaml | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 profiles/tempatureSettings.yaml diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md index 405b95e0..94077cae 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/dsHost_TestSpecification.md @@ -56,8 +56,8 @@ High level overview: |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| -|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state.|dsGetCPUTemperature|Y|N|N| -|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information while within abnormal temperatures|dsGetCPUTemperature|N|Y|N| +|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on the test profile|dsGetCPUTemperature|Y|N|N| +|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information while within abnormal temperatures based on the test profile, see ../../profiles/TempatureSettings.yaml |dsGetCPUTemperature|N|Y|N| ### Test Startup Requirement - Retrieve CPU Temperature diff --git a/profiles/tempatureSettings.yaml b/profiles/tempatureSettings.yaml new file mode 100644 index 00000000..e69de29b From b2a848183cae2b2c783771a570c0f024bcbb7de7 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:53:05 +0100 Subject: [PATCH 41/64] gh #14 Updated the yaml files --- .../ds-video-port_High-Level_TestSpec.md | 2 +- profiles/sink/Sink_4K_VideoPort.yaml | 439 ++++++++++++------ profiles/source/Source_4K_VideoPort.yaml | 263 +++++++++-- 3 files changed, 527 insertions(+), 177 deletions(-) diff --git a/docs/pages/ds-video-port_High-Level_TestSpec.md b/docs/pages/ds-video-port_High-Level_TestSpec.md index 3d7cd245..d3a81e9d 100644 --- a/docs/pages/ds-video-port_High-Level_TestSpec.md +++ b/docs/pages/ds-video-port_High-Level_TestSpec.md @@ -174,7 +174,7 @@ Check the HDCP status with external analyzer |------------------|-----------|---------|--|--|------|----|--------------------------| |Check Color information |Get each port Color Space, compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "Ports/1/colorspaces" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/colorspaces" supported by HDMI port.|dsGetColorSpace()|`Y`|`NA`|`Y`|`Y`|`NA`| ||Get Color Space of active port with video playback|dsIsVideoPortActive(), dsGetColorSpace()|`NA`|`Y`|`Y`|`Y`|`NA`| -||Check each port Color Depth Capabilities and compare with the configuration YAML file . If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the pat "Ports/1/Supported_color_depth_capabilities" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/Supported_color_depth_capabilities" supported by HDMI port.|dsColorDepthCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +||Check each port Color Depth Capabilities and compare with the configuration YAML file . If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the pat "Ports/1/Supported_color_depth_capabilities" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "Ports/1/Supported_color_depth_capabilities" supported by HDMI port.|dsColorDepthCapabilities()|`Y`|`NA`|`Y`|`NA`|`NA`| ||Get each port Color Depth and verify with the configuration YAML file . If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path "color_depth" supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path "color_depth" supported by HDMI port.|dsGetColorDepth()|`Y`|`NA`|`Y`|`Y`|`NA`| ||Get active port Color Depth and verify with the analyzer|dsIsVideoPortActive(), dsGetColorDepth()|`NA`|`Y`|`Y`|`Y`|`Y`| ||Set preferred color depth for each port and compare get function |dsSetPreferredColorDepth(), dsGetPreferredColorDepth()|`Y`|`NA`|`Y`|`NA`|`NA`| diff --git a/profiles/sink/Sink_4K_VideoPort.yaml b/profiles/sink/Sink_4K_VideoPort.yaml index 15350388..21ac8945 100644 --- a/profiles/sink/Sink_4K_VideoPort.yaml +++ b/profiles/sink/Sink_4K_VideoPort.yaml @@ -1,143 +1,296 @@ -Device: - Type: sink - Name: element - -Number_of_ports: 1 - -Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - - 0x08 #INTERNAL - -# 8-Bit, 10-bit and 12 bit -color_depth: 10 - -Ports: - 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "INTERNAL" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: true - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connected_audio_ports: {type: 0x03, index: 0} # dsAUDIOPORT_TYPE_SPEAKER - defaultResolution: "1080i50" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x01 # RGB - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - Display_surrond: true - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - hdcp_protocol_version: 0x01 #VERSION_2X - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x02 #FULL - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x07 #BT_2020_CL - \ No newline at end of file +Device: + Type: sink + Name: element +# OR-ed value of DS module +# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort +Module: 0x2 #dsVideoPort + +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false + +Number_of_ports: 1 +Port_types: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + - 0x08 #INTERNAL + +# 8-Bit, 10-bit and 12 bit +color_depth: 10 + + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range +connectedAOP: 0x03 #dsAUDIOPORT_TYPE_SPEAKER = 0x03 + +defaultResolution: "1080i50" +Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL + + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "INTERNAL" + + #if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + + #if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + + #Number of the supported resolutions + numSupportedResolutions: 3 + + #768p60 + #1080p + #2160p60 + supportedResolutons: + - name : "480i" + #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution + #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution + #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution + #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution + #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution + #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution + pixelResolution: 0 + + #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio + #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio + #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range + aspectRatio : 0 + + #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode + #dsVIDEO_SSMODE_2D = 1 ///< 2D mode + #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode + #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode + #dsVIDEO_SSMODE_MAX ///< Out of range + stereoscopicMode: 1 + + #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate + #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second + #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second + #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second + #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second + #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second + #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second + #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second + #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second + #dsVIDEO_FRAMERATE_MAX ///< Out of range + frameRate: 6 + + #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video + #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video + #dsVIDEO_SCANMODE_MAX ///< Out of range + interlaced: 0 + + - name: "480p" + pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "576p50" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "720p" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "720p50" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "768p60" + pixelResolution: 3 # dsVIDEO_PIXELRES_1366x768 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080p24" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 1 # dsVIDEO_FRAMERATE_24 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080p" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080i50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + + - name: "1080i" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + + - name: "2160p30" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 3 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "2160p60" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + defaultResolution: "1080i50" + + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x01 # RGB + + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + + #@a true if display supports surround sound or @a false otherwise + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode : 0 + + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1FFBFB #OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + #HDR Capabilities: + hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + + #HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + hdcp_protocol_version: 0x01 #VERSION_2X + + + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL \ No newline at end of file diff --git a/profiles/source/Source_4K_VideoPort.yaml b/profiles/source/Source_4K_VideoPort.yaml index 6022052a..e559da1e 100644 --- a/profiles/source/Source_4K_VideoPort.yaml +++ b/profiles/source/Source_4K_VideoPort.yaml @@ -1,40 +1,73 @@ Device: Type: source Name: xione +# OR-ed value of DS module +# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort +Module: 0x2 #dsVideoPort +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false Number_of_ports: 3 Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - 0x06 # HDMI - 0x00 # RF - 0x01 # BB # 8-Bit, 10-bit and 12 bit -color_depth: 10 +color_depth: 10 + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range +connectedAOP: 0x01 +defaultResolution: "1080i50" Ports: 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range Typeid: 0x06 # HDMI + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 # "RF" # "BB" # "SVIDEO" @@ -54,18 +87,165 @@ Ports: #"768p60" #"1080p" #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + supportedResolutons: + - name : "480i" + #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution + #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution + #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution + #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution + #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution + #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_MAX + pixelResolution: 0 + + #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio + #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio + #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range + aspectRatio: 0 + + #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode + #dsVIDEO_SSMODE_2D = 1 ///< 2D mode + #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode + #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode + #dsVIDEO_SSMODE_MAX ///< Out of range + stereoscopicMode: 1 + + #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate + #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second + #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second + #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second + #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second + #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second + #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second + #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second + #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second + #dsVIDEO_FRAMERATE_MAX ///< Out of range + frameRate: 6 + + #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video + #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video + #dsVIDEO_SCANMODE_MAX ///< Out of range + interlaced: 0 + + - name: "480p" + pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + - name: "576i" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # _INTERLACED + + - name: "576p" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "720p" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + + - name: "720p50" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p24" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p25" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_25 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p30" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 9 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p60" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + + - name: "1080i50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # _INTERLACED + + - name: "1080i59.94" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 0 # _INTERLACED + + - name: "2160p24" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p25" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_25 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p30" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 9 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p50" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p60" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + defaultResolution: "720p" #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space @@ -83,7 +263,12 @@ Ports: #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto # @a true if display supports surround sound or @a false otherwise - Display_surrond: true + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 2 # Supported TV Resolutions: #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution @@ -156,6 +341,8 @@ Ports: #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range Typeid: 0x00 # dsVIDEOPORT_TYPE_RF + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 # "RF" # "BB" # "SVIDEO" @@ -186,7 +373,7 @@ Ports: #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + defaultResolution: "480p" #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space @@ -204,7 +391,11 @@ Ports: #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto # @a true if display supports surround sound or @a false otherwise - Display_surrond: false + DisplaySurround: false + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 0 # Supported TV Resolutions: #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution @@ -277,6 +468,8 @@ Ports: #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range Typeid: 0x01 # dsVIDEOPORT_TYPE_BB + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 # "RF" # "BB" # "SVIDEO" @@ -307,7 +500,7 @@ Ports: #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connected_audio_ports: {type: 0x01, index: 0} # dsAUDIOPORT_TYPE_HDMI + defaultResolution: "480p" #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space @@ -325,7 +518,11 @@ Ports: #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto # @a true if display supports surround sound or @a false otherwise - Display_surrond: false + DisplaySurround: false + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 0 # Supported TV Resolutions: #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution From 00c2d361ec88603b9c24190b3638b9b099756605 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:24:49 +0100 Subject: [PATCH 42/64] gh #18 added the profile files for sink & source --- .../ds-video-device_High-Level_TestSpec.md | 14 +++--- profiles/sink/Sink_VideoDevice.yaml | 39 +++++++++++++++ profiles/source/Source_VideoDevice.yaml | 47 +++++++++++++++++++ 3 files changed, 93 insertions(+), 7 deletions(-) create mode 100644 profiles/sink/Sink_VideoDevice.yaml create mode 100644 profiles/source/Source_VideoDevice.yaml diff --git a/docs/pages/ds-video-device_High-Level_TestSpec.md b/docs/pages/ds-video-device_High-Level_TestSpec.md index 045322ec..aa1e1b74 100644 --- a/docs/pages/ds-video-device_High-Level_TestSpec.md +++ b/docs/pages/ds-video-device_High-Level_TestSpec.md @@ -63,8 +63,8 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the zoom mode status|Ensure that the each video device can be retrieved and the zoom mode can be set using configuration file and verify using get|dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| -||Ensure that the each video device can be retrieved and the zoom mode can be set using configuration file and verify using get with Video playback & connected device |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| +|Check the zoom mode status|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDFCs)` profile file and verify using get function.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| +||Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDFCs)` profile file and verify using get with Video playback & connected device. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-Check the Zoom Control @@ -82,7 +82,7 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check `HDR` Capability|Get the `HDR` capabilities for each port and verify with the configuration file|dsGetHDRCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Check `HDR` Capability|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/VideoDevice0/HDRCapabilities)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/NumVideoDevices)`|dsGetHDRCapabilities() |`Y`|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -100,8 +100,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check Video coding Formats and information|Check each video device the supported Video coding format and verify the with configuration file or profile|dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| -||Check the supported Video codec information for each port and verify the with configuration file or profile|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| +|Check Video coding Formats and information|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedVideoCodingFormats)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/VideoCodecInfo)` profile file.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)`.|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -119,8 +119,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the Display frame rate Capability|Set the supported display frame rate using configuration file and verify using get|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| -||Set the supported display frame rate using configuration file and check if callbacks are triggered|dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Check the Display frame rate Capability|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDisplayFramerate)` and verify using get function. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)`.|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDisplayFramerate)` and check if callbacks are triggered Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| #### Test Startup Requirement-Check the Display frame rate Capability diff --git a/profiles/sink/Sink_VideoDevice.yaml b/profiles/sink/Sink_VideoDevice.yaml new file mode 100644 index 00000000..b0d9af93 --- /dev/null +++ b/profiles/sink/Sink_VideoDevice.yaml @@ -0,0 +1,39 @@ +VideoDevice: + Type: sink + Name: element + NumVideoDevices: 1 + VideoDevice0: + #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ + #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ + #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ + #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * + #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ + #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ + #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ + #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ + #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ + #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ + SupportedDFCs: false + DefaultDFC: false + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ + #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ + #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ + #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ + SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedDisplayframerate: + - "60" + - "50" + - "24" + VideoCodecInfo: false \ No newline at end of file diff --git a/profiles/source/Source_VideoDevice.yaml b/profiles/source/Source_VideoDevice.yaml new file mode 100644 index 00000000..fb48237d --- /dev/null +++ b/profiles/source/Source_VideoDevice.yaml @@ -0,0 +1,47 @@ +VideoDevice: + Type: source + Name: xi-one + NumVideoDevices: 1 + VideoDevice0: + #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ + #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ + #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ + #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * + #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ + #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ + #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ + #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ + #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ + #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ + SupportedDFCs: + - 0 #dsVIDEO_ZOOM_NONE + - 1 #dsVIDEO_ZOOM_FULL + - 8 #dsVIDEO_ZOOM_PLATFORM + DefaultDFC: 1 #dsVIDEO_ZOOM_FULL=1 + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ + #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ + #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ + #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ + SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedDisplayframerate: false + VideoCodecInfo: + num_entries: 1 + VideoCodec0: + level: 5.1 #HEVC profile level + profile: 1 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 + #dsVIDEO_CODEC_HEVC_PROFILE_MAIN = (0x01 << 0) /*!< 8-bit HEVC video profile. */ + #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 = (0x01 << 1) /*!< 10-bit HEVC video profile. */ + #dsVIDEO_CODEC_HEVC_PROFILE_MAINSTILLPICTURE = (0x01 << 2) /*!< HECV Main Still Picture profile */ + #dsVIDEO_CODEC_HEVC_MAX = (0x01 << 3) /*!< Out of range */ \ No newline at end of file From b68404991e22dd5265fa988500d3e12b71ca0d47 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:50:10 +0100 Subject: [PATCH 43/64] gh #18 Updated profiles --- profiles/sink/Sink_VideoDevice.yaml | 92 ++++++++++++-------- profiles/source/Source_VideoDevice.yaml | 109 ++++++++++++++---------- 2 files changed, 122 insertions(+), 79 deletions(-) diff --git a/profiles/sink/Sink_VideoDevice.yaml b/profiles/sink/Sink_VideoDevice.yaml index b0d9af93..313be6f7 100644 --- a/profiles/sink/Sink_VideoDevice.yaml +++ b/profiles/sink/Sink_VideoDevice.yaml @@ -1,39 +1,61 @@ VideoDevice: Type: sink Name: element + Module: 0x10 #dsVideoDevice NumVideoDevices: 1 - VideoDevice0: - #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ - #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ - #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ - #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * - #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ - #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ - #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ - #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ - #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ - #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ - SupportedDFCs: false - DefaultDFC: false - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ - #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ - #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ - #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ - SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 - SupportedDisplayframerate: - - "60" - - "50" - - "24" - VideoCodecInfo: false \ No newline at end of file + Device: + 1: + #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ + #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ + #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ + #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * + #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ + #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ + #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ + #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ + #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ + #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ + SupportedDFCs: 0 #Not supported + DefaultDFC: 0 #Not supported + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ + #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ + #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ + #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ + SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedDisplayFramerate: + - "60" + - "50" + - "24" + VideoCodecInfo: 0 #Not supported + +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false diff --git a/profiles/source/Source_VideoDevice.yaml b/profiles/source/Source_VideoDevice.yaml index fb48237d..442df395 100644 --- a/profiles/source/Source_VideoDevice.yaml +++ b/profiles/source/Source_VideoDevice.yaml @@ -1,47 +1,68 @@ VideoDevice: Type: source - Name: xi-one + Name: xione + Module: 0x10 #dsVideoDevice NumVideoDevices: 1 - VideoDevice0: - #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ - #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ - #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ - #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * - #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ - #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ - #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ - #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ - #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ - #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ - SupportedDFCs: - - 0 #dsVIDEO_ZOOM_NONE - - 1 #dsVIDEO_ZOOM_FULL - - 8 #dsVIDEO_ZOOM_PLATFORM - DefaultDFC: 1 #dsVIDEO_ZOOM_FULL=1 - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ - #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ - #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ - #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ - SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 - SupportedDisplayframerate: false - VideoCodecInfo: - num_entries: 1 - VideoCodec0: - level: 5.1 #HEVC profile level - profile: 1 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 - #dsVIDEO_CODEC_HEVC_PROFILE_MAIN = (0x01 << 0) /*!< 8-bit HEVC video profile. */ - #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 = (0x01 << 1) /*!< 10-bit HEVC video profile. */ - #dsVIDEO_CODEC_HEVC_PROFILE_MAINSTILLPICTURE = (0x01 << 2) /*!< HECV Main Still Picture profile */ - #dsVIDEO_CODEC_HEVC_MAX = (0x01 << 3) /*!< Out of range */ \ No newline at end of file + Device: + 1: + #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ + #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ + #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ + #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * + #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ + #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ + #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ + #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ + #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ + #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ + SupportedDFCs: + - 0 #dsVIDEO_ZOOM_NONE + - 1 #dsVIDEO_ZOOM_FULL + - 8 #dsVIDEO_ZOOM_PLATFORM + DefaultDFC: 1 #dsVIDEO_ZOOM_FULL=1 + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ + #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ + #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ + #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ + SupportedVideoCodingFormats: 7 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedDisplayFramerate: 0 #Not supported + VideoCodecInfo: + num_entries: 1 + VideoCodec0: + level: 5.1 #HEVC profile level + profile: 1 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 + #dsVIDEO_CODEC_HEVC_PROFILE_MAIN = (0x01 << 0) /*!< 8-bit HEVC video profile. */ + #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 = (0x01 << 1) /*!< 10-bit HEVC video profile. */ + #dsVIDEO_CODEC_HEVC_PROFILE_MAINSTILLPICTURE = (0x01 << 2) /*!< HECV Main Still Picture profile */ + #dsVIDEO_CODEC_HEVC_MAX = (0x01 << 3) /*!< Out of range */ +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false \ No newline at end of file From 3b038ebd38fed54e526f4766606a00fa44e9fe05 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:26:58 +0100 Subject: [PATCH 44/64] gh #11 Display L2 spec and Test Code --- ...sDisplay_L2_Low-Level_TestSpecification.md | 133 +++++++++ docs/pages/dsDisplay_TestSpecificaion.md | 2 +- .../{include => }/sink/Panel_4K_Display.yaml | 6 +- .../{include => }/source/Puck_4K_Display.yaml | 6 +- src/test_l2_dsDisplay.c | 267 ++++++++++++------ 5 files changed, 321 insertions(+), 93 deletions(-) create mode 100644 docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md rename profiles/{include => }/sink/Panel_4K_Display.yaml (96%) rename profiles/{include => }/source/Puck_4K_Display.yaml (71%) diff --git a/docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md b/docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md new file mode 100644 index 00000000..1be5e5eb --- /dev/null +++ b/docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md @@ -0,0 +1,133 @@ +# DSDISPLAY L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [DSDISPLAY L2 Low Level Test Specification and Procedure Documentation](#dsdisplay-l2-low-level-test-specification-and-procedure-documentation) + + - [Table of Contents](#table-of-contents) + - [Overview](#overview) + - [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) + - [Definitions](#definitions) + - [References](#references) + - [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the level 2 testing suite for the DSDISPLAY module. + +### Acronyms, Terms and Abbreviations + +- `HAL` \- Hardware Abstraction layer +- `EDID` \- Extended Display Identification +- `HDMI` \- High-Definition Multimedia Interface +- `API` \- Application programming interface +- `HAL` \- Hardware Abstraction Layer, may include some common components +- `UT` \- Unit Test(s) +- `OEM` \- Original Equipment Manufacture +- `SoC` \- System on a Chip +- `DS` \- Device Settings + +### Definitions + + - `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References +- `High Level Test Specification` - [dsDisplay_TestSpecificaion.md](:/4d6a87ee74104f3bbe64f7514565a5a2) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsDisplay_RetrieveAndValidateEDID_sink`| +|Description|For the sink device, retrieve EDID information for the display type 'dsVIDEOPORT_TYPE_INTERNAL' using GetEDID and GetEDIDBytes, then validate the values against the data available in the "Panel_4K_Display.yaml" profile file. The values to be validated are the 'EDID_Data/productCode' for GetEDID and the 'EDID_Data/edidBytes'(which stands for Manufacturer ID) at bytes 8 and 9 against the values available in the profile file for GetEDIDBytes.| +|Test Group|Module : 02| +|Test Case ID|001| +|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 : + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the display using dsDisplayInit | None | dsERR_NONE | Should be successful | +| 02 | Get the display handle using dsGetDisplay for the 'dsVIDEOPORT_TYPE_INTERNAL' type | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Retrieve EDID information using dsGetEDID | handle = obtained from step 02 | dsERR_NONE | Should be successful | +| 04 | Validate with the product code data available in the profile file 'Panel_4K_Display.yaml.yml' | product code, EDID_Data/productCode | Value matches | Should be successful | +| 05 | Retrieve EDID bytes using dsGetEDIDBytes | handle = obtained from step 02, edidBytes = valid buffer, length = valid buffer | dsERR_NONE | Should be successful | +| 06 | Validate with the Manufacturer ID at bytes 8 and 9 against the values available in the profile file "Panel_4K_Display.yaml" | Manufacturer ID , EDID_Data/edidBytes | Value matches | Should be successful | +| 07 | Terminate the display using dsDisplayTerm | None | dsERR_NONE | Should be successful | + + +```mermaid +graph TB + A[Call dsDisplayInit] -->|dsERR_NONE| B[Call dsGetDisplay] + A -->|!= dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Parse 'Panel_CompositeInput.yaml'] + C--> D[Call dsGetEDID] + B -->|!= dsERR_NONE or invalid handle| B1[Test case fail] + D -->|dsERR_NONE and valid dsDisplayEDID_t| E[Compare productcode values] + D -->|!= dsERR_NONE or invalid dsDisplayEDID_t| D1[Test case fail] + E --> F[Call dsGetEDIDBytes] + F -->|dsERR_NONE and valid buffer and length >= 0| G[Compare Manufacturer ID values] + F -->|!= dsERR_NONE or invalid buffer or length < 0| F1[Test case fail] + G --> H[Call dsDisplayTerm] + H -->|dsERR_NONE| I[Test case success] + H -->|!= dsERR_NONE| H1[Test case fail] +``` + + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsDisplay_TestDefaultAspectRatio_source`| +|Description|Test the default aspect ratio (16:9) without any TV connected on source devices.| +|Test Group|Module : 02| +|Test Case ID|002| +|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 : + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the display using dsDisplayInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the display handle using dsGetDisplay() with dsVIDEOPORT_TYPE_HDMI and index 0 | dsVIDEOPORT_TYPE_HDMI, 0 | dsERR_NONE | Should be successful | +| 03 | Get the display aspect ratio using dsGetDisplayAspectRatio() with the handle obtained from dsGetDisplay() | handle obtained from dsGetDisplay() and aspectRatio = valid buffer | dsERR_NONE, dsVIDEO_ASPECT_RATIO_16x9 | Should be successful | +| 04 | Verify that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9 | None | dsVIDEO_ASPECT_RATIO_16x9 | Should be successful | +| 05 | Terminate the display using dsDisplayTerm() | None | dsERR_NONE | Should be successful | + + +```mermaid +graph TB +A[Call dsDisplayInit] -->|dsERR_NONE| B[Call dsGetDisplay] +B -->|dsERR_NONE| C[Call dsGetDisplayAspectRatio] +C -->|dsERR_NONE| D[Verify aspect ratio is dsVIDEO_ASPECT_RATIO_16x9] +D -->|Verified| E[Call dsDisplayTerm] +E -->|dsERR_NONE| F[Test case success] +A -->|!=dsERR_NONE| G[Test case fail] +B -->|!=dsERR_NONE| H[Test case fail] +C -->|!=dsERR_NONE| I[Test case fail] +D -->|Not Verified| J[Test case fail] +E -->|!=dsERR_NONE| K[Test case fail] +``` diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md index 2d355322..836e709b 100644 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ b/docs/pages/dsDisplay_TestSpecificaion.md @@ -51,7 +51,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| |The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|dsGetEDID(), dsGetEDIDBytes()|N|Y|Y|N|N| -|For the sink device, retrieve EDID information for the 'dsVIDEOPORT_TYPE_INTERNAL' type using GetEDID and GetEDIDBytes, then validate the values against the data available in the profile file. The values to be validated are the 'productCode' for GetEDID and the 'Manufacturer ID' at bytes 8 and 9 against the values available in the profile file "Panel_4K_Display.yaml" for GetEDIDBytes|dsGetEDID(), dsGetEDIDBytes()|Y|N|N|Y|N| +|For the sink device, retrieve EDID information for the 'dsVIDEOPORT_TYPE_INTERNAL' type using GetEDID and GetEDIDBytes, then validate the values against the data available in the profile file. The values to be validated are the 'EDID_Data/productCode' for GetEDID and the 'EDID_Data/edidBytes'(which stands for Manufacturer ID) at bytes 8 and 9 against the values available in the profile file "Panel_4K_Display.yaml" for GetEDIDBytes.|dsGetEDID(), dsGetEDIDBytes()|Y|N|N|Y|N| ### Test Startup Requirement - Get EDID Information diff --git a/profiles/include/sink/Panel_4K_Display.yaml b/profiles/sink/Panel_4K_Display.yaml similarity index 96% rename from profiles/include/sink/Panel_4K_Display.yaml rename to profiles/sink/Panel_4K_Display.yaml index 72519999..dfff8356 100644 --- a/profiles/include/sink/Panel_4K_Display.yaml +++ b/profiles/sink/Panel_4K_Display.yaml @@ -2,6 +2,10 @@ Device: Type: sink Name: element +dsDisplay: + features: + extendedEnumsSupported: false + EDID_Data: # Product code of the display device of the type int32_t productCode: 0x2A1B @@ -44,4 +48,4 @@ EDID_Data: 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" # length of the edid bytes - edidbytesLength: 256 \ No newline at end of file + edidbytesLength: 256 diff --git a/profiles/include/source/Puck_4K_Display.yaml b/profiles/source/Puck_4K_Display.yaml similarity index 71% rename from profiles/include/source/Puck_4K_Display.yaml rename to profiles/source/Puck_4K_Display.yaml index 1ea11e62..11dfec69 100644 --- a/profiles/include/source/Puck_4K_Display.yaml +++ b/profiles/source/Puck_4K_Display.yaml @@ -2,7 +2,11 @@ Device: Type: source Name: xione +dsDisplay: + features: + extendedEnumsSupported: false + # dsVIDEO_ASPECT_RATIO_4x3 = 0x00, ///< 4:3 aspect ratio # dsVIDEO_ASPECT_RATIO_16x9 = 0x01, ///< 16:9 aspect ratio # dsVIDEO_ASPECT_RATIO_MAX = 0xFF ///< Out of range -Aspect Ratio: 0x01 # 16:9 \ No newline at end of file +Aspect Ratio: 0x01 # 16:9 diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index c7bbe32d..005f2290 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -1,121 +1,208 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License atS +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** - * @addtogroup HPK Hardware Porting Kit - * @{ - * @par The Hardware Porting Kit - * HPK is the next evolution of the well-defined Hardware Abstraction Layer - * (HAL), but augmented with more comprehensive documentation and test suites - * that OEM or SOC vendors can use to self-certify their ports before taking - * them to RDKM for validation or to an operator for final integration and - * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC - * vendor to self-certify their own Video Accelerator devices, with minimal RDKM - * assistance. - * - */ - -/** - * @addtogroup Device_Settings Device Settings Module - * @{ - */ - -/** - * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests - * @{ - */ - -/** - * @addtogroup DS_Display_HALTEST Device Settings Display HAL Tests - * @{ - */ - -/** - * @defgroup DS_Display_HALTEST_L2 Device Settings Display HAL Tests L2 File - * @{ - * @parblock - * - * ### L2 Tests for DS Display HAL : - * - * Level 2 unit test cases for all APIs of Device Settings Display HAL - * - * **Pre-Conditions:** None@n - * **Dependencies:** None@n - * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) - * - * @endparblock - */ +* @file test_l2_dsDisplay.c +* @page dsDisplay Level 2 Tests +* +* ## Module's Role +* This module includes Level 2 functional tests (success and failure scenarios). +* This is to ensure that the dsDisplay APIs meet the requirements across all vendors. +* +* **Pre-Conditions:** None@n +* **Dependencies:** None@n +* +* Ref to API Definition specification documentation : [ds-display_halSpec.md](../../docs/pages/ds-display_halSpec.md) +*/ +#include +#include +#include +#include "dsDisplay.h" +static int gTestGroup = 2; +static int gTestID = 1; /** - * @file test_l2_dsDisplay.c - * - */ - -#include -#include +* @brief This test aims to retrieve and validate the EDID of a sink in the L2 dsDisplay module +* +* This test function tests the retrieval and validation of the Extended Display Identification Data (EDID) of a sink in the L2 dsDisplay module. It ensures that the functions dsDisplayInit, dsGetDisplay, dsGetEDID, dsGetEDIDBytes, and dsDisplayTerm are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../../docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md) +*/ -#include -#include +void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; // Initialize handle to 0. + dsDisplayEDID_t edid = { 0 }; // Initialize all edid fields to 0. + unsigned char edidBytes[MAX_EDID_BYTES_LEN] = { 0 }; // Initialize the edidbytes to 0. + int length = 0; // Initialize the length to 0. + + // Step 1: Call dsDisplayInit + ret = dsDisplayInit(); + UT_LOG_INFO("Invoked dsDisplayInit(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay + ret = dsGetDisplay(dsVIDEOPORT_TYPE_INTERNAL, 0, &handle); + UT_LOG_INFO("Invoked dsGetDisplay() with dsVIDEOPORT_TYPE_INTERNAL and index 0, returned: %d, handle: %ld\n", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDID fails + dsDisplayTerm(); + return; + } + + // Step 3: Call dsGetEDID + ret = dsGetEDID(handle, &edid); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDID() with handle %ld, returned: %d, productCode: %d\n", handle, ret, edid.productCode); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDID fails + dsDisplayTerm(); + return; + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(edid.productCode, "EDID_Data/productCode"); + + // Step 4: Call dsGetEDIDBytes + ret = dsGetEDIDBytes(handle, edidBytes, &length); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDIDBytes() with handle %ld, returned: %d, Manufacturer ID: %d\n", handle, ret, edidBytes[8] << 8 | edidBytes[9]); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDIDBytes fails + dsDisplayTerm(); + return; + } + + // Manufacturer ID + UT_LOG_INFO("Manufacturer ID: %d\n", edidBytes[8] << 8 | edidBytes[9]); + + //TODOs : Need KVP support for array handling + UT_ASSERT_KVP_EQUAL_PROFILE_UINT16(edidBytes[8] << 8 | edidBytes[9], "EDID_Data/edidBytes"); + + // Step 5: Call dsDisplayTerm + ret = dsDisplayTerm(); + UT_LOG_INFO("Invoked dsDisplayTerm(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief This test aims to verify the default aspect ratio of the source in the L2 dsDisplay module * -* TODO: Add the description of what is tested and why in this test +* In this test, the dsDisplayInit(), dsGetDisplay(), dsGetDisplayAspectRatio(), and dsDisplayTerm() functions are called in sequence to check the default aspect ratio of the source. The test verifies that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9. If any of the function calls fail or the aspect ratio is not as expected, the test fails. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../../docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsDisplay (void) + +void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; //Initialize handle to 0. + dsVideoAspectRatio_t aspectRatio = dsVIDEO_ASPECT_RATIO_MAX; // Initialize aspect ratio with MAX value. + + // Step 1: Call dsDisplayInit() + UT_LOG_DEBUG("Invoking dsDisplayInit()"); + ret = dsDisplayInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay() + UT_LOG_DEBUG("Invoking dsGetDisplay() with dsVIDEOPORT_TYPE_HDMI and index 0"); + ret = dsGetDisplay(dsVIDEOPORT_TYPE_HDMI, 0, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetDisplay() failed with error: %d\n", ret); + dsDisplayTerm(); + return; + } + + // Step 3: Call dsGetDisplayAspectRatio() + UT_LOG_DEBUG("Invoking dsGetDisplayAspectRatio() with handle obtained from dsGetDisplay()"); + ret = dsGetDisplayAspectRatio(handle, &aspectRatio); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + if (ret != dsERR_NONE || aspectRatio != dsVIDEO_ASPECT_RATIO_16x9) + { + UT_LOG_ERROR("dsGetDisplayAspectRatio() failed with error: %d\n", ret); + dsDisplayTerm(); + return; + } + + // Step 4: Verify aspect ratio + UT_LOG_DEBUG("Verifying that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9"); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + + // Step 5: Call dsDisplayTerm() + UT_LOG_DEBUG("Invoking dsDisplayTerm()"); + ret = dsDisplayTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; +static UT_test_suite_t * pSuite1 = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsDisplay_register ( void ) + +int test_l2_dsDisplay_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsDisplay]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + // Create the test suite + pSuite = UT_add_suite("[L2 dsDisplay Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } - - UT_add_test( pSuite, "test_l2_dsDisplay" ,test_l2_dsDisplay ); + pSuite1 = UT_add_suite("[L2 dsDisplay Source ]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } - return 0; -} + // List of test function names and strings + UT_add_test( pSuite, "l2_dsDisplay_RetrieveAndValidateEDID_sink", test_l2_dsDisplay_RetrieveAndValidateEDID_sink); + UT_add_test( pSuite1, "l2_dsDisplay_TestDefaultAspectRatio_source", test_l2_dsDisplay_TestDefaultAspectRatio_source); -/** @} */ // End of DS_Display_HALTEST_L2 -/** @} */ // End of DS_Display_HALTEST -/** @} */ // End of Device_Settings_HALTEST -/** @} */ // End of Device_Settings -/** @} */ // End of HPK + return 0; +} From 1e8ff428febf740e2edfef4bef64fdd9d33fedfd Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:39:02 +0100 Subject: [PATCH 45/64] gh #14 added the L2 code,L2 LLST and utils file --- build.sh | 2 +- ...deo-port_L2_Low-Level_TestSpecification.md | 1275 +++++++++++++++++ profiles/sink/Sink_4K_VideoPort.yaml | 563 ++++---- profiles/source/Source_4K_VideoPort.yaml | 1144 ++++++++------- src/main.c | 48 +- src/test_l2_dsAudio.c | 2 +- src/test_l2_dsCompositeIn.c | 4 +- src/test_l2_dsDisplay.c | 4 +- src/test_l2_dsFPD.c | 4 +- src/test_l2_dsHdmiIn.c | 2 +- src/test_l2_dsHost.c | 2 +- src/test_l2_dsVideoDevice.c | 2 +- src/test_l2_dsVideoPort.c | 1100 +++++++++++++- src/test_register.c | 67 +- src/test_utils.c | 207 +++ src/test_utils.h | 132 ++ 16 files changed, 3614 insertions(+), 944 deletions(-) create mode 100644 docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md create mode 100644 src/test_utils.c create mode 100644 src/test_utils.h diff --git a/build.sh b/build.sh index d3d86227..5dc562bc 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ NC="\e[39m" # When the major version changes in the ut-core, what that signals is that the testings will have to be upgraded to support that version # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your UT-Core Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_PROJECT_MAJOR_VERSION="1." +UT_PROJECT_MAJOR_VERSION="2." # Clone the Unit Test Requirements TEST_REPO=git@github.com:rdkcentral/ut-core.git diff --git a/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md new file mode 100644 index 00000000..9b8b3f55 --- /dev/null +++ b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md @@ -0,0 +1,1275 @@ +# Device Settings Video Port L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the level 2 testing suite for the Device Settings Video Port module. + +### 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 + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [ds-video-port_High-Level_TestSpec.md](ds-video-port_High-Level_TestSpec.md) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_EnableDisabledVideoPorts_sink`| +|Description|Get the handle for each video port, check the status of each video port to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port.| +|Test Group|02| +|Test Case ID|001| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the handle for each video port using dsGetVideoPort() | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 03 | Check the status of each video port using dsIsVideoPortEnabled() | handle = obtained from dsGetVideoPort() | dsERR_NONE | Should be successful | +| 04 | If a port is disabled, enable it using dsEnableVideoPort() | handle = obtained from dsGetVideoPort(), enabled = true | dsERR_NONE | Should be successful | +| 05 | Verify the status of each port using dsIsVideoPortEnabled() | handle = obtained from dsGetVideoPort() | dsERR_NONE, enabled = true | Should be successful | +| 06 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| D[Call dsIsVideoPortEnabled API] + D -->|dsERR_NONE| E[Check if video port is enabled] + E -->|Enabled flag is false| F[Call dsEnableVideoPort API] + F -->|dsERR_NONE| G[Call dsIsVideoPortEnabled API] + G -->|dsERR_NONE and enabled flag is true| B + B -->|End of loop|I[Call dsVideoPortTerm API] + I -->|dsERR_NONE| J[Test case success] + I -->|Not dsERR_NONE| I1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_EnableDisabledVideoPorts_source`| +|Description|Get the handle for each video port, check the status of each video port to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port.| +|Test Group|02| +|Test Case ID|002| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the handle for each video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 03 | Check the status of each video port using dsIsVideoPortEnabled | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | +| 04 | If a port is disabled, enable it using dsEnableVideoPort | handle = obtained from dsGetVideoPort, enabled = true | dsERR_NONE | Should be successful | +| 05 | Verify the status of each port using dsIsVideoPortEnabled | handle = obtained from dsGetVideoPort | dsERR_NONE, enabled = true | Should be successful | +| 06 | Terminate video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| D[Call dsIsVideoPortEnabled API] + D -->|dsERR_NONE| E[Check if video port is enabled] + E -->|Enabled flag is false| F[Call dsEnableVideoPort API] + F -->|dsERR_NONE| G[Call dsIsVideoPortEnabled API] + G -->|dsERR_NONE and enabled flag is true| B + B -->|End of loop|I[Call dsVideoPortTerm API] + I -->|dsERR_NONE| J[Test case success] + I -->|Not dsERR_NONE| I1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifyDisplayAndPortStatus_sink`| +|Description|Verify the connected/disconnected status of each port's display when no video port is connected.| +|Test Group|02| +|Test Case ID|003| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for each type of video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 03 | Check if the display is connected for the obtained video port handle using dsIsDisplayConnected | handle = obtained from dsGetVideoPort | dsERR_NONE, connected = false | Should be successful | +| 04 | Check if the video port is active for the obtained video port handle using dsIsVideoPortActive | handle = obtained from dsGetVideoPort | dsERR_NONE, active = false | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|dsERR_NONE| B{For each type and index
call dsGetVideoPort} + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsIsDisplayConnected for each handle] + C -->|dsERR_NONE and connected is false| D[Call dsIsVideoPortActive for each handle] + D -->|dsERR_NONE and enabled flag is true| B + B -->|End of loop|I[Call dsVideoPortTerm API] + I -->|dsERR_NONE| J[Test case success] + I -->|Not dsERR_NONE| I1[Test case fail] +``` + +### Test 4 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifyDisplayAndPortStatus_source`| +|Description|Verify the connected/disconnected status of each port's display when no video port is connected.| +|Test Group|02| +|Test Case ID|004| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for each type of video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 03 | Check if the display is connected for each video port using dsIsDisplayConnected | handle = obtained from dsGetVideoPort | dsERR_NONE, connected = false | Should be successful | +| 04 | Check if the video port is active for each video port using dsIsVideoPortActive | handle = obtained from dsGetVideoPort | dsERR_NONE, active = false | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|dsERR_NONE| B{For each type and index
call dsGetVideoPort} + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsIsDisplayConnected for each handle] + C -->|dsERR_NONE and connected is false| D[Call dsIsVideoPortActive for each handle] + D -->|dsERR_NONE and enabled flag is true| B + B -->|End of loop|I[Call dsVideoPortTerm API] + I -->|dsERR_NONE| J[Test case success] + I -->|Not dsERR_NONE| I1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities_sink`| +|Description|Retrieve the surround mode capabilities of each port and verify them with the configuration YAML file. If it is a sink device, retrieve the value from 'Sink_4K_VideoPort.yaml' using the path Ports/1/Display_surround" since the sink device has only an INTERNAL port. It is not supported for the source devices.| +|Test Group|02| +|Test Case ID|005| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, 0 | dsERR_NONE | Should be successful | +| 03 | Check if the display is in surround mode using dsIsDisplaySurround() with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | +| 04 | Verify if the surround mode from previous step matches with the configuration YAML file | surrond, "Ports/1/Display_surrond" | None | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit API] + Step1 -->|dsERR_NONE| Step2[Call dsGetVideoPort API] + Step1 -->|Not dsERR_NONE| Fail1[Test Case Failed] + Step2 -->|dsERR_NONE and valid handle| Step3[Call dsIsDisplaySurround API] + Step3 -->|dsERR_NONE and boolean value| Step4[Retrieve surround mode capabilities] + Step4 --> Step5[Verify if dsIsDisplaySurround value matches with configuration file value] + Step5 --> Step6[Call dsVideoPortTerm API] + Step6 -->|dsERR_NONE| End[Test Case Passed] + Step6 -->|Not dsERR_NONE| Fail5[Test Case Failed] +``` + +### Test 6 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifyDisplaySurround_source`| +|Description|Verify the each port surround mode capabilities of connected display and verify with configuration file. It is not supported of Sink devices. If it is a source devices, the value has to be retrieved from the Source_4K_VideoPort.yaml" using the path "Ports/1/Display_surround" supported by the HDMI device.| +|Test Group|02| +|Test Case ID|006| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with HDMI and index 0 | dsVIDEOPORT_TYPE_HDMI, 0, &handle | dsERR_NONE | Should be successful | +| 03 | Check if the display is surround using dsIsDisplaySurround() with valid handle | handle, &surround | dsERR_NONE | Should be successful | +| 04 | If display is surround, get the surround mode using dsGetSurroundMode() with valid handle | handle, &surround_mode | dsERR_NONE | Should be successful | +| 05 | Verify if the surround mode from previous step matches with the configuration YAML file | surrond, "Ports/1/Display_surrond" | True | Should be successful | +| 06 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort] +A -->|Not dsERR_NONE| A1[Test case fail] +B -->|dsERR_NONE and valid handle| C[Call dsIsDisplaySurround] +C -->|dsERR_NONE and display supports surround| D[Call dsGetSurroundMode] +C -->|Not dsERR_NONE| C1[Test case fail] +D -->|dsERR_NONE and valid surround mode| E[Verify if surround mode matches with value from Source_4K_VideoPort.yaml] +E -->G[Call dsVideoPortTerm] +G -->|dsERR_NONE| G1[Test case success] +G -->|Not dsERR_NONE| G2[Test case fail] +``` + +### Test 7 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetResolution_source`| +|Description|Set properties for each video port, including pixel resolution, aspect ratio, stereoscopic modes, frame rates, and scan modes, looping through supported values. Verify the settings using the get function.| +|Test Group|02| +|Test Case ID|007| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through each video port and get the handle using dsGetVideoPort() | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0, &handle | dsERR_NONE | Should be successful | +| 03 | Loop through all possible pixel resolutions, aspect ratios, stereoscopic modes, frame rates, and scan modes | pixelResolution = dsVIDEO_PIXELRES_720x480 to dsVIDEO_PIXELRES_MAX, aspectRatio = dsVIDEO_ASPECT_RATIO_4x3 to dsVIDEO_ASPECT_RATIO_MAX, stereoScopicMode = dsVIDEO_SSMODE_UNKNOWN to dsVIDEO_SSMODE_MAX, frameRate = dsVIDEO_FRAMERATE_UNKNOWN to dsVIDEO_FRAMERATE_MAX, interlaced = false | dsERR_NONE | Should be successful | +| 04 | Set resolution using dsSetResolution() with handle and setResolution | handle, &setResolution | dsERR_NONE | Should be successful | +| 05 | Get resolution using dsGetResolution() with handle and getResolution | handle, &getResolution | dsERR_NONE | Should be successful | +| 06 | Compare setResolution and getResolution | setResolution, getResolution | Equal values for all properties | Should be successful | +| 07 | Terminate video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort] + A -->|Not dsERR_NONE| A1[Test case Fail] + B -->|dsERR_NONE and valid handle| C{Loop through supported values} + C --> E[Set values using dsSetResolution API] + E --> F[Get values using dsGetResolution API] + F --> G[Compare returned and set resolution] + G --> C + F --> I[Call dsVideoPortTerm] + I -->|dsERR_NONE| J[Test case Success] + I -->|Not dsERR_NONE| I1[Test case Fail] +``` + +### Test 8 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifySupportedTvResolutions_sink`| +|Description|Gets the each port supported resolutions of TV and verify with the configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by HDMI port.| +|Test Group|02| +|Test Case ID|008| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0 | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the supported TV resolutions using dsSupportedTvResolutions with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | +| 04 | Verify the obtained resolutions with the expected resolutions from the configuration YAML file | resolutions = value in "Ports/1/Supported_tv_resolutions_capabilities" | dsERR_NONE | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit API] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] + Step1 -- Not dsERR_NONE --> Fail1[Test case fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsSupportedTvResolutions API] + Step3 -- dsERR_NONE and valid resolutions --> Step4[Verfiy if resolutions match with Sink_4K_VideoPort.yaml file value] + Step4 --> Step5[Call dsVideoPortTerm API] + Step5 -- dsERR_NONE --> End[Test Case Passed] + Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed: dsVideoPortTerm API failed] +``` + +### Test 9 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifySupportedTvResolutions_source`| +|Description|Gets the each port supported resolutions of TV and verify with the configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by HDMI port.| +|Test Group|02| +|Test Case ID|009| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with type=dsVIDEOPORT_TYPE_HDMI and index=1 | type=dsVIDEOPORT_TYPE_HDMI, index=1 | dsERR_NONE | Should be successful | +| 03 | Get the supported TV resolutions using dsSupportedTvResolutions with the obtained handle | handle=obtained handle | dsERR_NONE | Should be successful | +| 04 | Verify the obtained resolutions with the configuration YAML file | resolutions= value in "Ports/1/Supported_tv_resolutions_capabilities" | dsERR_NONE | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit API] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] + Step1 -- Not dsERR_NONE --> Fail1[Test case fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsSupportedTvResolutions API] + Step3 -- dsERR_NONE and valid resolutions --> Step4[Verfiy if resolutions match with Source_4K_VideoPort.yaml file value] + Step4 --> Step5[Call dsVideoPortTerm API] + Step5 -- dsERR_NONE --> End[Test Case Passed] + Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed: dsVideoPortTerm API failed] +``` + +### Test 10 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetHDRCapabilities_sink`| +|Description|Get the each port HDR capabilities & verify with the configuration YAML file YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported only by HDMI port.| +|Test Group|02| +|Test Case ID|10| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, 0 | dsERR_NONE | Should be successful | +| 03 | Get the HDR capabilities of the TV using dsGetTVHDRCapabilities() with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | +| 04 | Verify the obtained capabilities with the configuration YAML file | capabilities = obtained from previous step | capabilities = value in "Ports/1/hdr_capabilities | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|dsERR_NONE| B[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetTVHDRCapabilities API with handle] + C -->|dsERR_NONE and bitwise OR-ed value| D[Verify if output matches with value from Sink_4K_VideoPort.yaml] + D --> E[Call dsVideoPortTerm API] + E -->|dsERR_NONE| F[Test case success] + E -->|Not dsERR_NONE| E1[Test case fail] +``` + +### Test 11 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetHDRCapabilities_source`| +|Description|Get the each port HDR capabilities & verify with the configuration YAML file YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported only by HDMI port.| +|Test Group|02| +|Test Case ID|011| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for HDMI type using dsGetVideoPort | type = dsVIDEOPORT_TYPE_HDMI, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Get the HDR capabilities of the TV using dsGetTVHDRCapabilities with the handle obtained from previous step | handle = obtained from step 02, capabilities = valid pointer | dsERR_NONE | Should be successful | +| 04 | Verify the obtained capabilities with the configuration YAML file | capabilities = obtained from step 03 | capabilities = value in 'Ports/1/hdr_capabilities' | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|dsERR_NONE| B[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetTVHDRCapabilities API with handle] + C -->|dsERR_NONE and bitwise OR-ed value| D[Verify if output matches with value from Source_4K_VideoPort.yaml] + D --> E[Call dsVideoPortTerm API] + E -->|dsERR_NONE| F[Test case success] + E -->|Not dsERR_NONE| E1[Test case fail] +``` + +### Test 12 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_sink`| +|Description|Set Force-disable 4K support for each port and verify it using the get function.| +|Test Group|02| +|Test Case ID|12| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0, &handle | dsERR_NONE | Should be successful | +| 03 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable set to true | handle, true | dsERR_NONE | Should be successful | +| 04 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle, &getDisable | dsERR_NONE, true | Should be successful | +| 05 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable set to false | handle, false | dsERR_NONE | Should be successful | +| 06 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle, &getDisable | dsERR_NONE, false | Should be successful | +| 07 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|Not dsERR_NONE| A1[Test case fail] + A --> P{For each video port type
call dsGetVideoPort API} --> B[Call dsGetVideoPort API] + B[Call dsGetVideoPort API] --> |dsERR_NONE and valid handle|C[Set disable to true/false using dsSetForceDisable4KSupport API] + C --> |dsERR_NONE| D[Get the disable value using dsGetForceDisable4KSupport API] + D --> |dsERR_NONE| E[Verify if the disable values retrieved from set and get APIs match] + E --> |Iterate through all possible values | P + E --> |End of loop| F -->|Not dsERR_NONE| G[Test case fail] + F[Call dsVideoPortTerm API] -->|dsERR_NONE| F1[Test case success] +``` + +### Test 13 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_source`| +|Description|Set Force-disable 4K support for each port and verify it using the get function.| +|Test Group|02| +|Test Case ID|013| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0 , handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable = true | handle = obtained handle, disable = true | dsERR_NONE | Should be successful | +| 04 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle = obtained handle, getDisable = valid pointer | dsERR_NONE, getDisable = true | Should be successful | +| 05 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable = false | handle = obtained handle, disable = false | dsERR_NONE | Should be successful | +| 06 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle = obtained handle, getDisable = valid pointer | dsERR_NONE, getDisable = false | Should be successful | +| 07 | Terminate video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] -->|Not dsERR_NONE| A1[Test case fail] + A --> P{For each video port type
call dsGetVideoPort API} --> B[Call dsGetVideoPort API] + B[Call dsGetVideoPort API] --> |dsERR_NONE and valid handle|C[Set disable to true/false using dsSetForceDisable4KSupport API] + C --> |dsERR_NONE| D[Get the disable value using dsGetForceDisable4KSupport API] + D --> |dsERR_NONE| E[Verify if the disable values retrieved from set and get APIs match] + E --> |Iterate through all possible values | P + E --> |End of loop| F -->|Not dsERR_NONE| G[Test case fail] + F[Call dsVideoPortTerm API] -->|dsERR_NONE| F1[Test case success] +``` + +### Test 14 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetHDCPStatus_sink`| +|Description|Check the HDCP status of each port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources.| +|Test Group|02| +|Test Case ID|14| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Get the HDCP status for each handle using dsGetHDCPStatus() | handle = obtained from dsGetVideoPort() | dsERR_NONE | Should be successful | +| 04 | Check if the HDCP status is authenticated | status = obtained from dsGetHDCPStatus() | dsHDCP_STATUS_AUTHENTICATED | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] --> |dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A -->|Not dsERR_NONE| A1[Test Case Fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetHDCPStatus API with handle] + C -->|dsERR_NONE and HDCP status| D[Verify HDCP status is dsHDCP_STATUS_AUTHENTICATED] + D --> |Iterate through all possible values| B + D -->|End of loop|E[Call dsVideoPortTerm API] + E -->|dsERR_NONE| F[Test Case Success] + E -->|Not dsERR_NONE| E1[Test Case Fail] +``` + +### Test 15 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetHDCPStatus_source`| +|Description|Check the HDCP status of each port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources.| +|Test Group|02| +|Test Case ID|015| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Get the HDCP status using dsGetHDCPStatus() with the valid handle | handle = obtained handle, status = valid pointer | dsERR_NONE | Should be successful | +| 04 | Check if the HDCP status is either dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED | status = obtained status | dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit API] --> |dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A -->|Not dsERR_NONE| A1[Test Case Fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetHDCPStatus API with handle] + C -->|dsERR_NONE and HDCP status| D[Verify HDCP status is dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED] + D --> |Iterate through all possible values| B + D -->|End of loop|E[Call dsVideoPortTerm API] + E -->|dsERR_NONE| F[Test Case Success] + E -->|Not dsERR_NONE| E1[Test Case Fail] +``` + +### Test 16 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifyHDCPProtocolStatus_sink`| +|Description|Check the HDCP protocol status of each port and verify it with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by HDMI port.| +|Test Group|02| +|Test Case ID|16| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | +| 04 | Verify the obtained protocol version with the value from the configuration YAML file | protocolVersion = obtained from previous step | Ports/1/hdcp_protocol_version | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit API] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL port] + Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetHDCPProtocol API and get HDCP protocol version] + Step3 -- dsERR_NONE --> Step5[Compare the version with the value from Sink_4K_VideoPort.yaml file ] + Step5 --> Step6[Call dsVideoPortTerm API] + Step6 -- dsERR_NONE --> End[Test Case Passed] + Step6 -- Not dsERR_NONE --> Fail6[Test Case Failed] +``` + +### Test 17 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_VerifyHDCPProtocolStatus_source`| +|Description|Check the HDCP protocol status of each port and verify it with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by HDMI port.| +|Test Group|02| +|Test Case ID|017| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with HDMI type and index 0 | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | +| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value in "Ports/1/hdcp_protocol_version" | "Ports/1/hdcp_protocol_version" from YAML file | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Start(Start) --> Step1[Call dsVideoPortInit API] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI port] + Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetHDCPProtocol API and get HDCP protocol version] + Step3 -- dsERR_NONE --> Step5[Compare the version with the value from Source_4K_VideoPort.yaml file ] + Step5 --> Step6[Call dsVideoPortTerm API] + Step6 -- dsERR_NONE --> End[Test Case Passed] + Step6 -- Not dsERR_NONE --> Fail6[Test Case Failed] +``` + +### Test 18 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetHdmiPreference_sink`| +|Description|Set the preferred HDCP Protocol version for each valid port and verify it using the get function.| +|Test Group|02| +|Test Case ID|018| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with INTERNAL type and index 0 | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | +| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value in "Ports/1/hdcp_protocol_version" | "Ports/1/hdcp_protocol_version" from YAML file | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|return dsERR_NONE| B[Call dsGetVideoPort] -->|return dsERR_NONE and valid handle| P{Loop through all the valid ports and protocol versions} + A -->|Not dsERR_NONE| C[Test case fail] + P --> D[Call dsSetHdmiPreference API] + D -->|dsERR_NONE| F[Call dsGetHdmiPreference API] --> |Proceed to other values| P + F --> J[Call dsVideoPortTerm API] + J -->|dsERR_NONE| K[Test case success] + J -->|Not dsERR_NONE| L[Test case fail] +``` + +### Test 19 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetHdmiPreference_source`| +|Description|Set the preferred HDCP Protocol version for each valid port and verify it using the get function.| +|Test Group|02| +|Test Case ID|019| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with HDMI type and index 0 | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | +| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value in "Ports/1/hdcp_protocol_version" | "Ports/1/hdcp_protocol_version" from YAML file | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|return dsERR_NONE| B[Call dsGetVideoPort] -->|return dsERR_NONE and valid handle| P{Loop through all the valid ports and protocol versions} + A -->|return not dsERR_NONE| C[Test case fail] + P --> D[Call dsSetHdmiPreference API] + D -->|return dsERR_NONE| F[Call dsGetHdmiPreference API] --> |Proceed to other values| P + F --> J[Call dsVideoPortTerm API] + J -->|return dsERR_NONE| K[Test case success] + J -->|return not dsERR_NONE| L[Test case fail] +``` + +### Test 20 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetColorSpace_sink`| +|Description|Get each port Color Space, compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/colorspaces' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/colorspaces' supported by HDMI port.| +|Test Group|02| +|Test Case ID|20| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get video port handle using dsGetVideoPort() with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0 | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get color space using dsGetColorSpace() with handle obtained from previous step | handle = handle obtained from step 02 | dsERR_NONE | Should be successful | +| 04 | Compare the obtained color space with the value from the configuration YAML file | color_space = value in 'Ports/1/colorspaces' | Value from the configuration YAML file | Should be successful | +| 05 | Terminate video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort with type as dsVIDEOPORT_TYPE_INTERNAL] +A -->|Not dsERR_NONE| A1[Test case fail] +B -->|dsERR_NONE and valid handle| C[Call dsGetColorSpace API] +C -->|dsERR_NONE| D[Compare color space with value from Sink_4K_VideoPort.yaml file] +D --> E[Call dsVideoPortTerm] +E -->|dsERR_NONE| F[Test case success] +E -->|dsERR_NONE| E1[Test case fail] +``` + +### Test 21 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetColorSpace_source`| +|Description|Get each port Color Space, compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/colorspaces' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/colorspaces' supported by HDMI port.| +|Test Group|02| +|Test Case ID|21| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with type as dsVIDEOPORT_TYPE_HDMI and index as 0 | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the color space using dsGetColorSpace() with the handle obtained from previous step | handle = obtained from step 02 | dsERR_NONE | Should be successful | +| 04 | Compare the obtained color space with the value from the configuration YAML file | color_space = value in 'Ports/1/colorspaces' | Value from 'Ports/1/colorspaces' in the YAML file | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoPortInit] -->|return dsERR_NONE| B[Call dsGetVideoPort with type as dsVIDEOPORT_TYPE_HDMI] +A -->|Not dsERR_NONE| A1[Test case fail] +B -->|dsERR_NONE and valid handle| C[Call dsGetColorSpace API] +C -->|dsERR_NONE| D[Compare color space with value from Source_4K_VideoPort.yaml file] +D --> E[Call dsVideoPortTerm] +E -->|dsERR_NONE| F[Test case success] +E -->|Not dsERR_NONE| E1[Test case fail] +``` + +### Test 22 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_CheckColorDepthCapabilities_sink`| +|Description|Check each port Color Depth Capabilities and compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/Supported_color_depth_capabilities' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/Supported_color_depth_capabilities' supported by HDMI port.| +|Test Group|02| +|Test Case ID|22| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, 0 | dsERR_NONE | Should be successful | +| 03 | Check the color depth capabilities using dsColorDepthCapabilities with the obtained handle | handle | dsERR_NONE | Should be successful | +| 04 | Compare the obtained color depth capability with the value from the configuration YAML file | colorDepthCapability = value in 'Ports/1/Supported_color_depth_capabilities' | Check if equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Start(Start) --> Step1[Call dsVideoPortInit API] + Step1 -- "dsERR_NONE" --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] + Step1 -- "Not dsERR_NONE" --> Fail1[Test Case Failed] + Step2 -- "dsERR_NONE and valid handle" --> Step3[Call dsColorDepthCapabilities API with handle] + Step3 -- "dsERR_NONE" --> Step4[Compare if value retrieved from API and Sink_4K_VideoPort.yaml file matches] + Step4 --> Step6[Call dsVideoPortTerm API] + Step6 -- "dsERR_NONE" --> End[Test Case Passed] + Step6 -- "Not dsERR_NONE" --> Fail6[Test Case Failed] +``` + +### Test 23 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_CheckColorDepthCapabilities_source`| +|Description|Check each port Color Depth Capabilities and compare with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/Supported_color_depth_capabilities' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/Supported_color_depth_capabilities' supported by HDMI port.| +|Test Group|02| +|Test Case ID|23| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort with dsVIDEOPORT_TYPE_HDMI and index 0 | dsVIDEOPORT_TYPE_HDMI, 0 | dsERR_NONE | Should be successful | +| 03 | Check the color depth capabilities using dsColorDepthCapabilities with the obtained handle | handle | dsERR_NONE | Should be successful | +| 04 | Compare the obtained color depth capability with the value from the configuration YAML file | colorDepthCapability = value in 'Ports/1/Supported_color_depth_capabilities' | Check if equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Start(Start) --> Step1[Call dsVideoPortInit API] + Step1 -- "dsERR_NONE" --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] + Step1 -- "Not dsERR_NONE" --> Fail1[Test Case Failed] + Step2 -- "dsERR_NONE and valid handle" --> Step3[Call dsColorDepthCapabilities API with handle] + Step3 -- "dsERR_NONE" --> Step4[Compare if value retrieved from API and Source_4K_VideoPort.yaml file matches] + Step4 --> Step6[Call dsVideoPortTerm API] + Step6 -- "dsERR_NONE" --> End[Test Case Passed] + Step6 -- "Not dsERR_NONE" --> Fail6[Test Case Failed] +``` + +### Test 24 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetColorDepth_sink`| +|Description|Get each port Color Depth and verify with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'color_depth' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'color_depth' supported by HDMI port.| +|Test Group|02| +|Test Case ID|24| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with type=dsVIDEOPORT_TYPE_INTERNAL and index=0 | type=dsVIDEOPORT_TYPE_INTERNAL, index=0 | dsERR_NONE | Should be successful | +| 03 | Get the color depth using dsGetColorDepth() with the obtained handle | handle=obtained handle | dsERR_NONE | Should be successful | +| 04 | Verify the obtained color depth with the value from the configuration YAML file | color_depth=value in 'Ports/1/Supported_color_depth_capabilities'| Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_INTERNAL] + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetColorDepth with handle from previous step] + C -->|dsERR_NONE| D[Compare the color depth values from API and Sink_4K_VideoPort.yaml file] + D --> F[Call dsVideoPortTerm] + F -->|dsERR_NONE| G[Test case success] + F -->|Not dsERR_NONE| F1[Test case fail] +``` + +### Test 25 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetColorDepth_source`| +|Description|Get each port Color Depth and verify with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'color_depth' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'color_depth' supported by HDMI port.| +|Test Group|02| +|Test Case ID|25| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with type as dsVIDEOPORT_TYPE_HDMI and index as 0 | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the color depth using dsGetColorDepth() with the handle obtained from previous step | handle = obtained from step 02 | dsERR_NONE | Should be successful | +| 04 | Verify the color depth with the value from the 'Source_4K_VideoPort.yaml' file | color_depth=value in 'Ports/1/Supported_color_depth_capabilities'| Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_HDMI] + A -->|Not dsERR_NONE| A1[Test case fail] + B -->|dsERR_NONE and valid handle| C[Call dsGetColorDepth with handle from previous step] + C -->|dsERR_NONE| D[Compare the color depth values from API and Source_4K_VideoPort.yaml file] + D --> F[Call dsVideoPortTerm] + F -->|dsERR_NONE| G[Test case success] + F -->|Not dsERR_NONE| F1[Test case fail] +``` + +### Test 26 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source`| +|Description|Set preferred color depth for each port and compare get function| +|Test Group|02| +|Test Case ID|26| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get video port handle for each port type using dsGetVideoPort() | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 03 | Set preferred color depth for each color depth type using dsSetPreferredColorDepth() | handle = from step 02, colorDepthSet = dsDISPLAY_COLORDEPTH_8BIT to dsDISPLAY_COLORDEPTH_AUTO | dsERR_NONE | Should be successful | +| 04 | Get preferred color depth using dsGetPreferredColorDepth() | handle = from step 02, colorDepthGet | dsERR_NONE | Should be successful | +| 05 | Compare set and get color depth | colorDepthSet = colorDepthGet | colorDepthSet should be equal to colorDepthGet | Should be successful | +| 06 | Terminate video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit API] + Step1 --> Step{Loop through all possible ports and color depths} --> Step2[Call dsGetVideoPort API] + Step1 -->|Failure| TestcaseFail1[Testcase Fail] + Step2 -->|dsERR_NONE and valid handle| Step3[Call dsSetPreferredColorDepth API] + Step3 -->|dsERR_NONE| Step4[Call dsGetPreferredColorDepth API] + Step4 -->|dsERR_NONE| Step5[Compare color depth values] --> |Continue to next set of values| Step + Step5 -->|End of Iteration| Step7[Call dsVideoPortTerm API] + Step7 -->|dsERR_NONE| End(End) + Step7 -->|Failure| TestcaseFail6[Testcase Fail] +``` + +### Test 27 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetQuantizationRange_sink`| +|Description|Get each port QuantizationRange status and verify with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/quantization_ranges' supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/quantization_ranges' supported by HDMI port.| +|Test Group|02| +|Test Case ID|27| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_INTERNAL as type and 0 as index | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the Quantization Range using dsGetQuantizationRange() with the handle obtained from previous step | handle = obtained from step 02 | dsERR_NONE | Should be successful | +| 04 | Verify the Quantization Range with the value from the configuration YAML file | quantization_range = value in "Ports/1/quantization_ranges" | Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Start(Start) --> Step1[Call dsVideoPortInit] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with dsVIDEOPORT_TYPE_INTERNAL port] + Step1 -- Not dsERR_NONE --> TestcaseFail1[Test case fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetQuantizationRange with handle] + Step3 -- dsERR_NONE and valid quantization range --> Step4[Compare quantization range with Sink_4K_VideoPort.yaml] + Step4 --> Step5[Call dsVideoPortTerm] + Step5 -- dsERR_NONE --> End[Test case success] + Step5 -- Not dsERR_NONE --> TestcaseFail5[Test case fail] +``` + +### Test 28 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetQuantizationRange_source`| +|Description|Get each port QuantizationRange status and verify with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/quantization_ranges' supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/quantization_ranges' supported by HDMI port.| +|Test Group|02| +|Test Case ID|28| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_HDMI as type and 0 as index | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | +| 03 | Get the Quantization Range using dsGetQuantizationRange() with the handle obtained from dsGetVideoPort() | handle = obtained from dsGetVideoPort() | dsERR_NONE | Should be successful | +| 04 | Verify the Quantization Range with the value from the configuration YAML file | quantization_range = quantization_range = value in "Ports/1/quantization_ranges" | Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Start(Start) --> Step1[Call dsVideoPortInit] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with dsVIDEOPORT_TYPE_HDMI port] + Step1 -- Not dsERR_NONE --> TestcaseFail1[Test case fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetQuantizationRange with handle] + Step3 -- dsERR_NONE and valid quantization range --> Step4[Compare quantization range with Source_4K_VideoPort.yaml] + Step4 --> Step5[Call dsVideoPortTerm] + Step5 -- dsERR_NONE --> End[Test case success] + Step5 -- Not dsERR_NONE --> TestcaseFail5[Test case fail] +``` + +### Test 29 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetMatrixCoefficients_sink`| +|Description|Get each port MatrixCoefficients status and verify return dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN for source and with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/matrix_coefficients' supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/matrix_coefficients' supported by HDMI port.| +|Test Group|02| +|Test Case ID|29| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | +| 02 | Get the video port with type=dsVIDEOPORT_TYPE_INTERNAL and index=1 using dsGetVideoPort | type=dsVIDEOPORT_TYPE_INTERNAL, index=1 | dsERR_NONE | Should be successful | +| 03 | Get the Matrix Coefficients with handle obtained from dsGetVideoPort using dsGetMatrixCoefficients | handle=handle obtained from dsGetVideoPort | dsERR_NONE | Should be successful | +| 04 | Verify the Matrix Coefficients with the value from the configuration YAML file | matrix_coefficients='Ports/1/matrix_coefficients'| Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_INTERNAL] + Step1 -- Not dsERR_NONE --> Fail1[Test Case Fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetMatrixCoefficients with handle] + Step3 -- dsERR_NONE --> Step4[Compare the retrieved matrix_coefficients with value from Sink_4K_VideoPort.yaml file] + Step4 --> Step6[Call dsVideoPortTerm] + Step6 -- dsERR_NONE --> End[Test Case Success] + Step6 -- Not dsERR_NONE --> Fail6[Test Case Fail] +``` + +### Test 30 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoPort_GetMatrixCoefficients_source`| +|Description|Get each port MatrixCoefficients status and verify return dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN for source and with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/matrix_coefficients' supported only by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/matrix_coefficients' supported by HDMI port.| +|Test Group|02| +|Test Case ID|30| +|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 :** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | +| 02 | Get the video port handle using dsGetVideoPort() with type as dsVIDEOPORT_TYPE_HDMI and index as 1 | type = dsVIDEOPORT_TYPE_HDMI, index = 1 | dsERR_NONE | Should be successful | +| 03 | Get the Matrix Coefficients using dsGetMatrixCoefficients() with the handle obtained from previous step | handle = obtained from step 02 | dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN | Should be successful | +| 04 | Verify the Matrix Coefficients with the value from the configuration YAML file | matrix_coefficients='Ports/1/matrix_coefficients'| Should be equal | Should be successful | +| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + Step1[Call dsVideoPortInit] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_HDMI] + Step1 -- Not dsERR_NONE --> Fail1[Test Case Fail] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetMatrixCoefficients with handle] + Step3 -- dsERR_NONE --> Step4[Verify matrix_coefficients value is dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN] + Step4 -- dsERR_NONE --> Step5[Compare the retrieved matrix_coefficients with value from Source_4K_VideoPort.yaml file] + Step5 -- dsERR_NONE --> Step6[Call dsVideoPortTerm] + Step6 -- dsERR_NONE --> End[Test Case Success] + Step6 -- Not dsERR_NONE --> Fail6[Test Case Fail] +``` diff --git a/profiles/sink/Sink_4K_VideoPort.yaml b/profiles/sink/Sink_4K_VideoPort.yaml index 21ac8945..f4af15a3 100644 --- a/profiles/sink/Sink_4K_VideoPort.yaml +++ b/profiles/sink/Sink_4K_VideoPort.yaml @@ -1,296 +1,277 @@ -Device: +dsVideoPort: Type: sink - Name: element + Name: TV # OR-ed value of DS module # dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort -Module: 0x2 #dsVideoPort - -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false -dsHost: + Module: 0x2 #dsVideoPort features: extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false - -Number_of_ports: 1 -Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - - 0x08 #INTERNAL - -# 8-Bit, 10-bit and 12 bit -color_depth: 10 - - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range -connectedAOP: 0x03 #dsAUDIOPORT_TYPE_SPEAKER = 0x03 - -defaultResolution: "1080i50" -Ports: - 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL - - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "INTERNAL" - - #if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - - #if hdcp supported @true , if hdcp not supported @false - hdcp_supported: true - - #Number of the supported resolutions - numSupportedResolutions: 3 - - #768p60 - #1080p - #2160p60 - supportedResolutons: - - name : "480i" - #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution - #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution - #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution - #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution - #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution - #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution - pixelResolution: 0 - - #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio - #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio - #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range - aspectRatio : 0 - - #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode - #dsVIDEO_SSMODE_2D = 1 ///< 2D mode - #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode - #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode - #dsVIDEO_SSMODE_MAX ///< Out of range - stereoscopicMode: 1 - - #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate - #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second - #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second - #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second - #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second - #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second - #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second - #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second - #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second - #dsVIDEO_FRAMERATE_MAX ///< Out of range - frameRate: 6 - - #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video - #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video - #dsVIDEO_SCANMODE_MAX ///< Out of range - interlaced: 0 - - - name: "480p" - pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "576p50" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "720p" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "720p50" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "768p60" - pixelResolution: 3 # dsVIDEO_PIXELRES_1366x768 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080p24" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 1 # dsVIDEO_FRAMERATE_24 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080p" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080i50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED - - - name: "1080i" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED - - - name: "2160p30" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 3 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "2160p60" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - defaultResolution: "1080i50" - - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x01 # RGB - - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - - #@a true if display supports surround sound or @a false otherwise - DisplaySurround: true - - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode : 0 - - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x1FFBFB #OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 - - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - #HDR Capabilities: - hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - - #HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - hdcp_protocol_version: 0x01 #VERSION_2X - - - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x02 #FULL - - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x07 #BT_2020_CL \ No newline at end of file + Number_of_ports: 1 + Port_types: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + - 0x08 #INTERNAL + + # 8-Bit, 10-bit and 12 bit + color_depth: 10 + + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connectedAOP: 0x03 #dsAUDIOPORT_TYPE_SPEAKER = 0x03 + + defaultResolution: "1080i50" + Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL + + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "INTERNAL" + + #if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + + #if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + + #Number of the supported resolutions + numSupportedResolutions: 3 + + #768p60 + #1080p + #2160p60 + supportedResolutons: + - name : "480i" + #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution + #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution + #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution + #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution + #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution + #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution + pixelResolution: 0 + + #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio + #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio + #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range + aspectRatio : 0 + + #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode + #dsVIDEO_SSMODE_2D = 1 ///< 2D mode + #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode + #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode + #dsVIDEO_SSMODE_MAX ///< Out of range + stereoscopicMode: 1 + + #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate + #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second + #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second + #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second + #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second + #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second + #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second + #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second + #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second + #dsVIDEO_FRAMERATE_MAX ///< Out of range + frameRate: 6 + + #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video + #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video + #dsVIDEO_SCANMODE_MAX ///< Out of range + interlaced: 0 + + - name: "480p" + pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "576p50" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "720p" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "720p50" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "768p60" + pixelResolution: 3 # dsVIDEO_PIXELRES_1366x768 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080p24" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 1 # dsVIDEO_FRAMERATE_24 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080p" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "1080i50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + + - name: "1080i" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + + - name: "2160p30" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 3 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + - name: "2160p60" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + defaultResolution: "1080i50" + + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x01 # RGB + + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + + #@a true if display supports surround sound or @a false otherwise + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode : 0 + + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1FFBFB #OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + #HDR Capabilities: + hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + + #HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + hdcp_protocol_version: 0x01 #VERSION_2X + + + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL diff --git a/profiles/source/Source_4K_VideoPort.yaml b/profiles/source/Source_4K_VideoPort.yaml index e559da1e..c1aa3251 100644 --- a/profiles/source/Source_4K_VideoPort.yaml +++ b/profiles/source/Source_4K_VideoPort.yaml @@ -1,584 +1,574 @@ -Device: +dsVideoPort: Type: source - Name: xione + Name: STB # OR-ed value of DS module # dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort -Module: 0x2 #dsVideoPort - -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false -dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: + Module: 0x2 #dsVideoPort features: extendedEnumsSupported: false -Number_of_ports: 3 - -Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - - 0x06 # HDMI - - 0x00 # RF - - 0x01 # BB - -# 8-Bit, 10-bit and 12 bit -color_depth: 10 - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range -connectedAOP: 0x01 -defaultResolution: "1080i50" - -Ports: - 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x06 # HDMI - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "HDMI" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: true - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutons: - - name : "480i" - #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution - #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution - #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution - #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution - #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution - #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_MAX - pixelResolution: 0 - - #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio - #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio - #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range - aspectRatio: 0 - - #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode - #dsVIDEO_SSMODE_2D = 1 ///< 2D mode - #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode - #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode - #dsVIDEO_SSMODE_MAX ///< Out of range - stereoscopicMode: 1 - - #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate - #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second - #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second - #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second - #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second - #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second - #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second - #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second - #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second - #dsVIDEO_FRAMERATE_MAX ///< Out of range - frameRate: 6 - - #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video - #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video - #dsVIDEO_SCANMODE_MAX ///< Out of range - interlaced: 0 - - - name: "480p" - pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - name: "576i" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # _INTERLACED - - - name: "576p" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "720p" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - - name: "720p50" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p24" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p25" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_25 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p30" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 9 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p60" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - - name: "1080i50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # _INTERLACED - - - name: "1080i59.94" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 0 # _INTERLACED - - - name: "2160p24" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p25" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_25 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p30" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 9 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p50" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p60" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - defaultResolution: "720p" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x01 # RGB - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: true - - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 2 - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x01 #VERSION_2X - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x02 #FULL - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x07 #BT_2020_CL - - 2: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x00 # dsVIDEOPORT_TYPE_RF - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "RF" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: false - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - - defaultResolution: "480p" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x00 # UNKNOWN - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: false - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 0 - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x0 # NONE - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x0 #UNKNOWN - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x00 #UNKNOWN - - 3: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x01 # dsVIDEOPORT_TYPE_BB - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "BB" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: false - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + Number_of_ports: 1 + + Port_types: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + - 0x06 # HDMI + - 0x00 # RF + - 0x01 # BB + + # 8-Bit, 10-bit and 12 bit + color_depth: 8 + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + connectedAOP: 0x01 + defaultResolution: "1080i50" + + Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x06 # HDMI + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "HDMI" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutons: + - name : "480i" + #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution + #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution + #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution + #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution + #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution + #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_MAX + pixelResolution: 0 + + #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio + #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio + #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range + aspectRatio: 0 + + #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode + #dsVIDEO_SSMODE_2D = 1 ///< 2D mode + #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode + #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode + #dsVIDEO_SSMODE_MAX ///< Out of range + stereoscopicMode: 1 + + #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate + #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second + #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second + #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second + #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second + #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second + #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second + #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second + #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second + #dsVIDEO_FRAMERATE_MAX ///< Out of range + frameRate: 6 + + #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video + #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video + #dsVIDEO_SCANMODE_MAX ///< Out of range + interlaced: 0 + + - name: "480p" + pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + - name: "576i" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # _INTERLACED + + - name: "576p" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "720p" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + + - name: "720p50" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p24" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p25" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_25 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p30" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 9 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "1080p60" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + + - name: "1080i50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # _INTERLACED + + - name: "1080i59.94" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 0 # _INTERLACED + + - name: "2160p24" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p25" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_25 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p30" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 9 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p50" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # _PROGRESSIVE + + - name: "2160p60" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoscopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # _PROGRESSIVE + + defaultResolution: "720p" + + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x05 # RGB + + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x04 # OR value of 8bit, 10 bit, 12 bit and Auto + + # @a true if display supports surround sound or @a false otherwise + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 2 + + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x20 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x01 #VERSION_2X + + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL + + 2: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x00 # dsVIDEOPORT_TYPE_RF + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "RF" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: false + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + + defaultResolution: "480p" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x00 # UNKNOWN + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + DisplaySurround: false + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 0 + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x0 # NONE + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x02 #OUT OF RANGE + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x0 #UNKNOWN + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x00 #UNKNOWN + + 3: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x01 # dsVIDEOPORT_TYPE_BB + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "BB" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: false + # Number of the supported resolutions + numSupportedResolutions: 3 + #"768p60" + #"1080p" + #"2160p60" + supportedResolutionNames: + - "768p60" + - "1080p" + - "2160p60" + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - defaultResolution: "480p" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x00 # UNKNOWN - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: false - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 0 - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x0 # NONE - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x0 #UNKNOWN - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x00 #UNKNOWN \ No newline at end of file + defaultResolution: "480p" + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x00 # UNKNOWN + # Color Depth Capabilities: + #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth + #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth + #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth + #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth + #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth + Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto + # @a true if display supports surround sound or @a false otherwise + DisplaySurround: false + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 0 + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x0 # NONE + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x02 #OUT OF RANGE + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x0 #UNKNOWN + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x00 #UNKNOWN diff --git a/src/main.c b/src/main.c index 98857d06..f9db3667 100644 --- a/src/main.c +++ b/src/main.c @@ -65,37 +65,47 @@ */ #include +#include "test_utils.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); int main(int argc, char** argv) { - int registerReturn = 0; + int registerReturn = 0; - /* Register tests as required, then call the UT-main to support switches and triggering */ - UT_init( argc, argv ); + /* Register tests as required, then call the UT-main to support switches and triggering */ + UT_init( argc, argv ); - /* Check if tests are registered successfully */ + if ( test_utils_parseConfig() == -1 ) + { + printf("\n Failed to parse the configuration file"); + test_utils_parseConfig_term(); + return -1; + } - registerReturn = UT_register_APIDEF_l1_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l1_tests() returned failure"); - return -1; - } + /* Check if tests are registered successfully */ - registerReturn = UT_register_APIDEF_l2_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l2_tests() returned failure"); - return -1; - } + registerReturn = UT_register_APIDEF_l1_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l1_tests() returned failure"); + return -1; + } - /* Begin test executions */ - UT_run_tests(); + registerReturn = UT_register_APIDEF_l2_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l2_tests() returned failure"); + return -1; + } - return 0; + /* Begin test executions */ + UT_run_tests(); + + test_utils_parseConfig_term(); + + return 0; } /** @} */ // End of Device_Settings_MAIN diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index 42ed7841..aad82185 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -87,7 +87,7 @@ */ void test_l2_dsAudio (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index 992b7ec6..d9ad8a17 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -87,7 +87,7 @@ */ void test_l2_dsCompositeIn (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -116,4 +116,4 @@ int test_l2_dsCompositeIn_register ( void ) /** @} */ // End of DS_CompositeIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index bc86d9e1..14733d1d 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -88,7 +88,7 @@ */ void test_l2_dsDisplay (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -118,4 +118,4 @@ int test_l2_dsDisplay_register ( void ) /** @} */ // End of DS_Display_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index c84c9d72..79072ee0 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -88,7 +88,7 @@ */ void test_l2_dsFPD (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -117,4 +117,4 @@ int test_l2_dsFPD_register ( void ) /** @} */ // End of DS_FPD_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 304f48c8..3a6b6aa3 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -87,7 +87,7 @@ */ void test_l2_dsHdmiIn (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsHost.c b/src/test_l2_dsHost.c index 19b8d039..d3fc6f35 100644 --- a/src/test_l2_dsHost.c +++ b/src/test_l2_dsHost.c @@ -88,7 +88,7 @@ void test_l2_dsHost (void) { //This function needs to be implemented! - UT_FAIL(); + UT_FAIL(""); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsVideoDevice.c b/src/test_l2_dsVideoDevice.c index 2f1b73f3..86a94228 100644 --- a/src/test_l2_dsVideoDevice.c +++ b/src/test_l2_dsVideoDevice.c @@ -87,7 +87,7 @@ */ void test_l2_dsVideoDevice (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsVideoPort.c b/src/test_l2_dsVideoPort.c index ac2c316b..c2eaabe2 100644 --- a/src/test_l2_dsVideoPort.c +++ b/src/test_l2_dsVideoPort.c @@ -58,7 +58,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Ref to API Definition specification documentation : [dsVideoPort_halSpec.md](../../docs/pages/dsVideoPort_halSpec.md) * * @endparblock */ @@ -69,48 +69,1106 @@ * */ -#include #include - #include #include +#include +#include + +#include "test_utils.h" +#include "dsVideoPort.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief This test aims to enable disabled video ports and verify their status +* +* In this test, we initialize the video port, get the video port for each type, check if it's enabled. If not, we enable it and verify if it's enabled successfully. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool enabled; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + UT_LOG_DEBUG("Invoking dsIsVideoPortEnabled() with handle: %ld", handle); + ret = dsIsVideoPortEnabled(handle, &enabled); + UT_LOG_DEBUG("Return status: %d, Enabled: %d", ret, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + if (!enabled) + { + UT_LOG_DEBUG("Invoking dsEnableVideoPort() with handle: %ld and enabled: true", handle); + ret = dsEnableVideoPort(handle, true); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsVideoPortEnabled() with handle: %ld", handle); + ret = dsIsVideoPortEnabled(handle, &enabled); + UT_LOG_DEBUG("Return status: %d, Enabled: %d", ret, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, true); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the display and port status of the sink in the L2 dsVideoPort +* +* This test function initializes the video port, gets the video port for each type, checks if the display is connected and if the video port is active, and finally terminates the video port. The test is designed to ensure that the video port functionalities are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool connected, active; + + UT_LOG_DEBUG("Invoking dsVideoPortInit"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsDisplayConnected with handle: %ld", handle); + ret = dsIsDisplayConnected(handle, &connected); + UT_LOG_DEBUG("Return status: %d, Connected: %d", ret, connected); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + /* check for source */ + if(gSourceType == 1) { + UT_ASSERT_EQUAL(connected, false); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(connected, true); + } + + UT_LOG_DEBUG("Invoking dsIsVideoPortActive with handle: %ld", handle); + ret = dsIsVideoPortActive(handle, &active); + UT_LOG_DEBUG("Return status: %d, Active: %d", ret, active); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if(gSourceType == 1) { + UT_ASSERT_EQUAL(connected, false); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(connected, true); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to retrieve and verify the surround mode capabilities of the video port sink +* +* In this test, the dsVideoPortInit() function is invoked to initialize the video port. Then, the dsGetVideoPort() function is called with dsVIDEOPORT_TYPE_INTERNAL and index 0 to get the video port. The dsIsDisplaySurround() function is then invoked with the obtained handle to check if the display is in surround mode. The result is then compared with the expected value. Finally, the dsVideoPortTerm() function is invoked to terminate the video port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool surround; + int surround_mode; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsDisplaySurround() with handle %ld", handle); + ret = dsIsDisplaySurround(handle, &surround); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsIsDisplaySurround() returned %d and surround %d", ret, surround); + + if (gSourceType == 1) { + /*check for source device */ + UT_ASSERT_EQUAL(surround, false); + UT_LOG_DEBUG("Invoking dsGetSurroundMode() with valid handle"); + ret = dsGetSurroundMode(handle, &surround_mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Surround mode: %d and return status: %d", surround_mode, ret); + + UT_ASSERT_EQUAL(surround_mode, dsSURROUNDMODE_NONE); + } + else if(gSourceType == 0){ + /*check for sink device*/ + UT_ASSERT_EQUAL(surround, true); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting the resolution of a video source +* +* This test checks if the dsSetResolution and dsGetResolution functions work as expected. It sets the resolution of a video source and then gets the resolution to verify if the set resolution is correctly applied. This is done for all possible combinations of pixel resolution, aspect ratio, stereoscopic mode, and frame rate. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetResolution_source(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsVideoPortResolution_t setResolution, getResolution; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + for (int i = dsVIDEO_PIXELRES_720x480; i < dsVIDEO_PIXELRES_MAX; i++) + { + for (int j = dsVIDEO_ASPECT_RATIO_4x3; j < dsVIDEO_ASPECT_RATIO_MAX; j++) + { + for (int k = dsVIDEO_SSMODE_UNKNOWN; k < dsVIDEO_SSMODE_MAX; k++) + { + for (int l = dsVIDEO_FRAMERATE_UNKNOWN; l < dsVIDEO_FRAMERATE_MAX; l++) + { + strcpy(setResolution.name, "TestResolution"); + setResolution.pixelResolution = i; + setResolution.aspectRatio = j; + setResolution.stereoScopicMode = k; + setResolution.frameRate = l; + setResolution.interlaced = false; + + UT_LOG_DEBUG("Invoking dsSetResolution() with handle and setResolution"); + ret = dsSetResolution(handle, &setResolution); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsSetResolution() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetResolution() with handle and getResolution"); + ret = dsGetResolution(handle, &getResolution); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetResolution() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Comparing setResolution and getResolution"); + UT_LOG_DEBUG("getResolution.pixelResolution= %d ",getResolution.pixelResolution); + UT_LOG_DEBUG("getResolution.aspectRatio= %d ",getResolution.aspectRatio); + UT_LOG_DEBUG("getResolution.stereoScopicMode= %d ",getResolution.stereoScopicMode); + UT_LOG_DEBUG("getResolution.frameRate= %d ",getResolution.frameRate); + UT_LOG_DEBUG("getResolution.interlaced= %d ",getResolution.interlaced); + + UT_ASSERT_EQUAL(setResolution.pixelResolution, getResolution.pixelResolution); + UT_ASSERT_EQUAL(setResolution.aspectRatio, getResolution.aspectRatio); + UT_ASSERT_EQUAL(setResolution.stereoScopicMode, getResolution.stereoScopicMode); + UT_ASSERT_EQUAL(setResolution.frameRate, getResolution.frameRate); + UT_ASSERT_EQUAL(setResolution.interlaced, getResolution.interlaced); + } + } + } + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the supported TV resolutions +* +* This test verifies if the dsVideoPort API correctly identifies and returns the supported TV resolutions . The test is crucial to ensure the correct functioning of the video port in different resolution settings. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int resolutions; + + UT_LOG_DEBUG("Invoking dsVideoPortInit"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Returned status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSupportedTvResolutions with handle: %ld", handle); + ret = dsSupportedTvResolutions(handle, &resolutions); + UT_LOG_DEBUG("Returned status: %d, resolutions: %d", ret, resolutions); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if(gSourceType == 1) { + UT_ASSERT_EQUAL(resolutions, 0); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(resolutions, gDSVideoPortConfiguration[port].Supported_tv_resolutions_capabilities); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Returned status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for getting HDR capabilities +* +* This test verifies if the dsGetTVHDRCapabilities() function can successfully get the HDR capabilities. The test first initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL and index 0, then gets the HDR capabilities. It asserts that all these operations return dsERR_NONE, and that the obtained capabilities match the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 06@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetHDRCapabilities(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Returned status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetTVHDRCapabilities() with handle: %ld", handle); + ret = dsGetTVHDRCapabilities(handle, &capabilities); + UT_LOG_DEBUG("Returned status: %d, capabilities: %d", ret, capabilities); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + if(gSourceType == 1) { + UT_ASSERT_EQUAL(capabilities, dsHDRSTANDARD_SDR); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(capabilities, gDSVideoPortConfiguration[port].hdr_capabilities); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Returned status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +#if 0 + +/** +* @brief Test for setting and getting the ForceDisable4KSupport for a video port +* +* This test verifies the functionality of the dsSetForceDisable4KSupport() and dsGetForceDisable4KSupport() APIs. +* It checks if the APIs are able to correctly set and retrieve the ForceDisable4KSupport status for a video port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 012@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_sink(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool disable; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + + for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) + { + UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); + ret = dsGetVideoPort(type, 0, &handle); + UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); + continue; + } + for (int i = 0; i < 2; i++) { + disable = (i == 0) ? true : false; + UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); + ret = dsSetForceDisable4KSupport(handle, disable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Return status: %d", ret); + + bool getDisable; + UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); + ret = dsGetForceDisable4KSupport(handle, &getDisable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getDisable, disable); + UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of ForceDisable4KSupport in dsVideoPort +* +* This test function tests the setting and getting of ForceDisable4KSupport in dsVideoPort. It first initializes the video port, then gets the video port with valid parameters. It then sets the ForceDisable4KSupport and gets the same to validate if the set value is correctly retrieved. The test is performed for both true and false values of ForceDisable4KSupport. Finally, it terminates the video port. The test is designed to ensure the correct functioning of the dsSetForceDisable4KSupport and dsGetForceDisable4KSupport functions. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 013@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_source(void) +{ + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool disable; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) + { + UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); + ret = dsGetVideoPort(type, 0, &handle); + UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); + continue; + } + for (int i = 0; i < 2; i++) { + disable = (i == 0) ? true : false; + UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); + ret = dsSetForceDisable4KSupport(handle, disable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Return status: %d", ret); + + bool getDisable; + UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); + ret = dsGetForceDisable4KSupport(handle, &getDisable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getDisable, disable); + UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} +#endif +/** +* @brief This test checks the HDCP status of the video port +* +* This test initializes the video port, gets the video port handle for each type, checks the HDCP status and finally terminates the video port. The test is designed to verify if the HDCP status is authenticated for each video port type. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 007@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetHDCPStatus(void) +{ + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsHdcpStatus_t status; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetHDCPStatus() with handle: %ld", handle); + ret = dsGetHDCPStatus(handle, &status); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetHDCPStatus() failed with error: %d", ret); + continue; + } + UT_LOG_DEBUG("Return status: %d, HDCP Status: %d", ret, status); + + /* check for source */ + if(gSourceType == 1) { + UT_ASSERT_TRUE(status == dsHDCP_STATUS_UNPOWERED || status == dsHDCP_STATUS_PORTDISABLED); + if (status != dsHDCP_STATUS_UNPOWERED || status != dsHDCP_STATUS_PORTDISABLED) { + UT_LOG_ERROR("HDCP status is not unpowered or portdisabled. Status: %d", status); + } + } + else if(gSourceType == 0) { + /*check for sink*/ + UT_ASSERT_EQUAL(status, dsHDCP_STATUS_AUTHENTICATED); + if (status != dsHDCP_STATUS_AUTHENTICATED) { + UT_LOG_ERROR("HDCP status is not authenticated. Status: %d", status); + } + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the HDCP Protocol Status +* +* This test case verifies the HDCP Protocol Status by invoking the dsVideoPortInit, dsGetVideoPort, dsGetHDCPProtocol and dsVideoPortTerm APIs. The HDCP protocol version obtained from the API is compared with the one retrieved from the yaml file. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 008@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) +{ + gTestID = 8; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsHdcpProtocolVersion_t protocolVersion; + + UT_LOG_DEBUG("Invoking dsVideoPortInit"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetHDCPProtocol with handle: %ld", handle); + ret = dsGetHDCPProtocol(handle, &protocolVersion); + UT_LOG_DEBUG("Return status: %d, Protocol Version: %d", ret, protocolVersion); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(protocolVersion, gDSVideoPortConfiguration[port].hdcp_protocol_version); + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the HDMI preference for a video port +* +* In this test, the HDMI preference for each type of video port is set and then retrieved to verify if the set operation was successful. This is done for all types of HDCP protocol versions. The test is important to ensure the correct functioning of the HDMI preference setting and getting operations for different types of video ports and HDCP protocol versions. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 009@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) +{ + gTestID = 9; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsHdcpProtocolVersion_t hdcpCurrentProtocol, hdcpCurrentProtocolGet; + + UT_LOG_DEBUG("Invoking dsVideoPortInit"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + for (hdcpCurrentProtocol = dsHDCP_VERSION_1X; hdcpCurrentProtocol < dsHDCP_VERSION_MAX; hdcpCurrentProtocol++) + { + UT_LOG_DEBUG("Invoking dsSetHdmiPreference with handle: %ld and hdcpCurrentProtocol: %d", handle, hdcpCurrentProtocol); + ret = dsSetHdmiPreference(handle, &hdcpCurrentProtocol); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsSetHdmiPreference failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetHdmiPreference with handle: %ld", handle); + ret = dsGetHdmiPreference(handle, &hdcpCurrentProtocolGet); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetHdmiPreference failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("HDCP protocol version set: %d, HDCP protocol version get: %d", hdcpCurrentProtocol, hdcpCurrentProtocolGet); + UT_ASSERT_EQUAL(hdcpCurrentProtocol, hdcpCurrentProtocolGet); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of dsVideoPort_GetColorSpace +* +* This test is designed to check the correct operation of the dsVideoPort_GetColorSpace function. It does this by initializing the video port, getting the video port with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0, then getting the color space with the handle obtained from the previous step. The test asserts that all these operations return dsERR_NONE, indicating successful operation. The color space obtained is then compared with the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 010@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetColorSpace(void) +{ + gTestID = 10; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsDisplayColorSpace_t color_space; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetColorSpace() with handle obtained from previous step"); + ret = dsGetColorSpace(handle, &color_space); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsGetColorSpace() returned color_space %d and status %d", color_space, ret); + + UT_ASSERT_EQUAL(color_space, gDSVideoPortConfiguration[port].colorspaces); + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to check the color depth capabilities of the video port +* +* This test checks the color depth capabilities of the video port by invoking the dsVideoPortInit, dsGetVideoPort, dsColorDepthCapabilities, and dsVideoPortTerm functions. The test verifies that all these functions return the expected status and that the color depth capability matches the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 011@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) +{ + gTestID = 11; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + unsigned int colorDepthCapability; + + UT_LOG_DEBUG("Invoking dsVideoPortInit"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsColorDepthCapabilities with handle"); + ret = dsColorDepthCapabilities(handle, &colorDepthCapability); + UT_LOG_DEBUG("Return status: %d, Color Depth Capability: %u", ret, colorDepthCapability); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(colorDepthCapability, dsDISPLAY_COLORDEPTH_8BIT); + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of the dsVideoPort_GetColorDepth +* +* In this test, the dsVideoPort_GetColorDepth is tested to ensure it correctly retrieves the color depth of the video port. The test involves initializing the video port, getting the video port with type=dsVIDEOPORT_TYPE_INTERNAL and index=0, getting the color depth, and then terminating the video port. The test asserts that all these operations return dsERR_NONE, indicating successful execution. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 012@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetColorDepth(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + unsigned int color_depth; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetColorDepth() with handle=%ld", handle); + ret = dsGetColorDepth(handle, &color_depth); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsGetColorDepth() returned color_depth=%u and status=%d", color_depth, ret); + + UT_ASSERT_EQUAL(color_depth, gDSvideoPort_color_depth); + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test for setting and getting the preferred color depth of a video port * -* TODO: Add the description of what is tested and why in this test +* This test verifies if the dsSetPreferredColorDepth and dsGetPreferredColorDepth functions work as expected. +* It sets a preferred color depth for a video port and then retrieves it to check if the set and retrieved values match. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 013@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsVideoPort (void) +void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) { - UT_FAIL(This function needs to be implemented!); + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + dsDisplayColorDepth_t colorDepthSet, colorDepthGet; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + for (int j = dsDISPLAY_COLORDEPTH_8BIT; j <= dsDISPLAY_COLORDEPTH_AUTO; j++) + { + colorDepthSet = j; + UT_LOG_DEBUG("Invoking dsSetPreferredColorDepth() with handle %ld and colorDepth %d", handle, colorDepthSet); + ret = dsSetPreferredColorDepth(handle, colorDepthSet); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsSetPreferredColorDepth() failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetPreferredColorDepth() with handle %ld", handle); + ret = dsGetPreferredColorDepth(handle, &colorDepthGet); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetPreferredColorDepth() failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Color depth set: %d, Color depth got: %d", colorDepthSet, colorDepthGet); + UT_ASSERT_EQUAL(colorDepthGet, dsDISPLAY_COLORDEPTH_UNKNOWN); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of dsVideoPort_GetQuantizationRang +* +* This test case is designed to test the dsVideoPort_GetQuantizationRange function. It checks if the function correctly initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL as type and 0 as index, gets the quantization range with the handle obtained from the previous step, and finally terminates the video port. The test asserts that all these operations return dsERR_NONE, indicating successful execution. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 014@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetQuantizationRange(void) +{ + gTestID = 14; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsDisplayQuantizationRange_t quantization_range; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetQuantizationRange() with handle obtained from previous step"); + ret = dsGetQuantizationRange(handle, &quantization_range); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Quantization Range: %d", quantization_range); + + if(gSourceType == 1) { + UT_ASSERT_EQUAL(quantization_range, dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(quantization_range, gDSVideoPortConfiguration[port].quantization_ranges); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the functionality of dsVideoPort_GetMatrixCoefficients API +* +* This test case verifies the functionality of dsVideoPort_GetMatrixCoefficients API. The test case initializes the video port, gets the video port handle, retrieves the matrix coefficients and verifies it with the expected value. The test case also ensures that the API returns the correct status codes at each step. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 015@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_GetMatrixCoefficients(void) +{ + gTestID = 15; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsDisplayMatrixCoefficients_t matrix_coefficients; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", + gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetVideoPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMatrixCoefficients() with handle obtained from previous step"); + ret = dsGetMatrixCoefficients(handle, &matrix_coefficients); + UT_LOG_DEBUG("Return status: %d, Matrix Coefficients: %d", ret, matrix_coefficients); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if(gSourceType == 1) { + UT_ASSERT_EQUAL(matrix_coefficients, dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN); + } + else if(gSourceType == 0) { + UT_ASSERT_EQUAL(matrix_coefficients, gDSVideoPortConfiguration[port].matrix_coefficients); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsVideoPort_register ( void ) + +int test_l2_dsVideoPort_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsVideoPort]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } - - UT_add_test( pSuite, "test_l2_dsVideoPort" ,test_l2_dsVideoPort ); + // Create the test suite + pSuite = UT_add_suite("[L2 dsVideoPort]", NULL, NULL); + if (pSuite == NULL) { + return -1; + } + + UT_add_test( pSuite, "L2_EnableDisabledVideoPorts", test_l2_dsVideoPort_EnableDisabledVideoPorts); + UT_add_test( pSuite, "L2_VerifyDisplayAndPortStatus", test_l2_dsVideoPort_VerifyDisplayAndPortStatus); + UT_add_test( pSuite, "L2_RetrieveAndVerifySurroundModeCapabilities", test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities); + UT_add_test( pSuite, "L2_VerifySupportedTvResolutions", test_l2_dsVideoPort_VerifySupportedTvResolutions); + UT_add_test( pSuite, "L2_GetHDRCapabilities", test_l2_dsVideoPort_GetHDRCapabilities); + UT_add_test( pSuite, "L2_GetHDCPStatus", test_l2_dsVideoPort_GetHDCPStatus); + UT_add_test( pSuite, "L2_VerifyHDCPProtocolStatus", test_l2_dsVideoPort_VerifyHDCPProtocolStatus); + UT_add_test( pSuite, "L2_SetAndGetHdmiPreference", test_l2_dsVideoPort_SetAndGetHdmiPreference); + UT_add_test( pSuite, "L2_GetColorSpace", test_l2_dsVideoPort_GetColorSpace); + UT_add_test( pSuite, "L2_GetColorDepth", test_l2_dsVideoPort_GetColorDepth); + UT_add_test( pSuite, "L2_GetQuantizationRange", test_l2_dsVideoPort_GetQuantizationRange); + UT_add_test( pSuite, "L2_GetMatrixCoefficients", test_l2_dsVideoPort_GetMatrixCoefficients); + if(gSourceType == 1) { + // add the test suite for source type + UT_add_test( pSuite, "L2_SetAndGetResolution_source", test_l2_dsVideoPort_SetAndGetResolution_source); + UT_add_test( pSuite, "L2_SetAndGetPreferredColorDepth_source", test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source); + UT_add_test( pSuite, "L2_CheckColorDepthCapabilities_source", test_l2_dsVideoPort_CheckColorDepthCapabilities_source); + } - return 0; + return 0; } /** @} */ // End of DS_VideoPort_HALTEST_L2 diff --git a/src/test_register.c b/src/test_register.c index 3c509246..910f5a74 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -65,6 +65,7 @@ */ #include +#include "test_utils.h" /** * @brief Register test functionality @@ -93,38 +94,54 @@ extern int test_l2_dsDisplay_register( void ); int UT_register_APIDEF_l1_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l1_dsHost_register(); - registerFailed |= test_l1_dsAudio_register(); - registerFailed |= test_l1_dsVideoDevice_register(); - registerFailed |= test_l1_dsHdmiIn_register(); - registerFailed |= test_l1_dsFPD_register(); - registerFailed |= test_l1_dsVideoPort_register(); - registerFailed |= test_l1_dsCompositeIn_register(); - registerFailed |= test_l1_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l1_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l1_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l1_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l1_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l1_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l1_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l1_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l1_dsDisplay_register(); + + return registerFailed; } /* Register UT Functions */ int UT_register_APIDEF_l2_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l2_dsHost_register(); - registerFailed |= test_l2_dsAudio_register(); - registerFailed |= test_l2_dsVideoDevice_register(); - registerFailed |= test_l2_dsHdmiIn_register(); - registerFailed |= test_l2_dsFPD_register(); - registerFailed |= test_l2_dsVideoPort_register(); - registerFailed |= test_l2_dsCompositeIn_register(); - registerFailed |= test_l2_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l2_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l2_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l2_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l2_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l2_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l2_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l2_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l2_dsDisplay_register(); + + return registerFailed; } /** @} */ // End of Device_Settings_REGISTER /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_utils.c b/src/test_utils.c new file mode 100644 index 00000000..d91d251d --- /dev/null +++ b/src/test_utils.c @@ -0,0 +1,207 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @{ + * @parblock + * + * ### Utility functions for Device Settings HAL : + * + * Utility functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_utils.c +* +*/ +#include +#include +#include +#include +#include "test_utils.h" + +/* Global Variables */ +int32_t gSourceType = -1; + +int32_t gDSModule = 0x0; + +char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE] = {0}; +char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; + + +dsVideoPortConfiguration_t* gDSVideoPortConfiguration = NULL; +int32_t gDSvideoPort_NumberOfPorts = 0; +int32_t gDSvideoPort_color_depth = 0; +int32_t gDSvideoPort_connectedAOP = 0; +//char gDSvideoPort_defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; + +/* Parse Video Configuration file */ +static int test_utils_parse_dsVideoPort() +{ + char key_string[TEST_UTIL_KVP_SIZE]; + ut_kvp_status_t status; + + gDSvideoPort_NumberOfPorts = ut_kvp_getUInt32Field( ut_kvp_profile_getInstance(), "dsVideoPort/Number_of_ports" ); + gDSvideoPort_color_depth = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoPort/color_depth" ); + gDSvideoPort_connectedAOP = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoPort/connectedAOP" ); + + gDSVideoPortConfiguration = (dsVideoPortConfiguration_t*) calloc(gDSvideoPort_NumberOfPorts, sizeof(dsVideoPortConfiguration_t)); + if(gDSVideoPortConfiguration == NULL) { + UT_LOG_ERROR("Failed to allocate memory for Video Port configuration structure"); + return -1; + } + + for(int i = 0; i < gDSvideoPort_NumberOfPorts; i++) { + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Typeid" , i+1); + gDSVideoPortConfiguration[i].typeid = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Index" , i+1); + gDSVideoPortConfiguration[i].index = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Name" , i+1); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoPortConfiguration[i].port_name, DS_VIDEO_PORT_NAME_SIZE); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/dtcp_supported" , i+1); + gDSVideoPortConfiguration[i].dtcp_supported = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_supported" , i+1); + gDSVideoPortConfiguration[i].hdcp_supported = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/numSupportedResolutions" , i+1 ); + gDSVideoPortConfiguration[i].numSupportedResolutions = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/defaultResolution" , i+1); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoPortConfiguration[i].defaultResolution, TEST_UTIL_DEVICE_NAME_SIZE); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/colorspaces" , i+1 ); + gDSVideoPortConfiguration[i].colorspaces = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_color_depth_capabilities" , i+1 ); + gDSVideoPortConfiguration[i].Supported_color_depth_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/DisplaySurround" , i+1); + gDSVideoPortConfiguration[i].DisplaySurround = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/SurroundMode" , i+1 ); + gDSVideoPortConfiguration[i].SurroundMode = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_tv_resolutions_capabilities" , i+1 ); + gDSVideoPortConfiguration[i].Supported_tv_resolutions_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdr_capabilities" , i+1 ); + gDSVideoPortConfiguration[i].hdr_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_protocol_version" , i+1 ); + gDSVideoPortConfiguration[i].hdcp_protocol_version = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/quantization_ranges" , i+1 ); + gDSVideoPortConfiguration[i].quantization_ranges = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/matrix_coefficients" , i+1 ); + gDSVideoPortConfiguration[i].matrix_coefficients = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + } + if(status);//warning fix + return 0; +} + +/* Parse configuration file */ +int test_utils_parseConfig() +{ + ut_kvp_status_t status; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", gDeviceType, TEST_UTIL_DEVICE_TYPE_SIZE); + UT_LOG_DEBUG("gDeviceType: %s ",gDeviceType); + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_UTIL_TYPE_SOURCE_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_UTIL_TYPE_SINK_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Name", gDeviceName, TEST_UTIL_DEVICE_NAME_SIZE); + + UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDeviceName); + + gDSModule = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), "dsVideoPort/Module"); + UT_LOG_DEBUG("gDSModule: %d dsVideoPort:%d ",gDSModule,dsVideoPort); + if(gDSModule & dsVideoPort) { + status = test_utils_parse_dsVideoPort(); + if (status != UT_KVP_STATUS_SUCCESS ) { + UT_LOG_ERROR("Failed to parse dsAudio configurations"); + return -1; + } + } + + return 0; +} + +void test_utils_parseConfig_term() +{ + if(gDSVideoPortConfiguration) { + free(gDSVideoPortConfiguration); + } +} + +/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_utils.h b/src/test_utils.h new file mode 100644 index 00000000..7738ed81 --- /dev/null +++ b/src/test_utils.h @@ -0,0 +1,132 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @{ + * @parblock + * + * ### Utility functions for Device Settings HAL : + * + * Utility functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_utils.h +* +*/ +#ifndef __TEST_UTILS_H__ +#define __TEST_UTILS_H__ + +#include "dsVideoPort.h" + +#define TEST_UTIL_KVP_SIZE 256 +#define TEST_UTIL_DEVICE_TYPE_SIZE 8 +#define TEST_UTIL_DEVICE_NAME_SIZE 64 +#define TEST_UTIL_DS_MODULE_NAME_SIZE 32 + +#define TEST_UTIL_TYPE_SOURCE_VALUE "source" +#define TEST_UTIL_TYPE_SINK_VALUE "sink" + +#define DS_VIDEO_PORT_NAME_SIZE 32 +#define dsVideoPortRESOLUTION_NUMMAX 32 + +/* Video Port configuration */ +typedef struct _dsVideoPortConfiguration_t { + uint16_t typeid; + uint16_t index; + char port_name[DS_VIDEO_PORT_NAME_SIZE]; + bool dtcp_supported; + bool hdcp_supported; + int32_t numSupportedResolutions; + char supportedResolutons[dsVideoPortRESOLUTION_NUMMAX][DS_VIDEO_PORT_NAME_SIZE]; + char defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE]; + int32_t colorspaces; + int32_t Supported_color_depth_capabilities; + bool DisplaySurround; + int32_t SurroundMode; + int32_t Supported_tv_resolutions_capabilities; + int32_t hdr_capabilities; + int32_t hdcp_protocol_version; + int32_t quantization_ranges; + int32_t matrix_coefficients; +}dsVideoPortConfiguration_t; + +typedef enum _dsModule_t { + dsAudioPort = (0x1 << 0), + dsVideoPort = (0x1 << 1), + dsComposite = (0x1 << 2), + dsHdmiIn = (0x1 << 3), + dsVideoDevice = (0x1 << 4), + dsDisplay = (0x1 << 5), + dsFPD = (0x1 << 6), + dsHost = (0x1 << 7), +}dsModule_t; + +/* Global variables */ +extern char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE]; +extern char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE]; +extern int32_t gSourceType; +extern int32_t gDSModule; + +extern dsVideoPortConfiguration_t* gDSVideoPortConfiguration; +extern int32_t gDSvideoPort_NumberOfPorts; +extern int32_t gDSvideoPort_color_depth; +extern int32_t gDSvideoPort_connectedAOP; +//extern char gDSvideoPort_defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE]; + +/*Function prototypes */ +int test_utils_parseConfig(); +void test_utils_parseConfig_term(); + +#endif //__TEST_UTILS_H__ +/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file From 221375929df3a38822af9451ac2ebc23264957ce Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:58:11 +0100 Subject: [PATCH 46/64] gh #23 Added profiles --- ...ront-panel-display_High-Level_TestSpec.md} | 24 ++++++++------- profiles/sink/Sink_FPD.yaml | 25 ++++++++++++++++ profiles/source/Source_FPD.yaml | 29 +++++++++++++++++++ 3 files changed, 67 insertions(+), 11 deletions(-) rename docs/pages/{ds-fpd_TestSpec.md => ds-front-panel-display_High-Level_TestSpec.md} (73%) create mode 100644 profiles/sink/Sink_FPD.yaml create mode 100644 profiles/source/Source_FPD.yaml diff --git a/docs/pages/ds-fpd_TestSpec.md b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md similarity index 73% rename from docs/pages/ds-fpd_TestSpec.md rename to docs/pages/ds-front-panel-display_High-Level_TestSpec.md index 80de543b..37d85386 100644 --- a/docs/pages/ds-fpd_TestSpec.md +++ b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md @@ -31,6 +31,8 @@ High-level overview: - It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. Interface specification is available here: [ds-fdp HAl Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-front-panel-display_halSpec.md) +`Note: There will be no test case implemented to verify the 7-segment front panel display LEDs.` + ## Testing Scope |#|Test Functionality|Test Description| @@ -48,9 +50,9 @@ Interface specification is available here: [ds-fdp HAl Spec](https://github.com/ |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness(), dsGetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness(), dsGetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` Brightness Control @@ -72,8 +74,8 @@ Read the brightness intensity of the `LED` when set to a different level and com |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the blink functionality of discrete `LED` and verify Blink interval with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`NA`|`Y`|`Y`|`Y`|`Y`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the blink functionality of discrete `LED` and verify Blink interval with help of control plane.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`Y`|`NA`|`Y`|`Y`|`NA`| ### Test Startup Requirement-Discrete `LED` blink control @@ -93,10 +95,10 @@ Read the Blink interval from the `LED` detector device. |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` |dsGetFPState(), dsSetFPState(), dsSetFPColor(), dsGetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. if the indicator is `multi-colored`, set it to `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the color functionality of discrete `LED` available by setting and verify Blink interval with help of control plane. |dsGetFPState(), dsSetFPState(), dsSetFPColor()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor(), dsGetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and verify Blink interval with help of control plane. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` color control @@ -117,8 +119,8 @@ The control panel should be able to read the color of the `LED` through the spec |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.|dsFPGetSupportedLEDStates(), dsFPSetLEDState(), dsFPGetLEDState()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state with control plane. 4. Ensure each state transition is valid.|dsFPGetSupportedLEDStates(), dsFPSetLEDState()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.Note: 1.For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedLEDStates`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedLEDStates`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState(), dsFPGetLEDState()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state with control plane. 4. Ensure each state transition is valid.Note: For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedLEDStates`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedLEDStates`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete Power `LED` control diff --git a/profiles/sink/Sink_FPD.yaml b/profiles/sink/Sink_FPD.yaml new file mode 100644 index 00000000..6e509e78 --- /dev/null +++ b/profiles/sink/Sink_FPD.yaml @@ -0,0 +1,25 @@ +dsFPD: + Type: sink + Name: element + SupportedFPDIndicators : + - dsFPD_INDICATOR_POWER + dsFPD_INDICATOR_POWER : + MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs + MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs + DEFAULT_LEVELS : 10 # Default Brightness level for the FP text display + MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling + DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) + supportedColors : + - dsFPD_COLOR_RED + 7segement_display_Support : false + SupportedLEDStates: 0x1FE + #dsFPD_LED_DEVICE_NONE, ///< Default state + #dsFPD_LED_DEVICE_ACTIVE, ///< Device is active + #dsFPD_LED_DEVICE_STANDBY, ///< Device is in standby mode + #dsFPD_LED_DEVICE_WPS_CONNECTING, ///< Device connecting to WPS + #dsFPD_LED_DEVICE_WPS_CONNECTED, ///< Device connected to WPS + #dsFPD_LED_DEVICE_WPS_ERROR, ///< Error when trying to connect to WPS + #dsFPD_LED_DEVICE_FACTORY_RESET, ///< Reset Device to factory base + #dsFPD_LED_DEVICE_USB_UPGRADE, ///< Updating from USB drive + #dsFPD_LED_DEVICE_SOFTWARE_DOWNLOAD_ERROR, ///< Error in downloading new software update + #dsFPD_LED_DEVICE_MAX ///< Out of range \ No newline at end of file diff --git a/profiles/source/Source_FPD.yaml b/profiles/source/Source_FPD.yaml new file mode 100644 index 00000000..a0bd6f5d --- /dev/null +++ b/profiles/source/Source_FPD.yaml @@ -0,0 +1,29 @@ +dsFPD: + Type: source + Name: xi-one + SupportedFPDIndicators : + - dsFPD_INDICATOR_POWER + dsFPD_INDICATOR_POWER : + MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs + MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs + DEFAULT_LEVELS : 1 # Default Brightness level for the FP text display + MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling + DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) + MULTI_COLOR_MODE : 2 + supportedColors : + - dsFPD_COLOR_GREEN + - dsFPD_COLOR_RED + - dsFPD_COLOR_ORANGE + - dsFPD_COLOR_WHITE + SupportedLEDStates: 0x1FE + #dsFPD_LED_DEVICE_NONE, ///< Default state + #dsFPD_LED_DEVICE_ACTIVE, ///< Device is active + #dsFPD_LED_DEVICE_STANDBY, ///< Device is in standby mode + #dsFPD_LED_DEVICE_WPS_CONNECTING, ///< Device connecting to WPS + #dsFPD_LED_DEVICE_WPS_CONNECTED, ///< Device connected to WPS + #dsFPD_LED_DEVICE_WPS_ERROR, ///< Error when trying to connect to WPS + #dsFPD_LED_DEVICE_FACTORY_RESET, ///< Reset Device to factory base + #dsFPD_LED_DEVICE_USB_UPGRADE, ///< Updating from USB drive + #dsFPD_LED_DEVICE_SOFTWARE_DOWNLOAD_ERROR, ///< Error in downloading new software update + #dsFPD_LED_DEVICE_MAX ///< Out of range + 7segement_display_Support : false From b7db743a8ed0d63e2810137f8898ac4ad890d069 Mon Sep 17 00:00:00 2001 From: drissya-k <167057835+drissya-k@users.noreply.github.com> Date: Thu, 9 May 2024 17:09:20 +0530 Subject: [PATCH 47/64] Enhanced Error Code Flag Support From 77314877afe92e84ca24c574e38e781b994875f9 Mon Sep 17 00:00:00 2001 From: drissya-k <167057835+drissya-k@users.noreply.github.com> Date: Thu, 9 May 2024 17:13:30 +0530 Subject: [PATCH 48/64] Adding Enhanced Error Code Flag Support From a344f171573bf19bf491196c3dee811794582cf4 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:38:19 +0100 Subject: [PATCH 49/64] Updated the test specification and the configuration file --- docs/pages/dsHost_TestSpecification.md | 26 +++++----- ...viceSettingsExtendedEnumsNotSupported.yaml | 19 ------- profiles/edidExample.yaml | 0 profiles/sink/Sink_HostSettings.yaml | 52 +++++++++++++++++++ profiles/source/Source_HostSettings.yaml | 36 +++++++++++++ profiles/tempatureSettings.yaml | 0 6 files changed, 101 insertions(+), 32 deletions(-) delete mode 100644 profiles/deviceSettingsExtendedEnumsNotSupported.yaml delete mode 100644 profiles/edidExample.yaml create mode 100644 profiles/sink/Sink_HostSettings.yaml create mode 100644 profiles/source/Source_HostSettings.yaml delete mode 100644 profiles/tempatureSettings.yaml diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md index 94077cae..f4049918 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/dsHost_TestSpecification.md @@ -54,10 +54,10 @@ High level overview: ## Retrieve CPU Temperature -|Description|HAL APIs|L2|L3|Control plane requirements| -|-----------|--------|--|--|--------------------------| -|Invoke the module to retrieve `CPU` temperature, verify the returned temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on the test profile|dsGetCPUTemperature|Y|N|N| -|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information while within abnormal temperatures based on the test profile, see ../../profiles/TempatureSettings.yaml |dsGetCPUTemperature|N|Y|N| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the CPU temperature and check weather the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on "cpuTemperature" value in the configuration yaml|dsGetCPUTemperature|Y|N|Y|Y|N| +|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information|dsGetCPUTemperature|N|Y|Y|Y|Y| ### Test Startup Requirement - Retrieve CPU Temperature @@ -69,13 +69,13 @@ None ### Control Plane Requirement - Retrieve CPU Temperature -None +Control external heat/cold chambers ## Obtain SoC ID -|Description|HAL APIs|L2|L3|Control plane requirements| -|-----------|--------|--|--|--------------------------| -|Trigger the module to obtain `SoC` ID and verify the returned ID matches the expected format and length based on the configuration file.|dsGetSocIDFromSDK|Y|N|N| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the `SoC` ID and verify with "socID" value in configuration yaml file.|dsGetSocIDFromSDK|Y|N|Y|Y|N| ### Test Startup Requirement-Obtain SoC ID @@ -91,9 +91,9 @@ None ## Fetch Host EDID -|Description|HAL APIs|L2|L3|Control plane requirements| -|-----------|--------|--|--|--------------------------| -|Call the module function dsGetHostEDID() to fetch the host `EDID`. Verify the retrieved `EDID` data corresponds to the capabilities and specifications of the host device. Each device will have it's own `EDID` that is supports. I.E. Two devices with the same resolution and size will have the same `EDID` values. If the devices are not the same size, resolution, and device type they will not have the same `EDID` value. The retrieved `EDID` values will be compared against those within the configuration file.|dsGetHostEDID|Y|N|N| +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the host EDID bytes and validate the EDID bytes and length with the "edidBytes" and "edidbytesLength" values from the configuration yaml file|dsGetHostEDID|Y|N|N|Y|N| ### Test Startup Requirement - Fetch Host EDID @@ -101,8 +101,8 @@ Launch the test with the predefined configuration set of results. ### Emulator Requirement - Fetch Host EDID -Emulator will boot with the `EDID` coming from the configuration file. Each +Emulator will boot with the `EDID` coming from the configuration file. ### Control Plane Requirement - Fetch Host EDID -None \ No newline at end of file +None diff --git a/profiles/deviceSettingsExtendedEnumsNotSupported.yaml b/profiles/deviceSettingsExtendedEnumsNotSupported.yaml deleted file mode 100644 index 00a95f37..00000000 --- a/profiles/deviceSettingsExtendedEnumsNotSupported.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false -dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false \ No newline at end of file diff --git a/profiles/edidExample.yaml b/profiles/edidExample.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/profiles/sink/Sink_HostSettings.yaml b/profiles/sink/Sink_HostSettings.yaml new file mode 100644 index 00000000..521e3eed --- /dev/null +++ b/profiles/sink/Sink_HostSettings.yaml @@ -0,0 +1,52 @@ +Device: + Type: sink + Name: element + +# OR-ed value of DS module +# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort +Module: 0x80 #dsHost + +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false + +#soc ID +socID: "ABC32343" +#cpu temperatures in centigrade [min, max] +cpuTemperature: [30, 65] +# edid bytes data +edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 + ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 + 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 + 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 + 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 + 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 + 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc + 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f + + 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 + 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 + 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 + 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 + 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 + 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 + 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 + 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" +# length of the edid bytes +edidbytesLength: 256 \ No newline at end of file diff --git a/profiles/source/Source_HostSettings.yaml b/profiles/source/Source_HostSettings.yaml new file mode 100644 index 00000000..cb6294b3 --- /dev/null +++ b/profiles/source/Source_HostSettings.yaml @@ -0,0 +1,36 @@ +Device: + Type: sink + Name: element + +# OR-ed value of DS module +# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort +Module: 0x80 #dsHost + +# Profile for L1 +dsAudio: + features: + extendedEnumsSupported: false +dsHdmiIn: + features: + extendedEnumsSupported: false +dsVideoDevice: + features: + extendedEnumsSupported: false +dsDisplay: + features: + extendedEnumsSupported: false +dsHost: + features: + extendedEnumsSupported: false +dsVideoPort: + features: + extendedEnumsSupported: false + +#soc ID +socID: "ABC32343" +#cpu temperatures in centigrade [min, max] +cpuTemperature: [30, 65] +# edid bytes data +edidBytes: "" +# length of the edid bytes +edidbytesLength: 0 \ No newline at end of file diff --git a/profiles/tempatureSettings.yaml b/profiles/tempatureSettings.yaml deleted file mode 100644 index e69de29b..00000000 From 745977e38950605a0a08c83c03017e9f30b18617 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:46:03 +0100 Subject: [PATCH 50/64] Update dsHost_TestSpecification.md --- docs/pages/dsHost_TestSpecification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/dsHost_TestSpecification.md index f4049918..d155c28b 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/dsHost_TestSpecification.md @@ -56,7 +56,7 @@ High level overview: |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Get the CPU temperature and check weather the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on "cpuTemperature" value in the configuration yaml|dsGetCPUTemperature|Y|N|Y|Y|N| +|Get the CPU temperature and check weather the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on maximum and minimum values of "cpuTemperature" in the configuration yaml|dsGetCPUTemperature|Y|N|Y|Y|N| |Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information|dsGetCPUTemperature|N|Y|Y|Y|Y| ### Test Startup Requirement - Retrieve CPU Temperature From 2d7f03a378a32c594364b9c5a2b1fa92853e5ec5 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Sun, 16 Jun 2024 21:41:44 +0100 Subject: [PATCH 51/64] gh #10 CompositeIn L2 spec and Test Code --- ... => ds-compositeIn-High-Level_TestSpec.md} | 4 +- .../ds-compositeIn-L2-Low-Level_TestSpec.md | 167 ++++++++++++ .../include/sink/Panel_CompositeInput.yaml | 12 - profiles/sink/Panel_CompositeInput.yaml | 13 + src/test_l2_dsCompositeIn.c | 252 +++++++++++++++--- 5 files changed, 395 insertions(+), 53 deletions(-) rename docs/pages/{dsComposite_test_spec.md => ds-compositeIn-High-Level_TestSpec.md} (98%) create mode 100644 docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md delete mode 100644 profiles/include/sink/Panel_CompositeInput.yaml create mode 100644 profiles/sink/Panel_CompositeInput.yaml diff --git a/docs/pages/dsComposite_test_spec.md b/docs/pages/ds-compositeIn-High-Level_TestSpec.md similarity index 98% rename from docs/pages/dsComposite_test_spec.md rename to docs/pages/ds-compositeIn-High-Level_TestSpec.md index e2a74c90..6cbf94e3 100644 --- a/docs/pages/dsComposite_test_spec.md +++ b/docs/pages/ds-compositeIn-High-Level_TestSpec.md @@ -46,7 +46,7 @@ High level overview: |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| -|Ensure that the function returns the expected number of COMPOSITE input ports by comparing the input port values parsed from the configuration YAML file 'Panel_CompositeInput.yaml'. The value to be retrieved from the YAML is 'composite_input_configurations.number_of_ports'. |dsCompositeInGetNumberOfInputs|Y|N|N| +|Ensure that the function returns the expected number of COMPOSITE input ports by comparing the input port values parsed from the configuration YAML file 'Panel_CompositeInput.yaml'. The value to be retrieved from the YAML is 'composite_input_configurations/number_of_ports'. |dsCompositeInGetNumberOfInputs|Y|N|N| ### Emulator Requirement - Get Number of Inputs @@ -119,7 +119,7 @@ Emulator will boot with the port informations coming from the configuration file |Description|HAL APIs|L2|L3|Control plane requirements| |-----------|--------|--|--|--------------------------| |Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a COMPOSITE Input port is connected or disconnected.|dsCompositeInRegisterConnectCB|N|Y|Y| -|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t, if the connected port is active and presents video after being connected.|dsCompositeInRegisterConnectCB|N|Y|Y| +|Verify that the callback function properly updates the isPresented status in `dsCompositeInStatus_t`, if the connected port is active and presents video after being connected.|dsCompositeInRegisterConnectCB|N|Y|Y| ### Test Startup Requirement - Callback for connection Status diff --git a/docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md b/docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md new file mode 100644 index 00000000..389d8245 --- /dev/null +++ b/docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md @@ -0,0 +1,167 @@ +# Device Settings Composite Input L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the Low Level L2 Test Specification and Procedure for the Device Settings Composite Input module. + +### 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 + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [ds-compositeIn-High-Level_TestSpec.md](https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/docs/pages/ds-compositeIn-High-Level_TestSpec.md) +- `HAL Interface file` - [dsCompositeIn Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsCompositeIn_GetNumberOfInputs`| +|Description|Ensure that the function returns the expected number of COMPOSITE input ports by comparing the input port values parsed from the configuration YAML file for the platform under test. The value to be retrieved from the YAML is `dsCompositeIn/composite_input_configurations/number_of_ports`.| +|Test Group|02| +|Test Case ID|001| +|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 1 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the COMPOSITE Input module using `dsCompositeInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the number of COMPOSITE Input ports using `dsCompositeInGetNumberOfInputs` | numInputs = valid buffer | `dsERR_NONE` | Should be successful | +| 03 | Compare the value returned by `dsCompositeInGetNumberOfInputs` with the value retrieved from the YAML file | numInputs, `dsCompositeIn/composite_input_configurations/number_of_ports` from configuration file | They should match | Should be successful | +| 04 | Terminate the COMPOSITE Input module using `dsCompositeInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB +A[Call dsCompositeInInit] -->|Success| B[Parse 'Panel_CompositeInput.yaml'] +A -->|Failure| A1[Test case fail: dsCompositeInInit failed] +B -->|Success| C[Call dsCompositeInGetNumberOfInputs] +B -->|Failure| B1[Test case fail: Parsing YAML file failed] +C -->|Success| E[Compare num of ports values] +C -->|Failure| C1[Test case fail: dsCompositeInGetNumberOfInputs failed] +E -->|Success| F[Call dsCompositeInTerm] +E -->|Failure| E1[Test case fail] +F -->|Success| G[Test case success] +F -->|Failure| F1[Test case fail: dsCompositeInTerm failed] +``` + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsCompositeIn_VerifyCompositeInputStatus`| +|Description|Verify the status of the Composite Inputs by ensuring it is in disable status.| +|Test Group|02| +|Test Case ID|002| +|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 2 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Composite Input using `dsCompositeInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the status of the Composite Input using `dsCompositeInGetStatus` | status = valid buffer | `dsERR_NONE` | Should be successful | +| 03 | Check if the Composite Input is presented or not | isPresented = false | false | Should be successful | +| 04 | Loop through and check if each of the Composite Input Port existing on the platform is connected or not| status.isPortConnected[Port No] = false | false | Should be successful | +| 05 | Check the active port of the Composite Input | status.activePort = `dsCOMPOSITE_IN_PORT_NONE` | `dsCOMPOSITE_IN_PORT_NONE` | Should be successful | +| 06 | Terminate the Composite Input using `dsCompositeInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB + Step1[Call dsCompositeInInit] -->|dsERR_NONE| Step2[Call dsCompositeInGetStatus] + Step1 -->|Failure| Fail1[Test Case Failed: dsCompositeInInit failed] + Step2 -->|dsERR_NONE| Step3[Check 'isPresented' field] + Step2 -->|Failure| Fail2[Test Case Failed: dsCompositeInGetStatus failed] + Step3 -->|isPresented = false| Step4Loop{Loop through each port as per test profile} --> Step4 + Step3 -->|Failure| Fail3[Test Case Failed: isPresented field check failed] + Step4[Check 'isPortConnected' field] -->|Failure| Fail4[Test Case Failed: isPortConnected field check failed] --> Step5LoopCheck[Loop check] + Step4 -->|Passed| Pass1[isPortConnected field check passed] --> Step5LoopCheck[Loop check] + Step5LoopCheck -->|More ports| Step4Loop + Step5LoopCheck -->|Loop ends| Step6[Check 'activePort' field] + Step6 -->|activePort = dsCOMPOSITE_IN_PORT_NONE| Step7[Call dsCompositeInTerm] + Step6 -->|Failure| Fail5[Test Case Failed: activePort field check failed] + Step7 -->|dsERR_NONE| Step8[Test Case Passed] + Step7 -->|Failure| Fail6[Test Case Failed: dsCompositeInTerm failed] +``` + +### Test 3 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus`| +|Description|Loop through all the existing composite ports on the platform, verify that the function successfully sets the specified COMPOSITE Input port when there is no connection of source device, and check the disable status of the port information using Get status.| +|Test Group|02| +|Test Case ID|003| +|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 3 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the COMPOSITE Input module using `dsCompositeInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Loop through the supported COMPOSITE Input ports on the platform based on the get number of Inputs and select each port using `dsCompositeInSelectPort` | port = `dsCompositeInGetNumberOfInputs` | `dsERR_NONE` | Should be successful | +| 03 | Get the status of the selected COMPOSITE Input port using `dsCompositeInGetStatus` | status = valid buffer | `dsERR_NONE` | Should be successful | +| 04 | Check if the active port is the selected port ,if the port is not presented and if the port is not connected | activePort = port, isPresented = false, isPortConnected = false | activePort = port, isPresented = false, isPortConnected = false | Should be successful | +| 05 | Terminate the COMPOSITE Input module using `dsCompositeInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB + A[Call dsCompositeInInit] -->|Success| B{Loop through
all composite
ports} + A -->|Failure| A1[Test case fail] + B -->|dsCOMPOSITE_IN_PORT_0 to dsCOMPOSITE_IN_PORT_MAX| C[Call dsCompositeInSelectPort
with current port] + C -->|Success| D[Verify function sets
specified COMPOSITE
Input port] + D --> E[Call dsCompositeInGetStatus] + E -->|Success| F[Check disable status of the port] + F --> G{End of Loop?} + G -->|No| B + G -->|Yes| H[Call dsCompositeInTerm] + H -->|Success| I[Test case success] + H -->|Failure| H1[Test case fail] +``` diff --git a/profiles/include/sink/Panel_CompositeInput.yaml b/profiles/include/sink/Panel_CompositeInput.yaml deleted file mode 100644 index 808a66ca..00000000 --- a/profiles/include/sink/Panel_CompositeInput.yaml +++ /dev/null @@ -1,12 +0,0 @@ -Device: - Type: sink - Name: element - -composite_input_configurations: - #dsCOMPOSITE_IN_PORT_NONE = -1, ///< No composite port. - #dsCOMPOSITE_IN_PORT_0, ///< Composite port index 0. - #dsCOMPOSITE_IN_PORT_1, ///< Composite port index 1. - #dsCOMPOSITE_IN_PORT_MAX ///< Out of range - number_of_ports: 1 # Port 0 - ports: - - 0 # dsCOMPOSITE_IN_PORT_0 \ No newline at end of file diff --git a/profiles/sink/Panel_CompositeInput.yaml b/profiles/sink/Panel_CompositeInput.yaml new file mode 100644 index 00000000..471e20df --- /dev/null +++ b/profiles/sink/Panel_CompositeInput.yaml @@ -0,0 +1,13 @@ +dsCompositeIn: + Type: sink + Name: Panel_compositeIn_1_port + features: + extendedEnumsSupported: false + composite_input_configurations: + #dsCOMPOSITE_IN_PORT_NONE = -1, ///< No composite port. + #dsCOMPOSITE_IN_PORT_0, ///< Composite port index 0. + #dsCOMPOSITE_IN_PORT_1, ///< Composite port index 1. + #dsCOMPOSITE_IN_PORT_MAX ///< Out of range + number_of_ports: 1 # Port 0 + ports: + - 0 # dsCOMPOSITE_IN_PORT_0 diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index 37036cb6..9318b4af 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests + * @defgroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests * @{ */ @@ -58,62 +57,237 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-composite-in_halSpec.md](../../docs/pages/ds-composite-in_halSpec.md) * * @endparblock */ + /** * @file test_l2_dsCompositeIn.c * */ -#include -#include - #include #include +#include +#include "dsCompositeIn.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of COMPOSITE Input ports +* +* This test function initializes the COMPOSITE Input module, +* gets the number of COMPOSITE Input ports, compares the returned value with the value +* from the YAML file, and then terminates the COMPOSITE Input module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + uint8_t numInputs = 0; // Initialize to 0. + + // Call the pre-requisite API dsCompositeInInit to initialize the COMPOSITE Input module. + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Call the API dsCompositeInGetNumberOfInputs and pass a pointer to a uint8_t variable to store the number of COMPOSITE Input ports. + ret = dsCompositeInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Invoking dsCompositeInGetNumberOfInputs with valid buffer\n"); + + // Check the return status of dsCompositeInGetNumberOfInputs. It should return dsERR_NONE for success. Any other return value indicates an error. + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get number of COMPOSITE Input ports with error: %d\n", ret); + } + + //composite Input number of inputs + UT_LOG_INFO("Composite Number of Inputs: %d\n", numInputs); + + // Compare the value returned by dsCompositeInGetNumberOfInputs with the value retrieved from the YAML file. They should match. + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numInputs, "dsCompositeIn/composite_input_configurations/number_of_ports"); + + // Call the post-requisite API dsCompositeInTerm to terminate the COMPOSITE Input module. + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the status of the Composite Input +* +* This test function initializes the Composite Input, gets its status, +* checks if it is in disable status and then terminates the Composite Input. +* The purpose of this test is to ensure that the Composite Input is functioning as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_VerifyCompositeInputStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0 + uint8_t numberOfInputs = 0; // Initialize to 0. + + + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + ret = dsCompositeInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInGetStatus()"); + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsCompositeInGetStatus failed with error: %d\n", ret); + } + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + UT_LOG_INFO("IsPortConnected: %d\n", status.isPortConnected[port]); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + UT_LOG_INFO("IsPresented: %d, activePort: %d\n", + status.isPresented, + status.activePort); + + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsCOMPOSITE_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + ret = dsCompositeInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test to verify the selection and status of Composite In Port * -* TODO: Add the description of what is tested and why in this test +* This test verifies the functionality of Composite In Port selection and its status. +* It checks if the port is initialized, selected, and terminated correctly. +* It also checks the status of the port after selection. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ -void test_l2_dsCompositeIn (void) + +void test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0. + uint8_t numberOfInputs = 0; // Initialize to 0. + + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + dsCompositeInTerm(); + return; + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + ret = dsCompositeInSelectPort(port); + UT_LOG_DEBUG("Invoking dsCompositeInSelectPort()"); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to select COMPOSITE Input port %d\n", port); + continue; + } + + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get status of COMPOSITE Input ports\n"); + } + + UT_LOG_INFO("IsPresented: %d, IsPortConnected[0]: %d, activePort: %d\n", + status.isPresented, + status.isPortConnected[port], + status.activePort); + + UT_ASSERT_EQUAL(status.activePort, port); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsCompositeIn_register ( void ) + +int test_l2_dsCompositeIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsCompositeIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + // Create the test suite + pSuite = UT_add_suite("[L2 dsCompositeIn sink devices]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + // List of test function names and strings - - UT_add_test( pSuite, "test_l2_dsCompositeIn" ,test_l2_dsCompositeIn ); + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsCompositeIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_VerifyCompositeInputStatus", test_l2_dsCompositeIn_VerifyCompositeInputStatus); + UT_add_test( pSuite, "L2_VerifyCompositeInPortSelectionAndStatus", test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus); - return 0; -} + return 0; +} /** @} */ // End of DS_CompositeIn_HALTEST_L2 /** @} */ // End of DS_CompositeIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file From 1fc35a98d18634280c68aea026565b37411b6549 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:50:46 +0100 Subject: [PATCH 52/64] gh #18 Update for L2 code & spec --- build.sh | 2 +- .../ds-video-device_High-Level_TestSpec.md | 14 +- .../ds-video-device_L2-Low-Level_TestSpec.md | 328 +++++++++++++ profiles/sink/Sink_VideoDevice.yaml | 30 +- profiles/source/Source_VideoDevice.yaml | 32 +- src/main.c | 60 ++- src/test_l2_dsAudio.c | 2 +- src/test_l2_dsCompositeIn.c | 4 +- src/test_l2_dsDisplay.c | 4 +- src/test_l2_dsFPD.c | 4 +- src/test_l2_dsHdmiIn.c | 2 +- src/test_l2_dsHost.c | 2 +- src/test_l2_dsVideoDevice.c | 429 ++++++++++++++---- src/test_l2_dsVideoPort.c | 2 +- src/test_register.c | 67 ++- src/test_utils.c | 206 +++++++++ src/test_utils.h | 122 +++++ 17 files changed, 1111 insertions(+), 199 deletions(-) create mode 100644 docs/pages/ds-video-device_L2-Low-Level_TestSpec.md create mode 100644 src/test_utils.c create mode 100644 src/test_utils.h diff --git a/build.sh b/build.sh index d3d86227..5dc562bc 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ NC="\e[39m" # When the major version changes in the ut-core, what that signals is that the testings will have to be upgraded to support that version # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your UT-Core Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_PROJECT_MAJOR_VERSION="1." +UT_PROJECT_MAJOR_VERSION="2." # Clone the Unit Test Requirements TEST_REPO=git@github.com:rdkcentral/ut-core.git diff --git a/docs/pages/ds-video-device_High-Level_TestSpec.md b/docs/pages/ds-video-device_High-Level_TestSpec.md index aa1e1b74..6dd2427b 100644 --- a/docs/pages/ds-video-device_High-Level_TestSpec.md +++ b/docs/pages/ds-video-device_High-Level_TestSpec.md @@ -63,8 +63,8 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the zoom mode status|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDFCs)` profile file and verify using get function.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| -||Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDFCs)` profile file and verify using get with Video playback & connected device. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| +|Check the zoom mode status|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDFCs)` profile file and verify using get function.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| +||Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDFCs)` profile file and verify using get with Video playback & connected device. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-Check the Zoom Control @@ -82,7 +82,7 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check `HDR` Capability|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/VideoDevice0/HDRCapabilities)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/NumVideoDevices)`|dsGetHDRCapabilities() |`Y`|`NA`|`Y`|`Y`|`NA`| +|Check `HDR` Capability|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/HDRCapabilities)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`|dsGetHDRCapabilities() |`Y`|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -100,8 +100,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check Video coding Formats and information|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedVideoCodingFormats)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| -||Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/VideoCodecInfo)` profile file.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)`.|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| +|Check Video coding Formats and information|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedVideoCodingFormats)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/VideoCodecInfo)` profile file.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -119,8 +119,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the Display frame rate Capability|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDisplayFramerate)` and verify using get function. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)`.|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| -||Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(VideoDevice/VideoDevice0/SupportedDisplayFramerate)` and check if callbacks are triggered Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(VideoDevice/NumVideoDevices)` |dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Check the Display frame rate Capability|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDisplayFramerate)` and verify using get function. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDisplayFramerate)` and check if callbacks are triggered Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| #### Test Startup Requirement-Check the Display frame rate Capability diff --git a/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md b/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md new file mode 100644 index 00000000..74b73ede --- /dev/null +++ b/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md @@ -0,0 +1,328 @@ +# Device Settings Video Device L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the level 2 testing suite for the Device Settings Video Device module. + +### 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 + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- High Level Test Specification [ds-video-device_High-Level_TestSpec.md](ds-video-device_High-Level_TestSpec.md) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_SetAndGetDFC_source`| +|Description|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/1/SupportedDFCs)` profile file and verify using get| +|Test Group|02| +|Test Case ID|001| +|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 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Get video device handle using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file| dsERR_NONE | Should be successful | +| 03 | Loop through each supported video device and set the zoom mode using dsSetDFC | handle = obtained handle, dfc = dsVIDEO_ZOOM_NONE to dsVIDEO_ZOOM_MAX | dsERR_NONE | Should be successful | +| 04 | Verify the set zoom mode using dsGetDFC | handle = obtained handle, dfc_get = buffer to get dfc | dsERR_NONE, dfc_get = dfc | Should be successful | +| 05 | Terminate video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through
each video device} +A -->|Failure| A1[Test case fail] +B -->|dsERR_NONE| C[ dsGetVideoDevice] +C --> D[Set various zoom mode from
config file - dsSetDFC] +D -->|dsERR_NONE| E[Verify zoom mode -
dsGetDFC] +E -->|dsERR_NONE,
Zoom mode matches| B +B -->|End of loop|F[ dsVideoDeviceTerm] +F -->|dsERR_NONE| G[Test case success] +F -->|Failure| F1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_GetHDRCapabilities_sink`| +|Description|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)`| +|Test Group|02| +|Test Case ID|002| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file, handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Get the HDR capabilities for each video device using dsGetHDRCapabilities | handle = obtained from previous step, capabilities = valid pointer | dsERR_NONE | Should be successful | +| 04 | Verify the obtained HDR capabilities with the profile file | capabilities = obtained from previous step | Value should match with the profile file | Should be successful | +| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} +B -->|dsERR_NONE and valid handle| C[dsGetVideoDevice] +C -->|dsERR_NONE and valid capabilities| D[dsGetHDRCapabilities] +D -->|Verify HDR capabilities| E{End of loop} +E --> B +E -->|dsERR_NONE| F[dsVideoDeviceTerm] +F --> G[Test case success] +A -->|Failure| H[Test case fail] +F -->|Failure| J[Test case fail] +``` + +### Test 3 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_GetHDRCapabilities_source`| +|Description|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)`| +|Test Group|02| +|Test Case ID|003| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file, handle = valid buffer | dsERR_NONE | Should be successful | +| 03 | Get the HDR capabilities for each video device using dsGetHDRCapabilities | handle = obtained from dsGetVideoDevice, capabilities = valid buffer | dsERR_NONE | Should be successful | +| 04 | Verify the obtained HDR capabilities with the profile file | capabilities = obtained from dsGetHDRCapabilities | Equal to the value in the profile file | Should be successful | +| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} +B -->|dsERR_NONE| C[dsGetVideoDevice] +C -->|dsERR_NONE and valid handle| D[dsGetHDRCapabilities] +D -->|dsERR_NONE and valid capabilities| E[Verify HDR capabilities with profile file] +A --> H[Test case fail] +E --> B +B -->|End of loop| I[dsVideoDeviceTerm] +I -->|dsERR_NONE| J[Test case success] +I --> K[Test case fail] +``` + +### Test 4 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_GetSupportedVideoCodingFormats_sink`| +|Description|Loop through each supported video device and get the Video coding format for each video device and verify it with the profile file. For source use `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)` and for the sink use `Sink_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)`| +|Test Group|02| +|Test Case ID|004| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video device using dsVideoDeviceInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through each video device using dsGetVideoDevice() | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | +| 03 | Get the supported video coding formats for each device using dsGetSupportedVideoCodingFormats() | handle = obtained from dsGetVideoDevice() | dsERR_NONE | Should be successful | +| 04 | Verify the obtained supported formats with the profile file | supported_formats = obtained from dsGetSupportedVideoCodingFormats() | dsERR_NONE | Should be successful | +| 05 | Terminate the video device using dsVideoDeviceTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} +A -->|Failure| A1[Test case fail] +B --> C[Call dsGetVideoDevice for each device] +C -->|dsERR_NONE and
handle is valid| D[Call dsGetSupportedVideoCodingFormats
for each device] +D -->|dsERR_NONE and
supported_formats is valid| E[Verify supported_formats
with profile file] +E -->|Match| B +B --> |End of loop|F[Call dsVideoDeviceTerm] +F -->|dsERR_NONE| G[Test case success] +F -->|Failure| F1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_GetSupportedVideoCodingFormats_source`| +|Description|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)`| +|Test Group|02| +|Test Case ID|005| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | +| 03 | For each device, get the supported video coding formats using dsGetSupportedVideoCodingFormats | handle = handle from dsGetVideoDevice | dsERR_NONE | Should be successful | +| 04 | Verify the supported video coding formats with the profile file | supported_formats = supported_formats from dsGetSupportedVideoCodingFormats | dsVideoDevice/device/1/SupportedVideoCodingFormats from Source_VideoDevice.yaml | Should be successful | +| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} +B -->|dsERR_NONE| C[dsGetVideoDevice] +C -->|dsERR_NONE and valid handle| D[dsGetSupportedVideoCodingFormat] +D -->|dsERR_NONE and valid supported_formats| E[Verify supported_formats
with profile file] +E -->|Match| B +B -->|No more devices| H[dsVideoDeviceTerm] +H -->|dsERR_NONE| I[Test case pass] +H -->|Not dsERR_NONE| J[Test case fail] +A -->|Not dsERR_NONE| K[Test case fail] +``` + +### Test 6 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_GetVideoCodecInfo_source`| +|Description|Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(dsVideoDevice/device/1/VideoCodecInfo)` profile file| +|Test Group|02| +|Test Case ID|006| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Loop through each supported video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | +| 03 | Get Video codec information for each video device using dsGetVideoCodecInfo | handle = handle from dsGetVideoDevice, codec = codec | dsERR_NONE | Should be successful | +| 04 | Verify the obtained Video codec information with `Source_VideoDevice.yaml(dsVideoDevice/device/1/VideoCodecInfo)` profile file | info.num_entries = num_entries from dsGetVideoCodecInfo, info.entries from dsGetVideoCode | dsERR_NONE | Should be successful | +| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} +A -->|Failure| A1[Test case fail] +B -->|dsERR_NONE and valid handle| C[Call dsGetVideoCodecInfo with handle] +C -->|dsERR_NONE and info structure populated| D[Verify video codec info
with profile file] +D -->|Success| E[Loop for all supported
video codec formats] +E --> B +B -->|End of loop| F[Call dsVideoDeviceTerm] +F -->|dsERR_NONE| G[Test case success] +F -->|Failure| F1[Test case fail] +``` + +### Test 7 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink`| +|Description|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedDisplayframerate)` and verify using get| +|Test Group|02| +|Test Case ID|007| +|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:** + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | +| 02 | Get video device handle using dsGetVideoDevice with index 0 , Loop through each supported video device| index = 0 to MAX_DEVICES from profile file, handle = valid pointer | dsERR_NONE | Should be successful | +| 03 | Set the supported display frame rate for each video device using dsSetDisplayframerate | handle = obtained handle, framerate = "dsVideoDevice/device/1/SupportedDisplayframerate" | dsERR_NONE | Should be successful | +| 04 | Verify the set frame rate using dsGetCurrentDisplayframerate | handle = obtained handle, framerate = valid pointer | dsERR_NONE | Should be successful | +| 05 | Terminate video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsVideoDeviceInit] -->|dsERR_NONE| B[Call dsGetVideoDevice with index 0] +A -->|Failure| A1[Test case fail] +B -->|dsERR_NONE and valid handle| C{Loop through each
supported video device} +C --> D[Read supported display frame
rate from profile file] +D --> E[Call dsSetDisplayframerate
with handle and frame rate] +E -->|dsERR_NONE| F[Call dsGetCurrentDisplayframerate ] +F -->|dsERR_NONE and frame rate matches| G[Repeat steps for each
supported video device] +G --> C +C --> |End of loop|H[Call dsVideoDeviceTerm] +H -->|dsERR_NONE| I[Test case pass] +H -->|Failure| H1[Test case fail] +``` diff --git a/profiles/sink/Sink_VideoDevice.yaml b/profiles/sink/Sink_VideoDevice.yaml index 313be6f7..81ec7616 100644 --- a/profiles/sink/Sink_VideoDevice.yaml +++ b/profiles/sink/Sink_VideoDevice.yaml @@ -1,8 +1,10 @@ -VideoDevice: +dsVideoDevice: Type: sink - Name: element + Name: TV Module: 0x10 #dsVideoDevice NumVideoDevices: 1 + features: + extendedEnumsSupported: false Device: 1: #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ @@ -28,34 +30,14 @@ VideoDevice: #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + HDRCapabilities: 0x17 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ - SupportedVideoCodingFormats: 6 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedVideoCodingFormats: 0x06 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 SupportedDisplayFramerate: - "60" - "50" - "24" VideoCodecInfo: 0 #Not supported - -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false -dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false diff --git a/profiles/source/Source_VideoDevice.yaml b/profiles/source/Source_VideoDevice.yaml index 442df395..52b5bda8 100644 --- a/profiles/source/Source_VideoDevice.yaml +++ b/profiles/source/Source_VideoDevice.yaml @@ -1,8 +1,10 @@ -VideoDevice: +dsVideoDevice: Type: source - Name: xione + Name: STB Module: 0x10 #dsVideoDevice NumVideoDevices: 1 + features: + extendedEnumsSupported: false Device: 1: #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ @@ -19,7 +21,6 @@ VideoDevice: #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ SupportedDFCs: - - 0 #dsVIDEO_ZOOM_NONE - 1 #dsVIDEO_ZOOM_FULL - 8 #dsVIDEO_ZOOM_PLATFORM DefaultDFC: 1 #dsVIDEO_ZOOM_FULL=1 @@ -31,38 +32,19 @@ VideoDevice: #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - HDRCapabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + HDRCapabilities: 0x07 # OR-ed value of HDR10 | DolbyVision | HLG #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ - SupportedVideoCodingFormats: 7 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 + SupportedVideoCodingFormats: 0x07 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 SupportedDisplayFramerate: 0 #Not supported VideoCodecInfo: num_entries: 1 VideoCodec0: level: 5.1 #HEVC profile level - profile: 1 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 + profile: 2 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN = (0x01 << 0) /*!< 8-bit HEVC video profile. */ #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 = (0x01 << 1) /*!< 10-bit HEVC video profile. */ #dsVIDEO_CODEC_HEVC_PROFILE_MAINSTILLPICTURE = (0x01 << 2) /*!< HECV Main Still Picture profile */ #dsVIDEO_CODEC_HEVC_MAX = (0x01 << 3) /*!< Out of range */ -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false -dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false \ No newline at end of file diff --git a/src/main.c b/src/main.c index 98857d06..224f5ada 100644 --- a/src/main.c +++ b/src/main.c @@ -65,37 +65,47 @@ */ #include +#include "test_utils.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); int main(int argc, char** argv) { - int registerReturn = 0; - - /* Register tests as required, then call the UT-main to support switches and triggering */ - UT_init( argc, argv ); - - /* Check if tests are registered successfully */ - - registerReturn = UT_register_APIDEF_l1_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l1_tests() returned failure"); - return -1; - } - - registerReturn = UT_register_APIDEF_l2_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l2_tests() returned failure"); - return -1; - } - - /* Begin test executions */ - UT_run_tests(); - - return 0; + int registerReturn = 0; + + /* Register tests as required, then call the UT-main to support switches and triggering */ + UT_init( argc, argv ); + UT_LOG("---Start ------"); + if ( test_utils_parseConfig() == -1 ) + { + printf("\n Failed to parse the configuration file"); + test_utils_parseConfig_term(); + return -1; + } + + /* Check if tests are registered successfully */ + + registerReturn = UT_register_APIDEF_l1_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l1_tests() returned failure"); + return -1; + } + + registerReturn = UT_register_APIDEF_l2_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l2_tests() returned failure"); + return -1; + } + + /* Begin test executions */ + UT_run_tests(); + + test_utils_parseConfig_term(); + + return 0; } /** @} */ // End of Device_Settings_MAIN diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index 42ed7841..9924734d 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -87,7 +87,7 @@ */ void test_l2_dsAudio (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index 992b7ec6..37036cb6 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -87,7 +87,7 @@ */ void test_l2_dsCompositeIn (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -116,4 +116,4 @@ int test_l2_dsCompositeIn_register ( void ) /** @} */ // End of DS_CompositeIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index bc86d9e1..c7bbe32d 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -88,7 +88,7 @@ */ void test_l2_dsDisplay (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -118,4 +118,4 @@ int test_l2_dsDisplay_register ( void ) /** @} */ // End of DS_Display_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index c84c9d72..6298ba2f 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -88,7 +88,7 @@ */ void test_l2_dsFPD (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -117,4 +117,4 @@ int test_l2_dsFPD_register ( void ) /** @} */ // End of DS_FPD_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 304f48c8..6ae9931a 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -87,7 +87,7 @@ */ void test_l2_dsHdmiIn (void) { - UT_FAIL(This function needs to be implemented!); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsHost.c b/src/test_l2_dsHost.c index 19b8d039..c8904d7f 100644 --- a/src/test_l2_dsHost.c +++ b/src/test_l2_dsHost.c @@ -88,7 +88,7 @@ void test_l2_dsHost (void) { //This function needs to be implemented! - UT_FAIL(); + UT_FAIL(""); } static UT_test_suite_t * pSuite = NULL; diff --git a/src/test_l2_dsVideoDevice.c b/src/test_l2_dsVideoDevice.c index 2f1b73f3..7c6a9428 100644 --- a/src/test_l2_dsVideoDevice.c +++ b/src/test_l2_dsVideoDevice.c @@ -1,119 +1,384 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** - * @addtogroup HPK Hardware Porting Kit - * @{ - * @par The Hardware Porting Kit - * HPK is the next evolution of the well-defined Hardware Abstraction Layer - * (HAL), but augmented with more comprehensive documentation and test suites - * that OEM or SOC vendors can use to self-certify their ports before taking - * them to RDKM for validation or to an operator for final integration and - * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC - * vendor to self-certify their own Video Accelerator devices, with minimal RDKM - * assistance. - * - */ +* @file test_l2_dsVideoDevice.c +* @page dsVideoDevice Level 2 Tests +* +* ## Module's Role +* This module includes Level 2 functional tests (success and failure scenarios). +* This is to ensure that the dsVideoDevice APIs meet the requirements across all vendors. +* +* **Pre-Conditions:** None@n +* **Dependencies:** None@n +* +* Ref to API Definition specification documentation : [ds-video-device_halSpec.md](../../docs/pages/ds-video-device_halSpec.md) +*/ + +#include +#include +#include +#include +#include + +#include "test_utils.h" +#include "dsVideoDevice.h" + +static int gTestGroup = 2; +static int gTestID = 1; + -/** - * @addtogroup Device_Settings Device Settings Module - * @{ - */ /** - * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests - * @{ - */ +* @brief Test for setting and getting DFC source in dsVideoDevice +* +* This test case is designed to verify the functionality of setting and getting DFC source in dsVideoDevice. +* The test involves initializing the video device, getting the video device, setting the DFC, getting the DFC and terminating the video device. +* The test asserts that the DFC set is the same as the DFC get. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsVideoDevice_SetAndGetDFC_source(void) +{ + dsError_t retStatus; + intptr_t handle; + dsVideoZoom_t dfc_get; + + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + retStatus = dsVideoDeviceInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index: %d", i); + retStatus = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %ld", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with status: %d", retStatus); + continue; + } + for (int j=0;j -#include +void test_l2_dsVideoDevice_GetVideoCodecInfo_source(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); -#include -#include + dsError_t retStatus; + intptr_t handle; + dsVideoCodecInfo_t info; + dsVideoCodingFormat_t codec = dsVIDEO_CODEC_MPEGHPART2; + int j = 1; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + retStatus = dsVideoDeviceInit(); + UT_LOG_DEBUG("dsVideoDeviceInit return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index: %d", i); + retStatus = dsGetVideoDevice(i, &handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + UT_LOG_DEBUG("dsGetVideoDevice return status: %d, handle: %ld", retStatus, handle); + if(retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with error %d", retStatus); + continue; + } + + for(codec = dsVIDEO_CODEC_MPEGHPART2 ; codec < dsVIDEO_CODEC_MAX; ) + { + UT_LOG_DEBUG("Invoking dsGetVideoCodecInfo with handle: %ld, codec: %d", handle, codec); + retStatus = dsGetVideoCodecInfo(handle, codec, &info); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + UT_LOG_DEBUG("dsGetVideoCodecInfo return status: %d, num_entries: %d", retStatus, info.num_entries); + + UT_ASSERT_EQUAL(info.num_entries, gDSVideoDeviceConfiguration[i].num_codec_entries); + if(codec == dsVIDEO_CODEC_MPEGHPART2) + { + UT_LOG_DEBUG("Profile: %d", info.entries->profile); + UT_ASSERT_EQUAL(info.entries->profile,gDSVideoDeviceConfiguration[i].profile); + //TODO : kvp profile support for float type is not available now + //UT_ASSERT_EQUAL(info.entries->level,gDSVideoDeviceConfiguration[i].level); + } + codec = (0x01 << (j++)); + } + } + UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); + retStatus = dsVideoDeviceTerm(); + UT_LOG_DEBUG("dsVideoDeviceTerm return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test to verify the setting and getting of display framerate for dsVideoDevice * -* TODO: Add the description of what is tested and why in this test +* This test case is designed to validate the functionality of dsSetDisplayframerate and dsGetCurrentDisplayframerate APIs. +* The test involves setting a display framerate for a video device and then getting the current display framerate to verify if the set value is correctly retrieved. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 007@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) */ -void test_l2_dsVideoDevice (void) +void test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink(void) { - UT_FAIL(This function needs to be implemented!); + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + char getframerate[50] = {0}; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + ret = dsVideoDeviceInit(); + UT_LOG_DEBUG("dsVideoDeviceInit return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index :%d",i); + ret = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("dsGetVideoDevice return status: %d, handle: %ld", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if(ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with error %d", ret); + continue; + } + + for (int j=0;j +#include "test_utils.h" /** * @brief Register test functionality @@ -93,38 +94,54 @@ extern int test_l2_dsDisplay_register( void ); int UT_register_APIDEF_l1_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l1_dsHost_register(); - registerFailed |= test_l1_dsAudio_register(); - registerFailed |= test_l1_dsVideoDevice_register(); - registerFailed |= test_l1_dsHdmiIn_register(); - registerFailed |= test_l1_dsFPD_register(); - registerFailed |= test_l1_dsVideoPort_register(); - registerFailed |= test_l1_dsCompositeIn_register(); - registerFailed |= test_l1_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l1_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l1_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l1_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l1_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l1_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l1_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l1_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l1_dsDisplay_register(); + + return registerFailed; } /* Register UT Functions */ int UT_register_APIDEF_l2_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l2_dsHost_register(); - registerFailed |= test_l2_dsAudio_register(); - registerFailed |= test_l2_dsVideoDevice_register(); - registerFailed |= test_l2_dsHdmiIn_register(); - registerFailed |= test_l2_dsFPD_register(); - registerFailed |= test_l2_dsVideoPort_register(); - registerFailed |= test_l2_dsCompositeIn_register(); - registerFailed |= test_l2_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l2_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l2_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l2_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l2_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l2_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l2_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l2_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l2_dsDisplay_register(); + + return registerFailed; } /** @} */ // End of Device_Settings_REGISTER /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_utils.c b/src/test_utils.c new file mode 100644 index 00000000..497787a6 --- /dev/null +++ b/src/test_utils.c @@ -0,0 +1,206 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @{ + * @parblock + * + * ### Utility functions for Device Settings HAL : + * + * Utility functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_utils.c +* +*/ +#include +#include +#include +#include + +#include "test_utils.h" + +/* Global Variables */ +int32_t gSourceType = -1; + +int32_t gDSModule = 0x0; + +char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE] = {0}; +char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; + +dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration = NULL; +int32_t gDSvideoDevice_NumVideoDevices; + + +/* Parse Video Device Configuration file */ +static int test_utils_parse_dsVideoDevice() +{ + char key_string[TEST_UTIL_KVP_SIZE]; + ut_kvp_status_t status; + + gDSvideoDevice_NumVideoDevices = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoDevice/NumVideoDevices" ); + + UT_LOG("gDSvideoDevice_NumVideoDevices: %d",gDSvideoDevice_NumVideoDevices); + gDSVideoDeviceConfiguration = (dsVideoDeviceConfiguration_t*) calloc(gDSvideoDevice_NumVideoDevices, sizeof(dsVideoDeviceConfiguration_t)); + if(gDSVideoDeviceConfiguration == NULL) { + UT_LOG_ERROR("Failed to allocate memory for Video Port configuration structure"); + return -1; + } + + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) { + if(gSourceType == 1){ + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs" , i+1); + gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); + UT_LOG("NoOfSupportedDFCs: %d",gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs); + + // loop to get supported SupportedDFCs in array + for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs; j++) { + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs/%d" , i+1 , j); + gDSVideoDeviceConfiguration[i].SupportedDFCs[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + UT_LOG("SupportedDFCs: %d",gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); + } + } + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/DefaultDFC" , i+1); + gDSVideoDeviceConfiguration[i].DefaultDFC = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG("gDSVideoDeviceConfiguration[i].DefaultDFC :%d",gDSVideoDeviceConfiguration[i].DefaultDFC); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/HDRCapabilities" , i+1); + gDSVideoDeviceConfiguration[i].HDRCapabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG("gDSVideoDeviceConfiguration[i].HDRCapabilities :%d",gDSVideoDeviceConfiguration[i].HDRCapabilities); + + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedVideoCodingFormats" , i+1); + gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG("SupportedVideoCodingFormats: %d ",gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); + + if(gSourceType == 0){ + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate" , i+1); + gDSVideoDeviceConfiguration[i].NoOfSupportedDFR = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); + UT_LOG("NoOfSupportedDFR: %d ",gDSVideoDeviceConfiguration[i].NoOfSupportedDFR); + // loop to get supported SupportedDFR in array + for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFR; j++) { + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate/%d" , i+1 , j); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate, sizeof(gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate)); + UT_LOG("SupportedDisplayFramerate: %s ",gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate); + } + } + + UT_LOG("gSourceType %d ",gSourceType); + /* check for only source */ + if(gSourceType == 1){ + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/num_entries" , i+1); + gDSVideoDeviceConfiguration[i].num_codec_entries = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG("num_codec_entries %d",gDSVideoDeviceConfiguration[i].num_codec_entries); + + //snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].level, sizeof(key_string)); + //snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //gDSVideoDeviceConfiguration[i].level = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + //UT_LOG("gDSVideoDeviceConfiguration[i].level:%d",gDSVideoDeviceConfiguration[i].level); + snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/profile" , i+1); + gDSVideoDeviceConfiguration[i].profile = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG("gDSVideoDeviceConfiguration[i].profile :%d",gDSVideoDeviceConfiguration[i].profile); + } + } + + if(status);//warning fix + return 0; +} + +/* Parse configuration file */ +int test_utils_parseConfig() +{ + ut_kvp_status_t status; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", gDeviceType, TEST_UTIL_DEVICE_TYPE_SIZE); + UT_LOG_DEBUG("gDeviceType: %s ",gDeviceType); + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_UTIL_TYPE_SOURCE_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_UTIL_TYPE_SINK_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + gDSModule = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), "dsVideoDevice/Module"); + UT_LOG_DEBUG("gDSModule: %d dsVideoDevice:%d ",gDSModule,dsVideoDevice); + if(gDSModule & dsVideoDevice) { + status = test_utils_parse_dsVideoDevice(); + if (status != UT_KVP_STATUS_SUCCESS ) { + UT_LOG_ERROR("Failed to parse dsAudio configurations"); + return -1; + } + } + + return 0; +} + +void test_utils_parseConfig_term() +{ + if(gDSVideoDeviceConfiguration) { + free(gDSVideoDeviceConfiguration); + } +} + +/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK diff --git a/src/test_utils.h b/src/test_utils.h new file mode 100644 index 00000000..4e8ac37b --- /dev/null +++ b/src/test_utils.h @@ -0,0 +1,122 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @{ + * @parblock + * + * ### Utility functions for Device Settings HAL : + * + * Utility functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_utils.h +* +*/ +#ifndef __TEST_UTILS_H__ +#define __TEST_UTILS_H__ + +#include "dsVideoDevice.h" + +#define TEST_UTIL_KVP_SIZE 256 +#define TEST_UTIL_DEVICE_TYPE_SIZE 8 +#define TEST_UTIL_DEVICE_NAME_SIZE 64 +#define TEST_UTIL_DS_MODULE_NAME_SIZE 32 + +#define TEST_UTIL_TYPE_SOURCE_VALUE "source" +#define TEST_UTIL_TYPE_SINK_VALUE "sink" + + +#define DS_VIDEO_DEVICE_MODULE_NAME "VideoDevice" + +/* Video Device configuration */ +typedef struct _dsVideoDeviceConfiguration_t { + int32_t NoOfSupportedDFCs; + int32_t SupportedDFCs[dsVIDEO_ZOOM_MAX]; + int32_t DefaultDFC; + int32_t HDRCapabilities; + int32_t SupportedVideoCodingFormats; + int32_t NoOfSupportedDFR; + char SupportedDisplayFramerate[dsVIDEO_FRAMERATE_MAX]; + int32_t num_codec_entries; + float level; + int32_t profile; +}dsVideoDeviceConfiguration_t; + +typedef enum _dsModule_t { + dsAudioPort = (0x1 << 0), + dsVideoPort = (0x1 << 1), + dsComposite = (0x1 << 2), + dsHdmiIn = (0x1 << 3), + dsVideoDevice = (0x1 << 4), + dsDisplay = (0x1 << 5), + dsFPD = (0x1 << 6), + dsHost = (0x1 << 7), +}dsModule_t; + +/* Global variables */ +extern char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE]; +extern char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE]; +extern int32_t gSourceType; +extern int32_t gDSModule; + +extern dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration; +extern int32_t gDSvideoDevice_NumVideoDevices; + +/*Function prototypes */ +int test_utils_parseConfig(); +void test_utils_parseConfig_term(); + +#endif //__TEST_UTILS_H__ +/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file From 20382e25c6c7781e915549c4b33419fc5c3e6f10 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:41:10 +0100 Subject: [PATCH 53/64] gh #29: dsAudio - L2 Low level Specification and test implementation Updated dsAudio L2 low level Specification and test implementation --- Makefile | 5 +- build.sh | 4 +- .../ds-audio_High-Level_TestSpecification.md | 354 +++ ...ds-audio_L2_Low-Level_TestSpecification.md | 1451 +++++++++++ .../l2_module_test_specification_template.md | 104 - profiles/sink/Sink_AudioSettings.yaml | 305 +++ profiles/source/Source_AudioSettings.yaml | 85 + src/main.c | 53 +- src/test_dsAudio_parse_configuration.c | 196 ++ src/test_dsAudio_parse_configuration.h | 116 + src/test_l2_dsAudio.c | 2255 ++++++++++++++++- src/test_parse_configuration.c | 150 ++ src/test_parse_configuration.h | 103 + src/test_register.c | 67 +- 14 files changed, 5069 insertions(+), 179 deletions(-) create mode 100644 docs/pages/ds-audio_High-Level_TestSpecification.md create mode 100644 docs/pages/ds-audio_L2_Low-Level_TestSpecification.md delete mode 100644 docs/pages/l2_module_test_specification_template.md create mode 100644 profiles/sink/Sink_AudioSettings.yaml create mode 100644 profiles/source/Source_AudioSettings.yaml create mode 100644 src/test_dsAudio_parse_configuration.c create mode 100644 src/test_dsAudio_parse_configuration.h create mode 100644 src/test_parse_configuration.c create mode 100644 src/test_parse_configuration.h diff --git a/Makefile b/Makefile index 6ef4f638..dd808023 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,8 @@ export HAL_LIB_DIR build: $(SETUP_SKELETON_LIBS) @echo UT [$@] - make -C ./ut-core + make -C ./ut-core framework + make -C ./ut-core test #Build against the real library leads to the SOC library dependency also.SOC lib dependency cannot be specified in the ut Makefile, since it is supposed to be common across may platforms. So in order to over come this situation, creating a template SKELETON library with empty templates so that the template library wont have any other Soc dependency. And in the real platform mount copy bind with the actual library will work fine. skeleton: @@ -74,6 +75,6 @@ list: clean: @echo UT [$@] - make -C ./ut-core clean + make -C ./ut-core cleanall rm -rf $(BIN_DIR)/lib$(HAL_LIB).so rm -rf $(ROOT_DIR)/libs/lib$(HAL_LIB).so diff --git a/build.sh b/build.sh index 5dc562bc..f9dc384a 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ NC="\e[39m" # When the major version changes in the ut-core, what that signals is that the testings will have to be upgraded to support that version # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your UT-Core Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_PROJECT_MAJOR_VERSION="2." +UT_PROJECT_MAJOR_VERSION="3." # Clone the Unit Test Requirements TEST_REPO=git@github.com:rdkcentral/ut-core.git @@ -62,7 +62,7 @@ else check_next_revision cd ./ut-core git checkout ${UT_CORE_PROJECT_VERSION} - ./build.sh + ./build.sh $@ cd .. ./${0} $@ fi diff --git a/docs/pages/ds-audio_High-Level_TestSpecification.md b/docs/pages/ds-audio_High-Level_TestSpecification.md new file mode 100644 index 00000000..eed5e439 --- /dev/null +++ b/docs/pages/ds-audio_High-Level_TestSpecification.md @@ -0,0 +1,354 @@ +# Audio Settings High Level Test Specification Document + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + +## Acronyms, Terms and Abbreviations + +- `HAL` - Hardware Abstraction Layer +- `API` - Application Programming Interface +- `L2` - Level 2 Testing +- `L3` - Level 3 Testing +- `NA` - Not Applicable +- `Y` - Yes +- `DS` - Device Settings +- `Caller` - Any user of the interface via the `APIs` +- `CB` - Call-back function (suffix) +- `ARC` - Audio Return Channel +- `eARC` - Enhanced Audio Return Channel +- `SAD` - Short Audio Descriptor +- `SPDIF` - Sony/Philips Digital Interface +- `HDMI` - High-Definition Multimedia Interface +- `LE` - Loudness Equivalence +- `DRC` - Dynamic Range Control +- `MI` - Media Intelligent +- `MS12` - MultiStream 12 +- `PCM` - Pulse Code Modulation +- `AC3` - Audio Codec 3 +- `EAC3` - Enhanced `AC3` +- `WMA` - Windows Media Audio +- `AAC` - Advanced Audio coding +- `DD` - DOLBY Digital +- `DDPLUS` - DOLBY Digital Plus +- `DAP` - Digital Audio Processing + +## Introduction + +This document provides an overview of the testing requirements for the Audio Settings module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. + +- Interface of the test is available here - [Audio Settings HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAudio.h) +- `HAL` specification in this link - [Audio Settings HAL Specification](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-audio_halSpec.md) + +## Module Description + +The Audio device setting interface provides control to enable or disable Audio Output ports like TV Internal Speakers, `ARC`/`eARC`, Headphones, `SPDIF` and allows `caller` to configure or retrieve various audio parameters like `MS12` `DAP` Capabilities, `MS12` audio profile, stereo mode, audio gain, audio delay, fader control, primary language and secondary language. + +## Testing Scope + +|#|Test Functionality|Description| +|-|------------------|-----------| +|01|[Test Audio Port](#test-audio-port)|Test for audio port configuration| +|02|[Test MS12 `DAP` Capabilities](#test-ms12-dap-capabilities)|Test for MS12 `DAP` capabilities like compression, dialogue enhancement, volume mode, intelligent equalizer, bass enhancer Surround decode, `DRC` mode, Surround Virtualizer, `MI` Steering, Graphic equalizer, `LE` configuration| +|03|[Test MS12 Capabilities](#test-ms12-capabilities)|Test for MS12 capabilities| +|04|[Test `ARC` Support - Sink Device](#test-arc-support---sink-device)|Test for `ARC` Ports| +|05|[Test Stereo Mode Support](#test-stereo-mode-support)|Test for Stereo mode configurations| +|06|[Test Audio Gain and Mute](#test-audio-gain-and-mute)|Test for audio gain level configurations and mute functionality| +|07|[Test Audio Delay](#test-audio-delay)|Test for audio delay configuration| +|08|[Test Atmos Mode](#test-atmos-mode)|Test for audio atmos capabilities| +|09|[Test Audio Format](#test-audio-format)|Test for Audio Formats| +|10|[Test Associated Audio Mixing](#test-associated-audio-mixing)|Test for Associated Audio Mixing| +|11|[Test Primary/Secondary Language](#test-primarysecondary-language)|Test for primary/secondary language configuration| +|12|[Test Audio Mixer Levels](#test-audio-mixer-levels)|Test for Primary and secondary Audio mixer levels| + +## Emulator Requirements + +Boot configuration: Various Audio ports, audio formats, Stereo modes and `Ms12` features supported by device + +- Supported Audio Ports - [dsAudioPortType_t](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L201) +- Supported Audio Encoding Formats - [dsAudioEncoding_t](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L222) +- Supported Stereo Modes - [dsSetStereoMode](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L376) +- Supported `MS12` `DAP` Capabilities - [dsMS12Capabilities_t](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L335) +- Supported `MS12` Profiles - [dsMS12AudioProfileList_t](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L345) +- Supported `ARC` Types - [dsAudioARCTypes_t](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAVDTypes.h#L304) + +## Audio Format Requirements for Playback + +## Test Audio Port + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Enable/disable audio ports and retrieve status for verification|dsGetAudioPort(), dsEnableAudioPort(), dsIsAudioPortEnabled()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Enable/disable audio ports and verify using external analyzer with stream playback|dsGetAudioPort(), dsEnableAudioPort()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, get the handle for dsAUDIOPORT_TYPE_HEADPHONE port, check the connection status. Connection status should be false|dsGetAudioPort(), dsAudioOutIsConnected()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Loop through supported audio ports, get the handle for dsAUDIOPORT_TYPE_HEADPHONE port, check the connection status by connecting/disconnecting the port connections.|dsGetAudioPort(), dsAudioOutIsConnected()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Loop through supported audio ports, get the handle for dsAUDIOPORT_TYPE_HEADPHONE port, Check the connection status with call-back function by connecting/disconnecting the port connection|dsGetAudioPort(), dsAudioOutRegisterConnectCB()|`NA`|`Y`|`NA`|`Y`|`Y`| + +### Test Startup Requirement - Test Audio Port + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Audio Port + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Audio Port + +- Control the external analyzer +- Control the port connections + +## Test MS12 `DAP` Capabilities + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Retrieve the supported MS12 DAP capabilities of the device and verify them with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/1/MS12_Capabilities" supported by the SPEAKER port. If it is a source device, retrieve the value from the 'Source_AudioSettings.yaml' file using the path "Ports/2/MS12_Capabilities" supported by the HDMI port.|dsGetAudioPort(), dsGetMS12Capabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Set various compression levels for supported ports and retrieve compression levels for verification|dsGetAudioPort(), dsSetAudioCompression(), dsGetAudioCompression()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test various compression levels with stream playback. Loop through supported audio ports, Set various compression levels for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetAudioCompression()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Dialog Enhancement for supported ports and retrieve Dialog Enhancement for verification|dsGetAudioPort(), dsSetDialogEnhancement(), dsGetDialogEnhancement()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Dialog Enhancement for supported ports with stream playback. Loop through supported audio ports, Set Dialog Enhancement for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetDialogEnhancement()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set DOLBY Volume Mode for supported ports and retrieve DOLBY Volume Mode for verification|dsGetAudioPort(), dsSetDolbyVolumeMode(), dsGetDolbyVolumeMode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test DOLBY Volume Mode for supported ports with stream playback. Loop through supported audio ports, Set DOLBY Volume Mode for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetDolbyVolumeMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Intelligent Equalizer Mode for supported ports and retrieve Intelligent Equalizer Mode for verification|dsGetAudioPort(), dsSetIntelligentEqualizerMode(), dsGetIntelligentEqualizerMode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Intelligent Equalizer Mode with stream playback. Loop through supported audio ports, Set Intelligent Equalizer Mode for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetIntelligentEqualizerMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Volume leveller for supported ports and retrieve Volume leveller for verification|dsGetAudioPort(), dsSetVolumeLeveller(), dsGetVolumeLeveller()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Volume leveller for supported ports with stream playback. Loop through supported audio ports, Set Volume leveller for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetVolumeLeveller()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Bass Enhancer for supported ports and retrieve Bass Enhancer for verification|dsGetAudioPort(), dsSetBassEnhancer(), dsGetBassEnhancer()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Bass Enhancer for supported ports with stream playback. Loop through supported audio ports, Set Bass Enhancer for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetBassEnhancer()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Enable Surround Decoder for supported ports and retrieve Surround Decoder status for verification|dsGetAudioPort(), dsEnableSurroundDecoder(), dsIsSurroundDecoderEnabled()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Surround Decoder for supported ports with stream playback. Loop through supported audio ports, Set Bass Enhancer for supported ports and verify with external analyzer|dsGetAudioPort(), dsEnableSurroundDecoder()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set `DRC` Mode for supported ports and retrieve `DRC` Mode for verification|dsGetAudioPort(), dsSetDRCMode(), dsGetDRCMode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test `DRC` Mode for supported ports with stream playback. Loop through supported audio ports, Set `DRC` Mode for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetDRCMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Surround Virtualizer for supported ports and retrieve Surround Virtualizer for verification|dsGetAudioPort(), dsSetSurroundVirtualizer(), dsGetSurroundVirtualizer()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Surround Virtualizer for supported ports with stream playback. Loop through supported audio ports, Set Surround Virtualizer for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetSurroundVirtualizer()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set `MI` Steering for supported ports and retrieve `MI` Steering for verification|dsGetAudioPort(), dsSetMISteering(), dsGetMISteering()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test `MI` Steering for supported ports with stream playback. Loop through supported audio ports, Set `MI` Steering for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetMISteering()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Graphic Equalizer for supported ports and retrieve Graphic Equalizer for verification|dsGetAudioPort(), dsSetGraphicEqualizerMode(), dsGetGraphicEqualizerMode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test Graphic Equalizer for supported ports with stream playback. Loop through supported audio ports, Set Graphic Equalizer for supported ports and verify with external analyzer|dsGetAudioPort(), dsSetGraphicEqualizerMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Enable/disable audio loudness equivalence and retrieve audio loudness equivalence status for verification|dsGetAudioPort(), dsEnableLEConfig(), dsGetLEConfig()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Test audio loudness equivalence for supported ports with stream playback. Loop through supported audio ports, Enable/Disable audio loudness equivalence for supported ports and verify with external analyzer|dsGetAudioPort(), dsEnableLEConfig()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Test MS12 `DAP` Capabilities + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test MS12 `DAP` Capabilities + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test MS12 `DAP` Capabilities + +- Control the external analyzer +- Control the port connections + +## Test MS12 Capabilities + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through the supported audio ports and check whether the port supports MS12 decode using the configuration YAML file. For a sink device, retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/1/IsMS12Decode" supported by the SPEAKER port. For a source device, retrieve the value from the 'Source_AudioSettings.yaml' file using the path "Ports/2/IsMS12Decode" supported by the HDMI port.|dsGetAudioPort(), dsIsAudioMS12Decode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through the supported audio ports and check whether the port supports MS11 decode using the configuration YAML file. For a sink device, retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/1/IsMS11Decode" supported by the SPEAKER port. For a source device, retrieve the value from the 'Source_AudioSettings.yaml' file using the path "Ports/2/IsMS11Decode" supported by the HDMI port.|dsGetAudioPort(), dsIsAudioMSDecode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Get the supported MS12 audio profiles and verify them with the configuration YAML file. For a sink device, retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/1/MS12_AudioProfiles" supported by the SPEAKER port. For source devices, it is not supported. |dsGetAudioPort(), dsGetMS12AudioProfileList()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Get Supported `MS12` Audio profiles, Loop through supported audio ports, set various audio profiles for supported ports and retrieve audio profile for verification|dsGetAudioPort(), dsGetMS12AudioProfileList(), dsSetMS12AudioProfile(), dsGetMS12AudioProfile()|`Y`|`NA`|`NA`|`Y`|`NA`| + +### Test Startup Requirement - Test MS12 Capabilities + +`NA` + +### Emulator Requirements - Test MS12 Capabilities + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test MS12 Capabilities + +`NA` + +## Test `ARC` Support - Sink Device + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the ARC port handle by looping through the supported audio ports, get the ARC type of the connected device, and verify it with the configuration YAML file. For a sink device, retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/2/Arc_Types" as the sink device supports Arc_Types only on the HDMI_ARC port. It does not support for source device.|dsGetAudioPort(), dsGetSupportedARCTypes()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Get the `ARC` port handle by looping through supported audio ports, enable the `ARC` Port and check if the audio routed to `ARC` port using external analyzers|dsGetAudioPort(), dsAudioEnableARC()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Get the `ARC` port handle by looping through supported audio ports, enable the `ARC` Port, Set `SAD` for `ARC` port and verify using external analyzers|dsGetAudioPort(), dsAudioEnableARC(), dsAudioSetSAD()|`NA`|`Y`|`NA`|`Y`|`Y`| + +### Test Startup Requirement - Test `ARC` Support + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test `ARC` Support + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test `ARC` Support + +- Control the external analyzer +- Control the port connections + +## Test Stereo Mode Support + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Set Stereo mode for supported ports and retrieve Stereo mode for verification|dsGetAudioPort(), dsSetStereoMode(), dsGetStereoMode()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Set various stereo modes for all supported ports and verify using the external analyzer|dsGetAudioPort(), dsSetStereoMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Loop through supported audio ports, Set Stereo Auto mode for supported ports and retrieve it for verification|dsGetAudioPort(), dsSetStereoAuto(), dsGetStereoAuto()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Loop through supported audio ports, Set Auto Stereo mode for all supported ports and verify using the external analyzer|dsGetAudioPort(), dsSetStereoAuto()|`NA`|`Y`|`NA`|`Y`|`Y`| + +### Test Startup Requirement - Test Stereo Mode Support + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Stereo Mode Support + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Stereo Mode Support + +- Control the external analyzer +- Control the port connections + +## Test Audio Gain and Mute + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Set various Linear Audio Gain Values for supported ports and retrieve Audio Gain for verification|dsGetAudioPort(), dsSetAudioGain(), dsGetAudioGain()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Loop through supported audio ports, Set various Linear Audio Gain Values for all supported ports and verify levels using the external analyzer|dsGetAudioPort(), dsSetAudioGain()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Loop through supported audio ports, Set various Audio Levels for supported ports and retrieve Audio Level for verification|dsGetAudioPort(), dsSetAudioLevel(), dsGetAudioLevel()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Loop through supported audio ports, Set various Audio Level for all supported ports and verify using the external analyzer|dsGetAudioPort(), dsSetAudioLevel()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Loop through supported audio ports, Enable/disable audio mute for supported ports and retrieve Mute status for verification|dsGetAudioPort(), dsSetAudioMute(), dsIsAudioMute()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Enable/disable audio mute and verify mute status using external analyzer|dsGetAudioPort(), dsSetAudioMute()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Test Audio Gain and Mute + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Audio Gain and Mute + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Audio Gain and Mute + +- Control the external analyzer +- Control the port connections + +## Test Audio Delay + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Set Audio delay for supported ports and retrieve delay for verification|dsGetAudioPort(), dsSetAudioDelay(), dsGetAudioDelay()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Set Audio delay for supported ports and measure audio-video delay using external analyzers|dsGetAudioPort(), dsSetAudioDelay()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Test Audio Delay + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Audio Delay + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Audio Delay + +- Control the external analyzer +- Control the port connections + +## Test Atmos Mode + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Set Atmos for supported ports and analyze with external device|dsAudioPortInit(), dsSetAudioAtmosOutputMode()|`NA`|`Y`|`Y`|`Y`|`Y`| +|For sink devices, get the ATMOS capabilities of dsAUDIOPORT_TYPE_SPEAKER (internal speaker) and verify them with the configuration YAML file. Retrieve the value from the 'Sink_AudioSettings.yaml' file using the path "Ports/1/ATMOS_Capabilities" as the SPEAKER port number is 1. It is not supported for source device.|dsGetAudioPort(), dsGetSinkDeviceAtmosCapability()|`Y`|`NA`|`NA`|`Y`|`NA`| +|Loop through supported audio ports, Get the ATMOS capabilities of connected devices and verify with configuration file.|dsGetAudioPort(), dsGetSinkDeviceAtmosCapability()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Register Atmos capability call-back, change the Atmos capabilities of connected device, and check whether the call-back is triggered or not|dsAudioAtmosCapsChangeRegisterCB ()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Test Atmos Mode + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Atmos Mode + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Atmos Mode + +- Control the external analyzer +- Control the port connections + +## Test Audio Format + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the audio format of stream played and verify with external analyzer|dsGetAudioFormat()|`NA`|`Y`|`Y`|`Y`|`NA`| +|Get the audio capabilities of the device and verify with configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_AudioSettings.yaml' file with the path of "Audio_Capabilities". For the source devices, the value to be retrieved from the 'Source_AudioSettings.yaml' file with the path of "Audio_Capabilities".|dsGetAudioCapabilities()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Register a call-back, Change the audio format of playback and check whether call-back is triggered or not|dsAudioFormatUpdateRegisterCB(), dsGetAudioFormat()|`NA`|`Y`|`Y`|`Y`|`NA`| + +### Test Startup Requirement - Test Audio Format + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Test Audio Format + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Audio Format + +## Test Associated Audio Mixing + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Loop through supported audio ports, Enable/disable Associated Audio Mixing for supported ports and retrieve it for verification|dsGetAudioPort(), dsSetAssociatedAudioMixing(), dsGetAssociatedAudioMixing()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Enable Associated Audio Mixing for supported ports, Set various Fader Control values for supported ports and retrieve it for verification|dsGetAudioPort(), dsSetAssociatedAudioMixing(), dsSetFaderControl(), dsGetFaderControl()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Loop through supported audio ports, Test Associate Audio mixing and fader control with stream playback and verify with external analyzer|dsGetAudioPort(), dsSetAssociatedAudioMixing(), dsSetFaderControl()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Associated Audio Mixing Test + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Associated Audio Mixing Test + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Associated Audio Mixing Test + +- Control the external analyzer +- Control the port connections + +## Test Primary/Secondary Language + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Set Primary Language and retrieve the same for verification|dsGetAudioPort(), dsSetPrimaryLanguage(), dsGetPrimaryLanguage()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Set Primary Language with stream playback and verify with external analyzer|dsGetAudioPort(), dsSetPrimaryLanguage()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Set Secondary Language and retrieve the same for verification|dsGetAudioPort(), dsSetSecondaryLanguage(), dsGetSecondaryLanguage()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Set Primary Language with stream playback and verify with external analyzer|dsGetAudioPort(), dsSetSecondaryLanguage()|`NA`|`Y`|`Y`|`Y`|`Y`| + +### Test Startup Requirement - Language Test + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements - Language Test + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Language Test + +- Control the external analyzer +- Control the port connections + +## Test Audio Mixer Levels + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Set Audio mixer levels for Primary and system audio with stream playback and verify with external analyzer|dsGetAudioPort(), dsSetAudioMixerLevels()|`NA`|`Y`|`NA`|`Y`|`Y`| + +### Test Startup Requirement - Test Audio Mixer Levels + +Playback of stream is required for the L3 testcases. [Audio Format Requirements for Playback](#audio-format-requirements-for-playback) + +### Emulator Requirements -Test Audio Mixer Levels + +[Emulator Requirements](#emulator-requirements) + +### Control Plane Requirements - Test Audio Mixer Levels + +- Control the external analyzer +- Control the port connections diff --git a/docs/pages/ds-audio_L2_Low-Level_TestSpecification.md b/docs/pages/ds-audio_L2_Low-Level_TestSpecification.md new file mode 100644 index 00000000..af0edf8e --- /dev/null +++ b/docs/pages/ds-audio_L2_Low-Level_TestSpecification.md @@ -0,0 +1,1451 @@ +# Audio Settings L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Overview](#overview) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +### Acronyms, Terms and Abbreviations + +- `HAL` - Hardware Abstraction Layer +- `API` - Application Programming Interface +- `L2` - Level 2 Testing +- `L3` - Level 3 Testing +- `DS` - Device Settings +- `ARC` - Audio Return Channel +- `HDMI` - High-Definition Multimedia Interface +- `LE` - Loudness Equivalence +- `DRC` - Dynamic Range Control +- `MI` - Media Intelligent +- `MS12` - MultiStream 12 +- `MS11` - MultiStream 11 +- `DAP` - Digital Audio Processing + +## Overview + +This document describes the Low Level L2 Test Specification and Procedure for the Device Settings Audio module. + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- dsAudio HAL Interface - [dsAudio.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsAudio.h) +- High Level Test Specification - [ds-audio_High-Level_TestSpecification.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-audio_High-Level_TestSpecification.md) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus`| +|Description|Loop through supported audio ports, enable/disable audio ports and retrieve status for verification| +|Test Group|02| +|Test Case ID|001| +|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 1 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Enable audio port using `dsEnableAudioPort`|handle = obtained from `dsGetAudioPort`, enabled = true|`dsERR_NONE`|Should be successful| +|04|Check if audio port is enabled using `dsIsAudioPortEnabled`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`, enabled = `true`|Should be successful| +|05|Disable audio port using `dsEnableAudioPort`|handle = obtained from `dsGetAudioPort`, enabled = `false`|`dsERR_NONE`|Should be successful| +|06|Check if audio port is disabled using `dsIsAudioPortEnabled`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`, enabled = `false`|Should be successful| +|07|Terminate audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop: Call dsGetAudioPort
for each supported type} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Call dsEnableAudioPort with handle and true] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[Call dsIsAudioPortEnabled with handle] + D -->|dsERR_NONE and true|E[Call `dsEnableAudioPort` with handle and false] + E -->|dsERR_NONE|F[Call dsIsAudioPortEnabled with handle] + F -->|dsERR_NONE and false|B + F -->|Fail|F1[Test case fail] + F1 --> B + B -->|End of loop|G[Call dsAudioPortTerm] + G -->|dsERR_NONE|H[Test case success] + G -->|Failure|G1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink`| +|Description|Loop through supported audio ports, get the handle for `dsAUDIOPORT_TYPE_HEADPHONE` port, check the connection status. Connection status should be false| +|Test Group|02| +|Test Case ID|003| +|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 2 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|If the port type is `dsAUDIOPORT_TYPE_HEADPHONE`, check the connection status using `dsAudioOutIsConnected`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|04|Assert that the connection status is false|isConnected = `false`|`false`|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports
call dsGetAudioPort} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C{Check if port type is
dsAUDIOPORT_TYPE_HEADPHONE} + B -->|Not dsERR_NONE or invalid handle|B + C -->|Yes|D[Call dsAudioOutIsConnected with
handle from step 3] + C -->|No|B + B -->|End of loop|E[Call dsAudioPortTerm] + D -->|dsERR_NONE and false output|B + D --> |Fail|D1[Test case fail] + D1 --> B + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|E1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities`| +|Description|Retrieve the supported MS12 DAP capabilities of the device and verify them with the configuration file| +|Test Group|02| +|Test Case ID|003| +|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 3 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Get the MS12 capabilities using `dsGetMS12Capabilities`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|04|Compare MS12 capabilities from API and value retrieved from configuration file|MS12 capabilities = `dsAudio/Port/[port number]/MS12_Capabilities` of configuration file|Match|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + Step1[Call dsAudioPortInit API] -- dsERR_NONE --> Step2{Loop through
supported audio ports
call dsGetAudioPort} + Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] + Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetMS12Capabilities API with the handle] + Step2 -->|End of loop|Step6 + Step2 -->|Not dsERR_NONE or invalid handle|Step2 + Step3 -- dsERR_NONE and valid capabilities --> Step4[Retrieve MS12 capabilities from configuration file] + Step3 -- Not dsERR_NONE or invalid capabilities --> Fail3[Test Case Failed] + Step4 --> Step5[Compare capabilities from API and YAML file] + Step5 -- Match --> Step2 + Step5 -- Not Match --> Fail4[Test Case Failed] + Fail4 --> Step2 + Step6 -- dsERR_NONE --> End[Test Case Passed] + Step6 -- Not dsERR_NONE --> Fail5[Test Case Failed] +``` + +### Test 4 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetAudioCompression`| +|Description|Loop through supported audio ports, set various compression levels for supported ports and retrieve compression levels for verification| +|Test Group|02| +|Test Case ID|004| +|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 4 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|For each port, set various compression levels using `dsSetAudioCompression`|handle = obtained from `dsGetAudioPort`, compression = 0 to 10. supported compressions = `dsAudio/Ports/[port number]/number_of_supported_compressions` from configuration file. compression types = `dsAudio/Ports/[port number]/compressions` of configuration file|`dsERR_NONE`|Should be successful| +|04|Retrieve the set compression level using `dsGetAudioCompression`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved compression levels are same|compression = set value, getCompression = retrieved value|compression should be equal to getCompression|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[call dsAudioPortInit] -->|dsERR_NONE|B{Loop through the
supported audio ports
call dsGetAudioPort} + A -->|Not dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Set various compression level
by calling the API dsSetAudioCompression] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|E[Retrieve the compression level
call dsGetAudioCompression] + E -->|dsERR_NONE and same compression level|B + E -->|Fail|E1[Test case fail] + E1 --> B + B -->|End of loop|F[ call dsAudioPortTerm] + F -->|dsERR_NONE|G[Test case success] + F -->|Not dsERR_NONE|F1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsAudio_SetAndGetDialogEnhancement`| +|Description|Loop through supported audio ports, Set Dialog Enhancement for supported ports and retrieve Dialog Enhancement for verification| +|Test Group|02| +|Test Case ID|005| +|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 5 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|For each audio port, set the Dialog Enhancement level using `dsSetDialogEnhancement`|handle = obtained from `dsGetAudioPort`, level = 0 to 16|`dsERR_NONE`|Should be successful| +|04|For each audio port, get the Dialog Enhancement level using `dsGetDialogEnhancement`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|05|Verify the set and get Dialog Enhancement levels are same|getLevel = obtained from `dsGetDialogEnhancement`, level = set in `dsSetDialogEnhancement`|getLevel should be equal to level|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through audio ports
call dsGetAudioPort} + A -->|!= dsERR_NONE|A1[Test case fail] + B -->|Not dsERR_NONE or invalid handle|B + B -->|dsERR_NONE and valid handle|C[Call dsSetDialogEnhancement with handle and level 0-16] + C -->|dsERR_NONE|D[Call dsGetDialogEnhancement with handle] + D -->|dsERR_NONE|E[Verify dialog enhancement values ] + E -->|Match|B + E -->|No Match|E1[Test case fail] + E1 --> B + B -->|End of loop|F[Call dsAudioPortTerm] + F -->|dsERR_NONE|G[Test case success] + F -->|!= dsERR_NONE|F1[Test case fail] +``` + +### Test 6 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetDolbyVolumeMode`| +|Description|Loop through supported audio ports, Set DOLBY Volume Mode for supported ports and retrieve DOLBY Volume Mode for verification| +|Test Group|02| +|Test Case ID|006| +|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 6 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set DOLBY Volume Mode for the retrieved audio port using `dsSetDolbyVolumeMode`|handle = retrieved handle, mode = `true`|`dsERR_NONE`|Should be successful| +|04|Retrieve DOLBY Volume Mode for the set audio port using `dsGetDolbyVolumeMode`|handle = retrieved handle|`dsERR_NONE` and mode = `true`|Should be successful| +|05|Set DOLBY Volume Mode for the retrieved audio port using `dsSetDolbyVolumeMode`|handle = retrieved handle, mode = `false`|`dsERR_NONE`|Should be successful| +|06|Retrieve DOLBY Volume Mode for the set audio port using `dsGetDolbyVolumeMode`|handle = retrieved handle|dsERR_NONE and mode = `false`|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through audio ports
call dsGetAudioPort} + A -->|!=dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[dsSetDolbyVolumeMode true] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetDolbyVolumeMode] + D -->|dsERR_NONE and mode true|E[dsSetDolbyVolumeMode false] + E -->|dsERR_NONE|F[dsGetDolbyVolumeMode] + F -->|dsERR_NONE and mode false|B + F -->|Fail|F1[Test case fail] + F1 --> B + B -->|End of loop|G[dsAudioPortTerm] + G -->|dsERR_NONE|H[Test case success] + G -->|!=dsERR_NONE|G1[Test case fail] +``` + +### Test 7 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetIntelligentEqualizerMode`| +|Description|Loop through supported audio ports, Set Intelligent Equalizer Mode for supported ports and retrieve Intelligent Equalizer Mode for verification| +|Test Group|02| +|Test Case ID|007| +|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 7 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set Intelligent Equalizer Mode for each supported port using `dsSetIntelligentEqualizerMode`|handle = obtained from `dsGetAudioPort`, mode = 0 to 6|`dsERR_NONE`|Should be successful| +|04|Retrieve Intelligent Equalizer Mode for each supported port using `dsGetIntelligentEqualizerMode`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved Intelligent Equalizer Mode are same|mode = set mode, getMode = retrieved mode|mode should be equal to getMode|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[dsAudioPortInit] -->|dsERR_NONE|B{ Loop through supported audio ports
call dsGetAudioPort} +A -->|Failure|A_Fail[Test case fail] +B -->|dsERR_NONE|C[dsSetIntelligentEqualizerMode, mode 0-6] +B -->|Not dsERR_NONE or invalid handle|B +C -->|dsERR_NONE|D[dsGetIntelligentEqualizerMode] +D -->|dsERR_NONE|E[Compare get and set values] +E -->|Match|B +E -->|Fail|E1[Test case fail] +E1 --> B +B -->|End of loop|F[dsAudioPortTerm] +F -->|dsERR_NONE|G[Test case success] +F -->|Failure|F_Fail[Test case fail] +``` + +### Test 8 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetVolumeLeveller`| +|Description|Loop through supported audio ports, set Volume leveller for supported ports and retrieve Volume leveller for verification| +|Test Group|02| +|Test Case ID|008| +|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 8 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set the volume leveller for the retrieved audio port using `dsSetVolumeLeveller`|handle = retrieved handle, volLeveller = {mode: 1, level: 5}|`dsERR_NONE`|Should be successful| +|04|Retrieve the volume leveller for the same audio port using `dsGetVolumeLeveller`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved volume leveller are same|volLevellerSet.mode = volLevellerGet.mode, volLevellerSet.level = volLevellerGet.level|volLevellerSet.mode, volLevellerSet.level|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through audio ports
call dsGetAudioPort} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[dsSetVolumeLeveller] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetVolumeLeveller] + D --> D1[Compare the Volume leveller] + D1 --> |Fail|D2[Test case fail] + D2 --> B + D1 -->|dsERR_NONE and same structure|B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|E1[Test case fail] +``` + +### Test 9 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetBassEnhancer`| +|Description|Loop through supported audio ports, Set Bass Enhancer for supported ports and retrieve Bass Enhancer for verification| +|Test Group|02| +|Test Case ID|009| +|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 9 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set Bass Enhancer for the retrieved audio port using `dsSetBassEnhancer`|handle = retrieved handle, boost = 0 to 100|`dsERR_NONE`|Should be successful| +|04|Retrieve Bass Enhancer for the same audio port using `dsGetBassEnhancer`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved Bass Enhancer values are same|setBoost = retrieved boost|setBoost|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop dsGetAudioPort
through audio ports } + A -->|!= dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE|C[dsSetBassEnhancer boost 0-100] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetBassEnhancer] + D -->|dsERR_NONE|E[Compare get and set values] + E -->|Fail|E1[Test case fail] + E1 --> B + E -->|Match|B + B -->|End of loop|F[dsAudioPortTerm] + F -->|dsERR_NONE|G[Test case success] + F -->|!= dsERR_NONE|F1[Test case fail] +``` + +### Test 10 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_EnableAndVerifySurroundDecoder`| +|Description|Loop through supported audio ports, Enable Surround Decoder for supported ports and retrieve Surround Decoder status for verification| +|Test Group|02| +|Test Case ID|010| +|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 10 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Enable Surround Decoder for each supported port using `dsEnableSurroundDecoder`|handle = obtained handle, enabled = `true`|`dsERR_NONE`|Should be successful| +|04|Retrieve Surround Decoder status for each port using `dsIsSurroundDecoderEnabled`|handle = obtained handle, enabled = valid buffer|`dsERR_NONE` and enabled = `true`|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports
call dsGetAudioPort} + A -->|!= dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Call dsEnableSurroundDecoder] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[Call dsIsSurroundDecoderEnabled] + D -->|Not dsERR_NONE or enabled false|D1[Test case fail] + D1 --> B + D -->|dsERR_NONE and enabled true|B + B -->|End of loop|E[Call dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|!= dsERR_NONE|E1[Test case fail] +``` + +### Test 11 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetDRCMode`| +|Description|Loop through supported audio ports, Set `DRC` Mode for supported ports and retrieve `DRC` Mode for verification| +|Test Group|02| +|Test Case ID|011| +|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 11 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|For each valid audio port handle, loop through all `DRC` modes (0 and 1), set the `DRC` mode using `dsSetDRCMode`|handle = valid handle, mode = 0 or 1|`dsERR_NONE`|Should be successful| +|04|For each set `DRC` mode, get the `DRC` mode using `dsGetDRCMode`|handle = valid handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and get `DRC` modes are equal|getMode = mode|mode|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through supported
audio ports
call dsGetAudioPort} + A -->|!= dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[dsSetDRCMode mode 0 to 1] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetDRCMode] + D -->|dsERR_NONE and same mode as set|B + D -->|not dsERR_NONE or mode not match|D1[Test case fail] + D1 --> B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|!= dsERR_NONE|E1[Test case fail] +``` + +### Test 12 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetSurroundVirtualizer`| +|Description|Loop through supported audio ports, Set Surround Virtualizer for supported ports and retrieve Surround Virtualizer for verification| +|Test Group|02| +|Test Case ID|012| +|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 12 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set Surround Virtualizer for the retrieved audio port using `dsSetSurroundVirtualizer`|handle = retrieved handle, virtualizer = {mode: (0-1), boost: (0-96 in steps of 16)}|`dsERR_NONE`|Should be successful| +|04|Retrieve Surround Virtualizer for the same audio port using `dsGetSurroundVirtualizer`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved Surround Virtualizer are same|mode: (0-1), boost: (0-96 in steps of 16)|`dsERR_NONE`|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[call dsAudioPortInit] -->|dsERR_NONE|B{Loop through the
supported audio ports
call dsGetAudioPort } + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and a valid handle|C[dsSetSurroundVirtualizer API] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetSurroundVirtualizer API] + D -->|dsERR_NONE and values match|B + D -->|not dsERR_NONE or values don't match|D1[Test case fail] + D1 --> B + B -->|End of loop|E[dsAudioPortTerm API] + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|E1[Test case fail] +``` + +### Test 13 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetMISteering`| +|Description|Loop through supported audio ports, set `MI` Steering for supported ports and retrieve `MI` Steering for verification| +|Test Group|02| +|Test Case ID|013| +|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 13 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set `MI` Steering for the retrieved audio port using `dsSetMISteering`|handle = retrieved handle, enabled = `true`|`dsERR_NONE`|Should be successful| +|04|Retrieve `MI` Steering for the audio port using `dsGetMISteering`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the `MI` Steering status|enabled = retrieved status|`true`|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through audio ports
call dsGetAudioPort} + A -->|!= dsERR_NONE|AF[Test case fail] + B -->|dsERR_NONE and valid handle|C[dsSetMISteering] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetMISteering] + D -->|dsERR_NONE and enabled = true|B + D -->|not dsERR_NONE or enabled = false|D1[Test case fail] + D1 --> B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case pass] + E -->|!= dsERR_NONE|EF[Test case fail] +``` + +### Test 14 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetGraphicEqualizerMode`| +|Description|Loop through supported audio ports, Set Graphic Equalizer for supported ports and retrieve Graphic Equalizer for verification| +|Test Group|02| +|Test Case ID|014| +|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 14 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|For each audio port, set the Graphic Equalizer mode using `dsSetGraphicEqualizerMode`|handle = obtained from `dsGetAudioPort`, mode = 0 to 3|`dsERR_NONE`|Should be successful| +|04|For each audio port, get the Graphic Equalizer mode using `dsGetGraphicEqualizerMode`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|05|Verify the set and get Graphic Equalizer mode are same|mode = set mode, getMode = obtained from `dsGetGraphicEqualizerMode`|mode should be equal to getMode|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through audio ports
call dsGetAudioPort} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE|C[dsSetGraphicEqualizerMode mode 0 to 3] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetGraphicEqualizerMode] + D -->|dsERR_NONE, set and get match|B + D -->|not dsERR_NONE or set and get don't match|D1[Test case fail] + D1 --> B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|E1[Test case fail] +``` + +### Test 15 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_EnableDisableAndRetrieveLEConfig`| +|Description|Loop through supported audio ports, enable/disable audio loudness equivalence and retrieve audio loudness equivalence status for verification| +|Test Group|02| +|Test Case ID|015| +|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 15 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Enable loudness equivalence configuration using `dsEnableLEConfig`|handle = obtained handle, enable = `true`|`dsERR_NONE`|Should be successful| +|04|Retrieve loudness equivalence configuration using `dsGetLEConfig`|handle = obtained handle|`dsERR_NONE` and enable = `true`|Should be successful| +|05|Disable loudness equivalence configuration using `dsEnableLEConfig`|handle = obtained handle, enable = `false`|`dsERR_NONE`|Should be successful| +|06|Retrieve loudness equivalence configuration using `dsGetLEConfig`|handle = obtained handle|`dsERR_NONE` and enable = `false`|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports
Call dsGetAudioPort} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Call dsEnableLEConfig
with enable as true] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[Call dsGetLEConfig] + D -->|dsERR_NONE and enable as true|E[Call dsEnableLEConfig
with enable as false] + E -->|dsERR_NONE|F[Call dsGetLEConfig] + F -->|not dsERR_NONE or
enable as true|F1[Test case fail] + F1 --> B + F -->|dsERR_NONE and
enable as false|B + B -->|End of loop|G[Call dsAudioPortTerm] + G -->|dsERR_NONE|H[Test case success] + G -->|Failure|G1[Test case fail] +``` + +### Test 16 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_CheckMS12DecodeSupport`| +|Description|Loop through the supported audio ports and check whether the port supports `MS12` decode using the configuration file| +|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 the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Check if the port supports `MS12` decode using `dsIsAudioMS12Decode`|handle|`dsERR_NONE`|Should be successful| +|04|Compare configuration value with `dsIsAudioMS12Decode` value from API|MS12 support = `dsAudio/Port/[port number]/IsMS12Decode` of configuration file|Matches|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports} + B -->|Not dsERR_NONE or invalid handle|B + B -->|dsERR_NONE and valid handle|D[Call dsIsAudioMS12Decode] + D -->|dsERR_NONE and boolean value|E[Retrieve value from configuration] + E --> F[Compare configuration value with dsIsAudioMS12Decode value] + F -->|Fail| F1[Test case fail] + F1 --> B + F -->|Match|B + B -->|End of loop|I[Call dsAudioPortTerm] + I -->|dsERR_NONE|J[Test case success] + A -->|Not dsERR_NONE|K[Test case fail] + I -->|Not dsERR_NONE|N[Test case fail] +``` + +### Test 17 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_CheckMS11DecodeSupport`| +|Description|Loop through the supported audio ports and check whether the port supports `MS11` decode using the configuration file.| +|Test Group|02| +|Test Case ID|017| +|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 17 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Check whether the port supports `MS11` decode using `dsIsAudioMSDecode`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|04|Compare configuration value with `dsIsAudioMSDecode` value from `API`|MS11 Support = `dsAudio/Port/[port number]/IsMS11Decode` of configuration file|Matches|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[dsAudioPortInit] --> B{For Each Audio Port} +B --> C[dsGetAudioPort for SPEAKER port] +B -->|Not dsERR_NONE or invalid handle|B +C -->|dsERR_NONE|D[dsIsAudioMSDecode] +D -->|dsERR_NONE|E[Compare value from configuration file] +E -->|Fail|E1[Test case fail] +E1 --> B +E -->|Match|B +B-->|End of loop|F[dsAudioPortTerm] +F -->|dsERR_NONE|H[Test case pass] +F -->|Not dsERR_NONE|F1[Test case fail] +A -->|Not dsERR_NONE|A1[Test case fail] +``` + +### Test 18 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_VerifyMS12AudioProfiles_sink`| +|Description|Get the supported `MS12` audio profiles and verify them with the configuration file| +|Test Group|02| +|Test Case ID|018| +|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 18 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|02|Get the MS12 audio profile list using `dsGetMS12AudioProfileList`|handle = valid handle, profiles = valid pointer|`dsERR_NONE`|Should be successful| +|04|Verify the retrieved audio profile list with the expected profile string|MS12 audio profile count = `dsAudio/Port/[port number]/MS12_AudioProfileCount`, MS12 audio profiles = `dsAudio/Port/[port number]/MS12_AudioProfiles` of configuration file|profiles.audioProfileList = valid profile list|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[dsAudioPortInit] --> B{For Each Audio Port} +B -->|Not dsERR_NONE or invalid handle|B +B -->|dsERR_NONE and valid handle|C{Check if port supports
MS12 audioprofiles} +C -->|Yes|D[dsGetMS12AudioProfileList] +C -->|No|B +D -->|dsERR_NONE|E[Compare value from configuration file] +E --> |don't match|E1[Test case fail] +E1 --> B +E -->|Match|B +B-->|End of loop|F[dsAudioPortTerm] +F -->|dsERR_NONE|H[Test case pass] +F -->|Not dsERR_NONE|F1[Test case fail] +A -->|Not dsERR_NONE|A1[Test case fail] +``` + +### Test 19 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetMS12AudioProfile_sink`| +|Description|Get Supported `MS12` Audio profiles, loop through supported audio ports, set various audio profiles for supported ports and retrieve audio profile for verification.| +|Test Group|02| +|Test Case ID|019| +|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 19 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Get `MS12` audio profile list using `dsGetMS12AudioProfileList`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|04|Loop through all profiles and set `MS12` audio profile using `dsSetMS12AudioProfile`|handle = obtained from `dsGetAudioPort`, profile = profileName|`dsERR_NONE`|Should be successful| +|05|Get `MS12` audio profile using `dsGetMS12AudioProfile`|handle = obtained from `dsGetAudioPort`|`dsERR_NONE`|Should be successful| +|06|Assert that the set and get profiles are equal|profile = obtained from `dsGetMS12AudioProfile`, profileName = set in `dsSetMS12AudioProfile`|`True`|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through supported audio ports} +A -->|Failure|A1[Test case fail] +B -->|dsERR_NONE and valid handle|BC{Check if port supports
MS12 audioprofiles} +B -->|Not dsERR_NONE or invalid handle|B +BC -->|Yes|C[dsGetMS12AudioProfileList] +BC -->|No|B +C -->|dsERR_NONE|D[Loop through supported audio profiles] +D -->|dsERR_NONE|E[Call dsSetMS12AudioProfile for each profile] +E -->|dsERR_NONE|F[Call dsGetMS12AudioProfile for each profile] +F -->|Comparison Fails|F1[Test case fail] +F1-->B +F -->|dsERR_NONE|B +B -->|End of loop|G[Call dsAudioPortTerm] +G -->|dsERR_NONE|H[Test case success] +G -->|Failure|G1[Test case fail] +``` + +### Test 20 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetStereoMode`| +|Description|Loop through supported audio ports, set Stereo mode for supported ports and retrieve Stereo mode for verification| +|Test Group|02| +|Test Case ID|020| +|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 20 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set the stereo mode for the retrieved audio port handle using `dsSetStereoMode`|handle = retrieved handle, supported Stereo modes = `dsAudio/Port/[port number]/stereo_modes` of configuration file|`dsERR_NONE`|Should be successful| +|04|Get the stereo mode for the same audio port handle using `dsGetStereoMode`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Assert that the retrieved stereo mode is the same as the set stereo mode|mode = retrieved mode|mode = getmode|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports} + A -->|!= dsERR_NONE|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Call dsSetStereoMode
with various stereo modes] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[Call dsGetStereoMode with handle] + D -->|Comparison Fails|D1[Test case fail] + D1 --> B + D -->|dsERR_NONE, set and get matches|B + B -->|End of loop|E[Call dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|!= dsERR_NONE|E1[Test case fail] +``` + +### Test 21 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetStereoAuto_sink`| +|Description|Loop through supported audio ports, set Stereo Auto mode for supported ports and retrieve it for verification| +|Test Group|02| +|Test Case ID|021| +|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 21 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Check if the port support Stereo auto mode from the `Port/[port number]/stereo_auto_mode` of configuration file. Set Stereo Auto mode for the retrieved audio port using `dsSetStereoAuto`|handle = retrieved handle, autoMode = 1|`dsERR_NONE`|Should be successful| +|04|Retrieve the Stereo Auto mode for the same audio port using `dsGetStereoAuto`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved Stereo Auto mode are same|getAutoMode = retrieved auto mode, autoMode = 1|getAutoMode should be equal to autoMode|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through supported
audio ports} +B -->|dsERR_NONE|C[Call dsSetStereoAuto
with autoMode=true] +B -->|Not dsERR_NONE or invalid handle|B +C -->|dsERR_NONE|D[Call dsGetStereoAuto with handle] +D -->|Comparison Fail|D1[Test case fail] +D1 --> B +D -->|dsERR_NONE & get and set matches|B +B -->|End of loop|E[Call dsAudioPortTerm] +E -->|dsERR_NONE|F[Test case pass] +E -->|Failure|E1[Test case fail] +``` + +### Test 22 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetAudioGain_sink`| +|Description|Loop through supported audio ports, set various Linear Audio Gain Values for supported ports and retrieve Audio Gain for verification| +|Test Group|02| +|Test Case ID|022| +|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 22 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set various Linear Audio Gain Values for supported ports using `dsSetAudioGain`|handle = valid handle, gain = -2080 to 480 in steps of 10|`dsERR_NONE`|Should be successful| +|04|Retrieve Audio Gain for verification using `dsGetAudioGain`|handle = valid handle|`dsERR_NONE`, gain = set gain value|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE|C[dsSetAudioGain with
various gain values] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[dsGetAudioGain to
retrieve the audio gain value] + D --> |Comparison Fail|D1[Test case fail] + D1 --> B + D -->|dsERR_NONE and
gain value matches|B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|E1[Test case fail] +``` + +### Test 23 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetAudioLevel_sink`| +|Description|Loop through supported audio ports, set various Audio Levels for supported ports and retrieve Audio Level for verification| +|Test Group|02| +|Test Case ID|023| +|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 23 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set various Audio Levels for the obtained audio port handle using `dsSetAudioLevel`|handle = obtained handle, level = 0 to 100 in steps of 10|`dsERR_NONE`|Should be successful| +|04|Retrieve the Audio Level for the set level using `dsGetAudioLevel`|handle = obtained handle|`dsERR_NONE`, level = set level|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[dsAudioPortInit] -->|dsERR_NONE|B{Loop through the
supported audio ports} + A -->|Failure|A1[Test case fail] + B -->|dsERR_NONE and valid handle|C[Set various audio levels
dsSetAudioLevel] + B -->|Not dsERR_NONE or invalid handle|B + C -->|dsERR_NONE|D[Retrieve the audio level
dsGetAudioLevel] + D -->|Comparison Fail|D1[Test case fail] + D1 --> B + D -->|dsERR_NONE and same audio level|B + B -->|End of loop|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case pass] + E -->|Failure|E1[Test case fail] +``` + +### Test 24 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_AudioMuteVerification`| +|Description|Loop through supported audio ports, enable/disable audio mute for supported ports and retrieve Mute status for verification| +|Test Group|02| +|Test Case ID|024| +|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 24 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set audio mute to true using `dsSetAudioMute`|handle = obtained handle, mute = true|`dsERR_NONE`|Should be successful| +|04|Verify audio mute status using `dsIsAudioMute`|handle = obtained handle, mute = pointer to mute status|`dsERR_NONE`, mute = `true`|Should be successful| +|05|Set audio mute to false using `dsSetAudioMute`|handle = obtained handle, mute = `false`|`dsERR_NONE`|Should be successful| +|06|Verify audio mute status using `dsIsAudioMute`|handle = obtained handle, mute = pointer to mute status|`dsERR_NONE`, mute = `false`|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsAudioPortInit] -->|dsERR_NONE|B{Loop through
supported audio ports} +B -- dsERR_NONE & valid handle --> C[Call dsSetAudioMute with mute=true] +B -->|Not dsERR_NONE or invalid handle|B +C -- dsERR_NONE --> D[Call dsIsAudioMute] +D -- dsERR_NONE & muted=true --> E[Call dsSetAudioMute with mute=false] +E -- dsERR_NONE --> F[Call dsIsAudioMute] +F -->|mute != false| F1[Test case fail] +F1 --> B +F -- dsERR_NONE & muted=false --> B +B -- End of loop --> G[Call dsAudioPortTerm] +G -- dsERR_NONE --> H[Test case success] +G -- Not dsERR_NONE --> G1[Test case fail] +``` + +### Test 25 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetAudioDelay`| +|Description|Loop through supported audio ports, set Audio delay for supported ports and retrieve delay for verification| +|Test Group|02| +|Test Case ID|025| +|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 25 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Set the audio delay for the retrieved audio port using `dsSetAudioDelay`|handle = retrieved handle, delay = 100ms|`dsERR_NONE`|Should be successful| +|04|Retrieve the audio delay for the same audio port using `dsGetAudioDelay`|handle = retrieved handle|`dsERR_NONE`|Should be successful| +|05|Verify the set and retrieved audio delay are same|setDelay = 100ms, getDelay = retrieved delay|getDelay should be equal to setDelay|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[ dsAudioPortInit] -->|dsERR_NONE|B{Loop through the
supported audio ports} + B -->|dsERR_NONE|D[ call dsSetAudioDelay
with delay value] + B -->|Not dsERR_NONE or invalid handle|B + D -->|dsERR_NONE|E[call dsGetAudioDelay ] + E -->|dsERR_NONE|F[Verify audio delay matches
the set audio delay] + F --> F1[Test case fail] + F1 -->|Comparison Fail| B + F --> B + B -->|End of Loop|G[ call dsAudioPortTerm] + G -->|dsERR_NONE|H[Test case success] + A -->|Failure|I[Test case fail] + G -->|Failure|M[Test case fail] +``` + +### Test 26 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_VerifyAtmosCapabilities_sink`| +|Description|For sink devices, get the ATMOS capabilities and verify them with the configuration file| +|Test Group|02| +|Test Case ID|026| +|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 26 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through supported audio ports and get audio port using `dsGetAudioPort`|supported number of audio ports = `dsAudio/Number_of_supported_ports` field and port id = `dsAudio/Port/[port number]/Typeid` of configuration file|`dsERR_NONE`|Should be successful| +|03|Get the ATMOS capability of the sink device using `dsGetSinkDeviceAtmosCapability`|handle=valid handle|`dsERR_NONE`|Should be successful| +|04|Verify the ATMOS capability of the sink device|ATMOS capabilities = `dsAudio/Port/[port number]/ATMOS_Capabilities` of configuration file|Matches|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[ dsAudioPortInit] -->|dsERR_NONE|B{Loop through the
supported audio ports} + B -->|dsERR_NONE|D[call dsGetSinkDeviceAtmosCapability] + B -->|Not dsERR_NONE or invalid handle|B + D -->|dsERR_NONE|E[Verify the ATMOS Capabilities with the configuration file] + E --> |Comparison Fail|E1[Test case fail] + E1 --> B + E --> B + B -->|End of Loop|G[ call dsAudioPortTerm] + G -->|dsERR_NONE|H[Test case success] + A -->|Failure|I[Test case fail] + G -->|Failure|M[Test case fail] +``` + +### Test 27 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_GetAudioCapabilities`| +|Description|Get the audio capabilities of the device and verify with configuration file| +|Test Group|02| +|Test Case ID|027| +|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 27 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Get the audio port using `dsGetAudioPort`|type = Any supported port from the configuration file `dsAudio/Port/[port number]/Typeid`|`dsERR_NONE`|Should be successful| +|03|Get the audio capabilities using `dsGetAudioCapabilities` with the handle obtained from previous step|handle = obtained from step 02|`dsERR_NONE`|Should be successful| +|04|Verify the obtained capabilities with the expected value from the configuration file|Read audio capabilities from the `Audio_Capabilities` of configuration file|capabilities = obtained from step 03|Should be successful| +|05|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|return dsERR_NONE|B[Call dsGetAudioPort with
supported port] + A -->|return not dsERR_NONE|A1[Test case fail] + B -->|return dsERR_NONE|C[Call dsGetAudioCapabilities] + B -->|return not dsERR_NONE|B1[Test case fail] + C -->|return dsERR_NONE|D[Compare obtained audio capabilities with yaml file] + C -->|return not dsERR_NONE|C1[Test case fail] + D -->|Values match|E[Call dsAudioPortTerm] + D -->|Values do not match|D1[Test case fail] + E -->|return dsERR_NONE|F[Test case success] + E -->|return not dsERR_NONE|E1[Test case fail] +``` + +### Test 28 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_EnableDisableRetrieveAudioMixing`| +|Description|Loop through supported audio ports, Enable/disable Associated Audio Mixing for supported ports and retrieve it for verification| +|Test Group|02| +|Test Case ID|028| +|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 28 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Get the audio port using `dsGetAudioPort`|type = Any supported port from the configuration file `dsAudio/Port/[port number]/Typeid`|`dsERR_NONE`|Should be successful| +|03|Enable Associated Audio Mixing for the retrieved port using `dsSetAssociatedAudioMixing`|handle = retrieved handle, mixing = true|`dsERR_NONE`|Should be successful| +|04|Retrieve the Associated Audio Mixing status using `dsGetAssociatedAudioMixing`|handle = retrieved handle, mixing = pointer to bool|`dsERR_NONE` and mixing = `true`|Should be successful| +|05|Disable Associated Audio Mixing for the retrieved port using `dsSetAssociatedAudioMixing`|handle = retrieved handle, mixing = `false`|`dsERR_NONE`|Should be successful| +|06|Retrieve the Associated Audio Mixing status using `dsGetAssociatedAudioMixing`|handle = retrieved handle, mixing = pointer to bool|`dsERR_NONE` and mixing = `false`|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsAudioPortInit] -->|dsERR_NONE|B[Get audio port] + A -->|Failure|AF[Test case fail] + B -->|dsERR_NONE|C[Call dsSetAssociatedAudioMixing to
enable and disable audio mixing] + C --> |!dsERR_NONE|C1[Test case fail] + C -->|dsERR_NONE|D[Call dsGetAssociatedAudioMixing to
retrieve audio mixing status] + D --> |Comparison Fail|D1[Test case fail] + D -->|dsERR_NONE & get and set matches|E[dsAudioPortTerm] + E -->|dsERR_NONE|F[Test case success] + E -->|Failure|EF[Test case fail] +``` + +### Test 29 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_AudioPortControl`| +|Description|Loop through supported audio ports, Enable Associated Audio Mixing for supported ports, Set various Fader Control values for supported ports and retrieve it for verification| +|Test Group|02| +|Test Case ID|029| +|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 29 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Get the audio port using `dsGetAudioPort`|type = Any supported port from the configuration file `dsAudio/Port/[port number]/Typeid`|`dsERR_NONE`|Should be successful| +|03|Enable Associated Audio Mixing for the retrieved port using `dsSetAssociatedAudioMixing`|handle = retrieved handle, mixing = true|`dsERR_NONE`|Should be successful| +|04|Set various Fader Control values for the retrieved port using `dsSetFaderControl`|handle = retrieved handle, mixerbalance = -32 to 32 in steps of 8|`dsERR_NONE`|Should be successful| +|05|Retrieve the Fader Control value for verification using `dsGetFaderControl`|handle = retrieved handle, getMixerbalance = buffer to store the retrieved value|`dsERR_NONE`, getMixerbalance = mixerbalance|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[dsAudioPortInit] -->|dsERR_NONE|B[Get audio port] +B -->|dsERR_NONE|C[dsSetAssociatedAudioMixing] +C --> |!dsERR_NONE|C1[Test case fail] +C -->|dsERR_NONE|D[dsSetFaderControl] +D --> |!dsERR_NONE|D1[Test case fail] +D -->|dsERR_NONE|E[dsGetFaderControl] +E --> |Comparison Fail|E1[Test case fail] +E -->|dsERR_NONE &
get and set matches|I[dsAudioPortTerm] +I -->|dsERR_NONE|J[Test case success] +I -->|!= dsERR_NONE|K[Test case fail] +A -->|!= dsERR_NONE|L[Test case fail] +``` + +### Test 30 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetPrimaryLanguage`| +|Description|Set Primary Language and retrieve the same for verification| +|Test Group|02| +|Test Case ID|030| +|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 30 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Get the audio port using `dsGetAudioPort`|type = Any supported port from the configuration file `dsAudio/Port/[port number]/Typeid`|`dsERR_NONE`|Should be successful| +|03|Set the primary language using `dsSetPrimaryLanguage` with handle and valid language code|handle = obtained handle, setLang = "eng"|`dsERR_NONE`|Should be successful| +|04|Get the primary language using `dsGetPrimaryLanguage` with handle|handle = obtained handle, getLang = valid buffer|`dsERR_NONE`|Should be successful| +|05|Verify the set and get languages are same|setLang = "eng", getLang = obtained language|setLang should be equal to getLang|Should be successful| +|06|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsAudioPortInit] -->|dsERR_NONE|B[Call dsGetAudioPort] +A -->|!=dsERR_NONE|A1[Test case fail] +B -->|dsERR_NONE and valid handle|C[Call dsSetPrimaryLanguage] +B -->|!=dsERR_NONE or invalid handle|B1[Test case fail] +C -->|dsERR_NONE|D[Call dsGetPrimaryLanguage] +C -->|!=dsERR_NONE|C1[Test case fail] +D -->|dsERR_NONE and same language code|E[Call dsAudioPortTerm] +D -->|!=dsERR_NONE or different language code|D1[Test case fail] +E -->|dsERR_NONE|F[Test case success] +E -->|!=dsERR_NONE|E1[Test case fail] +``` + +### Test 31 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsAudio_SetAndGetSecondaryLanguage`| +|Description|Set Secondary Language and retrieve the same for verification| +|Test Group|02| +|Test Case ID|031| +|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 31 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the audio port using `dsAudioPortInit`|None|`dsERR_NONE`|Should be successful| +|02|Get the audio port using `dsGetAudioPort`|type = Any supported port from the configuration file `dsAudio/Port/[port number]/Typeid`|`dsERR_NONE`|Should be successful| +|03|Set the secondary language using `dsSetSecondaryLanguage`|handle = obtained handle, language = "eng"|`dsERR_NONE`|Should be successful| +|04|If setting secondary language fails, terminate the audio port using `dsAudioPortTerm` and return|None|`dsERR_NONE`|Should be successful| +|05|Get the secondary language using `dsGetSecondaryLanguage`|handle = obtained handle, language = valid buffer|`dsERR_NONE`|Should be successful| +|06|Verify the set and get languages are same|setLang = "eng", getLang = obtained language|setLang should be equal to getLang|Should be successful| +|07|Terminate the audio port using `dsAudioPortTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsAudioPortInit] -->|dsERR_NONE|B[Call dsGetAudioPort] +A -->|!=dsERR_NONE|A1[Test case fail] +B -->|dsERR_NONE|C[Call dsSetSecondaryLanguage] +B -->|!=dsERR_NONE|B1[Test case fail] +C -->|dsERR_NONE|D[Call dsGetSecondaryLanguage] +C -->|!=dsERR_NONE|C1[Test case fail] +D -->|dsERR_NONE & get and set same|E[Call dsAudioPortTerm] +D -->|!=dsERR_NONE|D1[Test case fail] +E -->|dsERR_NONE|F[Test case pass] +E -->|!=dsERR_NONE|E1[Test case fail] +``` diff --git a/docs/pages/l2_module_test_specification_template.md b/docs/pages/l2_module_test_specification_template.md deleted file mode 100644 index d319677a..00000000 --- a/docs/pages/l2_module_test_specification_template.md +++ /dev/null @@ -1,104 +0,0 @@ -# L2 Test Specification template -## History - -| Version | Date(YY-MM-DD) | Author |Comments | -| -------| ----- | ----- | ----- | -| 1.0.0 | 22/02/23 | Anjali Thampi| Inital Document | - -## Table of Contents - -- [Overview](#overview) - - [Acronyms](#acronyms) - - [Definitions](#definitions) - - [References](#references) -- [Level 2 Test Suite](#level-2-test-suite) - - [Test 1](#test-1) - - [Test 2](#test-2) - -## Overview - -This document describes the level 2 testing suite for this module. - -### Acronyms, Terms and Abbreviations - -- `HAL` \- Hardware Abstraction Layer, may include some common components -- `HAL.h` \- Abstracted defined API to control the hardware -- `HAL.c` \- Implementation wrapper layer created by the `OEM` or `SoC` Vendor. -- `RDK` \- Reference Design Kit for All Devices -- `RDK-B` \- Reference Design Kit for Broadband Devices -- `RDK-V` \- Reference Design Kit for Video Devices -- `UT` \- Unit Test(s) -- `OEM` \- Original Equipment Manufacture (Sky is also an OEM) -- `SoC` \- System on a Chip - -### Definitions - -- `Broadcom` \- `SoC` manufacturer -- `Amlogic` \- `SoC` manufacturer -- `Soc Vendor` \- Definition to encompass multiple vendors -- `Unit Tests` \- C Function tests that run on the target hardware -- `Common Testing Framework` \- Off the shelf 3rd Party Testing Framework, or framework that does not require infrastructure to control it. That's not to say it cannot be controlled via infrastructure if required. Examples of which are. - - `GTest` \- Google Test Suit - - `CUnit` \- C Testing Suit - - `Unity` \- C Embedded Testing Suit - - `ut-core` \- Common Testing Framework - -### References - -- `Feedback Loops` \- -- `Doxygen` \- SourceCode documentation tool - -- `Black Box Testing` \- - -## Level 2 Test Suite - -The following functions are expecting to test the module operates correctly. - -### Test 1 - -|Title|Details| -|--|--| -|Function Name|`test_l2__`| -|Description|TODO: Add the description of what is tested and why in this test| -|Test Group|TODO: Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)| -|Test Case ID|TODO: Add the ID of the test case so that it can be logically tracked in the logs| -|Priority|TODO: (Low/Med/High) Add the priority for the level of test, how important is the test to overall functionality| - -**Pre-Conditions :** -TODO: Add pre-conditions, if any - -**Dependencies :** TODO: Add dependencies for this test, if any - -**User Interaction :** TODO: Add any user interactions required during this test, if any - -#### Test Procedure : - -TODO: Add the steps to run this test and add a line in the below table for each input variation tried in this function. - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | First set of conditions | What is input data to be tested | How to gauge success, is it a success variable? | Should be successful | - -### Test 2 - -|Title|Details| -|--|--| -|Function Name|`test_l2__`| -|Description|TODO: Add the description of what is tested and why in this test| -|Test Group|TODO: Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)| -|Test Case ID|TODO: Add the ID of the test case so that it can be logically tracked in the logs| -|Priority|TODO: (Low/Med/High) Add the priority for the level of test, how important is the test to overall functionality| - -**Pre-Conditions :** -TODO: Add pre-conditions, if any - -**Dependencies :** TODO: Add dependencies for this test, if any - -**User Interaction :** TODO: Add any user interactions required during this test, if any - -#### Test Procedure : - -TODO: Add the steps to run this test and add a line in the below table for each input variation tried in this function. - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | First set of conditions | What is input data to be tested | How to gauge success, is it a success variable? | Should be successful | diff --git a/profiles/sink/Sink_AudioSettings.yaml b/profiles/sink/Sink_AudioSettings.yaml new file mode 100644 index 00000000..b668c839 --- /dev/null +++ b/profiles/sink/Sink_AudioSettings.yaml @@ -0,0 +1,305 @@ +dsAudio: + Type: sink + Name: dsAudio_4_port + + # Profile for L1 + features: + extendedEnumsSupported: false + + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + # dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + # dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + # dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + # dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + PortTypes: + - 0x02 #SPDIF + - 0x03 #SPEAKER + - 0x04 #HDMI_ARC + - 0x05 #HEADPHONE + + # Number of supported ports + Number_of_supported_ports: 4 + + # dsAUDIOSUPPORT_NONE = 0x0, ///< None + # dsAUDIOSUPPORT_ATMOS = 0x01, ///< Dolby Atmos + # dsAUDIOSUPPORT_DD = 0x02, ///< Dolby Digitial + # dsAUDIOSUPPORT_DDPLUS = 0x04, ///< Dolby Digital Plus + # dsAUDIOSUPPORT_DAD = 0x08, ///< Digital Audio Delivery + # dsAUDIOSUPPORT_DAPv2 = 0x10, ///< Digital Audio Processing version 2 + # dsAUDIOSUPPORT_MS12 = 0x20, ///< Multi Stream 12 + # dsAUDIOSUPPORT_MS12V2 = 0x40, ///< Multi Stream Version 2 + # dsAUDIOSUPPORT_Invalid = 0x80, ///< Invalid + Audio_Capabilities: 0x37 # dsAUDIOSUPPORT_ATMOS | dsAUDIOSUPPORT_DAPv2 | dsAUDIOSUPPORT_MS12 | dsAUDIOSUPPORT_DD | dsAUDIOSUPPORT_DDPLUS + + # Port details + Ports: + # Port Number to parse the port details + 1: + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + # dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + # dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + # dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + # dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + Typeid: 0x03 # SPEAKER + # SPEAKER + # HDMI_ARC + # SPDIF + # HEADPHONE + Name: "SPEAKER" + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # Number of Supported Compressions + number_of_supported_compressions: 4 + # dsAUDIO_CMP_NONE = 0x00, ///< No audio compression. + # dsAUDIO_CMP_LIGHT = 0x01, ///< Light audio level compression. + # dsAUDIO_CMP_MEDIUM = 0x02, ///< Medium audio level compression. + # dsAUDIO_CMP_HEAVY = 0x03, ///< Heavy audio level compression. + # dsAUDIO_CMP_MAX = 0x04 ///< Out of range + compressions: [0x00, 0x01, 0x02, 0x03] # NONE, LIGHT, MEDIUM, HEAVY + # Number of supported Stereo modes + number_of_supported_stereo_modes: 1 + # dsAUDIO_STEREO_UNKNOWN = 0x00, ///< Stereo mode none + # dsAUDIO_STEREO_MONO = 0x01, ///< Mono mode + # dsAUDIO_STEREO_STEREO = 0x02, ///< Normal stereo mode (L+R) + # dsAUDIO_STEREO_SURROUND = 0x03, ///< Surround mode + # dsAUDIO_STEREO_PASSTHRU = 0x04, ///< Passthrough mode + # dsAUDIO_STEREO_DD = 0x05, ///< Dolby Digital + # dsAUDIO_STEREO_DDPLUS = 0x06, ///< Dolby Digital Plus + # dsAUDIO_STEREO_MAX = 0x07 ///< Out of range + stereo_modes: [0x2] # STEREO, SURROUND + stereo_auto_mode: false + # dsMS12SUPPORT_NONE = 0x0, ///< MS12 Supported None + # dsMS12SUPPORT_DolbyVolume = 0x01, //< MS12 supported Dolby Volume + # dsMS12SUPPORT_InteligentEqualizer = 0x02, ///< MS12 supported Intelligent Equalizer + # dsMS12SUPPORT_DialogueEnhancer = 0x04, ///< MS12 Dialogue Enhancer supported + # dsMS12SUPPORT_Volumeleveller = 0x08, ///< MS12 Volume leveller + # dsMS12SUPPORT_BassEnhancer = 0x10, ///< MS12 Bass Enhancer + # dsMS12SUPPORT_SurroundDecoder = 0x20, ///< MS12 Surround Decoder + # dsMS12SUPPORT_DRCMode = 0x40, ///< MS12 DRC Mode + # dsMS12SUPPORT_SurroundVirtualizer = 0x80, ///< MS12 Surround Virtualizer + # dsMS12SUPPORT_MISteering = 0x100, ///< MS12 MI Steering + # dsMS12SUPPORT_GraphicEqualizer = 0x200, ///< MS12 Graphic equalizer + # dsMS12SUPPORT_LEConfig = 0x400, ///< MS12 LE config + # dsMS12SUPPORT_Invalid = 0x800 ///< Invalid / Out of range + MS12_Capabilities: 0x07 # DolbyVolume | IntelligentEqualizer | DialogueEnhancer + # profile names from the "ms12_audio_profiles.ini" file. + MS12_AudioProfiles: + - Off + - Music + - Movie + - Sports + - Entertainment + - Night + - Party + - User + # number of counts from the "ms12_audio_profiles.ini" file + MS12_AudioProfileCount: 8 + # @a true if audio port supports Dolby MS12 Multistream Decoding or @a false otherwise + IsMS12Decode: true + # @a true if audio port supports Dolby MS11 Multistream Decoding or @a false otherwise + IsMS11Decode: true + # dsAUDIO_ATMOS_NOTSUPPORTED = 0x00, ///< ATMOS audio not supported + # dsAUDIO_ATMOS_DDPLUSSTREAM = 0x01, ///< can handle dd plus stream which is only way to pass ATMOS metadata + # dsAUDIO_ATMOS_ATMOSMETADATA = 0x02, ///< capable of parsing ATMOS metadata + # dsAUDIO_ATMOS_MAX = 0x03 ///< Out of range + ATMOS_Capabilities: 0x02 # ATMOSMETADATA + + # Port Number to parse the port details + 2: + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + # dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + # dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + # dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + # dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + Typeid: 0x04 # HDMI_ARC + # SPEAKER + # HDMI_ARC + # SPDIF + # HEADPHONE + Name: "HDMI_ARC" + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # number of supported compressions + number_of_supported_compressions: 0 + # dsAUDIO_CMP_NONE = 0x00, ///< No audio compression. + # dsAUDIO_CMP_LIGHT = 0x01, ///< Light audio level compression. + # dsAUDIO_CMP_MEDIUM = 0x02, ///< Medium audio level compression. + # dsAUDIO_CMP_HEAVY = 0x03, ///< Heavy audio level compression. + # dsAUDIO_CMP_MAX = 0x04 ///< Out of range + compressions: + # Number of supported Stereo modes + number_of_supported_stereo_modes: 3 + # dsAUDIO_STEREO_UNKNOWN = 0x00, ///< Stereo mode none + # dsAUDIO_STEREO_MONO = 0x01, ///< Mono mode + # dsAUDIO_STEREO_STEREO = 0x02, ///< Normal stereo mode (L+R) + # dsAUDIO_STEREO_SURROUND = 0x03, ///< Surround mode + # dsAUDIO_STEREO_PASSTHRU = 0x04, ///< Passthrough mode + # dsAUDIO_STEREO_DD = 0x05, ///< Dolby Digital + # dsAUDIO_STEREO_DDPLUS = 0x06, ///< Dolby Digital Plus + # dsAUDIO_STEREO_MAX = 0x07 ///< Out of range + stereo_modes: [0x02, 0x03, 0x04] # STEREO, SURROUND, PASSTHRU + stereo_auto_mode: true + # dsMS12SUPPORT_NONE = 0x0, ///< MS12 Supported None + # dsMS12SUPPORT_DolbyVolume = 0x01, //< MS12 supported Dolby Volume + # dsMS12SUPPORT_InteligentEqualizer = 0x02, ///< MS12 supported Intelligent Equalizer + # dsMS12SUPPORT_DialogueEnhancer = 0x04, ///< MS12 Dialogue Enhancer supported + # dsMS12SUPPORT_Volumeleveller = 0x08, ///< MS12 Volume leveller + # dsMS12SUPPORT_BassEnhancer = 0x10, ///< MS12 Bass Enhancer + # dsMS12SUPPORT_SurroundDecoder = 0x20, ///< MS12 Surround Decoder + # dsMS12SUPPORT_DRCMode = 0x40, ///< MS12 DRC Mode + # dsMS12SUPPORT_SurroundVirtualizer = 0x80, ///< MS12 Surround Virtualizer + # dsMS12SUPPORT_MISteering = 0x100, ///< MS12 MI Steering + # dsMS12SUPPORT_GraphicEqualizer = 0x200, ///< MS12 Graphic equalizer + # dsMS12SUPPORT_LEConfig = 0x400, ///< MS12 LE config + # dsMS12SUPPORT_Invalid = 0x800 ///< Invalid / Out of range + MS12_Capabilities: 0x00 # dsMS12SUPPORT_NONE + MS12_AudioProfiles: + # number of counts from the "ms12_audio_profiles.ini" file + MS12_AudioProfileCount: 0 + # @a true if audio port supports Dolby MS12 Multistream Decoding or @a false otherwise + IsMS12Decode: false + # @a true if audio port supports Dolby MS11 Multistream Decoding or @a false otherwise + IsMS11Decode: false + # dsAUDIO_ATMOS_NOTSUPPORTED = 0x00, ///< ATMOS audio not supported + # dsAUDIO_ATMOS_DDPLUSSTREAM = 0x01, ///< can handle dd plus stream which is only way to pass ATMOS metadata + # dsAUDIO_ATMOS_ATMOSMETADATA = 0x02, ///< capable of parsing ATMOS metadata + # dsAUDIO_ATMOS_MAX = 0x03 ///< Out of range + ATMOS_Capabilities: 0x00 # ATMOSMETADATA + # dsAUDIOARCSUPPORT_NONE = 0x0, ///< None + # dsAUDIOARCSUPPORT_ARC = 0x01, ///< Audio Return Channel + # dsAUDIOARCSUPPORT_eARC = 0x02, ///< Enhanced Audio Return Channel + Arc_Types: 0x01 # dsAUDIOARCSUPPORT_ARC + + # Port Number to parse the port details + 3: + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + # dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + # dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + # dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + # dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + Typeid: 0x02 # SPDIF + # SPEAKER + # HDMI_ARC + # SPDIF + # HEADPHONE + Name: "SPDIF" + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + #Number of supported compressions + number_of_supported_compressions: 0 + #dsAUDIO_CMP_NONE = 0x00, ///< No audio compression. + #dsAUDIO_CMP_LIGHT = 0x01, ///< Light audio level compression. + #dsAUDIO_CMP_MEDIUM = 0x02, ///< Medium audio level compression. + #dsAUDIO_CMP_HEAVY = 0x03, ///< Heavy audio level compression. + #dsAUDIO_CMP_MAX = 0x04 ///< Out of range + compressions: + #number of supported stereo modes + number_of_supported_stereo_modes: 3 + #dsAUDIO_STEREO_UNKNOWN = 0x00, ///< Stereo mode none + #dsAUDIO_STEREO_MONO = 0x01, ///< Mono mode + #dsAUDIO_STEREO_STEREO = 0x02, ///< Normal stereo mode (L+R) + #dsAUDIO_STEREO_SURROUND = 0x03, ///< Surround mode + #dsAUDIO_STEREO_PASSTHRU = 0x04, ///< Passthrough mode + #dsAUDIO_STEREO_DD = 0x05, ///< Dolby Digital + #dsAUDIO_STEREO_DDPLUS = 0x06, ///< Dolby Digital Plus + #dsAUDIO_STEREO_MAX = 0x07 ///< Out of range + stereo_modes: [0x02, 0x03, 0x04] # STEREO, SURROUND, PASSTHRU + stereo_auto_mode: true + # dsMS12SUPPORT_NONE = 0x0, ///< MS12 Supported None + # dsMS12SUPPORT_DolbyVolume = 0x01, //< MS12 supported Dolby Volume + # dsMS12SUPPORT_InteligentEqualizer = 0x02, ///< MS12 supported Intelligent Equalizer + # dsMS12SUPPORT_DialogueEnhancer = 0x04, ///< MS12 Dialogue Enhancer supported + # dsMS12SUPPORT_Volumeleveller = 0x08, ///< MS12 Volume leveller + # dsMS12SUPPORT_BassEnhancer = 0x10, ///< MS12 Bass Enhancer + # dsMS12SUPPORT_SurroundDecoder = 0x20, ///< MS12 Surround Decoder + # dsMS12SUPPORT_DRCMode = 0x40, ///< MS12 DRC Mode + # dsMS12SUPPORT_SurroundVirtualizer = 0x80, ///< MS12 Surround Virtualizer + # dsMS12SUPPORT_MISteering = 0x100, ///< MS12 MI Steering + # dsMS12SUPPORT_GraphicEqualizer = 0x200, ///< MS12 Graphic equalizer + # dsMS12SUPPORT_LEConfig = 0x400, ///< MS12 LE config + # dsMS12SUPPORT_Invalid = 0x800 ///< Invalid / Out of range + MS12_Capabilities: 0x00 # dsMS12SUPPORT_NONE + MS12_AudioProfiles: + # number of counts from the "ms12_audio_profiles.ini" file + MS12_AudioProfileCount: 0 + # @a true if audio port supports Dolby MS12 Multistream Decoding or @a false otherwise + IsMS12Decode: false + # @a true if audio port supports Dolby MS11 Multistream Decoding or @a false otherwise + IsMS11Decode: true + # dsAUDIO_ATMOS_NOTSUPPORTED = 0x00, ///< ATMOS audio not supported + # dsAUDIO_ATMOS_DDPLUSSTREAM = 0x01, ///< can handle dd plus stream which is only way to pass ATMOS metadata + # dsAUDIO_ATMOS_ATMOSMETADATA = 0x02, ///< capable of parsing ATMOS metadata + # dsAUDIO_ATMOS_MAX = 0x03 ///< Out of range + ATMOS_Capabilities: 0 # dsAUDIO_ATMOS_NOTSUPPORTED + + # Port Number to parse the port details + 4: + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + Typeid: 0x05 # HEADPHONE + # SPEAKER + # HDMI_ARC + # SPDIF + # HEADPHONE + Name: "HEADPHONE" + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + #Number of supported compressions + number_of_supported_compressions: 0 + #dsAUDIO_CMP_NONE = 0x00, ///< No audio compression. + #dsAUDIO_CMP_LIGHT = 0x01, ///< Light audio level compression. + #dsAUDIO_CMP_MEDIUM = 0x02, ///< Medium audio level compression. + #dsAUDIO_CMP_HEAVY = 0x03, ///< Heavy audio level compression. + #dsAUDIO_CMP_MAX = 0x04 ///< Out of range + compressions: + #Number of Supported stereo modes + number_of_supported_stereo_modes: 0 + #dsAUDIO_STEREO_UNKNOWN = 0x00, ///< Stereo mode none + #dsAUDIO_STEREO_MONO = 0x01, ///< Mono mode + #dsAUDIO_STEREO_STEREO = 0x02, ///< Normal stereo mode (L+R) + #dsAUDIO_STEREO_SURROUND = 0x03, ///< Surround mode + #dsAUDIO_STEREO_PASSTHRU = 0x04, ///< Passthrough mode + #dsAUDIO_STEREO_DD = 0x05, ///< Dolby Digital + #dsAUDIO_STEREO_DDPLUS = 0x06, ///< Dolby Digital Plus + #dsAUDIO_STEREO_MAX = 0x07 ///< Out of range + stereo_modes: + stereo_auto_mode: false + # dsMS12SUPPORT_NONE = 0x0, ///< MS12 Supported None + # dsMS12SUPPORT_DolbyVolume = 0x01, //< MS12 supported Dolby Volume + # dsMS12SUPPORT_InteligentEqualizer = 0x02, ///< MS12 supported Intelligent Equalizer + # dsMS12SUPPORT_DialogueEnhancer = 0x04, ///< MS12 Dialogue Enhancer supported + # dsMS12SUPPORT_Volumeleveller = 0x08, ///< MS12 Volume leveller + # dsMS12SUPPORT_BassEnhancer = 0x10, ///< MS12 Bass Enhancer + # dsMS12SUPPORT_SurroundDecoder = 0x20, ///< MS12 Surround Decoder + # dsMS12SUPPORT_DRCMode = 0x40, ///< MS12 DRC Mode + # dsMS12SUPPORT_SurroundVirtualizer = 0x80, ///< MS12 Surround Virtualizer + # dsMS12SUPPORT_MISteering = 0x100, ///< MS12 MI Steering + # dsMS12SUPPORT_GraphicEqualizer = 0x200, ///< MS12 Graphic equalizer + # dsMS12SUPPORT_LEConfig = 0x400, ///< MS12 LE config + # dsMS12SUPPORT_Invalid = 0x800 ///< Invalid / Out of range + MS12_Capabilities: 0x00 # dsMS12SUPPORT_NONE + MS12_AudioProfiles: + # number of counts from the "ms12_audio_profiles.ini" file + MS12_AudioProfileCount: 0 + # @a true if audio port supports Dolby MS12 Multistream Decoding or @a false otherwise + IsMS12Decode: false + # @a true if audio port supports Dolby MS11 Multistream Decoding or @a false otherwise + IsMS11Decode: false + # dsAUDIO_ATMOS_NOTSUPPORTED = 0x00, ///< ATMOS audio not supported + # dsAUDIO_ATMOS_DDPLUSSTREAM = 0x01, ///< can handle dd plus stream which is only way to pass ATMOS metadata + # dsAUDIO_ATMOS_ATMOSMETADATA = 0x02, ///< capable of parsing ATMOS metadata + # dsAUDIO_ATMOS_MAX = 0x03 ///< Out of range + ATMOS_Capabilities: 0 # dsAUDIO_ATMOS_NOTSUPPORTED diff --git a/profiles/source/Source_AudioSettings.yaml b/profiles/source/Source_AudioSettings.yaml new file mode 100644 index 00000000..b897a953 --- /dev/null +++ b/profiles/source/Source_AudioSettings.yaml @@ -0,0 +1,85 @@ + +dsAudio: + Type: source + Name: dsAudio_1_port + + # Profile for L1 + features: + extendedEnumsSupported: false + + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + # dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + # dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + # dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + # dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + PortTypes: + - 0x00 # ID_LR + - 0x01 # HDMI + - 0x02 # SPDIF + + # Number of supported ports + Number_of_supported_ports: 1 + + # dsAUDIOSUPPORT_NONE = 0x0, ///< None + # dsAUDIOSUPPORT_ATMOS = 0x01, ///< Dolby Atmos + # dsAUDIOSUPPORT_DD = 0x02, ///< Dolby Digitial + # dsAUDIOSUPPORT_DDPLUS = 0x04, ///< Dolby Digital Plus + # dsAUDIOSUPPORT_DAD = 0x08, ///< Digital Audio Delivery + # dsAUDIOSUPPORT_DAPv2 = 0x10, ///< Digital Audio Processing version 2 + # dsAUDIOSUPPORT_MS12 = 0x20, ///< Multi Stream 12 + # dsAUDIOSUPPORT_MS12V2 = 0x40, ///< Multi Stream Version 2 + # dsAUDIOSUPPORT_Invalid = 0x80, ///< Invalid + Audio_Capabilities: 0x37 # dsAUDIOSUPPORT_ATMOS | dsAUDIOSUPPORT_DAPv2 | dsAUDIOSUPPORT_MS12 | dsAUDIOSUPPORT_DD | dsAUDIOSUPPORT_DDPLUS + + # Port details + Ports: + # Port Number to parse the port details + 1: + # dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + # dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + # dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + Typeid: 0x01 # HDMI + Name: "HDMI" + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # number of supported compressions + number_of_supported_compressions: 4 + # dsAUDIO_CMP_NONE = 0x00, ///< No audio compression. + # dsAUDIO_CMP_LIGHT = 0x01, ///< Light audio level compression. + # dsAUDIO_CMP_MEDIUM = 0x02, ///< Medium audio level compression. + # dsAUDIO_CMP_HEAVY = 0x03, ///< Heavy audio level compression. + compressions: [0x00, 0x01, 0x02, 0x03] # NONE, LIGHT, MEDIUM, HEAVY + # Number of supported Stereo modes + number_of_supported_stereo_modes: 3 + # dsAUDIO_STEREO_UNKNOWN = 0x00, ///< Stereo mode none + # dsAUDIO_STEREO_MONO = 0x01, ///< Mono mode + # dsAUDIO_STEREO_STEREO = 0x02, ///< Normal stereo mode (L+R) + # dsAUDIO_STEREO_SURROUND = 0x03, ///< Surround mode + # dsAUDIO_STEREO_PASSTHRU = 0x04, ///< Passthrough mode + stereo_modes: [0x02, 0x03, 0x04] # STEREO, SURROUND, PASSTHRU + stereo_auto_mode: true + # dsMS12SUPPORT_NONE = 0x0, ///< MS12 Supported None + # dsMS12SUPPORT_DolbyVolume = 0x01, //< MS12 supported Dolby Volume + # dsMS12SUPPORT_InteligentEqualizer = 0x02, ///< MS12 supported Intelligent Equalizer + # dsMS12SUPPORT_DialogueEnhancer = 0x04, ///< MS12 Dialogue Enhancer supported + # dsMS12SUPPORT_Volumeleveller = 0x08, ///< MS12 Volume leveller + # dsMS12SUPPORT_BassEnhancer = 0x10, ///< MS12 Bass Enhancer + # dsMS12SUPPORT_SurroundDecoder = 0x20, ///< MS12 Surround Decoder + # dsMS12SUPPORT_DRCMode = 0x40, ///< MS12 DRC Mode + # dsMS12SUPPORT_SurroundVirtualizer = 0x80, ///< MS12 Surround Virtualizer + # dsMS12SUPPORT_MISteering = 0x100, ///< MS12 MI Steering + # dsMS12SUPPORT_GraphicEqualizer = 0x200, ///< MS12 Graphic equalizer + # dsMS12SUPPORT_LEConfig = 0x400, ///< MS12 LE config + # dsMS12SUPPORT_Invalid = 0x800 ///< Invalid / Out of range + MS12_Capabilities: 0x05 # DolbyVolume | IntelligentEqualizer | DialogueEnhancer + MS12_AudioProfiles: + # number of counts from the "ms12_audio_profiles.ini" file + MS12_AudioProfileCount: 0 + IsMS12Decode: true + IsMS11Decode: false + # dsAUDIO_ATMOS_NOTSUPPORTED = 0x00, ///< ATMOS audio not supported + # dsAUDIO_ATMOS_SUPPORTED = 0x01, ///< ATMOS audio supported + ATMOS_Capabilities: 0x01 # dsAUDIO_ATMOS_SUPPORTED + diff --git a/src/main.c b/src/main.c index 98857d06..8279e28c 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -65,40 +65,51 @@ */ #include +#include "test_parse_configuration.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); int main(int argc, char** argv) { - int registerReturn = 0; + int registerReturn = 0; - /* Register tests as required, then call the UT-main to support switches and triggering */ - UT_init( argc, argv ); + /* Register tests as required, then call the UT-main to support switches and triggering */ + UT_init( argc, argv ); - /* Check if tests are registered successfully */ + if ( test_parse_configuration() == -1 ) + { + printf("\n Failed to parse the configuration file"); + test_parse_configuration_term(); + return -1; + } - registerReturn = UT_register_APIDEF_l1_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l1_tests() returned failure"); - return -1; - } + /* Check if tests are registered successfully */ - registerReturn = UT_register_APIDEF_l2_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l2_tests() returned failure"); - return -1; - } + registerReturn = UT_register_APIDEF_l1_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l1_tests() returned failure"); + return -1; + } - /* Begin test executions */ - UT_run_tests(); + registerReturn = UT_register_APIDEF_l2_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l2_tests() returned failure"); + return -1; + } - return 0; + /* Begin test executions */ + UT_run_tests(); + + test_parse_configuration_term(); + + return 0; } /** @} */ // End of Device_Settings_MAIN /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK + diff --git a/src/test_dsAudio_parse_configuration.c b/src/test_dsAudio_parse_configuration.c new file mode 100644 index 00000000..93e9e2d6 --- /dev/null +++ b/src/test_dsAudio_parse_configuration.c @@ -0,0 +1,196 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @addtogroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File + * @{ + */ + +/** + * @defgroup Device_Settings_DS_AUDIO_PARSE_CONFIG Device Settings HAL Tests audio parse configuraion File + * @{ + * @parblock + * + * ### Audio Parse configuraion functions for Device Settings HAL : + * + * Parse configuraion functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_dsAudio_parse_configuration.c +* +*/ +#include +#include +#include +#include + +#include "dsAudio.h" +#include "test_parse_configuration.h" + +/* Global Vairables */ +dsAudioPortConfiguration_t* gDSAudioPortConfiguration = NULL; +char gDSAudioDeviceName[DS_AUDIO_DEVICE_NAME_SIZE] = {0}; +int32_t gDSAudioNumberOfPorts = 0; +int32_t gAudioCapabilities = 0x0; + +/* Parse Audio Configuration file */ +int test_dsAudio_parse_configuration() +{ + char key_string[DS_AUDIO_KVP_SIZE]; + ut_kvp_status_t status; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio.Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); + + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio/Name", gDSAudioDeviceName, DS_AUDIO_DEVICE_NAME_SIZE); + + UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDSAudioDeviceName); + + gAudioCapabilities = UT_KVP_PROFILE_GET_UINT32("dsAudio/Audio_Capabilities"); + gDSAudioNumberOfPorts = UT_KVP_PROFILE_GET_UINT32("dsAudio/Number_of_supported_ports"); + + gDSAudioPortConfiguration = (dsAudioPortConfiguration_t*) calloc(gDSAudioNumberOfPorts, sizeof(dsAudioPortConfiguration_t)); + if(gDSAudioPortConfiguration == NULL) { + UT_LOG_ERROR("Failed to allcoate memory for audio configuration structure"); + return -1; + } + + for(int i = 0; i < gDSAudioNumberOfPorts; i++) { + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/Typeid" , i+1); + gDSAudioPortConfiguration[i].typeid = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + if(gDSAudioPortConfiguration[i].typeid == dsAUDIOPORT_TYPE_HDMI_ARC) { + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/Arc_Types" , i+1); + gDSAudioPortConfiguration[i].arc_type = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + } + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/Index" , i+1); + gDSAudioPortConfiguration[i].index = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/Name" , i+1); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSAudioPortConfiguration[i].port_name, UT_KVP_MAX_ELEMENT_SIZE); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/number_of_supported_compressions" , i+1); + gDSAudioPortConfiguration[i].no_of_supported_compression = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/number_of_supported_stereo_modes" , i+1); + gDSAudioPortConfiguration[i].no_of_supported_stereo_mode = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/stereo_auto_mode" , i+1); + gDSAudioPortConfiguration[i].stereo_auto_mode = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/MS12_Capabilities" , i+1); + gDSAudioPortConfiguration[i].ms12_capabilites = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), key_string ); + + memset(key_string, 0, DS_AUDIO_KVP_SIZE); + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/MS12_AudioProfileCount" , i+1); + gDSAudioPortConfiguration[i].ms12_audioprofilecount = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/IsMS12Decode" , i+1); + gDSAudioPortConfiguration[i].isms12decode = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/IsMS11Decode" , i+1); + gDSAudioPortConfiguration[i].isms11decode = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); + + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/ATMOS_Capabilities" , i+1); + gDSAudioPortConfiguration[i].atmos_capabilites = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), key_string ); + + // loop to get supported compressions in array + for(int j = 0; j < gDSAudioPortConfiguration[i].no_of_supported_compression; j++) { + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/compressions/%d" , i+1 , j); + gDSAudioPortConfiguration[i].supported_compressions[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + } + + //loop to get supported stereo modes in array + for(int j = 0; j < gDSAudioPortConfiguration[i].no_of_supported_stereo_mode; j++) { + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/stereo_modes/%d" , i+1 , j); + gDSAudioPortConfiguration[i].supported_stereo_mode[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + } + + // loop to get ms12 audio profiles + for(int j = 0; j < gDSAudioPortConfiguration[i].ms12_audioprofilecount; j++) { + snprintf(key_string, DS_AUDIO_KVP_SIZE, "dsAudio/Ports/%d/MS12_AudioProfiles/%d" , i+1 , j); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSAudioPortConfiguration[i].ms12_audio_profiles[j], UT_KVP_MAX_ELEMENT_SIZE); + } + } + + return 0; +} + +void test_dsAudio_parse_configuration_term() +{ + if(gDSAudioPortConfiguration) { + free(gDSAudioPortConfiguration); + } +} + +/** @} */ // End of Device_Settings_DS_AUDIO_PARSE_CONFIG +/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK + diff --git a/src/test_dsAudio_parse_configuration.h b/src/test_dsAudio_parse_configuration.h new file mode 100644 index 00000000..0d3379d3 --- /dev/null +++ b/src/test_dsAudio_parse_configuration.h @@ -0,0 +1,116 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @addtogroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File + * @{ + */ + +/** + * @defgroup Device_Settings_DS_AUDIO_PARSE_CONFIG_H Device Settings HAL Tests audio parse configuraion Header File + * @{ + * @parblock + * + * ### Audio Parse configuraion functions for Device Settings HAL : + * + * Parse configuraion functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_dsAudio_parse_configuration.h +* +*/ +#ifndef __TEST_DSAUDIO_PARSE_CONFIG_H__ +#define __TEST_DSAUDIO_PARSE_CONFIG_H__ + +#include "dsAudio.h" + +#define DS_AUDIO_KVP_SIZE 128 +#define DS_AUDIO_PORT_NAME_SIZE 32 +#define DS_AUDIO_MAX_MS12_PROFILE_LIST 10 +#define DS_AUDIO_MAX_MS12_PROFILE_LEN 32 +#define DS_AUDIO_DEVICE_NAME_SIZE 64 + +#define DS_AUDIO_MOULE_NAME "dsAudio" + +typedef struct _dsAudioPortConfiguration_t { + uint16_t typeid; + uint16_t index; + char port_name[DS_AUDIO_PORT_NAME_SIZE]; + int32_t no_of_supported_compression; + int32_t supported_compressions[dsAUDIO_CMP_MAX]; + int32_t no_of_supported_stereo_mode; + int32_t supported_stereo_mode[dsAUDIO_STEREO_MAX]; + bool stereo_auto_mode; + int32_t ms12_capabilites; + char ms12_audio_profiles[DS_AUDIO_MAX_MS12_PROFILE_LIST][DS_AUDIO_MAX_MS12_PROFILE_LEN]; + int32_t ms12_audioprofilecount; + bool isms12decode; + bool isms11decode; + int32_t atmos_capabilites; + int32_t arc_type; +}dsAudioPortConfiguration_t; + +/* Global variables */ +extern dsAudioPortConfiguration_t* gDSAudioPortConfiguration; +extern char gDSAudioDeviceName[]; +extern int32_t gDSAudioNumberOfPorts; +extern int32_t gAudioCapabilities; + +/*Function prototypes */ +int test_dsAudio_parse_configuration(); +void test_dsAudio_parse_configuration_term(); + +#endif //__TEST_DSAUDIO_PARSE_CONFIG_H__ + +/** @} */ // End of Device_Settings_DS_AUDIO_PARSE_CONFIG_H +/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index 9924734d..cb9a13f6 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ /** * @defgroup DS_Audio_HALTEST_L2 Device Settings Audio HAL Tests L2 File * @{ - * @parblock + * @parblock * * ### L2 Tests for DS Audio HAL : * @@ -58,7 +58,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-audio_halSpec.md](../../docs/pages/ds-audio_halSpec.md) * * @endparblock */ @@ -68,49 +68,2254 @@ * @file test_l2_dsAudio.c * */ -#include + +#include +#include + +#include #include +#include "dsAudio.h" +#include "test_parse_configuration.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief This test verifies the functionality of enabling, disabling and +* verifying the status of an audio port. +* +* This test function initializes an audio port, enables it, verifies its status, +* disables it, and then verifies its status again. This is done for all types of +* audio ports and for all indices. The test ensures that the audio port can be +* successfully enabled and disabled, and that the status of the port accurately +* reflects these changes. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: true", handle); + ret = dsEnableAudioPort(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not enabled", ret); + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: false", handle); + ret = dsEnableAudioPort(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not disabled", ret); + } + } //for (port) + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the connection status of the headphone port on sink platform +* +* This test initializes the audio port, gets the audio port for each type, checks +* if the headphone port is connected, and finally terminates the audio port. The test +* is designed to verify the correct functioning of the dsAudio module's headphone +* connection status checking mechanism. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool isConnected; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HEADPHONE) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsAudioOutIsConnected with handle: %p", handle); + ret = dsAudioOutIsConnected(handle, &isConnected); + UT_LOG_DEBUG("Return status: %d, isConnected: %d", ret, isConnected); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(isConnected, false); + if (ret != dsERR_NONE || isConnected) { + UT_LOG_ERROR("dsAudioOutIsConnected failed with error %d or Audio out is connected", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to retrieve and verify MS12 capabilities of the platform +* +* This test function is designed to retrieve and verify the MS12 capabilities +* of the audio sink. It initializes the audio port, gets the audio port with a +* specific type and index, retrieves the MS12 capabilities, and then terminates +* the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_capabilites == 0) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12Capabilities with handle: %p", handle); + retStatus = dsGetMS12Capabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12Capabilities failed with error %d", retStatus); + } + UT_ASSERT_EQUAL(capabilities, gDSAudioPortConfiguration[port].ms12_capabilites); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* audio compression for different audio port types. +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is invoked to get the handle of the audio port. For each compression level +* from 0 to 10, the dsSetAudioCompression function is invoked to set the +* audio compression level, and the dsGetAudioCompression function is invoked +* to get the set compression level. The set and got compression levels are then +* compared to verify if they are equal. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioCompression(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int compression, getCompression; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + if(gDSAudioPortConfiguration[port].no_of_supported_compression == 0) { + continue; + } + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + for (compression = 0; compression < gDSAudioPortConfiguration[port].no_of_supported_compression; compression++) { + UT_LOG_DEBUG("Invoking dsSetAudioCompression with handle: %p and compression: %d", + handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + ret = dsSetAudioCompression(handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetAudioCompression failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioCompression with handle: %p", handle); + ret = dsGetAudioCompression(handle, &getCompression); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioCompression failed with error: %d", ret); + } + + UT_LOG_DEBUG("Compression set: %d, Compression got: %d", gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + UT_ASSERT_EQUAL(gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + } /* for (compression) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dialog Enhancement for dsAudio +* +* This test sets the Dialog Enhancement for dsAudio and then gets the +* Dialog Enhancement to verify if the set operation was successful. +* This is done for all audio port types and for two indexes. The test is +* designed to ensure the proper functioning of the dsAudio's Dialog Enhancement +* set and get operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDialogEnhancement(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DialogueEnhancer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort() failed with error: %d", ret); + continue; + } + + for (level = 0; level <= 16; level++) { + UT_LOG_DEBUG("Invoking dsSetDialogEnhancement() with handle: %p and level: %d", handle, level); + ret = dsSetDialogEnhancement(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDialogEnhancement() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDialogEnhancement() with handle: %p", handle); + ret = dsGetDialogEnhancement(handle, &getLevel); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDialogEnhancement() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level: %d", getLevel); + UT_ASSERT_EQUAL(getLevel, level); + }/* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dolby volume mode for different audio port types. +* +* This test initializes the audio port, then for each audio port type, +* it gets the audio port, sets the Dolby volume mode to true, gets the +* Dolby volume mode and checks if it is true, sets the Dolby volume mode +* to false, gets the Dolby volume mode and checks if it is false, and +* finally terminates the audio port. The test is designed to verify the +* functionality of setting and getting the Dolby volume mode for different audio port types. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 06@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDolbyVolumeMode(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DolbyVolume)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode true", handle); + ret = dsSetDolbyVolumeMode(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,true); + if (ret != dsERR_NONE || !mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode false", handle); + ret = dsSetDolbyVolumeMode(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,false); + if (ret != dsERR_NONE || mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the Intelligent Equalizer Mode for dsAudio +* +* In this test, the Intelligent Equalizer Mode for dsAudio is set and then +* retrieved to verify if the set operation was successful. This is done for +* all audio port types and for all modes from 0 to 6. The test is crucial +* to ensure the correct functioning of the Intelligent Equalizer Mode +* setting and retrieval operations in dsAudio. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetIntelligentEqualizerMode(void) +{ + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_InteligentEqualizer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 6; mode++) { + UT_LOG_DEBUG("Invoking dsSetIntelligentEqualizerMode with handle %p and mode %d", handle, mode); + ret = dsSetIntelligentEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetIntelligentEqualizerMode failed with error %d", ret); + continue; + } + + int getMode = 0; + UT_LOG_DEBUG("Invoking dsGetIntelligentEqualizerMode with handle %p", handle); + ret = dsGetIntelligentEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetIntelligentEqualizerMode failed with error %d", ret); + } + + UT_LOG_DEBUG("Returned mode %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* the volume leveller for a given audio sink +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is called to get the handle of the audio port. The dsSetVolumeLeveller function +* is then used to set the volume leveller for the obtained audio port. +* The dsGetVolumeLeveller function is subsequently called to retrieve the volume +* leveller that was set. The retrieved volume leveller is then compared with the set +* volume leveller to verify if they match. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 08@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetVolumeLeveller(void) +{ + gTestID = 8; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + dsVolumeLeveller_t volLevellerSet = {0, 0}, volLevellerGet; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_Volumeleveller is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x08)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int level = 0; level <= 10; level++) { + volLevellerSet.mode = mode; + volLevellerSet.level = level; + UT_LOG_DEBUG("Invoking dsSetVolumeLeveller with handle: %p and volLeveller: {mode: %d, level: %d}", handle, volLevellerSet.mode, volLevellerSet.level); + retStatus = dsSetVolumeLeveller(handle, volLevellerSet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsSetVolumeLeveller failed with status: %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetVolumeLeveller with handle: %p", handle); + retStatus = dsGetVolumeLeveller(handle, &volLevellerGet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetVolumeLeveller failed with status: %d", retStatus); + } + + UT_LOG_DEBUG("Retrieved volLeveller: {mode: %d, level: %d}", volLevellerGet.mode, volLevellerGet.level); + UT_ASSERT_EQUAL(volLevellerGet.mode, volLevellerSet.mode); + UT_ASSERT_EQUAL(volLevellerGet.level, volLevellerSet.level); + } /* for (mode) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Bass Enhancer for audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. A random boost value is set using dsSetBassEnhancer() +* function and then retrieved using dsGetBassEnhancer() function. The set and retrieved +* boost values are then compared for equality. Finally, the dsAudioPortTerm() function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 09@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetBassEnhancer(void) +{ + gTestID = 9; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int boost = 0; + int setBoost = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_BassEnhancer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x10)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (setBoost = 0; setBoost <= 100; setBoost++) { + UT_LOG_DEBUG("Invoking dsSetBassEnhancer() with handle: %p and boost: %d", handle, setBoost); + ret = dsSetBassEnhancer(handle, setBoost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetBassEnhancer() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetBassEnhancer() with handle: %p", handle); + ret = dsGetBassEnhancer(handle, &boost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetBassEnhancer() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Boost value: %d", boost); + UT_ASSERT_EQUAL(boost, setBoost); + } /* for (setBoost) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the enabling and functionality of the +* Surround Decoder sink in the L2 dsAudio module +* +* This test initializes the dsAudio port, gets the audio port for each type, +* enables the surround decoder, checks if the surround decoder is enabled, and +* finally terminates the dsAudio port. The test is designed to ensure that the +* surround decoder can be successfully enabled and function as expected in the +* L2 dsAudio module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 010@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableAndVerifySurroundDecoder(void) +{ + gTestID = 10; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = true; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundDecoder is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x20)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to true", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + + enabled = false; + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to false", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting DRC mode in dsAudio. +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. For each mode (0 and 1), the dsSetDRCMode() function +* is invoked to set the DRC mode and the dsGetDRCMode() function is invoked to +* get the DRC mode. The test asserts that the mode set is the same as the mode got. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 011@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDRCMode(void) +{ + gTestID = 11; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mode; + int getMode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_DRCMode is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x40)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 1; mode++) { + UT_LOG_DEBUG("Invoking dsSetDRCMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetDRCMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDRCMode() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDRCMode() with handle=%p", handle); + ret = dsGetDRCMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDRCMode() failed with status: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(getMode, mode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Surround Virtualizer in dsAudio +* +* In this test, the dsAudioPortInit function is invoked to initialize the audio port. +* Then, for each audio port type and index, the dsGetAudioPort function is invoked +* to get the audio port handle. The dsSetSurroundVirtualizer function is then invoked +* to set the surround virtualizer for the obtained handle. The dsGetSurroundVirtualizer +* function is then invoked to get the surround virtualizer for the same handle. +* The obtained virtualizer is then compared with the set virtualizer to validate +* the set and get functionality. Finally, the dsAudioPortTerm function is invoked +* to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 012@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetSurroundVirtualizer(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsSurroundVirtualizer_t virtualizer = {0, 0}, getVirtualizer; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundVirtualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x80)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int boost = 0; boost <= 96; boost +=16) { + virtualizer.mode = mode; + virtualizer.boost = boost; + UT_LOG_DEBUG("Invoking dsSetSurroundVirtualizer with handle: %p and virtualizer: {mode: %d, boost: %d}", handle, virtualizer.mode, virtualizer.boost); + ret = dsSetSurroundVirtualizer(handle, virtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetSurroundVirtualizer failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSurroundVirtualizer with handle: %p", handle); + ret = dsGetSurroundVirtualizer(handle, &getVirtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetSurroundVirtualizer failed with error: %d", ret); + } + + UT_LOG_DEBUG("Received virtualizer: {mode: %d, boost: %d}", getVirtualizer.mode, getVirtualizer.boost); + UT_ASSERT_EQUAL(getVirtualizer.mode, virtualizer.mode); + UT_ASSERT_EQUAL(getVirtualizer.boost, virtualizer.boost); + } /* for (boost) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting MISteering in dsAudio. +* +* In this test, we initialize the audio port and then for each type of audio port +* and for each index, we set the MISteering to true and then get the MISteering +* to verify if it has been set correctly. If any of these operations fail, +* we log the error and continue with the next iteration. Finally, we terminate +* the audio port and assert that the operation was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 013@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMISteering(void) +{ + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool enabled; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_MISteering is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x100)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=true", handle); + ret = dsSetMISteering(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, true); + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=false", handle); + ret = dsSetMISteering(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Graphic Equalizer Mode in dsAudio +* +* In this test, the dsAudioPortInit() function is first invoked to initialize +* the audio port. Then, for each type of audio port and for each index, +* the dsGetAudioPort() function is invoked to get the audio port. +* For each mode from 0 to 3, the dsSetGraphicEqualizerMode() function is +* invoked to set the graphic equalizer mode and the dsGetGraphicEqualizerMode() +* function is invoked to get the graphic equalizer mode. The mode set and +* the mode got are then compared to ensure they are equal. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 014@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetGraphicEqualizerMode(void) +{ + gTestID = 14; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + int getMode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_GraphicEqualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x200)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (mode = 0; mode <= 3; mode++) { + UT_LOG_DEBUG("Invoking dsSetGraphicEqualizerMode() with handle: %p and mode: %d", handle, mode); + ret = dsSetGraphicEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetGraphicEqualizerMode() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetGraphicEqualizerMode() with handle: %p", handle); + ret = dsGetGraphicEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetGraphicEqualizerMode() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to enable, disable and retrieve the LE configuration for the audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index up to 10, the dsGetAudioPort() +* function is invoked to get the audio port. If successful, the dsEnableLEConfig() +* function is invoked to enable the LE configuration. The dsGetLEConfig() function is +* then invoked to retrieve the LE configuration. If successful, the dsEnableLEConfig() +* function is invoked again to disable the LE configuration. The dsGetLEConfig() function +* is then invoked again to check if the LE configuration has been disabled. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 015@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndRetrieveLEConfig(void) +{ + gTestID = 15; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enable = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_LEConfig is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x400)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=true", handle); + ret = dsEnableLEConfig(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || !enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,true); + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=false", handle); + ret = dsEnableLEConfig(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to check MS12 decode support for dsAudio +* +* This test checks if the MS12 decode support is available for dsAudio. +* It initializes the audio port, gets the audio port for each type and index, +* checks if MS12 decode is available, and finally terminates the audio port. +* The test is designed to ensure the correct functioning of dsAudio's MS12 decode support. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 016@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS12DecodeSupport(void) +{ + gTestID = 16; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool hasMS12Decode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("dsGetAudioPort returned handle %p", handle); + + UT_LOG_DEBUG("Invoking dsIsAudioMS12Decode with handle %p", handle); + ret = dsIsAudioMS12Decode(handle, &hasMS12Decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMS12Decode returned %d", ret); + } + UT_LOG_DEBUG("dsIsAudioMS12Decode returned %d", hasMS12Decode); + + UT_ASSERT_EQUAL(hasMS12Decode, gDSAudioPortConfiguration[port].isms12decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the support for MS11 decoding in dsAudio +* +* This test initializes the audio port and checks if MS11 decoding is supported +* for each audio port type. If the decoding is supported, it verifies the obtained +* values with the values retrieved from the 'Sink_AudioSettings.yaml' file. +* The test ends by terminating the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 017@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS11DecodeSupport(void) +{ + gTestID = 17; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool HasMS11Decode = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); -#include -#include + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsAudioMSDecode with handle: %p", handle); + ret = dsIsAudioMSDecode(handle, &HasMS11Decode); + UT_LOG_DEBUG("Return status: %d, HasMS11Decode: %d, SupportedMS11: %d", + ret, HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the MS12 Audio Profiles for a given sink +* +* This test case verifies the MS12 Audio Profiles for a given sink. +* It checks if the correct audio profiles are returned for a valid sink. +* This is important to ensure that the audio profiles are correctly configured and retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 018@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyMS12AudioProfiles_sink(void) +{ + gTestID = 18; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList with valid handle"); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_LOG_DEBUG("Return status: %d, Profiles: %s, Profile Count: %d", ret, profiles.audioProfileList, profiles.audioProfileCount); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(profiles.audioProfileCount, gDSAudioPortConfiguration[port].ms12_audioprofilecount); + + for (int i = 0; i < profiles.audioProfileCount; i++) { + if(strstr(profiles.audioProfileList, gDSAudioPortConfiguration[port].ms12_audio_profiles[i]) == NULL) { + UT_FAIL("Audioprofile mismatch"); + UT_LOG_ERROR("%s is not in %s", gDSAudioPortConfiguration[port].ms12_audio_profiles[i], profiles.audioProfileList); + } + } /* for (i) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of MS12 Audio Profile for different audio ports. +* +* In this test, the dsAudioPortInit() function is first invoked to +* initialize the audio port. Then, for each type of audio port, +* the dsGetAudioPort() function is invoked to get the handle of the audio port. +* The dsGetMS12AudioProfileList() function is then invoked to get the list of MS12 audio profiles. +* For each profile in the list, the dsSetMS12AudioProfile() function is invoked to set +* the profile, and the dsGetMS12AudioProfile() function is invoked to get the profile. +* The set and get profiles are then compared for equality. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. The test ensures that all these functions +* work as expected for different types of audio ports and profiles. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 019@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMS12AudioProfile_sink(void) +{ + gTestID = 19; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList() with handle=%p", handle); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfileList() failed with status=%d", ret); + } + + char *profileName = strtok(profiles.audioProfileList, ","); + char profile[DS_AUDIO_MAX_MS12_PROFILE_LEN]; + while (profileName != NULL) { + UT_LOG_DEBUG("Invoking dsSetMS12AudioProfile() with handle=%p and profile=%s", handle, profileName); + ret = dsSetMS12AudioProfile(handle, profileName); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMS12AudioProfile() failed with status=%d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfile() with handle=%p", handle); + ret = dsGetMS12AudioProfile(handle, profile); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfile() failed with status=%d", ret); + } + + UT_ASSERT_STRING_EQUAL(profile, profileName); + profileName = strtok(NULL, ","); + } /* while (profileName) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting the stereo mode of an audio sink +* +* This test checks if the stereo mode of an audio sink can be set and +* retrieved correctly. It does this by first initializing the audio port, +* then getting the audio port for each type and index. It then sets the +* stereo mode for the retrieved audio port and checks if the set mode +* can be retrieved correctly. If any of these operations fail, it logs +* an error and continues with the next iteration. Finally, it terminates +* the audio port and checks if the termination was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 020@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoMode(void) +{ + gTestID = 20; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsAudioStereoMode_t getmode ,mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].no_of_supported_stereo_mode <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (int j = 0; j < gDSAudioPortConfiguration[port].no_of_supported_stereo_mode; j++) { + mode = gDSAudioPortConfiguration[port].supported_stereo_mode[j]; + UT_LOG_DEBUG("Invoking dsSetStereoMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetStereoMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetStereoMode() with handle=%p", handle); + ret = dsGetStereoMode(handle, &getmode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Stereo mode: %d and return status: %d", getmode, ret); + UT_ASSERT_EQUAL(mode, getmode); + } /* for (j) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Stereo Auto mode in dsAudio API +* +* This test function tests the setting and getting of Stereo Auto mode +* in dsAudio API. It first initializes the audio port, then for each +* audio port type, it gets the audio port, sets the Stereo Auto mode, +* gets the Stereo Auto mode and validates it. The test is designed +* to ensure that the dsAudio API's set and get functions for +* Stereo Auto mode are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 021@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoAuto_sink(void) +{ + gTestID = 21; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int autoMode = 1; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!gDSAudioPortConfiguration[port].stereo_auto_mode) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("Handle: %p", handle); + + UT_LOG_DEBUG("Invoking dsSetStereoAuto with handle %p and autoMode %d", handle, autoMode); + ret = dsSetStereoAuto(handle, autoMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getAutoMode; + UT_LOG_DEBUG("Invoking dsGetStereoAuto with handle %p", handle); + ret = dsGetStereoAuto(handle, &getAutoMode); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetStereoAuto failed with error %d", ret); + } + UT_LOG_DEBUG("AutoMode: %d", getAutoMode); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getAutoMode, autoMode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting audio gain for different audio ports +* +* This test is designed to verify the functionality of setting and getting +* audio gain for different audio ports. It tests the dsSetAudioGain and +* dsGetAudioGain functions by setting a range of gain values and then +* getting the gain value to verify if the set value is correctly retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 022@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioGain_sink(void) +{ + gTestID = 22; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float gain, getGain; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (gain = -2080; gain <= 480; gain += 10) { + UT_LOG_DEBUG("Invoking dsSetAudioGain with handle=%p and gain=%f", handle, gain); + ret = dsSetAudioGain(handle, gain); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioGain with handle=%p", handle); + ret = dsGetAudioGain(handle, &getGain); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioGain failed with status=%d", ret); + } + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(gain, getGain); + } /* for (gain) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio level for a sink +* +* In this test, the audio level for a sink is set and then retrieved +* to verify if the set operation was successful. This is done for all +* audio port types and for all ports. The test is crucial to ensure +* the correct functioning of the audio level setting and getting operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 023@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioLevel_sink(void) +{ + gTestID = 23; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (level = 0; level <= 100; level+=10) { + UT_LOG_DEBUG("Invoking dsSetAudioLevel with handle=%p and level=%f", handle, level); + ret = dsSetAudioLevel(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioLevel with handle=%p", handle); + ret = dsGetAudioLevel(handle, &getLevel); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioLevel failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level=%f and status=%d", getLevel, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(level, getLevel); + } /* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the functionality of audio mute in dsAudio API +* +* This test case is designed to verify the audio mute functionality of +* the dsAudio API. It tests the ability of the API to mute and unmute the audio, +* and to correctly report the mute status. This is important to ensure that +* the API is correctly controlling the audio output and that it can +* accurately report the current mute status. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 024@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioMuteVerification(void) +{ + gTestID = 24; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mute = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: true", handle); + ret = dsSetAudioMute(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, true); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: false", handle); + ret = dsSetAudioMute(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, false); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio delay for a sink +* +* In this test, the audio delay for a sink is set and then retrieved +* to verify if the set value is correctly stored and retrieved. +* This is done for all audio port types. The test is crucial to ensure +* the correct functioning of audio delay setting and retrieval in the system. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 025@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioDelay(void) +{ + gTestID = 25; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + uint32_t setDelay = 100; + uint32_t getDelay; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPDIF && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI_ARC && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioDelay with handle and delay %d ms", setDelay); + ret = dsSetAudioDelay(handle, setDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioDelay with handle"); + ret = dsGetAudioDelay(handle, &getDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioDelay failed with error %d", ret); + } + + UT_LOG_DEBUG("Retrieved audio delay: %d ms", getDelay); + UT_ASSERT_EQUAL(getDelay, setDelay); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the Atmos capabilities of the sink +* +* In this test, the Atmos capabilities of the sink are verified by +* initializing the audio port, getting the audio port with type speaker and index 1, +* getting the sink device Atmos capability, and finally terminating the audio port. +* The test ensures that all these operations are successful and the returned values are as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 026@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyAtmosCapabilities_sink(void) +{ + gTestID = 26; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + dsATMOSCapability_t capability; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].atmos_capabilites == 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSinkDeviceAtmosCapability with handle=%p", handle); + ret = dsGetSinkDeviceAtmosCapability(handle, &capability); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsGetSinkDeviceAtmosCapability returned %d and capability=%d", ret, capability); + + UT_ASSERT_EQUAL(capability, gDSAudioPortConfiguration[port].atmos_capabilites); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of the dsAudio_GetAudioCapabilities_sink API +* +* This test case is designed to validate the dsAudio_GetAudioCapabilities_sink API. +* The test case will initialize the audio port, get the audio port with type as +* sink and index as 0, get the audio capabilities with the handle obtained from +* the previous step, and finally terminate the audio port. The test case will +* assert the return status of each operation to ensure they are successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 027@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_GetAudioCapabilities(void) +{ + gTestID = 27; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type as sink and index as 0"); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioCapabilities with handle obtained from previous step"); + retStatus = dsGetAudioCapabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_ASSERT_EQUAL(capabilities, gAudioCapabilities); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the enabling, disabling and +* retrieval of audio mixing in the dsAudio API. +* +* This test function iterates over all audio ports, enabling and disabling +* audio mixing, and then retrieving the state to verify the operation was successful. +* It tests the robustness and correctness of the dsAudio API's audio mixing functionality. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 028@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableRetrieveAudioMixing(void) +{ + gTestID = 28; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mixing = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, true); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: false", handle); + ret = dsSetAssociatedAudioMixing(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, false); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the audio port control sink in the L2 dsAudio module. +* +* This function tests the initialization, setting, and termination of +* the audio port in the L2 dsAudio module. It also tests the associated +* audio mixing and fader control functionalities. The test is performed +* for different types of audio ports and for different mixer balance values. +* The function asserts that all the invoked functions return no error and that +* the mixer balance value set is the same as the one retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 029@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioPortControl(void) +{ + gTestID = 29; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mixerbalance; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with type=%d and index=%d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing() with handle=%p and mixing=true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + for (mixerbalance = -32; mixerbalance <= 32; mixerbalance+=8) { + UT_LOG_DEBUG("Invoking dsSetFaderControl() with handle=%p and mixerbalance=%d", handle, mixerbalance); + ret = dsSetFaderControl(handle, mixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getMixerbalance; + UT_LOG_DEBUG("Invoking dsGetFaderControl() with handle=%p", handle); + ret = dsGetFaderControl(handle, &getMixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getMixerbalance, mixerbalance); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of primary language in dsAudio +* +* In this test, we initialize the audio port, set a primary language, +* get the primary language and validate if the set and get languages are same. +* This is to ensure the dsAudio's set and get primary language +* functionalities are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 030@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetPrimaryLanguage(void) +{ + gTestID = 30; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetPrimaryLanguage() with handle and valid language code"); + ret = dsSetPrimaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetPrimaryLanguage() with handle"); + ret = dsGetPrimaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test for setting and getting the secondary language for the audio port * -* TODO: Add the description of what is tested and why in this test +* This function tests the setting and getting of the secondary language +* for the audio port. It first initializes the audio port, gets the audio port handle, +* sets the secondary language, gets the secondary language, and finally terminates +* the audio port. It uses Cunit assertions to check the return values of the API calls. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 031@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsAudio (void) + +void test_l2_dsAudio_SetAndGetSecondaryLanguage(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 31; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetSecondaryLanguage with handle and valid language code"); + ret = dsSetSecondaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSecondaryLanguage with handle"); + ret = dsGetSecondaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsAudio_register ( void ) + +int test_l2_dsAudio_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsAudio]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + if(gSourceType == 1) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsAudio - Source]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else if(gSourceType == 0) { + // Create the test suite for sink type + pSuite = UT_add_suite("[L2 dsAudio - Sink]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else { + UT_LOG_ERROR("Invalid platform type"); + return -1; + } - - UT_add_test( pSuite, "test_l2_dsAudio" ,test_l2_dsAudio ); + // List of test function names and strings + UT_add_test( pSuite, "L2_EnableDisableAndVerifyAudioPortStatus", test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus); + if(gSourceType == 0) { + UT_add_test( pSuite, "l2_dsAudio_CheckHeadphoneConnectionStatus_sink", test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink); + } + UT_add_test( pSuite, "L2_RetrieveAndVerifyMS12Capabilities", test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities); + UT_add_test( pSuite, "L2_SetAndGetAudioCompression", test_l2_dsAudio_SetAndGetAudioCompression); + UT_add_test( pSuite, "L2_SetAndGetDialogEnhancement", test_l2_dsAudio_SetAndGetDialogEnhancement); + UT_add_test( pSuite, "L2_SetAndGetDolbyVolumeMode", test_l2_dsAudio_SetAndGetDolbyVolumeMode); + UT_add_test( pSuite, "L2_SetAndGetIntelligentEqualizerMode", test_l2_dsAudio_SetAndGetIntelligentEqualizerMode); + UT_add_test( pSuite, "L2_SetAndGetVolumeLeveller", test_l2_dsAudio_SetAndGetVolumeLeveller); + UT_add_test( pSuite, "L2_SetAndGetBassEnhancer", test_l2_dsAudio_SetAndGetBassEnhancer); + UT_add_test( pSuite, "L2_EnableAndVerifySurroundDecoder", test_l2_dsAudio_EnableAndVerifySurroundDecoder); + UT_add_test( pSuite, "L2_SetAndGetDRCMode", test_l2_dsAudio_SetAndGetDRCMode); + UT_add_test( pSuite, "L2_SetAndGetSurroundVirtualizer", test_l2_dsAudio_SetAndGetSurroundVirtualizer); + UT_add_test( pSuite, "L2_SetAndGetMISteering", test_l2_dsAudio_SetAndGetMISteering); + UT_add_test( pSuite, "L2_SetAndGetGraphicEqualizerMode", test_l2_dsAudio_SetAndGetGraphicEqualizerMode); + UT_add_test( pSuite, "L2_EnableDisableAndRetrieveLEConfig", test_l2_dsAudio_EnableDisableAndRetrieveLEConfig); + UT_add_test( pSuite, "L2_CheckMS12DecodeSupport", test_l2_dsAudio_CheckMS12DecodeSupport); + UT_add_test( pSuite, "L2_CheckMS11DecodeSupport", test_l2_dsAudio_CheckMS11DecodeSupport); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyMS12AudioProfiles_sink", test_l2_dsAudio_VerifyMS12AudioProfiles_sink); + UT_add_test( pSuite, "L2_SetAndGetMS12AudioProfile_sink", test_l2_dsAudio_SetAndGetMS12AudioProfile_sink); + } - return 0; -} + UT_add_test( pSuite, "L2_SetAndGetStereoMode", test_l2_dsAudio_SetAndGetStereoMode); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_SetAndGetStereoAuto_sink", test_l2_dsAudio_SetAndGetStereoAuto_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioGain_sink", test_l2_dsAudio_SetAndGetAudioGain_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioLevel_sink", test_l2_dsAudio_SetAndGetAudioLevel_sink); + } + UT_add_test( pSuite, "L2_AudioMuteVerification", test_l2_dsAudio_AudioMuteVerification); + UT_add_test( pSuite, "L2_SetAndGetAudioDelay", test_l2_dsAudio_SetAndGetAudioDelay); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyAtmosCapabilities_sink", test_l2_dsAudio_VerifyAtmosCapabilities_sink); + } + UT_add_test( pSuite, "L2_GetAudioCapabilities", test_l2_dsAudio_GetAudioCapabilities); + UT_add_test( pSuite, "L2_EnableDisableRetrieveAudioMixing", test_l2_dsAudio_EnableDisableRetrieveAudioMixing); + UT_add_test( pSuite, "L2_AudioPortControl", test_l2_dsAudio_AudioPortControl); + UT_add_test( pSuite, "L2_SetAndGetPrimaryLanguage", test_l2_dsAudio_SetAndGetPrimaryLanguage); + UT_add_test( pSuite, "L2_SetAndGetSecondaryLanguage", test_l2_dsAudio_SetAndGetSecondaryLanguage); + + return 0; +} /** @} */ // End of DS_Audio_HALTEST_L2 /** @} */ // End of DS_Audio_HALTEST diff --git a/src/test_parse_configuration.c b/src/test_parse_configuration.c new file mode 100644 index 00000000..bc5bcba8 --- /dev/null +++ b/src/test_parse_configuration.c @@ -0,0 +1,150 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File + * @{ + * @parblock + * + * ### Parse configuraion functions for Device Settings HAL : + * + * Parse configuraion functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.c +* +*/ +#include +#include +#include +#include + +#include "test_parse_configuration.h" + +/* Global Vairables */ +int32_t gSourceType = -1; +int32_t gDSModule = dsNone; + +char gDeviceType[TEST_DEVICE_TYPE_SIZE] = {0}; + +/* Parse configuration file */ +int test_parse_configuration() +{ + ut_kvp_status_t status; + char szReturnedString[UT_KVP_MAX_ELEMENT_SIZE]; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsAudioPort; + status = test_dsAudio_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse audio configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoDevice; + status = test_dsVideoDevice_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video device configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoPort; + status = test_dsVideoPort_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video port configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsCompositeIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsComposite; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsFPD/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsFPD; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsDisplay; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHost; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHdmiIn; + } + return 0; +} + +void test_parse_configuration_term() +{ + test_dsAudio_parse_configuration_term(); + test_dsVideoPort_parse_configuration_term(); + test_dsVideoDevice_parse_configuration_term(); +} + +/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK diff --git a/src/test_parse_configuration.h b/src/test_parse_configuration.h new file mode 100644 index 00000000..713e2072 --- /dev/null +++ b/src/test_parse_configuration.h @@ -0,0 +1,103 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_PARSE_CONFIG_HEADER Device Settings HAL Tests configuration parser Header File + * @{ + * @parblock + * + * ### Configuration parser functions for Device Settings HAL : + * + * Configuration parser functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.h +* +*/ +#ifndef __TEST_PARSE_CONFIG_H__ +#define __TEST_PARSE_CONFIG_H__ + +#include "test_dsAudio_parse_configuration.h" +#include "test_dsVideoDevice_parse_configuration.h" +#include "test_dsVideoPort_parse_configuration.h" + +#define TEST_DEVICE_TYPE_SIZE 8 +#define TEST_DS_MODULE_NAME_SIZE 32 + +#define TEST_TYPE_SOURCE_VALUE "source" +#define TEST_TYPE_SINK_VALUE "sink" + +/* Global variables */ +extern char gDeviceType[TEST_DEVICE_TYPE_SIZE]; +extern int32_t gSourceType; +extern int32_t gDSModule; + +typedef enum _dsModule_t { + dsNone = (0x0 << 0), + dsAudioPort = (0x1 << 0), + dsVideoPort = (0x1 << 1), + dsComposite = (0x1 << 2), + dsHdmiIn = (0x1 << 3), + dsVideoDevice = (0x1 << 4), + dsDisplay = (0x1 << 5), + dsFPD = (0x1 << 6), + dsHost = (0x1 << 7), +}dsModule_t; + +/*Function prototypes */ +int test_parse_configuration(); +void test_parse_configuration_term(); + +#endif //__TEST_PARSE_CONFIG_H__ + +/** @} */ // End of Device_Settings_PARSE_CONFIG_HEADER +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK diff --git a/src/test_register.c b/src/test_register.c index 3c509246..760ff4ce 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -65,6 +65,7 @@ */ #include +#include "test_parse_configuration.h" /** * @brief Register test functionality @@ -93,35 +94,51 @@ extern int test_l2_dsDisplay_register( void ); int UT_register_APIDEF_l1_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l1_dsHost_register(); - registerFailed |= test_l1_dsAudio_register(); - registerFailed |= test_l1_dsVideoDevice_register(); - registerFailed |= test_l1_dsHdmiIn_register(); - registerFailed |= test_l1_dsFPD_register(); - registerFailed |= test_l1_dsVideoPort_register(); - registerFailed |= test_l1_dsCompositeIn_register(); - registerFailed |= test_l1_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l1_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l1_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l1_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l1_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l1_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l1_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l1_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l1_dsDisplay_register(); + + return registerFailed; } /* Register UT Functions */ int UT_register_APIDEF_l2_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l2_dsHost_register(); - registerFailed |= test_l2_dsAudio_register(); - registerFailed |= test_l2_dsVideoDevice_register(); - registerFailed |= test_l2_dsHdmiIn_register(); - registerFailed |= test_l2_dsFPD_register(); - registerFailed |= test_l2_dsVideoPort_register(); - registerFailed |= test_l2_dsCompositeIn_register(); - registerFailed |= test_l2_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l2_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l2_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l2_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l2_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l2_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l2_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l2_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l2_dsDisplay_register(); + + return registerFailed; } /** @} */ // End of Device_Settings_REGISTER From f4263ffa162332aa3d04dd2671148b1de883383a Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:29:25 +0100 Subject: [PATCH 54/64] gh #7: dsHost - L2 Test Specifiction update Updated dsHost Test Speciciation and L2 test code --- ...> ds-host_High-Level_TestSpecification.md} | 210 +++++++-------- .../ds-host_L2_Low-Level_TestSpecification.md | 156 +++++++++++ docs/pages/dsComposite_test_spec.md | 185 ------------- docs/pages/dsDisplay_TestSpecificaion.md | 121 --------- .../l2_module_test_specification_template.md | 104 ------- profiles/sink/Sink_HostSettings.yaml | 78 ++---- profiles/source/Source_HostSettings.yaml | 47 +--- src/main.c | 53 ++-- src/test_l2_dsHost.c | 253 ++++++++++++++++-- src/test_register.c | 66 +++-- 10 files changed, 597 insertions(+), 676 deletions(-) rename docs/pages/{dsHost_TestSpecification.md => ds-host_High-Level_TestSpecification.md} (81%) create mode 100644 docs/pages/ds-host_L2_Low-Level_TestSpecification.md delete mode 100644 docs/pages/dsComposite_test_spec.md delete mode 100644 docs/pages/dsDisplay_TestSpecificaion.md delete mode 100644 docs/pages/l2_module_test_specification_template.md diff --git a/docs/pages/dsHost_TestSpecification.md b/docs/pages/ds-host_High-Level_TestSpecification.md similarity index 81% rename from docs/pages/dsHost_TestSpecification.md rename to docs/pages/ds-host_High-Level_TestSpecification.md index d155c28b..497b29d5 100644 --- a/docs/pages/dsHost_TestSpecification.md +++ b/docs/pages/ds-host_High-Level_TestSpecification.md @@ -1,108 +1,102 @@ -# HOST Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 01/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [References](#references) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#testing-scope) - -## Acronyms, Terms and Abbreviations - -- `SoC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `dsHost` - Device Settings Host -- `HDMI` - High-Definition Multimedia Interface - -## References - -- `EDID` specifications - [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) -- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://pypi.org/project/pyedid/) - -## Introduction - -This document provides an overview of the testing requirements for the `dsHost` module. -It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h) - -## Module Description - -High level overview: - -- `dsHost` offers a range of `API`s for retrieving information about the platform. -- Data is retrieved from the `SoC` and `HDMI`. This data is passed to the caller. -- In order to retrieve `HDMI` information, an external device must be connected. - -## Testing Scope - -|#|Testing Scope|Description| -|-|------------------|----------------| -|1|[Retrieve CPU Temperature](#retrieve-cpu-temperature)|Test if the module correctly retrieves the `CPU` temperature.| -|2|[Obtain SOC ID](#obtain-soc-id)|Test if the module successfully obtains the 8-byte `SoC` ID programmed to the CHIP One Time Programmable area.| -|3|[Fetch Host EDID](#fetch-host-edid)|Test if the module fetches the host `EDID` along with its length| ------------ - -## Retrieve CPU Temperature - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Get the CPU temperature and check weather the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on maximum and minimum values of "cpuTemperature" in the configuration yaml|dsGetCPUTemperature|Y|N|Y|Y|N| -|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information|dsGetCPUTemperature|N|Y|Y|Y|Y| - -### Test Startup Requirement - Retrieve CPU Temperature - -None - -### Emulator Requirement - Retrieve CPU Temperature - -None - -### Control Plane Requirement - Retrieve CPU Temperature - -Control external heat/cold chambers - -## Obtain SoC ID - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Get the `SoC` ID and verify with "socID" value in configuration yaml file.|dsGetSocIDFromSDK|Y|N|Y|Y|N| - -### Test Startup Requirement-Obtain SoC ID - -None - -### Emulator Requirement-Obtain SoC ID - -None - -### Control Plane Requirement-Obtain SoC ID - -None - -## Fetch Host EDID - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Get the host EDID bytes and validate the EDID bytes and length with the "edidBytes" and "edidbytesLength" values from the configuration yaml file|dsGetHostEDID|Y|N|N|Y|N| - -### Test Startup Requirement - Fetch Host EDID - -Launch the test with the predefined configuration set of results. - -### Emulator Requirement - Fetch Host EDID - -Emulator will boot with the `EDID` coming from the configuration file. - -### Control Plane Requirement - Fetch Host EDID - -None +# Device Settings Host High Level Test Specification Document + +## Table of Contents + +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [References](#references) +- [Introduction](#introduction) +- [Module Description](#module-description) +- [Testing Scope](#testing-scope) + +## Acronyms, Terms and Abbreviations + +- `SoC` - System On a Chip +- `EDID` - Extended Display Identification +- `API` - Application programming interface +- `CPU` - Central processing unit +- `dsHost` - Device Settings Host +- `HDMI` - High-Definition Multimedia Interface + +## References + +- `EDID` specifications - [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) +- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://pypi.org/project/pyedid/) + +## Introduction + +This document provides an overview of the testing requirements for the `dsHost` module. +It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, and expected deliverables. + +Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h) + +## Module Description + +High level overview: + +- `dsHost` offers a range of `API`s for retrieving information about the platform. +- Data is retrieved from the `SoC` and `HDMI`. This data is passed to the caller. +- In order to retrieve `HDMI` information, an external device must be connected. + +## Testing Scope + +|#|Testing Scope|Description| +|-|------------------|----------------| +|1|[Retrieve CPU Temperature](#retrieve-cpu-temperature)|Test if the module correctly retrieves the `CPU` temperature.| +|2|[Obtain SOC ID](#obtain-soc-id)|Test if the module successfully obtains the 8-byte `SoC` ID programmed to the CHIP One Time Programmable area.| +|3|[Fetch Host EDID](#fetch-host-edid)|Test if the module fetches the host `EDID` along with its length| +----------- + +## Retrieve CPU Temperature + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the CPU temperature and check weather the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on maximum and minimum values of `dsHost/cpuTemperature` in the configuration yaml|`dsGetCPUTemperature`|Y|N|Y|Y|N| +|Invoke the module to retrieve `CPU` temperature while the device is within a heat/cold chambers to verify that the device will properly retrieve the information|`dsGetCPUTemperature`|N|Y|Y|Y|Y| + +### Test Startup Requirement - Retrieve CPU Temperature + +None + +### Emulator Requirement - Retrieve CPU Temperature + +None + +### Control Plane Requirement - Retrieve CPU Temperature + +Control external heat/cold chambers + +## Obtain SoC ID + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the `SoC` ID and verify with `dsHost/socID` value in configuration yaml file.|`dsGetSocIDFromSDK`|Y|N|Y|Y|N| + +### Test Startup Requirement-Obtain SoC ID + +None + +### Emulator Requirement-Obtain SoC ID + +None + +### Control Plane Requirement-Obtain SoC ID + +None + +## Fetch Host EDID + +|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| +|-----------|--------|--|--|------|----|--------------------------| +|Get the host `EDID` bytes and validate the `EDID` bytes and length with the `dsHost/edidBytes` and `dsHost/edidbytesLength` values from the configuration yaml file|`dsGetHostEDID`|Y|N|N|Y|N| + +### Test Startup Requirement - Fetch Host EDID + +Launch the test with the predefined configuration set of results. + +### Emulator Requirement - Fetch Host EDID + +Emulator will boot with the `EDID` coming from the configuration file. + +### Control Plane Requirement - Fetch Host EDID + +None diff --git a/docs/pages/ds-host_L2_Low-Level_TestSpecification.md b/docs/pages/ds-host_L2_Low-Level_TestSpecification.md new file mode 100644 index 00000000..9750f25a --- /dev/null +++ b/docs/pages/ds-host_L2_Low-Level_TestSpecification.md @@ -0,0 +1,156 @@ +# Device Settings Host L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the Low Level L2 Test Specification and Procedure for the Device Settings Host module. + +### Acronyms, Terms and Abbreviations + +- `HAL` \- Hardware Abstraction Layer, may include some common components +- `UT` \- Unit Test(s) +- `SoC` \- System on a Chip +- `EDID` \- Extended Display Identification +- `CPU` \- Central processing unit +- `dsHost` \- Device Settings Host +- `API` \- Application programming interface + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [dsHost_TestSpecification.md](https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/docs/pages/dsHost_TestSpecification.md) +- `HAL Interface Header File` - [dsHost.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHost.h) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsHost_GetCPUTemperature`| +|Description|Get the `CPU` temperature and check whether the temperature falls within valid operating range and ensure the `CPU` is in a normal operating state based on maximum and minimum values of `dsHost/cpuTemperature` in the configuration file| +|Test Group|02| +|Test Case ID|001| +|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 1 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the host using `dsHostInit`|No input parameters|`dsERR_NONE`|Should be successful| +|02|Get the `CPU` temperature using `dsGetCPUTemperature`|cpuTemperature = valid buffer|`dsERR_NONE`|Should be successful| +|03|Check the `CPU` temperature against the profile|cpuTemperature = obtained value, profile temperature range = `dsHost/cpuTemperature` of configuration file|Value should fall in the expected range|Should be successful| +|04|Terminate the host using `dsHostTerm`|No input parameters|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsHostInit API] -->|return status is dsERR_NONE|B[Call dsGetCPUTemperature API] +A -->|return status is not dsERR_NONE|A1[Test case fail] +B -->|return status is dsERR_NONE|C[Check cpuTemperature value
with profile value] +B -->|return status is not dsERR_NONE|B1[Test case fail] +C -->|cpuTemperature is within valid range|D[Call dsHostTerm API] +C -->|cpuTemperature is out of valid range|C1[Test case fail] +D -->|return status is dsERR_NONE|E[Test case success] +D -->|return status is not dsERR_NONE|D1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsHost_GetAndVerifySocID`| +|Description|Get the `SoC` ID and verify with `dsHost/socID` value in configuration file| +|Test Group|02| +|Test Case ID|002| +|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 2 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the host using `dsHostInit` `API`|No input parameters|`dsERR_NONE`|Should be successful| +|02|Get the `SoC` ID using `dsGetSocIDFromSDK` `API`|socID = valid buffer|`dsERR_NONE`|Should be successful| +|03|Verify the `SoC` ID with the value in the configuration file|socID = value from `dsHost/socID` of configuration file|`dsERR_NONE`|Should be successful| +|04|Terminate the host using `dsHostTerm` `API`|No input parameters|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsHostInit API] -->|dsERR_NONE|B[Call dsGetSocIDFromSDK API] +A -->|Failure|A1[Test case fail] +B -->|dsERR_NONE|D[Compare SoC ID with socID
from sink configuration file] +B -->|Failure|B1[Test case fail] +D -->|Match|E[Call dsHostTerm API] +D -->|No Match|D1[Test case fail] +E -->|dsERR_NONE|F[Test case success] +E -->|Failure|E1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsHost_ValidateHostEDID_sink`| +|Description|Get the host `EDID` bytes and validate the `EDID` bytes and length with the `dsHost/edidBytes` and `dsHost/edidbytesLength` values from the configuration file| +|Test Group|02| +|Test Case ID|003| +|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 3 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the host using `dsHostInit`|No input parameters|`dsERR_NONE`|Should be successful| +|02|Get the host `EDID` using `dsGetHostEDID`|edid = valid buffer, length = valid pointer|`dsERR_NONE`|Should be successful| +|03|Validate the `EDID` bytes and length|edid = retrieved `EDID` from `dsHost/edidBytes` of configuration file, length = retrieved length from `dsHost/edidbytesLength` of configuration file|edidBytes and edidbytesLength from configuration file matches|Should be successful| +|04|Terminate the host using `dsHostTerm`|No input parameters|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsHostInit API] -->|Success: dsERR_NONE|B[Call dsGetHostEDID API] +A -->|Failure: Not dsERR_NONE|A1[Test case fail] +B -->|Success: dsERR_NONE and
valid edid, length|C[Validate EDID bytes and length with
values from configuration file] +B -->|Failure: Not dsERR_NONE or
invalid edid, length|B1[Test case fail] +C -->|Success: Values match|D[Call dsHostTerm API] +C -->|Failure: Values don't match|C1[Test case fail] +D -->|Success: dsERR_NONE|E[Test case success] +D -->|Failure: Not dsERR_NONE|D1[Test case fail] +``` diff --git a/docs/pages/dsComposite_test_spec.md b/docs/pages/dsComposite_test_spec.md deleted file mode 100644 index 37488e1b..00000000 --- a/docs/pages/dsComposite_test_spec.md +++ /dev/null @@ -1,185 +0,0 @@ -# CompositeIn Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 18/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#testing-scope) - -## Acronyms, Terms and Abbreviations - -- `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `RDK` - Reference Design Kit -- `dsComposite` - Device Settings Composite - -## Introduction - -This document provides an overview of the testing requirements for the `dsComposite` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsCompositeIn.h) - -## Module Description - -High level overview: - -- `dsComposite` provides a variety of APIs for accessing information regarding the Composite Inputs on sink devices. -- It facilitates interaction with Composite Input ports, aiding in their configuration and utilization within the system. This information is then passed to the caller. -- For the sink devices, to retrieve the available Composite Input information, an external device must be connected. - -## Testing Scope - -|#|Test Functionality|Test Description| -|-|------------------|----------------| -|1|[Get Number of Inputs](#get_number_of_inputs)|The test aims to verify the availability of Composite Input ports by confirming the number present.| -|2|[Get the Input Status](#get_the_input_status)|The test is to verify the status of all Composite Input Status| -|3|[Set the Composite port](#set_the_composite_port)|The test is to set the Composite Input port for Presentation| -|4|[Scale the Composite Input Video](#scale_the_composite_input_video)|The test scales the COMPOSITE input video, ensuring that the width and height, determined by the x and y coordinates respectively, do not surpass the current resolution limits of the device.| -|5|[Callback for connection Status](#callback_for_connection_status)|The test aims to verify the Callback function used for notifying applications of the COMPOSITE In hot plug status.| -|6|[Callback for Signal Change](#callback_for_signal_change)|The test aims to verify the callback function used to inform applications about changes in the signal status of the Composite In.(NoSignal/UnstableSignal/NotSupportedSignal/StableSignal)| -|7|[Callback for Status Change](#callback_for_status_change)|The test validates the functionality of the callback function designed to notify applications of Composite Input status change events.(Port,IsPresented flag status)| ------------ - -## Get Number of Inputs - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function returns the expected COMPOSITE Input ports.|Y|N| - -### Test Startup Requirement - Get Number of Inputs - -The test begins with the configured composite input port details. - -### Emulator Requirement - Get Number of Inputs - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get Number of Inputs - -None - -## Get the Input Status - -|Description|L2|L3| -|-----------|--|--| -|Verify the status of the Composite Input by ensuring it is in disable status.|Y|N| -|Verify the status of the Composite Input by ensuring it is enabled, connected to the source, and that the composite input port is active.|N|Y| - -### Test Startup Requirement - Get the Input Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Get the Input Status - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Get the Input Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Set the Composite port - -|Description|L2|L3| -|-----------|--|--| -|verify that the function successfully sets the specified COMPOSITE Input port as active for presentation and check the port information using "Get status".|Y|Y| -|Evaluate the function's response when called with a port ID that is already selected as active, ensuring it does not introduce any unintended changes.|N|Y| - -### Test Startup Requirement - Set the Composite port - -The test begins with the configured composite input port numbers. - -### Emulator Requirement - Set the Composite port - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Set the Composite port - -The Control Plane must monitor the external device (Video analyzer) to detect any video glitches. - -## Scale the Composite Input Video - -|Description|L2|L3| -|-----------|--|--| -|Verify that the function successfully scales the COMPOSITE input video when valid coordinates and dimensions are provided within the current resolution limits. Based on video resolution need to check whether the coordinates are in range|N|Y| - -### Test Startup Requirement - Scale the Composite Input Video - -The test begins by setting up the video analyzer, and the video should be played. - -### Emulator Requirement - Scale the Composite Input Video - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Scale the Composite Input Video - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for connection Status - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application when a COMPOSITE Input port is connected or disconnected.|N|Y| -|Validate that the callback function updates the isPortConnected status correctly based on the connection state provided.|N|Y| -|Verify that the callback function properly updates the isPresented status in ::dsCompositeInStatus_t if the connected port is active and presents video after being connected.|N|Y| - -### Test Startup Requirement - Callback for connection Status - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for connection Status - -Emulator will boot with the port information coming from the configuration file. - -### Control Plane Requirement - Callback for connection Status - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. - -## Callback for Signal Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly handles different signal statuses (e.g., NoSignal, UnstableSignal, NotSupportedSignal, StableSignal) and updates the application accordingly.|N|Y| -|Validate that the callback function updates the sigStatus parameter correctly based on the signal status provided.|N|Y| - -### Test Startup Requirement - Callback for Signal Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Signal Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Signal Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. -Provide resolution changes or configurations changes on the connected device that affects the output signal. - -## Callback for Status Change - -|Description|L2|L3| -|-----------|--|--| -|Verify that the callback function properly notifies the application of the Composite Input status change event.|N|Y| -|Validate that the callback function updates the inputStatus parameter correctly based on the status change provided.|N|Y| -|Verify that the callback function properly triggers whenever the dsCompositeInStatus_t is updated|N|Y| - -### Test Startup Requirement - Callback for Status Change - -Connection of the source device with the CompositeIn. - -### Emulator Requirement - Callback for Status Change - -Emulator will boot with the port informations coming from the configuration file. - -### Control Plane Requirement - Callback for Status Change - -The handling of connecting and disconnecting source devices in the CompositeIn will be managed by the Control Plane. diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/dsDisplay_TestSpecificaion.md deleted file mode 100644 index c0e8da8e..00000000 --- a/docs/pages/dsDisplay_TestSpecificaion.md +++ /dev/null @@ -1,121 +0,0 @@ -# Display Test Document - -## Version History - -| Date(DD/MM/YY) | Comment | Version | -| -------------- | ------------- | ------- | -| 05/03/2024 | First Release | 1.0.0 | - -## Table of Contents - -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [References](#references) -- [Introduction](#introduction) -- [Module Description](#module-description) -- [Testing Scope](#test-scope) - -## Acronyms, Terms and Abbreviations - -- `HAL` - Hardware Abstraction layer -- `SOC` - System On a Chip -- `EDID` - Extended Display Identification -- `API` - Application programming interface -- `CPU` - Central processing unit -- `RDK` - Reference Design Kit -- `dsDisplay` - Device Settings Display - -## References - -- `EDID` Specifications [https://en.wikipedia.org/wiki/Extended_Display_Identification_Data](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) -- Python `EDID` decoder library is available here - [https://pypi.org/project/pyedid/](https://en.wikipedia.org/wiki/Extended_Display_Identification_Data) - -## Introduction - -This document provides an overview of the testing requirements for the dsDisplay module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements and expected deliverables. - -Interface of the test is available in this link - [https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h) - -## Module Description - -High level overview: - -- `dsDisplay` offers a range of APIs for retrieving information about the Display Device. -- Data is retrieved from the Display Device and HDMI. This data is passed to the caller. -- In order to retrieve HDMI information, an external device must be connected. - -## Testing Scope - -|#|Test Functionality|Test Description| -|-|------------------|----------------| -|1|[Get EDID Information](#get-edid-information)|Test validates the accuracy and functionality of the display device module's functions (dsGetEDID and dsGetEDIDBytes) in retrieving the Extended Display Identification Data (EDID) from connected display devices| -|2|[Get Aspect Ratio](#get-aspect-ratio)| Test provides the aspect ratio of the display device| -|3|[Callback Registration for Display Related Events](#callback-registration-for-display-related-events)|To verify the callback registration for display related events. The display events are Dislay connected event, Display disconnected event, Rx Sense ON event, Rx Sense OFF event, HDCP protocol version change event| ------------ - -## Get EDID Information - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|The Get EDID Information test aims to verify the functionality of the display device module's dsGetEDID and dsGetEDIDBytes functions, which are responsible for retrieving the Extended Display Identification Data (EDID) from connected display devices. This test ensures that the module can accurately retrieve and interpret EDID information, providing essential data about the display's capabilities and characteristics.|N|Y|Y|Y| -|For sink devices, validate the predefined the EDID value coming from the TV HDMI port1 EDID |Y|N|Y|Y| - -### Test Startup Requirement - Get EDID Information - -Launch the test with the predefined configuration set of results. - -### Emulator Requirement - Get EDID Information - -Emulator will boot with the EDID coming from the configuration file. - -|#|Description| -|-|-----------| -|1|EDID for a panel TV| - -TODO: Generate a list of sample list for 5 to 6 different TV's. -Generate a list of TV's from the office for the different EDIDs and store the binaries of the test. It can use it as samples. - -### Control Plane Requirement - Get EDID Information - -None - -## Get Aspect Ratio - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test the aspect ratio returned by the dsGetDisplayAspectRatio() function for the specified display device handle.|N|Y|Y|N -|Adjust and test the aspect ratio to ensure it is providing the expected aspect ratio.|N|Y|Y|N| - -### Test Startup Requirement - Get Aspect Ratio - -Launch the test with the predefined configuration set of results. - -### Emulator Requirement - Get Aspect Ratio - -Emulator will boot with the Aspect ratio coming from the configuration file. - -### Control Plane Requirement - Get Aspect Ratio - -Maintains the configuration of various aspect ratios and provides them whenever a user is supposed to make a change. - -## Callback Registration for Display Related Events - -|Description|L2|L3|Source|Sink| -|-----------|--|--|------|----| -|Test the 'Display connected' event. Upon connecting the display device, the callback should trigger the event|N|Y|Y|Y| -|Test the 'Display disconnected' event. Upon disconnecting the display device, the callback should trigger the event|N|Y|Y|N| -|Test the 'Rx Sense ON' event by verifying the presence of a signal from the receiving device; the callback should be triggered when the signal is detected|N|Y|Y|N| -|Test the 'Rx Sense OFF' event by verifying the absense of a signal from the receiving device; the callback should be triggered when the signal is detected|N|Y|Y|N| -|Test the 'HDCP protocol version change' event by verifying if there is a change in the HDCP protocol version used for content protection; the callback should be triggered upon detection of the protocol change.|N|Y|Y|N| - - -### Test Startup Requirement -Callback Registration for Display Related Events - -Launch the test with the predefined set of configured HDCP 1.x and HDCP 2.x keys. - -### Emulator Requirement - Callback Registration for Display Related Events - -Emulator will boot with the HDCP keys coming from the configuration file. - -### Control Plane Requirement - Callback Registration for Display Related Events - -The control plane will generate events for HDMI connection and disconnection. It also supplies signals to the receiving devices to initiate the Rx Sense ON/Rx Sense OFF events. \ No newline at end of file diff --git a/docs/pages/l2_module_test_specification_template.md b/docs/pages/l2_module_test_specification_template.md deleted file mode 100644 index d319677a..00000000 --- a/docs/pages/l2_module_test_specification_template.md +++ /dev/null @@ -1,104 +0,0 @@ -# L2 Test Specification template -## History - -| Version | Date(YY-MM-DD) | Author |Comments | -| -------| ----- | ----- | ----- | -| 1.0.0 | 22/02/23 | Anjali Thampi| Inital Document | - -## Table of Contents - -- [Overview](#overview) - - [Acronyms](#acronyms) - - [Definitions](#definitions) - - [References](#references) -- [Level 2 Test Suite](#level-2-test-suite) - - [Test 1](#test-1) - - [Test 2](#test-2) - -## Overview - -This document describes the level 2 testing suite for this module. - -### Acronyms, Terms and Abbreviations - -- `HAL` \- Hardware Abstraction Layer, may include some common components -- `HAL.h` \- Abstracted defined API to control the hardware -- `HAL.c` \- Implementation wrapper layer created by the `OEM` or `SoC` Vendor. -- `RDK` \- Reference Design Kit for All Devices -- `RDK-B` \- Reference Design Kit for Broadband Devices -- `RDK-V` \- Reference Design Kit for Video Devices -- `UT` \- Unit Test(s) -- `OEM` \- Original Equipment Manufacture (Sky is also an OEM) -- `SoC` \- System on a Chip - -### Definitions - -- `Broadcom` \- `SoC` manufacturer -- `Amlogic` \- `SoC` manufacturer -- `Soc Vendor` \- Definition to encompass multiple vendors -- `Unit Tests` \- C Function tests that run on the target hardware -- `Common Testing Framework` \- Off the shelf 3rd Party Testing Framework, or framework that does not require infrastructure to control it. That's not to say it cannot be controlled via infrastructure if required. Examples of which are. - - `GTest` \- Google Test Suit - - `CUnit` \- C Testing Suit - - `Unity` \- C Embedded Testing Suit - - `ut-core` \- Common Testing Framework - -### References - -- `Feedback Loops` \- -- `Doxygen` \- SourceCode documentation tool - -- `Black Box Testing` \- - -## Level 2 Test Suite - -The following functions are expecting to test the module operates correctly. - -### Test 1 - -|Title|Details| -|--|--| -|Function Name|`test_l2__`| -|Description|TODO: Add the description of what is tested and why in this test| -|Test Group|TODO: Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)| -|Test Case ID|TODO: Add the ID of the test case so that it can be logically tracked in the logs| -|Priority|TODO: (Low/Med/High) Add the priority for the level of test, how important is the test to overall functionality| - -**Pre-Conditions :** -TODO: Add pre-conditions, if any - -**Dependencies :** TODO: Add dependencies for this test, if any - -**User Interaction :** TODO: Add any user interactions required during this test, if any - -#### Test Procedure : - -TODO: Add the steps to run this test and add a line in the below table for each input variation tried in this function. - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | First set of conditions | What is input data to be tested | How to gauge success, is it a success variable? | Should be successful | - -### Test 2 - -|Title|Details| -|--|--| -|Function Name|`test_l2__`| -|Description|TODO: Add the description of what is tested and why in this test| -|Test Group|TODO: Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)| -|Test Case ID|TODO: Add the ID of the test case so that it can be logically tracked in the logs| -|Priority|TODO: (Low/Med/High) Add the priority for the level of test, how important is the test to overall functionality| - -**Pre-Conditions :** -TODO: Add pre-conditions, if any - -**Dependencies :** TODO: Add dependencies for this test, if any - -**User Interaction :** TODO: Add any user interactions required during this test, if any - -#### Test Procedure : - -TODO: Add the steps to run this test and add a line in the below table for each input variation tried in this function. - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | First set of conditions | What is input data to be tested | How to gauge success, is it a success variable? | Should be successful | diff --git a/profiles/sink/Sink_HostSettings.yaml b/profiles/sink/Sink_HostSettings.yaml index 521e3eed..e976e494 100644 --- a/profiles/sink/Sink_HostSettings.yaml +++ b/profiles/sink/Sink_HostSettings.yaml @@ -1,52 +1,28 @@ -Device: - Type: sink - Name: element - -# OR-ed value of DS module -# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort -Module: 0x80 #dsHost - -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false - -#soc ID -socID: "ABC32343" -#cpu temperatures in centigrade [min, max] -cpuTemperature: [30, 65] -# edid bytes data -edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 - ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 - 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 - 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 - 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 - 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 - 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc - 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f - - 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 - 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 - 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 - 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 - 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 - 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 - 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 - 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" -# length of the edid bytes -edidbytesLength: 256 \ No newline at end of file + Type: sink + Name: Host_Input + features: + extendedEnumsSupported: false + #soc ID + socID: "ABC32343" + #cpu temperatures in centigrade [min, max] + cpuTemperature: [30, 100] + # edid bytes data + edidBytes: [0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x85, 0x1b, 0x2a, 0x01, 0x01, 0x01, 0x01, + 0xff, 0x20, 0x01, 0x03, 0x80, 0x7a, 0x45, 0x78, 0x0a, 0xee, 0x91, 0xa3, 0x54, 0x4c, 0x99, 0x26, + 0x0f, 0x50, 0x54, 0x21, 0x08, 0x00, 0x31, 0x40, 0x45, 0x40, 0x61, 0x40, 0x71, 0x40, 0x81, 0x80, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0xe8, 0x00, 0x30, 0xf2, 0x70, 0x5a, 0x80, 0xb0, 0x58, + 0x8a, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, 0x1e, 0x02, 0x3a, 0x80, 0x18, 0x71, 0x38, 0x2d, 0x40, + 0x58, 0x2c, 0x45, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x17, + 0x3e, 0x1e, 0x88, 0x3c, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x54, 0x56, 0x0a, 0x20, 0x20, 0x01, 0x6f, + 0x02, 0x03, 0x5f, 0xf1, 0x53, 0x61, 0x60, 0x10, 0x1f, 0x04, 0x13, 0x05, 0x14, 0x03, 0x02, 0x12, + 0x20, 0x21, 0x22, 0x15, 0x01, 0x5d, 0x5e, 0x5f, 0x2c, 0x09, 0x57, 0x03, 0x15, 0x07, 0x50, 0x57, + 0x07, 0x00, 0x67, 0x7e, 0x00, 0x6d, 0x03, 0x0c, 0x00, 0x10, 0x00, 0x38, 0x3c, 0x20, 0x00, 0x60, + 0x01, 0x02, 0x03, 0x68, 0xd8, 0x5d, 0xc4, 0x01, 0x78, 0x88, 0x0b, 0x02, 0xe2, 0x00, 0xcf, 0xe3, + 0x05, 0xc0, 0x00, 0xe3, 0x06, 0x0d, 0x01, 0xe4, 0x0f, 0x03, 0x00, 0x00, 0xeb, 0x01, 0x46, 0xd0, + 0x00, 0x4d, 0x57, 0x3a, 0x94, 0x34, 0x07, 0xa5, 0xe6, 0x11, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x66, + 0x21, 0x50, 0xb0, 0x51, 0x00, 0x1b, 0x30, 0x40, 0x70, 0x36, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66] + # length of the edid bytes + edidbytesLength: 256 diff --git a/profiles/source/Source_HostSettings.yaml b/profiles/source/Source_HostSettings.yaml index cb6294b3..dec88de4 100644 --- a/profiles/source/Source_HostSettings.yaml +++ b/profiles/source/Source_HostSettings.yaml @@ -1,36 +1,13 @@ -Device: - Type: sink - Name: element - -# OR-ed value of DS module -# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort -Module: 0x80 #dsHost - -# Profile for L1 -dsAudio: - features: - extendedEnumsSupported: false -dsHdmiIn: - features: - extendedEnumsSupported: false -dsVideoDevice: - features: - extendedEnumsSupported: false -dsDisplay: - features: - extendedEnumsSupported: false dsHost: - features: - extendedEnumsSupported: false -dsVideoPort: - features: - extendedEnumsSupported: false - -#soc ID -socID: "ABC32343" -#cpu temperatures in centigrade [min, max] -cpuTemperature: [30, 65] -# edid bytes data -edidBytes: "" -# length of the edid bytes -edidbytesLength: 0 \ No newline at end of file + Type: source + Name: Host_Output + features: + extendedEnumsSupported: false + #soc ID + socID: "ABC32343" + #cpu temperatures in centigrade [min, max] + cpuTemperature: [30, 100] + # edid bytes data + edidBytes: + # length of the edid bytes + edidbytesLength: 0 diff --git a/src/main.c b/src/main.c index 98857d06..8279e28c 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -65,40 +65,51 @@ */ #include +#include "test_parse_configuration.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); int main(int argc, char** argv) { - int registerReturn = 0; + int registerReturn = 0; - /* Register tests as required, then call the UT-main to support switches and triggering */ - UT_init( argc, argv ); + /* Register tests as required, then call the UT-main to support switches and triggering */ + UT_init( argc, argv ); - /* Check if tests are registered successfully */ + if ( test_parse_configuration() == -1 ) + { + printf("\n Failed to parse the configuration file"); + test_parse_configuration_term(); + return -1; + } - registerReturn = UT_register_APIDEF_l1_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l1_tests() returned failure"); - return -1; - } + /* Check if tests are registered successfully */ - registerReturn = UT_register_APIDEF_l2_tests(); - if ( registerReturn == -1 ) - { - printf("\n UT_register_APIDEF_l2_tests() returned failure"); - return -1; - } + registerReturn = UT_register_APIDEF_l1_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l1_tests() returned failure"); + return -1; + } - /* Begin test executions */ - UT_run_tests(); + registerReturn = UT_register_APIDEF_l2_tests(); + if ( registerReturn == -1 ) + { + printf("\n UT_register_APIDEF_l2_tests() returned failure"); + return -1; + } - return 0; + /* Begin test executions */ + UT_run_tests(); + + test_parse_configuration_term(); + + return 0; } /** @} */ // End of Device_Settings_MAIN /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK + diff --git a/src/test_l2_dsHost.c b/src/test_l2_dsHost.c index 19b8d039..b14c5d71 100644 --- a/src/test_l2_dsHost.c +++ b/src/test_l2_dsHost.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ */ /** - * @addtogroup DS_Host_HALTEST Device Settings Host HAL Tests + * @defgroup DS_Host_HALTEST Device Settings Host HAL Tests * @{ */ @@ -58,59 +58,258 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-host_halSpec.md](../../docs/pages/ds-host_halSpec.md) + * * @endparblock */ /** - * @file test_l2_dsHost.c + * @file test_l2_dsAudio.c * */ - -#include -#include - #include #include +#include +#include "dsHost.h" +#include "test_parse_configuration.h" + +#define DSHOST_SOC_LENGTH 20 + +static int gTestGroup = 2; +static int gTestID = 1; /** -* @brief TODO: Describe the object of the test +* @brief Test for getting CPU temperature from the Host HAL sub-system * -* TODO: Add the description of what is tested and why in this test +* This test function initializes the Host HAL sub-system, gets the CPU temperature, +* checks if the temperature is within the valid range, and then terminates the +* Host sub-system. It uses the provided macro to check if the returned CPU temperature +* is equal to the value specified in the 'Sink_HostSettings.yaml' configuration file. +* If any of the API calls fail, the test function will immediately return, as +* indicated by the use of the UT_ASSERT_EQUAL_FATAL macro. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsHost (void) + +void test_l2_dsHost_GetCPUTemperature(void) { - //This function needs to be implemented! - UT_FAIL(); + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus = dsERR_NONE; + float cpuTemperature = 0.0; + int32_t minTemparature = 0; + int32_t maxTemparature = 0; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + retStatus = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetCPUTemperature with valid buffer"); + retStatus = dsGetCPUTemperature(&cpuTemperature); + UT_LOG_DEBUG("CPU Temperature: %f, Return status: %d", cpuTemperature, retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetCPUTemperature failed with status: %d", retStatus); + } + + minTemparature = UT_KVP_PROFILE_GET_UINT32("dsHost.cpuTemperature.0"); + maxTemparature = UT_KVP_PROFILE_GET_UINT32("dsHost.cpuTemperature.1"); + + UT_LOG_DEBUG("CPU Temperature from Profile: min:%d, max:%d", minTemparature, maxTemparature); + + if(cpuTemperature > maxTemparature || cpuTemperature < minTemparature) + { + UT_FAIL("Invalid temperature"); + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + retStatus = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to get and verify the SoC ID from the Host HAL sub-system +* +* This test function initializes the Host HAL sub-system, gets the SoC ID, +* verifies it with the value from the configuration file, and then terminates +* the Host HAL sub-system. It uses the provided macro to compare the SoC ID +* with the value from the configuration file. The function logs all the +* steps and checks the return values of the API calls. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsHost_GetAndVerifySocID(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + ut_kvp_status_t status; + + dsError_t ret; + char socID[DSHOST_SOC_LENGTH] = {0}; + char socIDProfile[DSHOST_SOC_LENGTH] = {0}; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + ret = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSocIDFromSDK with valid buffer"); + ret = dsGetSocIDFromSDK(socID); + UT_LOG_DEBUG("Return status: %d, socID: %s", ret, socID); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetSocIDFromSDK failed with status: %d", ret); + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost.socID", socIDProfile, DSHOST_SOC_LENGTH); + UT_ASSERT( status == UT_KVP_STATUS_SUCCESS ); + if(!strstr(socID, socIDProfile)) + { + UT_FAIL("Invalid SocID"); + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + ret = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test validates the Host EDID sink of the L2 dsHost module +* +* This test function initializes the dsHost module, retrieves the Host EDID, +* validates the retrieved EDID and length, and then terminates the dsHost module. +* The purpose of this test is to ensure that the dsHost module correctly retrieves +* and validates the Host EDID. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsHost_ValidateHostEDID_sink(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + unsigned char edid[EDID_MAX_DATA_SIZE]; + unsigned char edid_profile; + char key_string[TEST_DS_KEY_SIZE]; + int i = 0; + int length; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + ret = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetHostEDID with valid pointers for edid and length"); + ret = dsGetHostEDID(edid, &length); + UT_LOG_DEBUG("Return status: %d, EDID: %s, Length: %d", ret, edid, length); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetHostEDID failed with status: %d", ret); + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(length, "dsHost.edidbytesLength"); + + /* Checking only manufacture ID */ + for( i = 8; i < 9; i++) + { + snprintf(key_string, TEST_DS_KEY_SIZE, "dsHost.edidBytes.%d", i); + edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); + if(edid_profile != edid[i]) + { + UT_FAIL("edid check failed"); + UT_LOG_ERROR("edid byte: %x, expected value: %x", edid[i], edid_profile); + break; + } + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + ret = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsHost_register ( void ) + +int test_l2_dsHost_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsHost]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + ut_kvp_status_t status; + int32_t source_type = 0; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); + + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHost - Source]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for sink type + pSuite = UT_add_suite("[L2 dsHost - Sink]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + // List of test function names and strings - - UT_add_test( pSuite, "test_l2_dsHost" ,test_l2_dsHost ); + UT_add_test( pSuite, "L2_GetCPUTemperature", test_l2_dsHost_GetCPUTemperature); + UT_add_test( pSuite, "L2_GetAndVerifySocID", test_l2_dsHost_GetAndVerifySocID); + if(source_type == 0) { + UT_add_test( pSuite, "L2_ValidateHostEDID", test_l2_dsHost_ValidateHostEDID_sink); + } - return 0; + return 0; } /** @} */ // End of DS_Host_HALTEST_L2 diff --git a/src/test_register.c b/src/test_register.c index 3c509246..07f61e3e 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -64,7 +64,9 @@ * */ +#include #include +#include "test_parse_configuration.h" /** * @brief Register test functionality @@ -93,35 +95,51 @@ extern int test_l2_dsDisplay_register( void ); int UT_register_APIDEF_l1_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l1_dsHost_register(); - registerFailed |= test_l1_dsAudio_register(); - registerFailed |= test_l1_dsVideoDevice_register(); - registerFailed |= test_l1_dsHdmiIn_register(); - registerFailed |= test_l1_dsFPD_register(); - registerFailed |= test_l1_dsVideoPort_register(); - registerFailed |= test_l1_dsCompositeIn_register(); - registerFailed |= test_l1_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l1_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l1_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l1_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l1_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l1_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l1_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l1_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l1_dsDisplay_register(); + + return registerFailed; } /* Register UT Functions */ int UT_register_APIDEF_l2_tests( void ) { - int registerFailed=0; - - registerFailed |= test_l2_dsHost_register(); - registerFailed |= test_l2_dsAudio_register(); - registerFailed |= test_l2_dsVideoDevice_register(); - registerFailed |= test_l2_dsHdmiIn_register(); - registerFailed |= test_l2_dsFPD_register(); - registerFailed |= test_l2_dsVideoPort_register(); - registerFailed |= test_l2_dsCompositeIn_register(); - registerFailed |= test_l2_dsDisplay_register(); - - return registerFailed; + int registerFailed=0; + + if(gDSModule & dsHost) + registerFailed |= test_l2_dsHost_register(); + if(gDSModule & dsAudioPort) + registerFailed |= test_l2_dsAudio_register(); + if(gDSModule & dsVideoDevice) + registerFailed |= test_l2_dsVideoDevice_register(); + if(gDSModule & dsHdmiIn) + registerFailed |= test_l2_dsHdmiIn_register(); + if(gDSModule & dsFPD) + registerFailed |= test_l2_dsFPD_register(); + if(gDSModule & dsVideoPort) + registerFailed |= test_l2_dsVideoPort_register(); + if(gDSModule & dsComposite) + registerFailed |= test_l2_dsCompositeIn_register(); + if(gDSModule & dsDisplay) + registerFailed |= test_l2_dsDisplay_register(); + + return registerFailed; } /** @} */ // End of Device_Settings_REGISTER From 5dc9b496c04c99efbd9e70415ec4e2ee09c81ece Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Wed, 26 Jun 2024 06:09:58 +0100 Subject: [PATCH 55/64] gh #18 added the parse config files --- build.sh | 6 +- src/main.c | 12 +- ... test_dsVideoDevice_parse_configuration.c} | 146 ++++++++--------- ... test_dsVideoDevice_parse_configuration.h} | 59 +++---- src/test_l2_dsVideoDevice.c | 2 +- src/test_parse_configuration.c | 152 ++++++++++++++++++ src/test_parse_configuration.h | 101 ++++++++++++ src/test_register.c | 4 +- 8 files changed, 358 insertions(+), 124 deletions(-) rename src/{test_utils.c => test_dsVideoDevice_parse_configuration.c} (66%) rename src/{test_utils.h => test_dsVideoDevice_parse_configuration.h} (66%) create mode 100644 src/test_parse_configuration.c create mode 100644 src/test_parse_configuration.h diff --git a/build.sh b/build.sh index 5dc562bc..6baa310a 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ NC="\e[39m" # When the major version changes in the ut-core, what that signals is that the testings will have to be upgraded to support that version # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your UT-Core Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_PROJECT_MAJOR_VERSION="2." +UT_PROJECT_MAJOR_VERSION="3." # Clone the Unit Test Requirements TEST_REPO=git@github.com:rdkcentral/ut-core.git @@ -62,7 +62,7 @@ else check_next_revision cd ./ut-core git checkout ${UT_CORE_PROJECT_VERSION} - ./build.sh + ./build.sh $@ cd .. ./${0} $@ -fi +fi \ No newline at end of file diff --git a/src/main.c b/src/main.c index 224f5ada..7fe41889 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ */ #include -#include "test_utils.h" +#include "test_parse_configuration.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); @@ -76,11 +76,11 @@ int main(int argc, char** argv) /* Register tests as required, then call the UT-main to support switches and triggering */ UT_init( argc, argv ); - UT_LOG("---Start ------"); - if ( test_utils_parseConfig() == -1 ) + + if ( test_parse_configuration() == -1 ) { printf("\n Failed to parse the configuration file"); - test_utils_parseConfig_term(); + test_parse_configuration_term(); return -1; } @@ -103,7 +103,7 @@ int main(int argc, char** argv) /* Begin test executions */ UT_run_tests(); - test_utils_parseConfig_term(); + test_parse_configuration_term(); return 0; diff --git a/src/test_utils.c b/src/test_dsVideoDevice_parse_configuration.c similarity index 66% rename from src/test_utils.c rename to src/test_dsVideoDevice_parse_configuration.c index 497787a6..9027f260 100644 --- a/src/test_utils.c +++ b/src/test_dsVideoDevice_parse_configuration.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2024 RDK Management +* Copyright 2022 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -42,93 +42,120 @@ */ /** - * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @defgroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings Video Device HAL Tests + * @{ + */ + +/** + * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG Device Settings Video Device Parse Config File * @{ * @parblock * - * ### Utility functions for Device Settings HAL : + * ### L2 Tests for DS Video Device HAL : * - * Utility functions required for the module across all vendors. + * Level 2 unit test cases for all APIs of Device Settings Video Device HAL * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * **Pre-Conditions:** None@n + * **Dependencies:** None@n * - * @endparblock * + * @endparblock */ /** -* @file test_utils.c -* -*/ + * @file test_dsVideoDevice_parse_configuration.c + * + */ +#include #include #include #include -#include -#include "test_utils.h" - -/* Global Variables */ -int32_t gSourceType = -1; - -int32_t gDSModule = 0x0; - -char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE] = {0}; -char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; +#include "test_parse_configuration.h" +#include "test_dsVideoDevice_parse_configuration.h" +/* Global variables */ dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration = NULL; -int32_t gDSvideoDevice_NumVideoDevices; +char gDSVideoDeviceName[DS_VIDEO_DEVICE_NAME_SIZE] = {0}; +int32_t gDSvideoDevice_NumVideoDevices = 0; /* Parse Video Device Configuration file */ -static int test_utils_parse_dsVideoDevice() +int test_dsVideoDevice_parse_configuration() { - char key_string[TEST_UTIL_KVP_SIZE]; + char key_string[DS_VIDEO_DEVICE_KVP_SIZE]; ut_kvp_status_t status; gDSvideoDevice_NumVideoDevices = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoDevice/NumVideoDevices" ); UT_LOG("gDSvideoDevice_NumVideoDevices: %d",gDSvideoDevice_NumVideoDevices); + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Name", gDSVideoDeviceName, DS_VIDEO_DEVICE_NAME_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDSVideoDeviceName); + } + else { + UT_LOG_ERROR("Failed to get the Device Name "); + return -1; + } + gDSVideoDeviceConfiguration = (dsVideoDeviceConfiguration_t*) calloc(gDSvideoDevice_NumVideoDevices, sizeof(dsVideoDeviceConfiguration_t)); if(gDSVideoDeviceConfiguration == NULL) { - UT_LOG_ERROR("Failed to allocate memory for Video Port configuration structure"); + UT_LOG_ERROR("Failed to allocate memory for Video Device configuration structure"); return -1; } - for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) { if(gSourceType == 1){ - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs" , i+1); gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); UT_LOG("NoOfSupportedDFCs: %d",gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs); // loop to get supported SupportedDFCs in array for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs; j++) { - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs/%d" , i+1 , j); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs/%d" , i+1 , j); gDSVideoDeviceConfiguration[i].SupportedDFCs[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); UT_LOG("SupportedDFCs: %d",gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); } } - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/DefaultDFC" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/DefaultDFC" , i+1); gDSVideoDeviceConfiguration[i].DefaultDFC = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); UT_LOG("gDSVideoDeviceConfiguration[i].DefaultDFC :%d",gDSVideoDeviceConfiguration[i].DefaultDFC); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/HDRCapabilities" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/HDRCapabilities" , i+1); gDSVideoDeviceConfiguration[i].HDRCapabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); UT_LOG("gDSVideoDeviceConfiguration[i].HDRCapabilities :%d",gDSVideoDeviceConfiguration[i].HDRCapabilities); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedVideoCodingFormats" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedVideoCodingFormats" , i+1); gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); UT_LOG("SupportedVideoCodingFormats: %d ",gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); if(gSourceType == 0){ - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate" , i+1); gDSVideoDeviceConfiguration[i].NoOfSupportedDFR = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); UT_LOG("NoOfSupportedDFR: %d ",gDSVideoDeviceConfiguration[i].NoOfSupportedDFR); // loop to get supported SupportedDFR in array for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFR; j++) { - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate/%d" , i+1 , j); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate/%d" , i+1 , j); status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate, sizeof(gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate)); UT_LOG("SupportedDisplayFramerate: %s ",gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate); } @@ -137,70 +164,35 @@ static int test_utils_parse_dsVideoDevice() UT_LOG("gSourceType %d ",gSourceType); /* check for only source */ if(gSourceType == 1){ - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/num_entries" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/num_entries" , i+1); gDSVideoDeviceConfiguration[i].num_codec_entries = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); UT_LOG("num_codec_entries %d",gDSVideoDeviceConfiguration[i].num_codec_entries); - //snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); //status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].level, sizeof(key_string)); - //snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); //gDSVideoDeviceConfiguration[i].level = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); //UT_LOG("gDSVideoDeviceConfiguration[i].level:%d",gDSVideoDeviceConfiguration[i].level); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/profile" , i+1); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/profile" , i+1); gDSVideoDeviceConfiguration[i].profile = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); UT_LOG("gDSVideoDeviceConfiguration[i].profile :%d",gDSVideoDeviceConfiguration[i].profile); } } - if(status);//warning fix return 0; } -/* Parse configuration file */ -int test_utils_parseConfig() -{ - ut_kvp_status_t status; - - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", gDeviceType, TEST_UTIL_DEVICE_TYPE_SIZE); - UT_LOG_DEBUG("gDeviceType: %s ",gDeviceType); - if (status == UT_KVP_STATUS_SUCCESS ) { - if (!strncmp(gDeviceType, TEST_UTIL_TYPE_SOURCE_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { - gSourceType = 1; - } - else if(!strncmp(gDeviceType, TEST_UTIL_TYPE_SINK_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { - gSourceType = 0; - } - else { - UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); - return -1; - } - } - else { - UT_LOG_ERROR("Failed to get the platform type"); - return -1; - } - - gDSModule = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), "dsVideoDevice/Module"); - UT_LOG_DEBUG("gDSModule: %d dsVideoDevice:%d ",gDSModule,dsVideoDevice); - if(gDSModule & dsVideoDevice) { - status = test_utils_parse_dsVideoDevice(); - if (status != UT_KVP_STATUS_SUCCESS ) { - UT_LOG_ERROR("Failed to parse dsAudio configurations"); - return -1; - } - } - - return 0; -} - -void test_utils_parseConfig_term() +/* Free Parse Video Device Configuration */ +void test_dsVideoDevice_parse_configuration_term() { if(gDSVideoDeviceConfiguration) { free(gDSVideoDeviceConfiguration); } } -/** @} */ // End of Device_Settings_UTILS + +/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_utils.h b/src/test_dsVideoDevice_parse_configuration.h similarity index 66% rename from src/test_utils.h rename to src/test_dsVideoDevice_parse_configuration.h index 4e8ac37b..73fe75fd 100644 --- a/src/test_utils.h +++ b/src/test_dsVideoDevice_parse_configuration.h @@ -42,13 +42,18 @@ */ /** - * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @addtogroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @{ + */ + +/** + * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H Device Settings HAL Tests video device parse configuration Header File * @{ * @parblock * - * ### Utility functions for Device Settings HAL : + * ### Audio Parse configuration functions for Device Settings HAL : * - * Utility functions required for the module across all vendors. + * Parse configuration functions required for the module across all vendors. * * **Pre-Conditions:** None @n * **Dependencies:** None @n @@ -58,24 +63,21 @@ */ /** -* @file test_utils.h +* @file test_dsVideoDevice_parse_configuration.h * */ -#ifndef __TEST_UTILS_H__ -#define __TEST_UTILS_H__ +#ifndef __TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ +#define __TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ #include "dsVideoDevice.h" -#define TEST_UTIL_KVP_SIZE 256 -#define TEST_UTIL_DEVICE_TYPE_SIZE 8 -#define TEST_UTIL_DEVICE_NAME_SIZE 64 -#define TEST_UTIL_DS_MODULE_NAME_SIZE 32 - -#define TEST_UTIL_TYPE_SOURCE_VALUE "source" -#define TEST_UTIL_TYPE_SINK_VALUE "sink" +#define DS_VIDEO_DEVICE_KVP_SIZE 128 +#define DS_VIDEO_DEVICE_PORT_NAME_SIZE 32 +#define DS_VIDEO_DEVICE_MAX_MS12_PROFILE_LIST 10 +#define DS_VIDEO_DEVICE_MAX_MS12_PROFILE_LEN 32 +#define DS_VIDEO_DEVICE_NAME_SIZE 64 - -#define DS_VIDEO_DEVICE_MODULE_NAME "VideoDevice" +#define DS_VIDEO_DEVICE_MODULE_NAME "dsVideoDevice" /* Video Device configuration */ typedef struct _dsVideoDeviceConfiguration_t { @@ -91,32 +93,19 @@ typedef struct _dsVideoDeviceConfiguration_t { int32_t profile; }dsVideoDeviceConfiguration_t; -typedef enum _dsModule_t { - dsAudioPort = (0x1 << 0), - dsVideoPort = (0x1 << 1), - dsComposite = (0x1 << 2), - dsHdmiIn = (0x1 << 3), - dsVideoDevice = (0x1 << 4), - dsDisplay = (0x1 << 5), - dsFPD = (0x1 << 6), - dsHost = (0x1 << 7), -}dsModule_t; - /* Global variables */ -extern char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE]; -extern char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE]; -extern int32_t gSourceType; -extern int32_t gDSModule; - extern dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration; +extern char gDSVideoDeviceName[]; extern int32_t gDSvideoDevice_NumVideoDevices; /*Function prototypes */ -int test_utils_parseConfig(); -void test_utils_parseConfig_term(); +int test_dsVideoDevice_parse_configuration(); +void test_dsVideoDevice_parse_configuration_term(); + +#endif //__TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ -#endif //__TEST_UTILS_H__ -/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H +/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsVideoDevice.c b/src/test_l2_dsVideoDevice.c index 7c6a9428..eb10ab1d 100644 --- a/src/test_l2_dsVideoDevice.c +++ b/src/test_l2_dsVideoDevice.c @@ -36,7 +36,7 @@ #include #include -#include "test_utils.h" +#include "test_parse_configuration.h" #include "dsVideoDevice.h" static int gTestGroup = 2; diff --git a/src/test_parse_configuration.c b/src/test_parse_configuration.c new file mode 100644 index 00000000..b4b89860 --- /dev/null +++ b/src/test_parse_configuration.c @@ -0,0 +1,152 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @{ + * @parblock + * + * ### Parse configuration functions for Device Settings HAL : + * + * Parse configuration functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.c +* +*/ +#include +#include +#include +#include + +#include "test_parse_configuration.h" + +/* Global Variables */ +int32_t gSourceType = -1; +int32_t gDSModule = dsNone; + +char gDeviceType[TEST_DEVICE_TYPE_SIZE] = {0}; + + +/* Parse configuration file */ +int test_parse_configuration() +{ + ut_kvp_status_t status; + char szReturnedString[UT_KVP_MAX_ELEMENT_SIZE]; +#if 0 + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsAudioPort; + status = test_dsAudio_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse audio configuration file"); + return -1; + } + } +#endif + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoDevice; + status = test_dsVideoDevice_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video device configuration file"); + return -1; + } + } +#if 0 + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoPort; + status = test_dsVideoPort_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video port configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsCompositeIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsComposite; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsFPD/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsFPD; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsDisplay; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHost; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHdmiIn; + } +#endif + return 0; +} + +void test_parse_configuration_term() +{ + //test_dsAudio_parse_configuration_term(); + //test_dsVideoPort_parse_configuration_term(); + test_dsVideoDevice_parse_configuration_term(); +} + +/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_parse_configuration.h b/src/test_parse_configuration.h new file mode 100644 index 00000000..245c427f --- /dev/null +++ b/src/test_parse_configuration.h @@ -0,0 +1,101 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_PARSE_CONFIG_HEADER Device Settings HAL Tests configuration parser Header File + * @{ + * @parblock + * + * ### Configuration parser functions for Device Settings HAL : + * + * Configuration parser functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.h +* +*/ +#ifndef __TEST_DS_PARSE_CONFIG_H__ +#define __TEST_DS_PARSE_CONFIG_H__ + +#include "test_dsVideoDevice_parse_configuration.h" + +#define TEST_DEVICE_TYPE_SIZE 8 +#define TEST_DS_MODULE_NAME_SIZE 32 + +#define TEST_TYPE_SOURCE_VALUE "source" +#define TEST_TYPE_SINK_VALUE "sink" + +/* Global variables */ +extern char gDeviceType[TEST_DEVICE_TYPE_SIZE]; +extern int32_t gSourceType; +extern int32_t gDSModule; + +typedef enum _dsModule_t { + dsNone = (0x0 << 0), + dsAudioPort = (0x1 << 0), + dsVideoPort = (0x1 << 1), + dsComposite = (0x1 << 2), + dsHdmiIn = (0x1 << 3), + dsVideoDevice = (0x1 << 4), + dsDisplay = (0x1 << 5), + dsFPD = (0x1 << 6), + dsHost = (0x1 << 7), +}dsModule_t; + +/*Function prototypes */ +int test_parse_configuration(); +void test_parse_configuration_term(); + +#endif //__TEST_DS_PARSE_CONFIG_H__ + +/** @} */ // End of Device_Settings_PARSE_CONFIG_HEADER +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_register.c b/src/test_register.c index 910f5a74..05763513 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -65,11 +65,11 @@ */ #include -#include "test_utils.h" +#include "test_parse_configuration.h" /** * @brief Register test functionality - * + * */ /* L1 Testing Functions */ From 266b0e4287cc86d1a8b4b5405e9d401407c8d766 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:00:37 +0100 Subject: [PATCH 56/64] gh #11 update def grp in L2 files --- ...md => ds-display-L2-Low-Level_TestSpec.md} | 70 ++++----- ...n.md => ds-display-high-Level_TestSpec.md} | 0 profiles/sink/Panel_4K_Display.yaml | 90 +++++------ profiles/source/Puck_4K_Display.yaml | 13 +- src/test_l2_dsDisplay.c | 148 +++++++++++++----- 5 files changed, 188 insertions(+), 133 deletions(-) rename docs/pages/{dsDisplay_L2_Low-Level_TestSpecification.md => ds-display-L2-Low-Level_TestSpec.md} (55%) rename docs/pages/{dsDisplay_TestSpecificaion.md => ds-display-high-Level_TestSpec.md} (100%) diff --git a/docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md b/docs/pages/ds-display-L2-Low-Level_TestSpec.md similarity index 55% rename from docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md rename to docs/pages/ds-display-L2-Low-Level_TestSpec.md index 1be5e5eb..5ada8a7f 100644 --- a/docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md +++ b/docs/pages/ds-display-L2-Low-Level_TestSpec.md @@ -1,19 +1,16 @@ -# DSDISPLAY L2 Low Level Test Specification and Procedure Documentation +# Device Settings Display L2 Low Level Test Specification and Procedure Documentation ## Table of Contents -- [DSDISPLAY L2 Low Level Test Specification and Procedure Documentation](#dsdisplay-l2-low-level-test-specification-and-procedure-documentation) - - - [Table of Contents](#table-of-contents) - - [Overview](#overview) - - [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) - - [Definitions](#definitions) - - [References](#references) - - [Level 2 Test Procedure](#level-2-test-procedure) +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) ## Overview -This document describes the level 2 testing suite for the DSDISPLAY module. +This document describes the Low Level L2 test Specification and Procedure for the Device settings Display module. ### Acronyms, Terms and Abbreviations @@ -29,10 +26,12 @@ This document describes the level 2 testing suite for the DSDISPLAY module. ### Definitions - - `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. ### References -- `High Level Test Specification` - [dsDisplay_TestSpecificaion.md](:/4d6a87ee74104f3bbe64f7514565a5a2) + +- `High Level Test Specification` - [dsDisplay_TestSpecificaion.md](https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/docs/pages/ds-display-high-Level_TestSpec) +- `HAL Interface file` - [dsDisplay.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsDisplay.h) ## Level 2 Test Procedure @@ -44,31 +43,30 @@ The following functions are expecting to test the module operates correctly. |--|--| |Function Name|`test_l2_dsDisplay_RetrieveAndValidateEDID_sink`| |Description|For the sink device, retrieve EDID information for the display type 'dsVIDEOPORT_TYPE_INTERNAL' using GetEDID and GetEDIDBytes, then validate the values against the data available in the "Panel_4K_Display.yaml" profile file. The values to be validated are the 'EDID_Data/productCode' for GetEDID and the 'EDID_Data/edidBytes'(which stands for Manufacturer ID) at bytes 8 and 9 against the values available in the profile file for GetEDIDBytes.| -|Test Group|Module : 02| +|Test Group|02| |Test Case ID|001| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 1 | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the display using dsDisplayInit | None | dsERR_NONE | Should be successful | -| 02 | Get the display handle using dsGetDisplay for the 'dsVIDEOPORT_TYPE_INTERNAL' type | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | -| 03 | Retrieve EDID information using dsGetEDID | handle = obtained from step 02 | dsERR_NONE | Should be successful | -| 04 | Validate with the product code data available in the profile file 'Panel_4K_Display.yaml.yml' | product code, EDID_Data/productCode | Value matches | Should be successful | -| 05 | Retrieve EDID bytes using dsGetEDIDBytes | handle = obtained from step 02, edidBytes = valid buffer, length = valid buffer | dsERR_NONE | Should be successful | -| 06 | Validate with the Manufacturer ID at bytes 8 and 9 against the values available in the profile file "Panel_4K_Display.yaml" | Manufacturer ID , EDID_Data/edidBytes | Value matches | Should be successful | -| 07 | Terminate the display using dsDisplayTerm | None | dsERR_NONE | Should be successful | - +| 01 | Initialize the display using `dsDisplayInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the display handle using `dsGetDisplay` for the `dsVIDEOPORT_TYPE_INTERNAL` type | type = `dsVIDEOPORT_TYPE_INTERNAL`, index = 0 | `dsERR_NONE` | Should be successful | +| 03 | Retrieve EDID information using `dsGetEDID` | handle = obtained from step 02 | `dsERR_NONE` | Should be successful | +| 04 | Validate with the product code data available in the profile file | product code, `dsDisplay/EDID_Data/productCode` | Value matches | Should be successful | +| 05 | Retrieve EDID bytes using `dsGetEDIDBytes` | handle = obtained from step 02, edidBytes = valid buffer, length = valid buffer | `dsERR_NONE` | Should be successful | +| 06 | Validate with the Manufacturer ID at bytes 8 and 9 against the values available in the profile file | Manufacturer ID , `dsDisplay/EDID_Data/edidBytes` | Value matches | Should be successful | +| 07 | Terminate the display using `dsDisplayTerm` | None | `dsERR_NONE` | Should be successful | ```mermaid graph TB @@ -87,36 +85,34 @@ graph TB H -->|!= dsERR_NONE| H1[Test case fail] ``` - ### Test 2 |Title|Details| |--|--| |Function Name|`test_l2_dsDisplay_TestDefaultAspectRatio_source`| |Description|Test the default aspect ratio (16:9) without any TV connected on source devices.| -|Test Group|Module : 02| +|Test Group|02| |Test Case ID|002| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 2 | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the display using dsDisplayInit() | None | dsERR_NONE | Should be successful | -| 02 | Get the display handle using dsGetDisplay() with dsVIDEOPORT_TYPE_HDMI and index 0 | dsVIDEOPORT_TYPE_HDMI, 0 | dsERR_NONE | Should be successful | -| 03 | Get the display aspect ratio using dsGetDisplayAspectRatio() with the handle obtained from dsGetDisplay() | handle obtained from dsGetDisplay() and aspectRatio = valid buffer | dsERR_NONE, dsVIDEO_ASPECT_RATIO_16x9 | Should be successful | -| 04 | Verify that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9 | None | dsVIDEO_ASPECT_RATIO_16x9 | Should be successful | -| 05 | Terminate the display using dsDisplayTerm() | None | dsERR_NONE | Should be successful | - +| 01 | Initialize the display using `dsDisplayInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the display handle using `dsGetDisplay` with `dsVIDEOPORT_TYPE_HDMI` and index 0 | `dsVIDEOPORT_TYPE_HDMI`, 0 | `dsERR_NONE` | Should be successful | +| 03 | Get the display aspect ratio using `dsGetDisplayAspectRatio` with the handle obtained from `dsGetDisplay` | handle obtained from `dsGetDisplay` and aspectRatio = valid buffer | `dsERR_NONE`, `dsVIDEO_ASPECT_RATIO_16x9` | Should be successful | +| 04 | Verify that the aspect ratio is `dsVIDEO_ASPECT_RATIO_16x9` | None | `dsVIDEO_ASPECT_RATIO_16x9`, `dsDisplay/AspectRatio` | Should be successful | +| 05 | Terminate the display using `dsDisplayTerm` | None | `dsERR_NONE` | Should be successful | ```mermaid graph TB diff --git a/docs/pages/dsDisplay_TestSpecificaion.md b/docs/pages/ds-display-high-Level_TestSpec.md similarity index 100% rename from docs/pages/dsDisplay_TestSpecificaion.md rename to docs/pages/ds-display-high-Level_TestSpec.md diff --git a/profiles/sink/Panel_4K_Display.yaml b/profiles/sink/Panel_4K_Display.yaml index dfff8356..c134b34a 100644 --- a/profiles/sink/Panel_4K_Display.yaml +++ b/profiles/sink/Panel_4K_Display.yaml @@ -1,51 +1,47 @@ -Device: +dsDisplay: Type: sink Name: element - -dsDisplay: features: extendedEnumsSupported: false - -EDID_Data: - # Product code of the display device of the type int32_t - productCode: 0x2A1B - # Serial number of the display device of the type int32_t - serialNumber: 0x01010101 - # Year of manufacture of the display device of the type int32_t - manufactureYear: 2022 - # Week of manufacture of the display device of the type int32_t - manufactureWeek: 1 - # Device type ( @a true if HDMI, @a false if DVI ) of the type bool - hdmiDeviceType: true - # Receiver is a repeater ( @a true if Repeater, @a false if connected Receiver is not a repeater) of the type bool - isRepeater: false - # Physical Address for HDMI node A of the type uint8_t - physicalAddressA: 1 - # Physical Address for HDMI node B of the type uint8_t - physicalAddressB: 0 - # Physical Address for HDMI node C of the type uint8_t - physicalAddressC: 0 - # Physical Address for HDMI node D of the type uint8_t - physicalAddressD: 0 - # Connected Display Monitor Name of the type char. Max length of the string is dsEEDID_MAX_MON_NAME_LENGTH ( 14 ) - monitorName: "element TV" - # edid bytes data - edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 - ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 - 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 - 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 - 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 - 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 - 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc - 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f - - 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 - 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 - 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 - 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 - 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 - 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 - 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 - 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" - # length of the edid bytes - edidbytesLength: 256 + EDID_Data: + # Product code of the display device of the type int32_t + productCode: 0x2A1B + # Serial number of the display device of the type int32_t + serialNumber: 0x01010101 + # Year of manufacture of the display device of the type int32_t + manufactureYear: 2022 + # Week of manufacture of the display device of the type int32_t + manufactureWeek: 1 + # Device type ( @a true if HDMI, @a false if DVI ) of the type bool + hdmiDeviceType: true + # Receiver is a repeater ( @a true if Repeater, @a false if connected Receiver is not a repeater) of the type bool + isRepeater: false + # Physical Address for HDMI node A of the type uint8_t + physicalAddressA: 1 + # Physical Address for HDMI node B of the type uint8_t + physicalAddressB: 0 + # Physical Address for HDMI node C of the type uint8_t + physicalAddressC: 0 + # Physical Address for HDMI node D of the type uint8_t + physicalAddressD: 0 + # Connected Display Monitor Name of the type char. Max length of the string is dsEEDID_MAX_MON_NAME_LENGTH ( 14 ) + monitorName: "element TV" + # edid bytes data + edidBytes: [0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x85, 0x1b, 0x2a, 0x01, 0x01, 0x01, 0x01, + 0xff, 0x20, 0x01, 0x03, 0x80, 0x7a, 0x45, 0x78, 0x0a, 0xee, 0x91, 0xa3, 0x54, 0x4c, 0x99, 0x26, + 0x0f, 0x50, 0x54, 0x21, 0x08, 0x00, 0x31, 0x40, 0x45, 0x40, 0x61, 0x40, 0x71, 0x40, 0x81, 0x80, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0xe8, 0x00, 0x30, 0xf2, 0x70, 0x5a, 0x80, 0xb0, 0x58, + 0x8a, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, 0x1e, 0x02, 0x3a, 0x80, 0x18, 0x71, 0x38, 0x2d, 0x40, + 0x58, 0x2c, 0x45, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x17, + 0x3e, 0x1e, 0x88, 0x3c, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, + 0x00, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x54, 0x56, 0x0a, 0x20, 0x20, 0x01, 0x6f, + 0x02, 0x03, 0x5f, 0xf1, 0x53, 0x61, 0x60, 0x10, 0x1f, 0x04, 0x13, 0x05, 0x14, 0x03, 0x02, 0x12, + 0x20, 0x21, 0x22, 0x15, 0x01, 0x5d, 0x5e, 0x5f, 0x2c, 0x09, 0x57, 0x03, 0x15, 0x07, 0x50, 0x57, + 0x07, 0x00, 0x67, 0x7e, 0x00, 0x6d, 0x03, 0x0c, 0x00, 0x10, 0x00, 0x38, 0x3c, 0x20, 0x00, 0x60, + 0x01, 0x02, 0x03, 0x68, 0xd8, 0x5d, 0xc4, 0x01, 0x78, 0x88, 0x0b, 0x02, 0xe2, 0x00, 0xcf, 0xe3, + 0x05, 0xc0, 0x00, 0xe3, 0x06, 0x0d, 0x01, 0xe4, 0x0f, 0x03, 0x00, 0x00, 0xeb, 0x01, 0x46, 0xd0, + 0x00, 0x4d, 0x57, 0x3a, 0x94, 0x34, 0x07, 0xa5, 0xe6, 0x11, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x66, + 0x21, 0x50, 0xb0, 0x51, 0x00, 0x1b, 0x30, 0x40, 0x70, 0x36, 0x00, 0x40, 0x84, 0x63, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66] + # length of the edid bytes + edidbytesLength: 256 diff --git a/profiles/source/Puck_4K_Display.yaml b/profiles/source/Puck_4K_Display.yaml index 11dfec69..7433d622 100644 --- a/profiles/source/Puck_4K_Display.yaml +++ b/profiles/source/Puck_4K_Display.yaml @@ -1,12 +1,9 @@ -Device: +dsDisplay: Type: source Name: xione - -dsDisplay: features: extendedEnumsSupported: false - -# dsVIDEO_ASPECT_RATIO_4x3 = 0x00, ///< 4:3 aspect ratio -# dsVIDEO_ASPECT_RATIO_16x9 = 0x01, ///< 16:9 aspect ratio -# dsVIDEO_ASPECT_RATIO_MAX = 0xFF ///< Out of range -Aspect Ratio: 0x01 # 16:9 + # dsVIDEO_ASPECT_RATIO_4x3 = 0x00, ///< 4:3 aspect ratio + # dsVIDEO_ASPECT_RATIO_16x9 = 0x01, ///< 16:9 aspect ratio + # dsVIDEO_ASPECT_RATIO_MAX = 0xFF ///< Out of range + Aspect Ratio: 0x01 # 16:9 diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index 005f2290..3363bc3b 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -17,23 +17,62 @@ */ /** -* @file test_l2_dsDisplay.c -* @page dsDisplay Level 2 Tests -* -* ## Module's Role -* This module includes Level 2 functional tests (success and failure scenarios). -* This is to ensure that the dsDisplay APIs meet the requirements across all vendors. -* -* **Pre-Conditions:** None@n -* **Dependencies:** None@n -* -* Ref to API Definition specification documentation : [ds-display_halSpec.md](../../docs/pages/ds-display_halSpec.md) -*/ + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup DS_Display_HALTEST Device Settings Display HAL Tests + * @{ + */ + +/** + * @defgroup DS_Display_HALTEST_L2 Device Settings Display HAL Tests L2 File + * @{ + * @parblock + * + * ### L2 Tests for DS Display HAL : + * + * Level 2 unit test cases for all APIs of Device Settings Display HAL + * + * **Pre-Conditions:** None@n + * **Dependencies:** None@n + * + * Refer to API Definition specification documentation : [ds-display_halSpec.md](../../docs/pages/ds-display_halSpec.md) + * + * @endparblock + */ + + +/** + * @file test_l2_dsDisplay.c + * + */ #include #include #include #include "dsDisplay.h" +#include "test_parse_configuration.h" static int gTestGroup = 2; static int gTestID = 1; @@ -46,7 +85,7 @@ static int gTestID = 1; * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../../docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md) +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) */ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) @@ -59,6 +98,8 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) dsDisplayEDID_t edid = { 0 }; // Initialize all edid fields to 0. unsigned char edidBytes[MAX_EDID_BYTES_LEN] = { 0 }; // Initialize the edidbytes to 0. int length = 0; // Initialize the length to 0. + unsigned char edid_profile; + char key_string[TEST_DS_KEY_SIZE]; // Step 1: Call dsDisplayInit ret = dsDisplayInit(); @@ -80,14 +121,8 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) ret = dsGetEDID(handle, &edid); UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_LOG_INFO("Invoked dsGetEDID() with handle %ld, returned: %d, productCode: %d\n", handle, ret, edid.productCode); - if (ret != dsERR_NONE) - { - // Call dsDisplayTerm if dsGetEDID fails - dsDisplayTerm(); - return; - } - UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(edid.productCode, "EDID_Data/productCode"); + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(edid.productCode, "dsDisplay/EDID_Data/productCode"); // Step 4: Call dsGetEDIDBytes ret = dsGetEDIDBytes(handle, edidBytes, &length); @@ -101,10 +136,17 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) } // Manufacturer ID - UT_LOG_INFO("Manufacturer ID: %d\n", edidBytes[8] << 8 | edidBytes[9]); - - //TODOs : Need KVP support for array handling - UT_ASSERT_KVP_EQUAL_PROFILE_UINT16(edidBytes[8] << 8 | edidBytes[9], "EDID_Data/edidBytes"); + for( uint8_t i = 8; i < 9; i++) + { + snprintf(key_string, MAX_EDID_BYTES_LEN, "dsDisplay.edidBytes.%d", i); + edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); + if(edid_profile != edidBytes[i]) + { + UT_FAIL("edid check failed"); + UT_LOG_ERROR("edid byte: %x, expected value: %x", edidBytes[i], edid_profile); + break; + } + } // Step 5: Call dsDisplayTerm ret = dsDisplayTerm(); @@ -123,7 +165,7 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../../docs/pages/dsDisplay_L2_Low-Level_TestSpecification.md) +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) */ void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) @@ -159,8 +201,6 @@ void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) if (ret != dsERR_NONE || aspectRatio != dsVIDEO_ASPECT_RATIO_16x9) { UT_LOG_ERROR("dsGetDisplayAspectRatio() failed with error: %d\n", ret); - dsDisplayTerm(); - return; } // Step 4: Verify aspect ratio @@ -176,8 +216,6 @@ void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) } static UT_test_suite_t * pSuite = NULL; -static UT_test_suite_t * pSuite1 = NULL; - /** * @brief Register the main tests for this module * @@ -186,23 +224,51 @@ static UT_test_suite_t * pSuite1 = NULL; int test_l2_dsDisplay_register(void) { + int32_t source_type = 0; + ut_kvp_status_t status; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); + // Create the test suite - pSuite = UT_add_suite("[L2 dsDisplay Sink]", NULL, NULL); - if (pSuite == NULL) - { - return -1; + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Source ]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } } - - pSuite1 = UT_add_suite("[L2 dsDisplay Source ]", NULL, NULL); - if (pSuite == NULL) - { + else { + UT_LOG_ERROR("Failed to get the platform type"); return -1; } - // List of test function names and strings - - UT_add_test( pSuite, "l2_dsDisplay_RetrieveAndValidateEDID_sink", test_l2_dsDisplay_RetrieveAndValidateEDID_sink); - UT_add_test( pSuite1, "l2_dsDisplay_TestDefaultAspectRatio_source", test_l2_dsDisplay_TestDefaultAspectRatio_source); + if(source_type == 0) { + UT_add_test( pSuite, "L2_RetrieveAndValidateEDID_sink", test_l2_dsDisplay_RetrieveAndValidateEDID_sink); + } + else if ( source_type == 1 ){ + UT_add_test( pSuite, "L2_TestDefaultAspectRatio_source", test_l2_dsDisplay_TestDefaultAspectRatio_source); + } return 0; } + +/** @} */ // End of DS_Display_HALTEST_L2 +/** @} */ // End of DS_Display_HALTEST +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file From a4d61158fc37c69ae5031ca6e3f97c92ccfdc213 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:38:56 +0100 Subject: [PATCH 57/64] gh #24 updated L2 spec and added defgrp --- ...c.md => ds-hdmi-in-High-Level_TestSpec.md} | 2 +- .../pages/ds-hdmi-in-L2-Low-Level_TestSpec.md | 335 +++++++++++ profiles/sink/Sink_EDID_Info.yaml | 46 -- profiles/sink/Sink_HDMIIN.yaml | 27 +- profiles/source/Source_HDMIIN.yaml | 20 +- src/test_l2_dsHdmiIn.c | 546 ++++++++++++++++-- 6 files changed, 870 insertions(+), 106 deletions(-) rename docs/pages/{dsHdmiIn_test_spec.md => ds-hdmi-in-High-Level_TestSpec.md} (99%) create mode 100644 docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md delete mode 100644 profiles/sink/Sink_EDID_Info.yaml diff --git a/docs/pages/dsHdmiIn_test_spec.md b/docs/pages/ds-hdmi-in-High-Level_TestSpec.md similarity index 99% rename from docs/pages/dsHdmiIn_test_spec.md rename to docs/pages/ds-hdmi-in-High-Level_TestSpec.md index d12f9aec..2a8e9d9d 100644 --- a/docs/pages/dsHdmiIn_test_spec.md +++ b/docs/pages/ds-hdmi-in-High-Level_TestSpec.md @@ -161,7 +161,7 @@ Control plane validates the current mode by the analyzers. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| |Callback for connection Status|Verify that the callback function properly updates the connection/disconnection status flag and notifies the application when a `HDMI` Input port is connected or disconnected.|dsHdmiInRegisterConnectCB()|`N`|`Y`|`Y`|`Y`|`Y`| -|Callback for connection Status|Verify that the callback function properly updates the isPresented status in ::dsHdmiInStatus_t, if the connected port is active and presents video after being connected.|dsHdmiInRegisterConnectCB()|`N`|`Y`|`Y`|`Y`|`Y`| +|Callback for connection Status|Verify that the callback function properly updates the isPresented status, if the connected port is active and presents video after being connected.|dsHdmiInRegisterConnectCB()|`N`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement - Callback for connection Status diff --git a/docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md b/docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md new file mode 100644 index 00000000..d7584507 --- /dev/null +++ b/docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md @@ -0,0 +1,335 @@ +# Device Settings HDMI Input L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the Low Level L2 Test Specification and Procedure Documentation for the Device Settings HDMI Input module. + +### 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 + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [ds-hdmi-in-High-Level_TestSpec.md](https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/docs/pages/ds-hdmi-in-High-Level_TestSpec.md) +- `HAL Interface file` - [dsHdmiIn.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsHdmiIn.h) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_GetNumberOfInputs`| +|Description|Verify that the function returns the expected `HDMI` Input ports. Compare the input port values by parsing the configuration YAML file `dsHdmiIn/numberOfPorts`| +|Test Group|02| +|Test Case ID|001| +|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 1 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize `HDMI` input using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the number of `HDMI` input ports using `dsHdmiInGetNumberOfInputs` | pNumberOfinputs = valid buffer | `dsERR_NONE` | Should be successful | +| 03 | Compare the number of `HDMI` input ports with the value in the configuration file | pNumberOfinputs = `dsHdmiIn/numberOfPorts` | `dsERR_NONE` | Should be successful | +| 04 | Terminate `HDMI` input using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB +A[Call dsHdmiInInit API] -->|dsERR_NONE| B[Parse Configuration file] +A -->|Failure| A1[Test case fail] +B -->|Success| C[Call dsHdmiInGetNumberOfInputs API] +B -->|Failure| B1[Test case fail] +C -->|Success| D[Compare pNumberOfinputs with YAML value] +C -->|Failure| C1[Test case fail] +D -->|Match| E[Call dsHdmiInTerm API] +D -->|Mismatch| D1[Test case fail] +E -->|Failure| E1[Test case fail] +E -->|dsERR_NONE| F[Test case success] +``` + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_GetStatus`| +|Description|Verify the HDMI port with the 'Get status' function when it is disabled, without selecting any port, and without any external devices.| +|Test Group|02| +|Test Case ID|002| +|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 2 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize `HDMI` input using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the status of `HDMI` input using `dsHdmiInGetStatus` | status = valid buffer | `dsERR_NONE` | Should be successful | +| 03 | Check if `HDMI` input is presented | isPresented = false | false | Should be successful | +| 04 | Check if any `HDMI` input port is active | activePort = `dsHDMI_IN_PORT_NONE` | `dsHDMI_IN_PORT_NONE` | Should be successful | +| 05 | Check if any `HDMI` input port is connected | isPortConnected[i] = false for all i in range 0 to `dsHDMI_IN_PORT_MAX` | false | Should be successful | +| 06 | Terminate `HDMI` input using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB +A[Call dsHdmiInInit] -->|dsERR_NONE| B[Call dsHdmiInGetStatus] +A -->|Failure| A1[Test case fail] +B -->|dsERR_NONE| C[Check pStatus] +B -->|Failure| B1[Test case fail] +C -->|isPresented=false, isPortConnected=false,
activePort=dsHDMI_IN_PORT_NONE| D[Call dsHdmiInTerm] +C -->|Failure| C1[Test case fail] +D -->|dsERR_NONE| E[Test case success] +D -->|Failure| D1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_VerifyHdmiInputPortStatus`| +|Description|Loop through all `HDMI` Input port, verify that the function successfully sets the specified `HDMI` Input port without any external device connection and 'Get status' to check the active port is false, port connected is false and presentation is false.| +|Test Group|02| +|Test Case ID|003| +|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 3 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize HDMI input using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Get the number of `HDMI` inputs using `dsHdmiInGetNumberOfInputs` | numInputs = valid buffer | `dsERR_NONE`, numInputs > 0 | Should be successful | +| 03 | Loop through supported `HDMI` input ports and select each port using `dsHdmiInSelectPort` | port = `dsHDMI_IN_PORT_0` to numInputs-1, audioMix = false, evideoPlaneType = dsVideoPlane_PRIMARY, topMost = false | `dsERR_NONE` | Should be successful | +| 04 | Get the status of the selected HDMI input port using `dsHdmiInGetStatus` | status = valid buffer | `dsERR_NONE`, activePort = port, isPresented = false, isPortConnected[port] = false | Should be successful | +| 05 | Terminate HDMI input using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB +A[Call dsHdmiInInit API] -->|dsERR_NONE| B[Call dsHdmiInGetNumberOfInputs API] +A -->|Not dsERR_NONE| A1[Test case fail] +B -->|dsERR_NONE and
non-zero inputs| C{Loop through supported
HDMI input ports} +B -->|Not dsERR_NONE or
zero inputs| B1[Test case fail] +C --> D[Call dsHdmiInSelectPort API with current port] +D -->|dsERR_NONE| E[Call dsHdmiInGetStatus API] +E -->|!dsERR_NONE| E1[Test case fail] +E1 --> F +E -->|dsERR_NONE, activePort is current port,
isPresented is false, isPortConnected is false| F[Next port in loop] +F --> C +C -->|End of loop| G[Call dsHdmiInTerm API] +G -->|dsERR_NONE| H[Test case pass] +G -->|Not dsERR_NONE| G1[Test case fail] +``` + +### Test 4 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_VerifyHdmiArcPort_sink`| +|Description|Loop through supported ports and verify whether the given port is an HDMI ARC port by comparing it with the `dsHdmiIn/HdmiArcPort/numberOfPorts` configuration file.| +|Test Group|02| +|Test Case ID|004| +|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 4 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize HDMI input using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Loop through supported HDMI input ports | iPort = `dsHDMI_IN_PORT_0` to number of Hdmi Input ports supported | `dsERR_NONE` | Should be successful | +| 03 | For each port, check if it is an `HDMI` ARC port using `dsIsHdmiARCPort` | iPort = current port in loop, &isArcPort = valid buffer | `dsERR_NONE` | Should be successful | +| 04 | If the port is an `HDMI` ARC port, verify it with the configuration file | iPort = current port, isArcPort = `dsHdmiIn/HdmiArcPortID` from configuration file returned by `dsIsHdmiARCPort` | `dsERR_NONE` | Should be successful | +| 05 | Terminate `HDMI` input using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB + A[Call dsHdmiInInit API] -->|Success| B{Loop through
HDMI ports} + A -->|Failure| A1[Test case fail] + B --> C[Call dsIsHdmiARCPort API] + C -->|Success| D[Check isArcPort flag] + D -->|isArcPort is true| E[Compare with configuration file] + E --> F[Is it the last HDMI port?] + F -->|No| B + F -->|Yes| G[Call dsHdmiInTerm API] + G -->|Success| H[Test case pass] + G -->|Failure| G1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink`| +|Description|Setting the `EDID` version for a given port and getting back the `EDID` version and compare with the Set value.| +|Test Group|02| +|Test Case ID|005| +|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 5 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize HDMI input module using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Set `EDID` version for each HDMI port using `dsSetEdidVersion` | hdmiPort = `dsHDMI_IN_PORT_0` to `dsHDMI_IN_PORT_2`, edidVersion = Supported `EDID` version from configuration file `dsHdmiIn/EdidVersion/` | `dsERR_NONE` | Should be successful | +| 03 | Get and compare the `EDID` version for each `HDMI` port using `dsGetEdidVersion` | hdmiPort | `dsERR_NONE` | Should be successful | +| 04 | Repeat steps 2 to 4 for all `HDMI` ports and `EDID` versions | | `dsERR_NONE` | Should be successful | +| 05 | Terminate `HDMI` input module using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB + A[dsHdmiInInit] --> |Success| B[dsSetEdidVersion for various ports and edid version] + A --> |Failure| A1[Test Case Fail: dsHdmiInInit] + B --> |Success| C[dsGetEdidVersion] + B --> |Failure| B1[Test Case Fail: dsSetEdidVersion] + C --> |Success & get and set matches | G[dsHdmiInTerm] + C --> |Failure| C1[Test Case Fail: dsGetEdidVersion] + G --> |Success| H[Test Case Success] + G --> |Failure| G1[Test Case Fail: dsHdmiInTerm] +``` + +### Test 6 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink`| +|Description|Make sure that the functionality can list and get the count of all the game features that are supported. Compare the result by parsing the configuration YAML file `dsHdmiIn/gameFeatures/count`| +|Test Group|02| +|Test Case ID|006| +|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 6 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize HDMI input using dsHdmiInInit | None | dsERR_NONE | Should be successful | +| 02 | Get the list of supported game features using dsGetSupportedGameFeaturesList | features = `dsHdmiIn/gameFeatures/feature` | dsERR_NONE | Should be successful | +| 03 | Compare the count of game features with the count in the configuration file | features.gameFeatureCount = value from `dsHdmiIn/gameFeatures/count` | dsERR_NONE | Should be successful | +| 04 | Terminate HDMI input using dsHdmiInTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsHdmiInInit API] -->|dsERR_NONE| B[Call dsGetSupportedGameFeaturesList API] + A -->|Failure| A1[Test case fail] + B --> C[Verify gameFeatureCount field] + B -->|Failure| B1[Test case fail] + C -->|dsERR_NONE| D[Verify gameFeatureList field] + C -->|Failure| C1[Test case fail] + D --> E[Call dsHdmiInTerm API] + D -->|Failure| D1[Test case fail] + E --> F[Test case success] + E -->|Failure| E1[Test case fail] +``` + +### Test 7 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsHdmiIn_SetAndGetAllmSupport_sink`| +|Description|Set and Get the `ALLM` support to `EDID` version 2.0 without connecting any source devices.| +|Test Group|02| +|Test Case ID|007| +|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 7 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize `HDMI` input using `dsHdmiInInit` | None | `dsERR_NONE` | Should be successful | +| 02 | Set `EDID` 2.0 ALLM support to true using `dsSetEdid2AllmSupport` | iHdmiPort = `dsHDMI_IN_PORT_0`, allmSupport = true | `dsERR_NONE` | Should be successful | +| 03 | Get `EDID` 2.0 ALLM support using `dsGetEdid2AllmSupport` | iHdmiPort = `dsHDMI_IN_PORT_0`, number of Hdmi Input ports | `dsERR_NONE`, allmSupport = true | Should be successful | +| 04 | Set EDID 2.0 ALLM support to false using `dsSetEdid2AllmSupport` | iHdmiPort = dsHDMI_IN_PORT_0, allmSupport = false | `dsERR_NONE` | Should be successful | +| 05 | Get EDID 2.0 ALLM support using `dsGetEdid2AllmSupport` | iHdmiPort = `dsHDMI_IN_PORT_0`, to number of Hdmi Input ports supported | `dsERR_NONE`, allmSupport = false | Should be successful | +| 06 | Terminate HDMI input using `dsHdmiInTerm` | None | `dsERR_NONE` | Should be successful | + +```mermaid +graph TB +A[Call dsHdmiInInit] -->|Success| B[Call dsSetEdid2AllmSupport with true] +A -->|Failure| A1[Test case fail] +B -->|Success| C[Call dsGetEdid2AllmSupport] +B -->|Failure| B1[Test case fail] +C -->|Success| D[Call dsSetEdid2AllmSupport with false] +C -->|Failure| C1[Test case fail] +D -->|Success| E[Call dsGetEdid2AllmSupport] +D -->|Failure| D1[Test case fail] +E -->|Success| F[Call dsHdmiInTerm] +E -->|Failure| E1[Test case fail] +F -->|Success| G[Test case success] +F -->|Failure| F1[Test case fail] +``` diff --git a/profiles/sink/Sink_EDID_Info.yaml b/profiles/sink/Sink_EDID_Info.yaml deleted file mode 100644 index 4861754d..00000000 --- a/profiles/sink/Sink_EDID_Info.yaml +++ /dev/null @@ -1,46 +0,0 @@ -HDMIIN: - Type: sink - Name: element - EDID_Data: - # Product code of the display device of the type int32_t - productCode: 0x2A1B - # Serial number of the display device of the type int32_t - serialNumber: 0x01010101 - # Year of manufacture of the display device of the type int32_t - manufactureYear: 2022 - # Week of manufacture of the display device of the type int32_t - manufactureWeek: 1 - # Device type ( @a true if HDMI, @a false if DVI ) of the type bool - hdmiDeviceType: true - # Receiver is a repeater ( @a true if Repeater, @a false if connected Receiver is not a repeater) of the type bool - isRepeater: false - # Physical Address for HDMI node A of the type uint8_t - physicalAddressA: 1 - # Physical Address for HDMI node B of the type uint8_t - physicalAddressB: 0 - # Physical Address for HDMI node C of the type uint8_t - physicalAddressC: 0 - # Physical Address for HDMI node D of the type uint8_t - physicalAddressD: 0 - # Connected Display Monitor Name of the type char. Max length of the string is dsEEDID_MAX_MON_NAME_LENGTH ( 14 ) - monitorName: "element TV" - # edid bytes data - edidBytes: "00 ff ff ff ff ff ff 00 15 85 1b 2a 01 01 01 01 - ff 20 01 03 80 7a 45 78 0a ee 91 a3 54 4c 99 26 - 0f 50 54 21 08 00 31 40 45 40 61 40 71 40 81 80 - 01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58 - 8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40 - 58 2c 45 00 40 84 63 00 00 1e 00 00 00 fd 00 17 - 3e 1e 88 3c 00 0a 20 20 20 20 20 20 00 00 00 fc - 00 65 6c 65 6d 65 6e 74 20 54 56 0a 20 20 01 6f - - 02 03 5f f1 53 61 60 10 1f 04 13 05 14 03 02 12 - 20 21 22 15 01 5d 5e 5f 2c 09 57 03 15 07 50 57 - 07 00 67 7e 00 6d 03 0c 00 10 00 38 3c 20 00 60 - 01 02 03 68 d8 5d c4 01 78 88 0b 02 e2 00 cf e3 - 05 c0 00 e3 06 0d 01 e4 0f 03 00 00 eb 01 46 d0 - 00 4d 57 3a 94 34 07 a5 e6 11 46 d0 00 00 00 66 - 21 50 b0 51 00 1b 30 40 70 36 00 40 84 63 00 00 - 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66" - # length of the edid bytes - edidbytesLength: 256 \ No newline at end of file diff --git a/profiles/sink/Sink_HDMIIN.yaml b/profiles/sink/Sink_HDMIIN.yaml index b9fd91bc..1c3611e4 100644 --- a/profiles/sink/Sink_HDMIIN.yaml +++ b/profiles/sink/Sink_HDMIIN.yaml @@ -1,15 +1,20 @@ -HDMIIN: +# Profile for L1 +dsHdmiIn: Type: sink - Name: element - HdmiInputPort: - #dsHDMI_IN_PORT_NONE = -1, /*!< HDMI input port index for NONE */ - #dsHDMI_IN_PORT_0, /*!< HDMI input port index for PORT 0 */ - #dsHDMI_IN_PORT_1, /*!< HDMI input port index for PORT 1 */ - #dsHDMI_IN_PORT_2, /*!< HDMI input port index for PORT 2 */ - #dsHDMI_IN_PORT_MAX /*!< Out of range */ - numberOfPorts: 3 - HdmiArcPort: - portNumber: 1 + Name: panel_4k + features: + extendedEnumsSupported: false + #dsHDMI_IN_PORT_NONE = -1, /*!< HDMI input port index for NONE */ + #dsHDMI_IN_PORT_0, /*!< HDMI input port index for PORT 0 */ + #dsHDMI_IN_PORT_1, /*!< HDMI input port index for PORT 1 */ + #dsHDMI_IN_PORT_2, /*!< HDMI input port index for PORT 2 */ + #dsHDMI_IN_PORT_MAX /*!< Out of range */ + numberOfPorts: 3 + # HDMI_EDID_VER_14 = 0x0, /*!< EDID version 1.4 */ + # HDMI_EDID_VER_20 = 0x01, /*!< EDID version 2.0 */ + # HDMI_EDID_VER_MAX = 0x02, /*!< Out of bounds */ + EdidVersion: [0x01, 0x01, 0x01] # supported 2.0 for all three HDMI input ports + HdmiArcPortID: 1 gameFeatures: feature: "allm" count: 1 \ No newline at end of file diff --git a/profiles/source/Source_HDMIIN.yaml b/profiles/source/Source_HDMIIN.yaml index 12797eda..95a587bf 100644 --- a/profiles/source/Source_HDMIIN.yaml +++ b/profiles/source/Source_HDMIIN.yaml @@ -1,10 +1,12 @@ -HDMIIN: +# Profile for L1 +dsHdmiIn: Type: source - Name: xi-one - compositeInputPort: - numberOfPorts: 0 - HdmiInputPort: - numberOfPorts: 0 - HdmiArcPort: - portNumber: 0 -gameFeatures: false + Name: STB + features: + extendedEnumsSupported: false + numberOfPorts: 0 + EdidVersion: #No ports + HdmiArcPortID: #No ports + gameFeatures: + feature: "" + count: 0 diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 6ae9931a..1215753f 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests + * @defgroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests * @{ */ @@ -58,7 +57,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-hdmi-in_halSpec.md](../../docs/pages/ds-hdmi-in_halSpec.md) * @endparblock */ @@ -68,52 +67,521 @@ * */ -#include -#include - #include #include +#include +#include "dsHdmiIn.h" +#include "test_parse_configuration.h" + +#define DS_HDMIIN_KEY_SIZE 64 + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of HDMI inputs from the source +* +* This test checks if the function dsHdmiInGetNumberOfInputs correctly retrieves the number of HDMI inputs from the source. +* It first initializes the HDMI input, then retrieves the number of inputs, and finally terminates the HDMI input. +* The test asserts that all these operations return no errors and that the retrieved number of inputs matches the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; //Initialize to dsERR_NONE. + uint8_t numberOfInputs = 0; //Initialize to 0. + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs with valid buffer"); + ret = dsHdmiInGetNumberOfInputs(&numberOfInputs); + UT_LOG_DEBUG("Number of Inputs: %d, Return status: %d", numberOfInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsHdmiInGetNumberOfInputs"); + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numberOfInputs, "dsHdmiIn/numberOfPorts"); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for getting the status of HDMI input source +* +* This test function initializes the HDMI input subsystem, gets the status of the HDMI input ports, verifies the returned status, +* and then terminates the HDMI input subsystem. It uses the Cunit assertion macros to check the return values of the API calls +* and the values of the returned status structure. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize to dsERR_NONE + dsHdmiInStatus_t status = {0}; // Initialize all fields to 0 + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus() with valid status pointer"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("IsPortConnected: %d\n", status.isPortConnected[i]); + UT_ASSERT_EQUAL(status.isPortConnected[i], false); + } + + UT_LOG_DEBUG("isPresented: %d, activePort: %d", status.isPresented, status.activePort); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsHDMI_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI input port status for a given source +* +* This test function initializes the HDMI input, gets the number of inputs, selects each port, +* gets the status of each port, and finally terminates the HDMI input. The test is designed to +* ensure that the HDMI input port status is correctly reported for each source. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiInputPortStatus(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = 0; //Initialize to 0 + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInStatus_t status = {0}; //Initialize all fields to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs()"); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Number of inputs: %d, Return status: %d", numInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (uint8_t i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("Invoking dsHdmiInSelectPort() with port number %d", i); + ret = dsHdmiInSelectPort(i, false, dsVideoPlane_PRIMARY, false); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + continue; + } + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus()"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Active port: %d, Is presented: %d, Is port connected: %d, Return status: %d", status.activePort, status.isPresented, status.isPortConnected[i], ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(status.activePort, i); + UT_ASSERT_FALSE(status.isPortConnected[i]); + UT_ASSERT_FALSE(status.isPresented); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI ARC Port sink functionality +* +* This test initializes the HDMI input, checks if the HDMI ARC Port is available and validates +* the number of ports and their status. It then terminates the HDMI input. The test is designed +* to ensure the proper functioning of HDMI ARC Port sink. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiArcPort_sink(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus = dsERR_NONE; //Initialize to dsERR_NONE + bool isArcPort = false; //Initialize to 0 + dsHdmiInPort_t iPort = dsHDMI_IN_PORT_NONE; //Initialize to default dsHDMI_IN_PORT_NONE + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + retStatus = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + retStatus = dsHdmiInGetNumberOfInputs(&numInputs); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for(iPort = dsHDMI_IN_PORT_0; iPort < numInputs; iPort++) + { + UT_LOG_DEBUG("Invoking dsIsHdmiARCPort with iPort: %d", iPort); + retStatus = dsIsHdmiARCPort(iPort, &isArcPort); + UT_LOG_DEBUG("Return status: %d, isArcPort: %d", retStatus, isArcPort); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if(isArcPort == false) + { + continue; + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(iPort, "dsHdmiIn/HdmiArcPortID"); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + retStatus = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to set and get EDID version and validate EDID length for HDMI input +* +* This test sets the EDID version for HDMI input ports and then gets the EDID version to validate it. +* It also retrieves the EDID bytes info to validate the length. This is done to ensure the correct +* functioning of HDMI input related APIs. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInPort_t hdmiPort[] = {dsHDMI_IN_PORT_0, dsHDMI_IN_PORT_1, dsHDMI_IN_PORT_2}; + tv_hdmi_edid_version_t edidVersion[] = {HDMI_EDID_VER_14, HDMI_EDID_VER_20}; + tv_hdmi_edid_version_t getEdidVersion = HDMI_EDID_VER_MAX; + unsigned char edid[256] = { 0 }; + char keyString[DS_HDMIIN_KEY_SIZE] = {0}; + int length = 0; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + tv_hdmi_edid_version_t supportedEdidVersion; + + snprintf(keyString, DS_HDMIIN_KEY_SIZE, "dsHdmiIn/EdidVersion/%d", i); + + supportedEdidVersion = UT_KVP_PROFILE_GET_UINT8(keyString); + + for (int j = HDMI_EDID_VER_14; j < supportedEdidVersion; j++) + { + UT_LOG_DEBUG("Invoking dsSetEdidVersion with hdmiPort=%d, edidVersion=%d\n", hdmiPort[i], edidVersion[j]); + ret = dsSetEdidVersion(hdmiPort[i], edidVersion[j]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to set EDID version\n"); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetEdidVersion with hdmiPort=%d\n", hdmiPort[i]); + ret = dsGetEdidVersion(hdmiPort[i], &getEdidVersion); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get EDID version\n"); + } + UT_ASSERT_EQUAL(getEdidVersion, edidVersion[j]); + } + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the supported game features list for HDMI input +* +* In this test, the dsHdmiInInit function is invoked to initialize the HDMI input. +* Then, the dsGetSupportedGameFeaturesList function is called to get the list of +* supported game features. The results are then compared with the expected values +* from the Sink_HDMIIN.yaml profile. Finally, the dsHdmiInTerm function is invoked +* to terminate the HDMI input. The test ensures that all these operations are successful +* and the supported game features list is as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 006@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + dsSupportedGameFeatureList_t features = {0}; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSupportedGameFeaturesList with valid buffer"); + ret = dsGetSupportedGameFeaturesList(&features); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsGetSupportedGameFeaturesList"); + } + + UT_LOG_DEBUG("Game feature count: %d",features.gameFeatureCount); + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(features.gameFeatureCount, "dsHdmiIn/gameFeatures/count"); + + for ( uint8_t i = 0; i < features.gameFeatureCount; i++ ){ + UT_LOG_DEBUG("Game feature list: %s",features.gameFeatureList); + UT_ASSERT_KVP_EQUAL_PROFILE_STRING(features.gameFeatureList,"dsHdmiIn/gameFeatures/feature") + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief This test aims to verify the functionality of setting and getting the ALLM support for HDMI input. * -* TODO: Add the description of what is tested and why in this test +* In this test, the dsHdmiInInit function is first invoked to initialize the HDMI input. +* Then, the dsSetEdid2AllmSupport function is called to set the ALLM support for HDMI input to true. +* The dsGetEdid2AllmSupport function is then called to get the current ALLM support status, +* which should be true. The same process is repeated with the ALLM support set to false. +* Finally, the dsHdmiInTerm function is invoked to terminate the HDMI input. +* The test ensures that all these operations return no error. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) */ -void test_l2_dsHdmiIn (void) + +void test_l2_dsHdmiIn_SetAndGetAllmSupport_sink(void) { - UT_FAIL("This function needs to be implemented!"); + dsError_t ret = dsERR_NONE; + bool allmSupport = false; + dsHdmiInPort_t iHdmiPort = dsHDMI_IN_PORT_0; + uint8_t numInputs = 0; // Initialize to 0 + dsSupportedGameFeatureList_t features = {0}; + + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + ret = dsGetSupportedGameFeaturesList(&features); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + if ( strstr(features.gameFeatureList, "allm" ) ){ + + for ( iHdmiPort = dsHDMI_IN_PORT_0; iHdmiPort < numInputs; iHdmiPort++ ){ + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to true", iHdmiPort); + + ret = dsSetEdid2AllmSupport(iHdmiPort, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, true); + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to false", iHdmiPort); + ret = dsSetEdid2AllmSupport(iHdmiPort, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, false); + } + } + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsHdmiIn_register ( void ) + +int test_l2_dsHdmiIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsHdmiIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + ut_kvp_status_t status; + int32_t source_type = 0; - - UT_add_test( pSuite, "test_l2_dsHdmiIn" ,test_l2_dsHdmiIn ); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); - return 0; -} + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Source]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for sink type + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + // List of test function names and strings + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsHdmiIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_GetStatus", test_l2_dsHdmiIn_GetStatus); + UT_add_test( pSuite, "L2_VerifyHdmiInputPortStatus", test_l2_dsHdmiIn_VerifyHdmiInputPortStatus); + + if ( source_type == 0 ){ + UT_add_test( pSuite, "L2_VerifyHdmiArcPort_sink", test_l2_dsHdmiIn_VerifyHdmiArcPort_sink); + UT_add_test( pSuite, "L2_SetAndGetEdidVersionAndValidateEdidLength_sink", test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink); + UT_add_test( pSuite, "L2_GetSupportedGameFeaturesList_sink", test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink); + UT_add_test( pSuite, "L2_SetAndGetAllmSupport_sink", test_l2_dsHdmiIn_SetAndGetAllmSupport_sink); + } + + return 0; +} /** @} */ // End of DS_HDMIIn_HALTEST_L2 /** @} */ // End of DS_HDMIIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file From e681b8061ce22fa7e62e2f1cc3029316d2468a81 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:47:45 +0100 Subject: [PATCH 58/64] gh #18 Updated Specification document and test cases --- .../ds-video-device_High-Level_TestSpec.md | 14 +- .../ds-video-device_L2-Low-Level_TestSpec.md | 319 +-- profiles/sink/Sink_VideoDevice.yaml | 51 +- profiles/source/Source_VideoDevice.yaml | 3 +- src/test_dsVideoDevice_parse_configuration.c | 33 +- src/test_dsVideoDevice_parse_configuration.h | 2 +- src/test_l2_dsAudio.c | 2255 ++++++++++++++++- src/test_l2_dsCompositeIn.c | 252 +- src/test_l2_dsDisplay.c | 233 +- src/test_l2_dsHdmiIn.c | 546 +++- src/test_l2_dsHost.c | 253 +- src/test_l2_dsVideoDevice.c | 185 +- src/test_parse_configuration.c | 22 +- src/test_parse_configuration.h | 10 +- 14 files changed, 3687 insertions(+), 491 deletions(-) diff --git a/docs/pages/ds-video-device_High-Level_TestSpec.md b/docs/pages/ds-video-device_High-Level_TestSpec.md index 6dd2427b..a6adf4fd 100644 --- a/docs/pages/ds-video-device_High-Level_TestSpec.md +++ b/docs/pages/ds-video-device_High-Level_TestSpec.md @@ -63,8 +63,8 @@ Supported zoom modes [dsVideoZoom_t link](https://github.com/rdkcentral/rdk-hali |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the zoom mode status|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDFCs)` profile file and verify using get function.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| -||Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDFCs)` profile file and verify using get with Video playback & connected device. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| +|Check the zoom mode status|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedDFCs)` profile file and verify using get function.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`Y`|`N`|`Y`|`NA`|`NA`| +||Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedDFCs)` profile file and verify using get with Video playback & connected device. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetVideoDevice(), dsSetDFC(), dsGetDFC()|`NA`|`Y`|`Y`|`NA`|`Y`| #### Test Startup Requirement-Check the Zoom Control @@ -82,7 +82,7 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check `HDR` Capability|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/HDRCapabilities)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`|dsGetHDRCapabilities() |`Y`|`NA`|`Y`|`Y`|`NA`| +|Check `HDR` Capability|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/HDRCapabilities)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`|dsGetHDRCapabilities() |`Y`|`NA`|`Y`|`Y`|`NA`| #### Test Startup Requirement-Check the HDR Capability @@ -100,8 +100,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check Video coding Formats and information|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedVideoCodingFormats)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| -||Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/VideoCodecInfo)` profile file.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| +|Check Video coding Formats and information|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedVideoCodingFormats)` Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsGetSupportedVideoCodingFormats() |`Y`|`NA`|`Y`|`Y`|`NA`| +||Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/VideoCodecInfo)` profile file.Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsGetVideoCodecInfo() |`Y`|`NA`|`Y`|`NA`|`NA`| #### Test Startup Requirement-Check Video codec and Formats @@ -119,8 +119,8 @@ Verify the applied zoom mode during playback with analyzer. |Test Functionality|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |------------------|-----------|--------|--|--|------|----|--------------------------| -|Check the Display frame rate Capability|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDisplayFramerate)` and verify using get function. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| -||Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/devicenumber/SupportedDisplayFramerate)` and check if callbacks are triggered Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| +|Check the Display frame rate Capability|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedDisplayFramerate)` and verify using get function. Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)`.|dsSetDisplayframerate(), dsGetCurrentDisplayframerate()|`Y`|`NA`|`NA`|`Y`|`NA`| +||Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/Device/[Device Number]/SupportedDisplayFramerate)` and check if callbacks are triggered Note:Supported Number of VideoDevices check this profile file for source `Source_VideoDevice.yaml(dsVideoDevice/NumVideoDevices)` |dsSetDisplayframerate(), dsRegisterFrameratePreChangeCB(), dsRegisterFrameratePostChangeCB()|`NA`|`Y`|`NA`|`Y`|`Y`| #### Test Startup Requirement-Check the Display frame rate Capability diff --git a/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md b/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md index 74b73ede..44600e95 100644 --- a/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md +++ b/docs/pages/ds-video-device_L2-Low-Level_TestSpec.md @@ -10,7 +10,7 @@ ## Overview -This document describes the level 2 testing suite for the Device Settings Video Device module. +This document describes the Low Level L2 Test Specification and Procedure for the Device Settings Video Device module. ### Acronyms, Terms and Abbreviations @@ -18,6 +18,7 @@ This document describes the level 2 testing suite for the Device Settings Video - `UT` \- Unit Test(s) - `OEM` \- Original Equipment Manufacture - `SoC` \- System on a Chip +- `HDR` \- High Dynamic Range ### Definitions @@ -26,6 +27,7 @@ This document describes the level 2 testing suite for the Device Settings Video ### References - High Level Test Specification [ds-video-device_High-Level_TestSpec.md](ds-video-device_High-Level_TestSpec.md) +- dsVideoDevice `HAL` Interface - [dsVideoDevice.h](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoDevice.h) ## Level 2 Test Procedure @@ -34,295 +36,218 @@ The following functions are expecting to test the module operates correctly. ### Test 1 |Title|Details| -|--|--| +|-----|-------| |Function Name|`test_l2_dsVideoDevice_SetAndGetDFC_source`| -|Description|Loop through each supported video device and the zoom mode can be set using `Source_VideoDevice.yaml(dsVideoDevice/Device/1/SupportedDFCs)` profile file and verify using get| +|Description|Loop through each supported video device and the zoom mode can be set using `dsVideoDevice/Device/[Device Number]/SupportedDFCs` field of configuration file and verify using get| |Test Group|02| |Test Case ID|001| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 1 -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Get video device handle using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file| dsERR_NONE | Should be successful | -| 03 | Loop through each supported video device and set the zoom mode using dsSetDFC | handle = obtained handle, dfc = dsVIDEO_ZOOM_NONE to dsVIDEO_ZOOM_MAX | dsERR_NONE | Should be successful | -| 04 | Verify the set zoom mode using dsGetDFC | handle = obtained handle, dfc_get = buffer to get dfc | dsERR_NONE, dfc_get = dfc | Should be successful | -| 05 | Terminate video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize video device using `dsVideoDeviceInit`|None|`dsERR_NONE`|Should be successful| +|02|Get video device handle using `dsGetVideoDevice`|index = 0 to `dsVideoDevice/NumVideoDevices` from profile file|`dsERR_NONE`|Should be successful| +|03|Loop through each supported video device and set the zoom mode using `dsSetDFC`|handle = obtained handle, dfc = `dsVideoDevice/Device/[Device Number]/SupportedDFCs` of configuration file|`dsERR_NONE`|Should be successful| +|04|Verify the set zoom mode using `dsGetDFC`|handle = obtained handle, dfc_get = buffer to get dfc|`dsERR_NONE`, dfc_get = dfc|Should be successful| +|05|Terminate video device using `dsVideoDeviceTerm`|None|`dsERR_NONE`|Should be successful| ```mermaid graph TB -A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through
each video device} -A -->|Failure| A1[Test case fail] -B -->|dsERR_NONE| C[ dsGetVideoDevice] -C --> D[Set various zoom mode from
config file - dsSetDFC] -D -->|dsERR_NONE| E[Verify zoom mode -
dsGetDFC] -E -->|dsERR_NONE,
Zoom mode matches| B +A[dsVideoDeviceInit] -->|dsERR_NONE|B{Loop through
each video device} +A -->|Failure|A1[Test case fail] +B -->|dsERR_NONE|C[ dsGetVideoDevice] +C --> D[Set various zoom mode from
configuration file - dsSetDFC] +D -->|dsERR_NONE|E[Verify zoom mode -
dsGetDFC] +E -->|dsERR_NONE,
Zoom mode matches|B +E -->|!dsERR_NONE,
Zoom mode doesn't match|E1[Test case fail] +E1 --> B B -->|End of loop|F[ dsVideoDeviceTerm] -F -->|dsERR_NONE| G[Test case success] -F -->|Failure| F1[Test case fail] +F -->|dsERR_NONE|G[Test case success] +F -->|Failure|F1[Test case fail] ``` ### Test 2 |Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoDevice_GetHDRCapabilities_sink`| -|Description|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)`| +|-----|-------| +|Function Name|`test_l2_dsVideoDevice_GetHDRCapabilities`| +|Description|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the configuration file| |Test Group|02| |Test Case ID|002| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 2 -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file, handle = valid pointer | dsERR_NONE | Should be successful | -| 03 | Get the HDR capabilities for each video device using dsGetHDRCapabilities | handle = obtained from previous step, capabilities = valid pointer | dsERR_NONE | Should be successful | -| 04 | Verify the obtained HDR capabilities with the profile file | capabilities = obtained from previous step | Value should match with the profile file | Should be successful | -| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the video device using `dsVideoDeviceInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through each video device using `dsGetVideoDevice`|index = 0 to `dsVideoDevice/NumVideoDevices` from configuration file, handle = valid pointer|`dsERR_NONE`|Should be successful| +|03|Get the `HDR` capabilities for each video device using `dsGetHDRCapabilities`|handle = obtained from previous step, capabilities = valid pointer|`dsERR_NONE`|Should be successful| +|04|Verify the obtained `HDR` capabilities with the configuration file|capabilities = obtained from previous step, configuration field = `dsVideoDevice/Device/[Device Number]/HDRCapabilities`|Value should match with the configuration file|Should be successful| +|05|Terminate the video device using `dsVideoDeviceTerm`|None|`dsERR_NONE`|Should be successful| ```mermaid graph TB -A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} -B -->|dsERR_NONE and valid handle| C[dsGetVideoDevice] -C -->|dsERR_NONE and valid capabilities| D[dsGetHDRCapabilities] -D -->|Verify HDR capabilities| E{End of loop} +A[dsVideoDeviceInit] -->|dsERR_NONE|B{Loop through each
supported video device} +B -->|dsERR_NONE and valid handle|C[dsGetVideoDevice] +C -->|dsERR_NONE and valid capabilities|D[dsGetHDRCapabilities] +D -->|Verify HDR capabilities|E{End of loop} +D -->|Verify HDR capabilities Fail|D1[Test case fail] +D1 --> E E --> B -E -->|dsERR_NONE| F[dsVideoDeviceTerm] +E -->|dsERR_NONE|F[dsVideoDeviceTerm] F --> G[Test case success] -A -->|Failure| H[Test case fail] -F -->|Failure| J[Test case fail] +A -->|Failure|H[Test case fail] +F -->|Failure|J[Test case fail] ``` ### Test 3 |Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoDevice_GetHDRCapabilities_source`| -|Description|Loop through each supported video device and Get the `HDR` capabilities for each video device and verify with the profile file for source use this `Source_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/HDRCapabilities)`| +|-----|-------| +|Function Name|`test_l2_dsVideoDevice_GetSupportedVideoCodingFormats`| +|Description|Loop through each supported video device and get the Video coding format for each video device and verify it with the Configuration file| |Test Group|02| |Test Case ID|003| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 3 -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file, handle = valid buffer | dsERR_NONE | Should be successful | -| 03 | Get the HDR capabilities for each video device using dsGetHDRCapabilities | handle = obtained from dsGetVideoDevice, capabilities = valid buffer | dsERR_NONE | Should be successful | -| 04 | Verify the obtained HDR capabilities with the profile file | capabilities = obtained from dsGetHDRCapabilities | Equal to the value in the profile file | Should be successful | -| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the video device using `dsVideoDeviceInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through each video device using `dsGetVideoDevice`|index = 0 to `dsVideoDevice/NumVideoDevices` from the configuration file|`dsERR_NONE`|Should be successful| +|03|Get the supported video coding formats for each device using `dsGetSupportedVideoCodingFormats`|handle = obtained from `dsGetVideoDevice`|`dsERR_NONE`|Should be successful| +|04|Verify the obtained supported formats with the configuration file|supported_formats = from previous step, configuration field = `dsVideoDevice/Device/[Device Number]/SupportedVideoCodingFormats`|`dsERR_NONE`|Should be successful| +|05|Terminate the video device using `dsVideoDeviceTerm`|None|`dsERR_NONE`|Should be successful| ```mermaid graph TB -A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} -B -->|dsERR_NONE| C[dsGetVideoDevice] -C -->|dsERR_NONE and valid handle| D[dsGetHDRCapabilities] -D -->|dsERR_NONE and valid capabilities| E[Verify HDR capabilities with profile file] -A --> H[Test case fail] -E --> B -B -->|End of loop| I[dsVideoDeviceTerm] -I -->|dsERR_NONE| J[Test case success] -I --> K[Test case fail] +A[Call dsVideoDeviceInit] -->|dsERR_NONE|B{Loop through each
supported video device} +A -->|Failure|A1[Test case fail] +B --> C[Call dsGetVideoDevice for each device] +C -->|dsERR_NONE and
handle is valid|D[Call dsGetSupportedVideoCodingFormats
for each device] +D -->|dsERR_NONE and
supported_formats is valid|E[Verify supported_formats
with configuration file] +E -->|Match|B +E -->|No Match|E1[Test case fail] +E1 --> B +B -->|End of loop|F[Call dsVideoDeviceTerm] +F -->|dsERR_NONE|G[Test case success] +F -->|Failure|F1[Test case fail] ``` ### Test 4 |Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoDevice_GetSupportedVideoCodingFormats_sink`| -|Description|Loop through each supported video device and get the Video coding format for each video device and verify it with the profile file. For source use `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)` and for the sink use `Sink_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)`| +|-----|-------| +|Function Name|`test_l2_dsVideoDevice_GetVideoCodecInfo_source`| +|Description|Loop through each supported video device and get Video codec information for each video device and verify the with configuration file| |Test Group|02| |Test Case ID|004| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 4 -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video device using dsVideoDeviceInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through each video device using dsGetVideoDevice() | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | -| 03 | Get the supported video coding formats for each device using dsGetSupportedVideoCodingFormats() | handle = obtained from dsGetVideoDevice() | dsERR_NONE | Should be successful | -| 04 | Verify the obtained supported formats with the profile file | supported_formats = obtained from dsGetSupportedVideoCodingFormats() | dsERR_NONE | Should be successful | -| 05 | Terminate the video device using dsVideoDeviceTerm() | None | dsERR_NONE | Should be successful | +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the video device using `dsVideoDeviceInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through each supported video device using `dsGetVideoDevice`|index = 0 to `dsVideoDevice/NumVideoDevices` from the configuration file|`dsERR_NONE`|Should be successful| +|03|Get Video codec information for each video device using `dsGetVideoCodecInfo`|handle = handle from `dsGetVideoDevice`, codec = codec|`dsERR_NONE`|Should be successful| +|04|Verify the obtained Video codec information with configuration file|num_entries = `dsVideoDevice/Device/[Device Number]/VideoCodecInfo/num_entries`, level = `dsVideoDevice/Device/[Device Number]/VideoCodecInfo/VideoCodec[number]/level`, profile = `dsVideoDevice/Device/[Device Number]/VideoCodecInfo/VideoCodec[number]/profile`|`dsERR_NONE`|Should be successful| +|05|Terminate the video device using `dsVideoDeviceTerm`|None|`dsERR_NONE`|Should be successful| ```mermaid graph TB -A[Call dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} -A -->|Failure| A1[Test case fail] -B --> C[Call dsGetVideoDevice for each device] -C -->|dsERR_NONE and
handle is valid| D[Call dsGetSupportedVideoCodingFormats
for each device] -D -->|dsERR_NONE and
supported_formats is valid| E[Verify supported_formats
with profile file] -E -->|Match| B -B --> |End of loop|F[Call dsVideoDeviceTerm] -F -->|dsERR_NONE| G[Test case success] -F -->|Failure| F1[Test case fail] +A[Call dsVideoDeviceInit] -->|dsERR_NONE|B{Loop through each
supported video device} +A -->|Failure|A1[Test case fail] +B -->|dsERR_NONE and valid handle|C[Call dsGetVideoCodecInfo with handle] +C -->|dsERR_NONE and info structure populated|D[Verify video codec info
with profile file] +D -->|Success|B +D -->|Fail|D1[Test case fail] +D1 --> B +B -->|End of loop|F[Call dsVideoDeviceTerm] +F -->|dsERR_NONE|G[Test case success] +F -->|Failure|F1[Test case fail] ``` ### Test 5 |Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoDevice_GetSupportedVideoCodingFormats_source`| -|Description|Loop through each supported video device and the get Video coding format for each video device and verify the with profile file for source use this file `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)` and for the sink use this `Sink_VideoDevice.yaml(dsVideoDevice/device/1/SupportedVideoCodingFormats)`| -|Test Group|02| -|Test Case ID|005| -|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:** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Loop through each video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | -| 03 | For each device, get the supported video coding formats using dsGetSupportedVideoCodingFormats | handle = handle from dsGetVideoDevice | dsERR_NONE | Should be successful | -| 04 | Verify the supported video coding formats with the profile file | supported_formats = supported_formats from dsGetSupportedVideoCodingFormats | dsVideoDevice/device/1/SupportedVideoCodingFormats from Source_VideoDevice.yaml | Should be successful | -| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB -A[dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} -B -->|dsERR_NONE| C[dsGetVideoDevice] -C -->|dsERR_NONE and valid handle| D[dsGetSupportedVideoCodingFormat] -D -->|dsERR_NONE and valid supported_formats| E[Verify supported_formats
with profile file] -E -->|Match| B -B -->|No more devices| H[dsVideoDeviceTerm] -H -->|dsERR_NONE| I[Test case pass] -H -->|Not dsERR_NONE| J[Test case fail] -A -->|Not dsERR_NONE| K[Test case fail] -``` - -### Test 6 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoDevice_GetVideoCodecInfo_source`| -|Description|Loop through each supported video device and get Video codec information for each video device and verify the with `Source_VideoDevice.yaml(dsVideoDevice/device/1/VideoCodecInfo)` profile file| -|Test Group|02| -|Test Case ID|006| -|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:** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Loop through each supported video device using dsGetVideoDevice | index = 0 to MAX_DEVICES from profile file | dsERR_NONE | Should be successful | -| 03 | Get Video codec information for each video device using dsGetVideoCodecInfo | handle = handle from dsGetVideoDevice, codec = codec | dsERR_NONE | Should be successful | -| 04 | Verify the obtained Video codec information with `Source_VideoDevice.yaml(dsVideoDevice/device/1/VideoCodecInfo)` profile file | info.num_entries = num_entries from dsGetVideoCodecInfo, info.entries from dsGetVideoCode | dsERR_NONE | Should be successful | -| 05 | Terminate the video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB -A[Call dsVideoDeviceInit] -->|dsERR_NONE| B{Loop through each
supported video device} -A -->|Failure| A1[Test case fail] -B -->|dsERR_NONE and valid handle| C[Call dsGetVideoCodecInfo with handle] -C -->|dsERR_NONE and info structure populated| D[Verify video codec info
with profile file] -D -->|Success| E[Loop for all supported
video codec formats] -E --> B -B -->|End of loop| F[Call dsVideoDeviceTerm] -F -->|dsERR_NONE| G[Test case success] -F -->|Failure| F1[Test case fail] -``` - -### Test 7 - -|Title|Details| -|--|--| +|-----|-------| |Function Name|`test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink`| -|Description|Loop through each supported video device and Set the supported display frame rate for each video device using profile file `Source_VideoDevice.yaml(dsVideoDevice/device/1/SupportedDisplayframerate)` and verify using get| +|Description|Loop through each supported video device and Set the supported display frame rate for each video device using configuration file and verify using get| |Test Group|02| -|Test Case ID|007| +|Test Case ID|005| |Priority|High| -**Pre-Conditions :** +**Pre-Conditions** None -**Dependencies :** +**Dependencies** None -**User Interaction :** +**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 Procedure - Test 5 -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize video device using dsVideoDeviceInit | None | dsERR_NONE | Should be successful | -| 02 | Get video device handle using dsGetVideoDevice with index 0 , Loop through each supported video device| index = 0 to MAX_DEVICES from profile file, handle = valid pointer | dsERR_NONE | Should be successful | -| 03 | Set the supported display frame rate for each video device using dsSetDisplayframerate | handle = obtained handle, framerate = "dsVideoDevice/device/1/SupportedDisplayframerate" | dsERR_NONE | Should be successful | -| 04 | Verify the set frame rate using dsGetCurrentDisplayframerate | handle = obtained handle, framerate = valid pointer | dsERR_NONE | Should be successful | -| 05 | Terminate video device using dsVideoDeviceTerm | None | dsERR_NONE | Should be successful | +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize video device using `dsVideoDeviceInit`|None|`dsERR_NONE`|Should be successful| +|02|Get video device handle using `dsGetVideoDevice` with index 0 , Loop through each supported video device|index = 0 to `dsVideoDevice/NumVideoDevices` from the configuration file, handle = valid pointer|`dsERR_NONE`|Should be successful| +|03|Set the supported display frame rate for each video device using `dsSetDisplayframerate`|handle = obtained handle, framerate = `dsVideoDevice/Device/[Device Number]/SupportedDisplayframerate`|dsERR_NONE|Should be successful| +|04|Verify the set frame rate using `dsGetCurrentDisplayframerate`|handle = obtained handle, framerate = valid pointer|`dsERR_NONE`|Should be successful| +|05|Terminate video device using `dsVideoDeviceTerm`|None|`dsERR_NONE`|Should be successful| ```mermaid graph TB -A[Call dsVideoDeviceInit] -->|dsERR_NONE| B[Call dsGetVideoDevice with index 0] -A -->|Failure| A1[Test case fail] -B -->|dsERR_NONE and valid handle| C{Loop through each
supported video device} -C --> D[Read supported display frame
rate from profile file] +A[Call dsVideoDeviceInit] -->|dsERR_NONE|B{Loop through each
supported video device} +A -->|Failure|A1[Test case fail] +B --> D[Read supported display frame
rate from profile file] D --> E[Call dsSetDisplayframerate
with handle and frame rate] -E -->|dsERR_NONE| F[Call dsGetCurrentDisplayframerate ] -F -->|dsERR_NONE and frame rate matches| G[Repeat steps for each
supported video device] -G --> C -C --> |End of loop|H[Call dsVideoDeviceTerm] -H -->|dsERR_NONE| I[Test case pass] -H -->|Failure| H1[Test case fail] +E -->|dsERR_NONE|F[Call dsGetCurrentDisplayframerate ] +F -->|dsERR_NONE and frame rate matches|B +F --> |!dsERR_NONE and frame rate doesn't match|F1[Test case fail] +F1 --> B +B -->|End of loop|H[Call dsVideoDeviceTerm] +H -->|dsERR_NONE|I[Test case pass] +H -->|Failure|H1[Test case fail] ``` diff --git a/profiles/sink/Sink_VideoDevice.yaml b/profiles/sink/Sink_VideoDevice.yaml index 81ec7616..cc26d310 100644 --- a/profiles/sink/Sink_VideoDevice.yaml +++ b/profiles/sink/Sink_VideoDevice.yaml @@ -1,40 +1,39 @@ dsVideoDevice: Type: sink Name: TV - Module: 0x10 #dsVideoDevice NumVideoDevices: 1 features: extendedEnumsSupported: false Device: 1: - #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ - #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ - #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ - #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * - #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ - #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ - #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ - #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ - #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ - #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ - #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ + #dsVIDEO_ZOOM_UNKNOWN = -1 /*!< Unknown mode */ + #dsVIDEO_ZOOM_NONE = 0 /*!< Decoder format conversion is inactive */ + #dsVIDEO_ZOOM_FULL = 1 /*!< Full screen (16:9 video is streched to fit 4:3 frame) */ + #dsVIDEO_ZOOM_LB_16_9 = 2 /*!< 16:9 Letterbox (16:9 video is placed in a 4:3 frame with a full letterbox effect) * + #dsVIDEO_ZOOM_LB_14_9 = 3 /*!< 14:9 Letterbox (16:9 video is transferred into a 4:3 frame with 14:9 */ + #dsVIDEO_ZOOM_CCO = 4 /*!< Center Cut-out (16:9 video is cut to fill 4:3 frame with its center part) */ + #dsVIDEO_ZOOM_PAN_SCAN = 5 /*!< Pan & Scan (16:9 is cut and panned to fille 4:3 frame, following MPEG pan & scan vectors) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_4_3 = 6 /*!< 2.21:1 Letterbox on 4:3 (video is transferred into 4:3 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_LB_2_21_1_ON_16_9 = 7 /*!< 2.21:1 Letterbox on 16:9 (video is transferred into 16:9 frame with a 2.21:1 letterbox effect) */ + #dsVIDEO_ZOOM_PLATFORM = 8 /*!< Control over the decoder format conversions is managed by the platform */ + #dsVIDEO_ZOOM_16_9_ZOOM = 9 /*!< 16:9 Zoom (4:3 video is zoomed to fill 16:9 frame) */ + #dsVIDEO_ZOOM_PILLARBOX_4_3 = 10 /*!< Pillarbox 4:3 (4:3 video is placed in a 16:9 frame with a pillarbox effect) */ + #dsVIDEO_ZOOM_WIDE_4_3 = 11 /*!< Wide 4:3 (4:3 video is stretched to fill 16:9 frame) */ SupportedDFCs: 0 #Not supported DefaultDFC: 0 #Not supported - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed HDRCapabilities: 0x17 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision - #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ - #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ - #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ - #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ + #dsVIDEO_CODEC_MPEGHPART2 = (0x01 << 0) /*!< Also known HEVC, H.265 */ + #dsVIDEO_CODEC_MPEG4PART10 = (0x01 << 1) /*!< Also known as H.264, MPEG4 AVC */ + #dsVIDEO_CODEC_MPEG2 = (0x01 << 2) /*!< Also known as H.222/H.262 */ + #dsVIDEO_CODEC_MAX = (0x01 << 3) /*!< Out of range */ SupportedVideoCodingFormats: 0x06 #dsVIDEO_CODEC_MPEG2|dsVIDEO_CODEC_MPEG4PART10 SupportedDisplayFramerate: - "60" diff --git a/profiles/source/Source_VideoDevice.yaml b/profiles/source/Source_VideoDevice.yaml index 52b5bda8..3a201e45 100644 --- a/profiles/source/Source_VideoDevice.yaml +++ b/profiles/source/Source_VideoDevice.yaml @@ -1,7 +1,6 @@ dsVideoDevice: Type: source Name: STB - Module: 0x10 #dsVideoDevice NumVideoDevices: 1 features: extendedEnumsSupported: false @@ -43,8 +42,8 @@ dsVideoDevice: num_entries: 1 VideoCodec0: level: 5.1 #HEVC profile level - profile: 2 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN = (0x01 << 0) /*!< 8-bit HEVC video profile. */ #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 = (0x01 << 1) /*!< 10-bit HEVC video profile. */ #dsVIDEO_CODEC_HEVC_PROFILE_MAINSTILLPICTURE = (0x01 << 2) /*!< HECV Main Still Picture profile */ #dsVIDEO_CODEC_HEVC_MAX = (0x01 << 3) /*!< Out of range */ + profile: 2 #dsVIDEO_CODEC_HEVC_PROFILE_MAIN10 diff --git a/src/test_dsVideoDevice_parse_configuration.c b/src/test_dsVideoDevice_parse_configuration.c index 9027f260..4dcd2a6e 100644 --- a/src/test_dsVideoDevice_parse_configuration.c +++ b/src/test_dsVideoDevice_parse_configuration.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -88,7 +88,7 @@ int test_dsVideoDevice_parse_configuration() gDSvideoDevice_NumVideoDevices = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoDevice/NumVideoDevices" ); - UT_LOG("gDSvideoDevice_NumVideoDevices: %d",gDSvideoDevice_NumVideoDevices); + UT_LOG_DEBUG("gDSvideoDevice_NumVideoDevices: %d",gDSvideoDevice_NumVideoDevices); status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); if (status == UT_KVP_STATUS_SUCCESS ) { @@ -127,55 +127,62 @@ int test_dsVideoDevice_parse_configuration() if(gSourceType == 1){ snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs" , i+1); gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); - UT_LOG("NoOfSupportedDFCs: %d",gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs); + UT_LOG_DEBUG("NoOfSupportedDFCs: %d",gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs); // loop to get supported SupportedDFCs in array for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs; j++) { snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs/%d" , i+1 , j); gDSVideoDeviceConfiguration[i].SupportedDFCs[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - UT_LOG("SupportedDFCs: %d",gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); + UT_LOG_DEBUG("SupportedDFCs: %d",gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); } } snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/DefaultDFC" , i+1); gDSVideoDeviceConfiguration[i].DefaultDFC = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - UT_LOG("gDSVideoDeviceConfiguration[i].DefaultDFC :%d",gDSVideoDeviceConfiguration[i].DefaultDFC); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].DefaultDFC :%d",gDSVideoDeviceConfiguration[i].DefaultDFC); snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/HDRCapabilities" , i+1); gDSVideoDeviceConfiguration[i].HDRCapabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - UT_LOG("gDSVideoDeviceConfiguration[i].HDRCapabilities :%d",gDSVideoDeviceConfiguration[i].HDRCapabilities); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].HDRCapabilities :%d",gDSVideoDeviceConfiguration[i].HDRCapabilities); snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedVideoCodingFormats" , i+1); gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - UT_LOG("SupportedVideoCodingFormats: %d ",gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); + UT_LOG_DEBUG("SupportedVideoCodingFormats: %d ",gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); if(gSourceType == 0){ snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate" , i+1); gDSVideoDeviceConfiguration[i].NoOfSupportedDFR = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); - UT_LOG("NoOfSupportedDFR: %d ",gDSVideoDeviceConfiguration[i].NoOfSupportedDFR); + UT_LOG_DEBUG("NoOfSupportedDFR: %d ",gDSVideoDeviceConfiguration[i].NoOfSupportedDFR); // loop to get supported SupportedDFR in array for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFR; j++) { snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate/%d" , i+1 , j); status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate, sizeof(gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate)); - UT_LOG("SupportedDisplayFramerate: %s ",gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate); + if (status == UT_KVP_STATUS_SUCCESS ) { + UT_LOG_DEBUG("SupportedDisplayFramerate: %s ",gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate); + } + else { + UT_LOG_ERROR("Failed to get the platform Device SupportedDisplayFramerate"); + return -1; + } } } - UT_LOG("gSourceType %d ",gSourceType); + UT_LOG_DEBUG("gSourceType %d ",gSourceType); /* check for only source */ if(gSourceType == 1){ snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/num_entries" , i+1); gDSVideoDeviceConfiguration[i].num_codec_entries = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - UT_LOG("num_codec_entries %d",gDSVideoDeviceConfiguration[i].num_codec_entries); + UT_LOG_DEBUG("num_codec_entries %d",gDSVideoDeviceConfiguration[i].num_codec_entries); + //TODO : kvp profile support for float type is not available now //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); //status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].level, sizeof(key_string)); //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); //gDSVideoDeviceConfiguration[i].level = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - //UT_LOG("gDSVideoDeviceConfiguration[i].level:%d",gDSVideoDeviceConfiguration[i].level); + //UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].level:%d",gDSVideoDeviceConfiguration[i].level); snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/profile" , i+1); gDSVideoDeviceConfiguration[i].profile = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - UT_LOG("gDSVideoDeviceConfiguration[i].profile :%d",gDSVideoDeviceConfiguration[i].profile); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].profile :%d",gDSVideoDeviceConfiguration[i].profile); } } diff --git a/src/test_dsVideoDevice_parse_configuration.h b/src/test_dsVideoDevice_parse_configuration.h index 73fe75fd..e806918e 100644 --- a/src/test_dsVideoDevice_parse_configuration.h +++ b/src/test_dsVideoDevice_parse_configuration.h @@ -51,7 +51,7 @@ * @{ * @parblock * - * ### Audio Parse configuration functions for Device Settings HAL : + * ### Video Device Parse configuration functions for Device Settings HAL : * * Parse configuration functions required for the module across all vendors. * diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index 9924734d..cb9a13f6 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ /** * @defgroup DS_Audio_HALTEST_L2 Device Settings Audio HAL Tests L2 File * @{ - * @parblock + * @parblock * * ### L2 Tests for DS Audio HAL : * @@ -58,7 +58,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-audio_halSpec.md](../../docs/pages/ds-audio_halSpec.md) * * @endparblock */ @@ -68,49 +68,2254 @@ * @file test_l2_dsAudio.c * */ -#include + +#include +#include + +#include #include +#include "dsAudio.h" +#include "test_parse_configuration.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief This test verifies the functionality of enabling, disabling and +* verifying the status of an audio port. +* +* This test function initializes an audio port, enables it, verifies its status, +* disables it, and then verifies its status again. This is done for all types of +* audio ports and for all indices. The test ensures that the audio port can be +* successfully enabled and disabled, and that the status of the port accurately +* reflects these changes. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: true", handle); + ret = dsEnableAudioPort(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not enabled", ret); + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: false", handle); + ret = dsEnableAudioPort(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not disabled", ret); + } + } //for (port) + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the connection status of the headphone port on sink platform +* +* This test initializes the audio port, gets the audio port for each type, checks +* if the headphone port is connected, and finally terminates the audio port. The test +* is designed to verify the correct functioning of the dsAudio module's headphone +* connection status checking mechanism. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool isConnected; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HEADPHONE) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsAudioOutIsConnected with handle: %p", handle); + ret = dsAudioOutIsConnected(handle, &isConnected); + UT_LOG_DEBUG("Return status: %d, isConnected: %d", ret, isConnected); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(isConnected, false); + if (ret != dsERR_NONE || isConnected) { + UT_LOG_ERROR("dsAudioOutIsConnected failed with error %d or Audio out is connected", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to retrieve and verify MS12 capabilities of the platform +* +* This test function is designed to retrieve and verify the MS12 capabilities +* of the audio sink. It initializes the audio port, gets the audio port with a +* specific type and index, retrieves the MS12 capabilities, and then terminates +* the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_capabilites == 0) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12Capabilities with handle: %p", handle); + retStatus = dsGetMS12Capabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12Capabilities failed with error %d", retStatus); + } + UT_ASSERT_EQUAL(capabilities, gDSAudioPortConfiguration[port].ms12_capabilites); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* audio compression for different audio port types. +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is invoked to get the handle of the audio port. For each compression level +* from 0 to 10, the dsSetAudioCompression function is invoked to set the +* audio compression level, and the dsGetAudioCompression function is invoked +* to get the set compression level. The set and got compression levels are then +* compared to verify if they are equal. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioCompression(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int compression, getCompression; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + if(gDSAudioPortConfiguration[port].no_of_supported_compression == 0) { + continue; + } + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + for (compression = 0; compression < gDSAudioPortConfiguration[port].no_of_supported_compression; compression++) { + UT_LOG_DEBUG("Invoking dsSetAudioCompression with handle: %p and compression: %d", + handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + ret = dsSetAudioCompression(handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetAudioCompression failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioCompression with handle: %p", handle); + ret = dsGetAudioCompression(handle, &getCompression); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioCompression failed with error: %d", ret); + } + + UT_LOG_DEBUG("Compression set: %d, Compression got: %d", gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + UT_ASSERT_EQUAL(gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + } /* for (compression) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dialog Enhancement for dsAudio +* +* This test sets the Dialog Enhancement for dsAudio and then gets the +* Dialog Enhancement to verify if the set operation was successful. +* This is done for all audio port types and for two indexes. The test is +* designed to ensure the proper functioning of the dsAudio's Dialog Enhancement +* set and get operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDialogEnhancement(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DialogueEnhancer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort() failed with error: %d", ret); + continue; + } + + for (level = 0; level <= 16; level++) { + UT_LOG_DEBUG("Invoking dsSetDialogEnhancement() with handle: %p and level: %d", handle, level); + ret = dsSetDialogEnhancement(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDialogEnhancement() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDialogEnhancement() with handle: %p", handle); + ret = dsGetDialogEnhancement(handle, &getLevel); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDialogEnhancement() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level: %d", getLevel); + UT_ASSERT_EQUAL(getLevel, level); + }/* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dolby volume mode for different audio port types. +* +* This test initializes the audio port, then for each audio port type, +* it gets the audio port, sets the Dolby volume mode to true, gets the +* Dolby volume mode and checks if it is true, sets the Dolby volume mode +* to false, gets the Dolby volume mode and checks if it is false, and +* finally terminates the audio port. The test is designed to verify the +* functionality of setting and getting the Dolby volume mode for different audio port types. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 06@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDolbyVolumeMode(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DolbyVolume)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode true", handle); + ret = dsSetDolbyVolumeMode(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,true); + if (ret != dsERR_NONE || !mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode false", handle); + ret = dsSetDolbyVolumeMode(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,false); + if (ret != dsERR_NONE || mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the Intelligent Equalizer Mode for dsAudio +* +* In this test, the Intelligent Equalizer Mode for dsAudio is set and then +* retrieved to verify if the set operation was successful. This is done for +* all audio port types and for all modes from 0 to 6. The test is crucial +* to ensure the correct functioning of the Intelligent Equalizer Mode +* setting and retrieval operations in dsAudio. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetIntelligentEqualizerMode(void) +{ + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_InteligentEqualizer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 6; mode++) { + UT_LOG_DEBUG("Invoking dsSetIntelligentEqualizerMode with handle %p and mode %d", handle, mode); + ret = dsSetIntelligentEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetIntelligentEqualizerMode failed with error %d", ret); + continue; + } + + int getMode = 0; + UT_LOG_DEBUG("Invoking dsGetIntelligentEqualizerMode with handle %p", handle); + ret = dsGetIntelligentEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetIntelligentEqualizerMode failed with error %d", ret); + } + + UT_LOG_DEBUG("Returned mode %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* the volume leveller for a given audio sink +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is called to get the handle of the audio port. The dsSetVolumeLeveller function +* is then used to set the volume leveller for the obtained audio port. +* The dsGetVolumeLeveller function is subsequently called to retrieve the volume +* leveller that was set. The retrieved volume leveller is then compared with the set +* volume leveller to verify if they match. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 08@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetVolumeLeveller(void) +{ + gTestID = 8; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + dsVolumeLeveller_t volLevellerSet = {0, 0}, volLevellerGet; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_Volumeleveller is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x08)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int level = 0; level <= 10; level++) { + volLevellerSet.mode = mode; + volLevellerSet.level = level; + UT_LOG_DEBUG("Invoking dsSetVolumeLeveller with handle: %p and volLeveller: {mode: %d, level: %d}", handle, volLevellerSet.mode, volLevellerSet.level); + retStatus = dsSetVolumeLeveller(handle, volLevellerSet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsSetVolumeLeveller failed with status: %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetVolumeLeveller with handle: %p", handle); + retStatus = dsGetVolumeLeveller(handle, &volLevellerGet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetVolumeLeveller failed with status: %d", retStatus); + } + + UT_LOG_DEBUG("Retrieved volLeveller: {mode: %d, level: %d}", volLevellerGet.mode, volLevellerGet.level); + UT_ASSERT_EQUAL(volLevellerGet.mode, volLevellerSet.mode); + UT_ASSERT_EQUAL(volLevellerGet.level, volLevellerSet.level); + } /* for (mode) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Bass Enhancer for audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. A random boost value is set using dsSetBassEnhancer() +* function and then retrieved using dsGetBassEnhancer() function. The set and retrieved +* boost values are then compared for equality. Finally, the dsAudioPortTerm() function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 09@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetBassEnhancer(void) +{ + gTestID = 9; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int boost = 0; + int setBoost = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_BassEnhancer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x10)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (setBoost = 0; setBoost <= 100; setBoost++) { + UT_LOG_DEBUG("Invoking dsSetBassEnhancer() with handle: %p and boost: %d", handle, setBoost); + ret = dsSetBassEnhancer(handle, setBoost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetBassEnhancer() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetBassEnhancer() with handle: %p", handle); + ret = dsGetBassEnhancer(handle, &boost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetBassEnhancer() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Boost value: %d", boost); + UT_ASSERT_EQUAL(boost, setBoost); + } /* for (setBoost) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the enabling and functionality of the +* Surround Decoder sink in the L2 dsAudio module +* +* This test initializes the dsAudio port, gets the audio port for each type, +* enables the surround decoder, checks if the surround decoder is enabled, and +* finally terminates the dsAudio port. The test is designed to ensure that the +* surround decoder can be successfully enabled and function as expected in the +* L2 dsAudio module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 010@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableAndVerifySurroundDecoder(void) +{ + gTestID = 10; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = true; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundDecoder is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x20)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to true", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + + enabled = false; + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to false", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting DRC mode in dsAudio. +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. For each mode (0 and 1), the dsSetDRCMode() function +* is invoked to set the DRC mode and the dsGetDRCMode() function is invoked to +* get the DRC mode. The test asserts that the mode set is the same as the mode got. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 011@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDRCMode(void) +{ + gTestID = 11; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mode; + int getMode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_DRCMode is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x40)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 1; mode++) { + UT_LOG_DEBUG("Invoking dsSetDRCMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetDRCMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDRCMode() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDRCMode() with handle=%p", handle); + ret = dsGetDRCMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDRCMode() failed with status: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(getMode, mode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Surround Virtualizer in dsAudio +* +* In this test, the dsAudioPortInit function is invoked to initialize the audio port. +* Then, for each audio port type and index, the dsGetAudioPort function is invoked +* to get the audio port handle. The dsSetSurroundVirtualizer function is then invoked +* to set the surround virtualizer for the obtained handle. The dsGetSurroundVirtualizer +* function is then invoked to get the surround virtualizer for the same handle. +* The obtained virtualizer is then compared with the set virtualizer to validate +* the set and get functionality. Finally, the dsAudioPortTerm function is invoked +* to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 012@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetSurroundVirtualizer(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsSurroundVirtualizer_t virtualizer = {0, 0}, getVirtualizer; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundVirtualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x80)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int boost = 0; boost <= 96; boost +=16) { + virtualizer.mode = mode; + virtualizer.boost = boost; + UT_LOG_DEBUG("Invoking dsSetSurroundVirtualizer with handle: %p and virtualizer: {mode: %d, boost: %d}", handle, virtualizer.mode, virtualizer.boost); + ret = dsSetSurroundVirtualizer(handle, virtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetSurroundVirtualizer failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSurroundVirtualizer with handle: %p", handle); + ret = dsGetSurroundVirtualizer(handle, &getVirtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetSurroundVirtualizer failed with error: %d", ret); + } + + UT_LOG_DEBUG("Received virtualizer: {mode: %d, boost: %d}", getVirtualizer.mode, getVirtualizer.boost); + UT_ASSERT_EQUAL(getVirtualizer.mode, virtualizer.mode); + UT_ASSERT_EQUAL(getVirtualizer.boost, virtualizer.boost); + } /* for (boost) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting MISteering in dsAudio. +* +* In this test, we initialize the audio port and then for each type of audio port +* and for each index, we set the MISteering to true and then get the MISteering +* to verify if it has been set correctly. If any of these operations fail, +* we log the error and continue with the next iteration. Finally, we terminate +* the audio port and assert that the operation was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 013@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMISteering(void) +{ + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool enabled; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_MISteering is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x100)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=true", handle); + ret = dsSetMISteering(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, true); + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=false", handle); + ret = dsSetMISteering(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Graphic Equalizer Mode in dsAudio +* +* In this test, the dsAudioPortInit() function is first invoked to initialize +* the audio port. Then, for each type of audio port and for each index, +* the dsGetAudioPort() function is invoked to get the audio port. +* For each mode from 0 to 3, the dsSetGraphicEqualizerMode() function is +* invoked to set the graphic equalizer mode and the dsGetGraphicEqualizerMode() +* function is invoked to get the graphic equalizer mode. The mode set and +* the mode got are then compared to ensure they are equal. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 014@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetGraphicEqualizerMode(void) +{ + gTestID = 14; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + int getMode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_GraphicEqualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x200)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (mode = 0; mode <= 3; mode++) { + UT_LOG_DEBUG("Invoking dsSetGraphicEqualizerMode() with handle: %p and mode: %d", handle, mode); + ret = dsSetGraphicEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetGraphicEqualizerMode() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetGraphicEqualizerMode() with handle: %p", handle); + ret = dsGetGraphicEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetGraphicEqualizerMode() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to enable, disable and retrieve the LE configuration for the audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index up to 10, the dsGetAudioPort() +* function is invoked to get the audio port. If successful, the dsEnableLEConfig() +* function is invoked to enable the LE configuration. The dsGetLEConfig() function is +* then invoked to retrieve the LE configuration. If successful, the dsEnableLEConfig() +* function is invoked again to disable the LE configuration. The dsGetLEConfig() function +* is then invoked again to check if the LE configuration has been disabled. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 015@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndRetrieveLEConfig(void) +{ + gTestID = 15; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enable = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_LEConfig is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x400)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=true", handle); + ret = dsEnableLEConfig(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || !enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,true); + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=false", handle); + ret = dsEnableLEConfig(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to check MS12 decode support for dsAudio +* +* This test checks if the MS12 decode support is available for dsAudio. +* It initializes the audio port, gets the audio port for each type and index, +* checks if MS12 decode is available, and finally terminates the audio port. +* The test is designed to ensure the correct functioning of dsAudio's MS12 decode support. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 016@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS12DecodeSupport(void) +{ + gTestID = 16; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool hasMS12Decode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("dsGetAudioPort returned handle %p", handle); + + UT_LOG_DEBUG("Invoking dsIsAudioMS12Decode with handle %p", handle); + ret = dsIsAudioMS12Decode(handle, &hasMS12Decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMS12Decode returned %d", ret); + } + UT_LOG_DEBUG("dsIsAudioMS12Decode returned %d", hasMS12Decode); + + UT_ASSERT_EQUAL(hasMS12Decode, gDSAudioPortConfiguration[port].isms12decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the support for MS11 decoding in dsAudio +* +* This test initializes the audio port and checks if MS11 decoding is supported +* for each audio port type. If the decoding is supported, it verifies the obtained +* values with the values retrieved from the 'Sink_AudioSettings.yaml' file. +* The test ends by terminating the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 017@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS11DecodeSupport(void) +{ + gTestID = 17; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool HasMS11Decode = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); -#include -#include + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsAudioMSDecode with handle: %p", handle); + ret = dsIsAudioMSDecode(handle, &HasMS11Decode); + UT_LOG_DEBUG("Return status: %d, HasMS11Decode: %d, SupportedMS11: %d", + ret, HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the MS12 Audio Profiles for a given sink +* +* This test case verifies the MS12 Audio Profiles for a given sink. +* It checks if the correct audio profiles are returned for a valid sink. +* This is important to ensure that the audio profiles are correctly configured and retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 018@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyMS12AudioProfiles_sink(void) +{ + gTestID = 18; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList with valid handle"); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_LOG_DEBUG("Return status: %d, Profiles: %s, Profile Count: %d", ret, profiles.audioProfileList, profiles.audioProfileCount); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(profiles.audioProfileCount, gDSAudioPortConfiguration[port].ms12_audioprofilecount); + + for (int i = 0; i < profiles.audioProfileCount; i++) { + if(strstr(profiles.audioProfileList, gDSAudioPortConfiguration[port].ms12_audio_profiles[i]) == NULL) { + UT_FAIL("Audioprofile mismatch"); + UT_LOG_ERROR("%s is not in %s", gDSAudioPortConfiguration[port].ms12_audio_profiles[i], profiles.audioProfileList); + } + } /* for (i) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of MS12 Audio Profile for different audio ports. +* +* In this test, the dsAudioPortInit() function is first invoked to +* initialize the audio port. Then, for each type of audio port, +* the dsGetAudioPort() function is invoked to get the handle of the audio port. +* The dsGetMS12AudioProfileList() function is then invoked to get the list of MS12 audio profiles. +* For each profile in the list, the dsSetMS12AudioProfile() function is invoked to set +* the profile, and the dsGetMS12AudioProfile() function is invoked to get the profile. +* The set and get profiles are then compared for equality. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. The test ensures that all these functions +* work as expected for different types of audio ports and profiles. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 019@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMS12AudioProfile_sink(void) +{ + gTestID = 19; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList() with handle=%p", handle); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfileList() failed with status=%d", ret); + } + + char *profileName = strtok(profiles.audioProfileList, ","); + char profile[DS_AUDIO_MAX_MS12_PROFILE_LEN]; + while (profileName != NULL) { + UT_LOG_DEBUG("Invoking dsSetMS12AudioProfile() with handle=%p and profile=%s", handle, profileName); + ret = dsSetMS12AudioProfile(handle, profileName); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMS12AudioProfile() failed with status=%d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfile() with handle=%p", handle); + ret = dsGetMS12AudioProfile(handle, profile); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfile() failed with status=%d", ret); + } + + UT_ASSERT_STRING_EQUAL(profile, profileName); + profileName = strtok(NULL, ","); + } /* while (profileName) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting the stereo mode of an audio sink +* +* This test checks if the stereo mode of an audio sink can be set and +* retrieved correctly. It does this by first initializing the audio port, +* then getting the audio port for each type and index. It then sets the +* stereo mode for the retrieved audio port and checks if the set mode +* can be retrieved correctly. If any of these operations fail, it logs +* an error and continues with the next iteration. Finally, it terminates +* the audio port and checks if the termination was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 020@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoMode(void) +{ + gTestID = 20; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsAudioStereoMode_t getmode ,mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].no_of_supported_stereo_mode <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (int j = 0; j < gDSAudioPortConfiguration[port].no_of_supported_stereo_mode; j++) { + mode = gDSAudioPortConfiguration[port].supported_stereo_mode[j]; + UT_LOG_DEBUG("Invoking dsSetStereoMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetStereoMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetStereoMode() with handle=%p", handle); + ret = dsGetStereoMode(handle, &getmode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Stereo mode: %d and return status: %d", getmode, ret); + UT_ASSERT_EQUAL(mode, getmode); + } /* for (j) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Stereo Auto mode in dsAudio API +* +* This test function tests the setting and getting of Stereo Auto mode +* in dsAudio API. It first initializes the audio port, then for each +* audio port type, it gets the audio port, sets the Stereo Auto mode, +* gets the Stereo Auto mode and validates it. The test is designed +* to ensure that the dsAudio API's set and get functions for +* Stereo Auto mode are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 021@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoAuto_sink(void) +{ + gTestID = 21; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int autoMode = 1; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!gDSAudioPortConfiguration[port].stereo_auto_mode) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("Handle: %p", handle); + + UT_LOG_DEBUG("Invoking dsSetStereoAuto with handle %p and autoMode %d", handle, autoMode); + ret = dsSetStereoAuto(handle, autoMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getAutoMode; + UT_LOG_DEBUG("Invoking dsGetStereoAuto with handle %p", handle); + ret = dsGetStereoAuto(handle, &getAutoMode); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetStereoAuto failed with error %d", ret); + } + UT_LOG_DEBUG("AutoMode: %d", getAutoMode); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getAutoMode, autoMode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting audio gain for different audio ports +* +* This test is designed to verify the functionality of setting and getting +* audio gain for different audio ports. It tests the dsSetAudioGain and +* dsGetAudioGain functions by setting a range of gain values and then +* getting the gain value to verify if the set value is correctly retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 022@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioGain_sink(void) +{ + gTestID = 22; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float gain, getGain; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (gain = -2080; gain <= 480; gain += 10) { + UT_LOG_DEBUG("Invoking dsSetAudioGain with handle=%p and gain=%f", handle, gain); + ret = dsSetAudioGain(handle, gain); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioGain with handle=%p", handle); + ret = dsGetAudioGain(handle, &getGain); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioGain failed with status=%d", ret); + } + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(gain, getGain); + } /* for (gain) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio level for a sink +* +* In this test, the audio level for a sink is set and then retrieved +* to verify if the set operation was successful. This is done for all +* audio port types and for all ports. The test is crucial to ensure +* the correct functioning of the audio level setting and getting operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 023@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioLevel_sink(void) +{ + gTestID = 23; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (level = 0; level <= 100; level+=10) { + UT_LOG_DEBUG("Invoking dsSetAudioLevel with handle=%p and level=%f", handle, level); + ret = dsSetAudioLevel(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioLevel with handle=%p", handle); + ret = dsGetAudioLevel(handle, &getLevel); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioLevel failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level=%f and status=%d", getLevel, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(level, getLevel); + } /* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the functionality of audio mute in dsAudio API +* +* This test case is designed to verify the audio mute functionality of +* the dsAudio API. It tests the ability of the API to mute and unmute the audio, +* and to correctly report the mute status. This is important to ensure that +* the API is correctly controlling the audio output and that it can +* accurately report the current mute status. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 024@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioMuteVerification(void) +{ + gTestID = 24; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mute = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: true", handle); + ret = dsSetAudioMute(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, true); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: false", handle); + ret = dsSetAudioMute(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, false); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio delay for a sink +* +* In this test, the audio delay for a sink is set and then retrieved +* to verify if the set value is correctly stored and retrieved. +* This is done for all audio port types. The test is crucial to ensure +* the correct functioning of audio delay setting and retrieval in the system. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 025@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioDelay(void) +{ + gTestID = 25; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + uint32_t setDelay = 100; + uint32_t getDelay; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPDIF && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI_ARC && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioDelay with handle and delay %d ms", setDelay); + ret = dsSetAudioDelay(handle, setDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioDelay with handle"); + ret = dsGetAudioDelay(handle, &getDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioDelay failed with error %d", ret); + } + + UT_LOG_DEBUG("Retrieved audio delay: %d ms", getDelay); + UT_ASSERT_EQUAL(getDelay, setDelay); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the Atmos capabilities of the sink +* +* In this test, the Atmos capabilities of the sink are verified by +* initializing the audio port, getting the audio port with type speaker and index 1, +* getting the sink device Atmos capability, and finally terminating the audio port. +* The test ensures that all these operations are successful and the returned values are as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 026@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyAtmosCapabilities_sink(void) +{ + gTestID = 26; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + dsATMOSCapability_t capability; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].atmos_capabilites == 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSinkDeviceAtmosCapability with handle=%p", handle); + ret = dsGetSinkDeviceAtmosCapability(handle, &capability); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsGetSinkDeviceAtmosCapability returned %d and capability=%d", ret, capability); + + UT_ASSERT_EQUAL(capability, gDSAudioPortConfiguration[port].atmos_capabilites); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of the dsAudio_GetAudioCapabilities_sink API +* +* This test case is designed to validate the dsAudio_GetAudioCapabilities_sink API. +* The test case will initialize the audio port, get the audio port with type as +* sink and index as 0, get the audio capabilities with the handle obtained from +* the previous step, and finally terminate the audio port. The test case will +* assert the return status of each operation to ensure they are successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 027@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_GetAudioCapabilities(void) +{ + gTestID = 27; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type as sink and index as 0"); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioCapabilities with handle obtained from previous step"); + retStatus = dsGetAudioCapabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_ASSERT_EQUAL(capabilities, gAudioCapabilities); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the enabling, disabling and +* retrieval of audio mixing in the dsAudio API. +* +* This test function iterates over all audio ports, enabling and disabling +* audio mixing, and then retrieving the state to verify the operation was successful. +* It tests the robustness and correctness of the dsAudio API's audio mixing functionality. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 028@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableRetrieveAudioMixing(void) +{ + gTestID = 28; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mixing = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, true); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: false", handle); + ret = dsSetAssociatedAudioMixing(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, false); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the audio port control sink in the L2 dsAudio module. +* +* This function tests the initialization, setting, and termination of +* the audio port in the L2 dsAudio module. It also tests the associated +* audio mixing and fader control functionalities. The test is performed +* for different types of audio ports and for different mixer balance values. +* The function asserts that all the invoked functions return no error and that +* the mixer balance value set is the same as the one retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 029@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioPortControl(void) +{ + gTestID = 29; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mixerbalance; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with type=%d and index=%d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing() with handle=%p and mixing=true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + for (mixerbalance = -32; mixerbalance <= 32; mixerbalance+=8) { + UT_LOG_DEBUG("Invoking dsSetFaderControl() with handle=%p and mixerbalance=%d", handle, mixerbalance); + ret = dsSetFaderControl(handle, mixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getMixerbalance; + UT_LOG_DEBUG("Invoking dsGetFaderControl() with handle=%p", handle); + ret = dsGetFaderControl(handle, &getMixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getMixerbalance, mixerbalance); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of primary language in dsAudio +* +* In this test, we initialize the audio port, set a primary language, +* get the primary language and validate if the set and get languages are same. +* This is to ensure the dsAudio's set and get primary language +* functionalities are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 030@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetPrimaryLanguage(void) +{ + gTestID = 30; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetPrimaryLanguage() with handle and valid language code"); + ret = dsSetPrimaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetPrimaryLanguage() with handle"); + ret = dsGetPrimaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test for setting and getting the secondary language for the audio port * -* TODO: Add the description of what is tested and why in this test +* This function tests the setting and getting of the secondary language +* for the audio port. It first initializes the audio port, gets the audio port handle, +* sets the secondary language, gets the secondary language, and finally terminates +* the audio port. It uses Cunit assertions to check the return values of the API calls. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 031@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsAudio (void) + +void test_l2_dsAudio_SetAndGetSecondaryLanguage(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 31; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetSecondaryLanguage with handle and valid language code"); + ret = dsSetSecondaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSecondaryLanguage with handle"); + ret = dsGetSecondaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsAudio_register ( void ) + +int test_l2_dsAudio_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsAudio]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + if(gSourceType == 1) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsAudio - Source]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else if(gSourceType == 0) { + // Create the test suite for sink type + pSuite = UT_add_suite("[L2 dsAudio - Sink]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else { + UT_LOG_ERROR("Invalid platform type"); + return -1; + } - - UT_add_test( pSuite, "test_l2_dsAudio" ,test_l2_dsAudio ); + // List of test function names and strings + UT_add_test( pSuite, "L2_EnableDisableAndVerifyAudioPortStatus", test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus); + if(gSourceType == 0) { + UT_add_test( pSuite, "l2_dsAudio_CheckHeadphoneConnectionStatus_sink", test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink); + } + UT_add_test( pSuite, "L2_RetrieveAndVerifyMS12Capabilities", test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities); + UT_add_test( pSuite, "L2_SetAndGetAudioCompression", test_l2_dsAudio_SetAndGetAudioCompression); + UT_add_test( pSuite, "L2_SetAndGetDialogEnhancement", test_l2_dsAudio_SetAndGetDialogEnhancement); + UT_add_test( pSuite, "L2_SetAndGetDolbyVolumeMode", test_l2_dsAudio_SetAndGetDolbyVolumeMode); + UT_add_test( pSuite, "L2_SetAndGetIntelligentEqualizerMode", test_l2_dsAudio_SetAndGetIntelligentEqualizerMode); + UT_add_test( pSuite, "L2_SetAndGetVolumeLeveller", test_l2_dsAudio_SetAndGetVolumeLeveller); + UT_add_test( pSuite, "L2_SetAndGetBassEnhancer", test_l2_dsAudio_SetAndGetBassEnhancer); + UT_add_test( pSuite, "L2_EnableAndVerifySurroundDecoder", test_l2_dsAudio_EnableAndVerifySurroundDecoder); + UT_add_test( pSuite, "L2_SetAndGetDRCMode", test_l2_dsAudio_SetAndGetDRCMode); + UT_add_test( pSuite, "L2_SetAndGetSurroundVirtualizer", test_l2_dsAudio_SetAndGetSurroundVirtualizer); + UT_add_test( pSuite, "L2_SetAndGetMISteering", test_l2_dsAudio_SetAndGetMISteering); + UT_add_test( pSuite, "L2_SetAndGetGraphicEqualizerMode", test_l2_dsAudio_SetAndGetGraphicEqualizerMode); + UT_add_test( pSuite, "L2_EnableDisableAndRetrieveLEConfig", test_l2_dsAudio_EnableDisableAndRetrieveLEConfig); + UT_add_test( pSuite, "L2_CheckMS12DecodeSupport", test_l2_dsAudio_CheckMS12DecodeSupport); + UT_add_test( pSuite, "L2_CheckMS11DecodeSupport", test_l2_dsAudio_CheckMS11DecodeSupport); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyMS12AudioProfiles_sink", test_l2_dsAudio_VerifyMS12AudioProfiles_sink); + UT_add_test( pSuite, "L2_SetAndGetMS12AudioProfile_sink", test_l2_dsAudio_SetAndGetMS12AudioProfile_sink); + } - return 0; -} + UT_add_test( pSuite, "L2_SetAndGetStereoMode", test_l2_dsAudio_SetAndGetStereoMode); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_SetAndGetStereoAuto_sink", test_l2_dsAudio_SetAndGetStereoAuto_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioGain_sink", test_l2_dsAudio_SetAndGetAudioGain_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioLevel_sink", test_l2_dsAudio_SetAndGetAudioLevel_sink); + } + UT_add_test( pSuite, "L2_AudioMuteVerification", test_l2_dsAudio_AudioMuteVerification); + UT_add_test( pSuite, "L2_SetAndGetAudioDelay", test_l2_dsAudio_SetAndGetAudioDelay); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyAtmosCapabilities_sink", test_l2_dsAudio_VerifyAtmosCapabilities_sink); + } + UT_add_test( pSuite, "L2_GetAudioCapabilities", test_l2_dsAudio_GetAudioCapabilities); + UT_add_test( pSuite, "L2_EnableDisableRetrieveAudioMixing", test_l2_dsAudio_EnableDisableRetrieveAudioMixing); + UT_add_test( pSuite, "L2_AudioPortControl", test_l2_dsAudio_AudioPortControl); + UT_add_test( pSuite, "L2_SetAndGetPrimaryLanguage", test_l2_dsAudio_SetAndGetPrimaryLanguage); + UT_add_test( pSuite, "L2_SetAndGetSecondaryLanguage", test_l2_dsAudio_SetAndGetSecondaryLanguage); + + return 0; +} /** @} */ // End of DS_Audio_HALTEST_L2 /** @} */ // End of DS_Audio_HALTEST diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index 37036cb6..9318b4af 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests + * @defgroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests * @{ */ @@ -58,62 +57,237 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-composite-in_halSpec.md](../../docs/pages/ds-composite-in_halSpec.md) * * @endparblock */ + /** * @file test_l2_dsCompositeIn.c * */ -#include -#include - #include #include +#include +#include "dsCompositeIn.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of COMPOSITE Input ports +* +* This test function initializes the COMPOSITE Input module, +* gets the number of COMPOSITE Input ports, compares the returned value with the value +* from the YAML file, and then terminates the COMPOSITE Input module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + uint8_t numInputs = 0; // Initialize to 0. + + // Call the pre-requisite API dsCompositeInInit to initialize the COMPOSITE Input module. + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Call the API dsCompositeInGetNumberOfInputs and pass a pointer to a uint8_t variable to store the number of COMPOSITE Input ports. + ret = dsCompositeInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Invoking dsCompositeInGetNumberOfInputs with valid buffer\n"); + + // Check the return status of dsCompositeInGetNumberOfInputs. It should return dsERR_NONE for success. Any other return value indicates an error. + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get number of COMPOSITE Input ports with error: %d\n", ret); + } + + //composite Input number of inputs + UT_LOG_INFO("Composite Number of Inputs: %d\n", numInputs); + + // Compare the value returned by dsCompositeInGetNumberOfInputs with the value retrieved from the YAML file. They should match. + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numInputs, "dsCompositeIn/composite_input_configurations/number_of_ports"); + + // Call the post-requisite API dsCompositeInTerm to terminate the COMPOSITE Input module. + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the status of the Composite Input +* +* This test function initializes the Composite Input, gets its status, +* checks if it is in disable status and then terminates the Composite Input. +* The purpose of this test is to ensure that the Composite Input is functioning as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_VerifyCompositeInputStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0 + uint8_t numberOfInputs = 0; // Initialize to 0. + + + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + ret = dsCompositeInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInGetStatus()"); + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsCompositeInGetStatus failed with error: %d\n", ret); + } + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + UT_LOG_INFO("IsPortConnected: %d\n", status.isPortConnected[port]); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + UT_LOG_INFO("IsPresented: %d, activePort: %d\n", + status.isPresented, + status.activePort); + + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsCOMPOSITE_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + ret = dsCompositeInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test to verify the selection and status of Composite In Port * -* TODO: Add the description of what is tested and why in this test +* This test verifies the functionality of Composite In Port selection and its status. +* It checks if the port is initialized, selected, and terminated correctly. +* It also checks the status of the port after selection. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ -void test_l2_dsCompositeIn (void) + +void test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0. + uint8_t numberOfInputs = 0; // Initialize to 0. + + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + dsCompositeInTerm(); + return; + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + ret = dsCompositeInSelectPort(port); + UT_LOG_DEBUG("Invoking dsCompositeInSelectPort()"); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to select COMPOSITE Input port %d\n", port); + continue; + } + + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get status of COMPOSITE Input ports\n"); + } + + UT_LOG_INFO("IsPresented: %d, IsPortConnected[0]: %d, activePort: %d\n", + status.isPresented, + status.isPortConnected[port], + status.activePort); + + UT_ASSERT_EQUAL(status.activePort, port); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsCompositeIn_register ( void ) + +int test_l2_dsCompositeIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsCompositeIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + // Create the test suite + pSuite = UT_add_suite("[L2 dsCompositeIn sink devices]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + // List of test function names and strings - - UT_add_test( pSuite, "test_l2_dsCompositeIn" ,test_l2_dsCompositeIn ); + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsCompositeIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_VerifyCompositeInputStatus", test_l2_dsCompositeIn_VerifyCompositeInputStatus); + UT_add_test( pSuite, "L2_VerifyCompositeInPortSelectionAndStatus", test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus); - return 0; -} + return 0; +} /** @} */ // End of DS_CompositeIn_HALTEST_L2 /** @} */ // End of DS_CompositeIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index c7bbe32d..3363bc3b 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License atS +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_Display_HALTEST Device Settings Display HAL Tests + * @defgroup DS_Display_HALTEST Device Settings Display HAL Tests * @{ */ @@ -58,7 +57,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-display_halSpec.md](../../docs/pages/ds-display_halSpec.md) * * @endparblock */ @@ -69,53 +68,207 @@ * */ -#include -#include - #include #include +#include +#include "dsDisplay.h" +#include "test_parse_configuration.h" +static int gTestGroup = 2; +static int gTestID = 1; /** -* @brief TODO: Describe the object of the test +* @brief This test aims to retrieve and validate the EDID of a sink in the L2 dsDisplay module * -* TODO: Add the description of what is tested and why in this test +* This test function tests the retrieval and validation of the Extended Display Identification Data (EDID) of a sink in the L2 dsDisplay module. It ensures that the functions dsDisplayInit, dsGetDisplay, dsGetEDID, dsGetEDIDBytes, and dsDisplayTerm are working as expected. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) */ -void test_l2_dsDisplay (void) + +void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; // Initialize handle to 0. + dsDisplayEDID_t edid = { 0 }; // Initialize all edid fields to 0. + unsigned char edidBytes[MAX_EDID_BYTES_LEN] = { 0 }; // Initialize the edidbytes to 0. + int length = 0; // Initialize the length to 0. + unsigned char edid_profile; + char key_string[TEST_DS_KEY_SIZE]; + + // Step 1: Call dsDisplayInit + ret = dsDisplayInit(); + UT_LOG_INFO("Invoked dsDisplayInit(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay + ret = dsGetDisplay(dsVIDEOPORT_TYPE_INTERNAL, 0, &handle); + UT_LOG_INFO("Invoked dsGetDisplay() with dsVIDEOPORT_TYPE_INTERNAL and index 0, returned: %d, handle: %ld\n", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDID fails + dsDisplayTerm(); + return; + } + + // Step 3: Call dsGetEDID + ret = dsGetEDID(handle, &edid); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDID() with handle %ld, returned: %d, productCode: %d\n", handle, ret, edid.productCode); + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(edid.productCode, "dsDisplay/EDID_Data/productCode"); + + // Step 4: Call dsGetEDIDBytes + ret = dsGetEDIDBytes(handle, edidBytes, &length); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDIDBytes() with handle %ld, returned: %d, Manufacturer ID: %d\n", handle, ret, edidBytes[8] << 8 | edidBytes[9]); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDIDBytes fails + dsDisplayTerm(); + return; + } + + // Manufacturer ID + for( uint8_t i = 8; i < 9; i++) + { + snprintf(key_string, MAX_EDID_BYTES_LEN, "dsDisplay.edidBytes.%d", i); + edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); + if(edid_profile != edidBytes[i]) + { + UT_FAIL("edid check failed"); + UT_LOG_ERROR("edid byte: %x, expected value: %x", edidBytes[i], edid_profile); + break; + } + } + + // Step 5: Call dsDisplayTerm + ret = dsDisplayTerm(); + UT_LOG_INFO("Invoked dsDisplayTerm(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } -static UT_test_suite_t * pSuite = NULL; +/** +* @brief This test aims to verify the default aspect ratio of the source in the L2 dsDisplay module +* +* In this test, the dsDisplayInit(), dsGetDisplay(), dsGetDisplayAspectRatio(), and dsDisplayTerm() functions are called in sequence to check the default aspect ratio of the source. The test verifies that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9. If any of the function calls fail or the aspect ratio is not as expected, the test fails. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; //Initialize handle to 0. + dsVideoAspectRatio_t aspectRatio = dsVIDEO_ASPECT_RATIO_MAX; // Initialize aspect ratio with MAX value. + + // Step 1: Call dsDisplayInit() + UT_LOG_DEBUG("Invoking dsDisplayInit()"); + ret = dsDisplayInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay() + UT_LOG_DEBUG("Invoking dsGetDisplay() with dsVIDEOPORT_TYPE_HDMI and index 0"); + ret = dsGetDisplay(dsVIDEOPORT_TYPE_HDMI, 0, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetDisplay() failed with error: %d\n", ret); + dsDisplayTerm(); + return; + } + // Step 3: Call dsGetDisplayAspectRatio() + UT_LOG_DEBUG("Invoking dsGetDisplayAspectRatio() with handle obtained from dsGetDisplay()"); + ret = dsGetDisplayAspectRatio(handle, &aspectRatio); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + if (ret != dsERR_NONE || aspectRatio != dsVIDEO_ASPECT_RATIO_16x9) + { + UT_LOG_ERROR("dsGetDisplayAspectRatio() failed with error: %d\n", ret); + } + + // Step 4: Verify aspect ratio + UT_LOG_DEBUG("Verifying that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9"); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + + // Step 5: Call dsDisplayTerm() + UT_LOG_DEBUG("Invoking dsDisplayTerm()"); + ret = dsDisplayTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsDisplay_register ( void ) + +int test_l2_dsDisplay_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsDisplay]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + int32_t source_type = 0; + ut_kvp_status_t status; - - UT_add_test( pSuite, "test_l2_dsDisplay" ,test_l2_dsDisplay ); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); - return 0; -} + // Create the test suite + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Source ]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + // List of test function names and strings + if(source_type == 0) { + UT_add_test( pSuite, "L2_RetrieveAndValidateEDID_sink", test_l2_dsDisplay_RetrieveAndValidateEDID_sink); + } + else if ( source_type == 1 ){ + UT_add_test( pSuite, "L2_TestDefaultAspectRatio_source", test_l2_dsDisplay_TestDefaultAspectRatio_source); + } + return 0; +} /** @} */ // End of DS_Display_HALTEST_L2 /** @} */ // End of DS_Display_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 6ae9931a..1215753f 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests + * @defgroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests * @{ */ @@ -58,7 +57,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-hdmi-in_halSpec.md](../../docs/pages/ds-hdmi-in_halSpec.md) * @endparblock */ @@ -68,52 +67,521 @@ * */ -#include -#include - #include #include +#include +#include "dsHdmiIn.h" +#include "test_parse_configuration.h" + +#define DS_HDMIIN_KEY_SIZE 64 + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of HDMI inputs from the source +* +* This test checks if the function dsHdmiInGetNumberOfInputs correctly retrieves the number of HDMI inputs from the source. +* It first initializes the HDMI input, then retrieves the number of inputs, and finally terminates the HDMI input. +* The test asserts that all these operations return no errors and that the retrieved number of inputs matches the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; //Initialize to dsERR_NONE. + uint8_t numberOfInputs = 0; //Initialize to 0. + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs with valid buffer"); + ret = dsHdmiInGetNumberOfInputs(&numberOfInputs); + UT_LOG_DEBUG("Number of Inputs: %d, Return status: %d", numberOfInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsHdmiInGetNumberOfInputs"); + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numberOfInputs, "dsHdmiIn/numberOfPorts"); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for getting the status of HDMI input source +* +* This test function initializes the HDMI input subsystem, gets the status of the HDMI input ports, verifies the returned status, +* and then terminates the HDMI input subsystem. It uses the Cunit assertion macros to check the return values of the API calls +* and the values of the returned status structure. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize to dsERR_NONE + dsHdmiInStatus_t status = {0}; // Initialize all fields to 0 + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus() with valid status pointer"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("IsPortConnected: %d\n", status.isPortConnected[i]); + UT_ASSERT_EQUAL(status.isPortConnected[i], false); + } + + UT_LOG_DEBUG("isPresented: %d, activePort: %d", status.isPresented, status.activePort); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsHDMI_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI input port status for a given source +* +* This test function initializes the HDMI input, gets the number of inputs, selects each port, +* gets the status of each port, and finally terminates the HDMI input. The test is designed to +* ensure that the HDMI input port status is correctly reported for each source. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiInputPortStatus(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = 0; //Initialize to 0 + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInStatus_t status = {0}; //Initialize all fields to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs()"); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Number of inputs: %d, Return status: %d", numInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (uint8_t i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("Invoking dsHdmiInSelectPort() with port number %d", i); + ret = dsHdmiInSelectPort(i, false, dsVideoPlane_PRIMARY, false); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + continue; + } + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus()"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Active port: %d, Is presented: %d, Is port connected: %d, Return status: %d", status.activePort, status.isPresented, status.isPortConnected[i], ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(status.activePort, i); + UT_ASSERT_FALSE(status.isPortConnected[i]); + UT_ASSERT_FALSE(status.isPresented); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI ARC Port sink functionality +* +* This test initializes the HDMI input, checks if the HDMI ARC Port is available and validates +* the number of ports and their status. It then terminates the HDMI input. The test is designed +* to ensure the proper functioning of HDMI ARC Port sink. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiArcPort_sink(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus = dsERR_NONE; //Initialize to dsERR_NONE + bool isArcPort = false; //Initialize to 0 + dsHdmiInPort_t iPort = dsHDMI_IN_PORT_NONE; //Initialize to default dsHDMI_IN_PORT_NONE + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + retStatus = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + retStatus = dsHdmiInGetNumberOfInputs(&numInputs); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for(iPort = dsHDMI_IN_PORT_0; iPort < numInputs; iPort++) + { + UT_LOG_DEBUG("Invoking dsIsHdmiARCPort with iPort: %d", iPort); + retStatus = dsIsHdmiARCPort(iPort, &isArcPort); + UT_LOG_DEBUG("Return status: %d, isArcPort: %d", retStatus, isArcPort); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if(isArcPort == false) + { + continue; + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(iPort, "dsHdmiIn/HdmiArcPortID"); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + retStatus = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to set and get EDID version and validate EDID length for HDMI input +* +* This test sets the EDID version for HDMI input ports and then gets the EDID version to validate it. +* It also retrieves the EDID bytes info to validate the length. This is done to ensure the correct +* functioning of HDMI input related APIs. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInPort_t hdmiPort[] = {dsHDMI_IN_PORT_0, dsHDMI_IN_PORT_1, dsHDMI_IN_PORT_2}; + tv_hdmi_edid_version_t edidVersion[] = {HDMI_EDID_VER_14, HDMI_EDID_VER_20}; + tv_hdmi_edid_version_t getEdidVersion = HDMI_EDID_VER_MAX; + unsigned char edid[256] = { 0 }; + char keyString[DS_HDMIIN_KEY_SIZE] = {0}; + int length = 0; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + tv_hdmi_edid_version_t supportedEdidVersion; + + snprintf(keyString, DS_HDMIIN_KEY_SIZE, "dsHdmiIn/EdidVersion/%d", i); + + supportedEdidVersion = UT_KVP_PROFILE_GET_UINT8(keyString); + + for (int j = HDMI_EDID_VER_14; j < supportedEdidVersion; j++) + { + UT_LOG_DEBUG("Invoking dsSetEdidVersion with hdmiPort=%d, edidVersion=%d\n", hdmiPort[i], edidVersion[j]); + ret = dsSetEdidVersion(hdmiPort[i], edidVersion[j]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to set EDID version\n"); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetEdidVersion with hdmiPort=%d\n", hdmiPort[i]); + ret = dsGetEdidVersion(hdmiPort[i], &getEdidVersion); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get EDID version\n"); + } + UT_ASSERT_EQUAL(getEdidVersion, edidVersion[j]); + } + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the supported game features list for HDMI input +* +* In this test, the dsHdmiInInit function is invoked to initialize the HDMI input. +* Then, the dsGetSupportedGameFeaturesList function is called to get the list of +* supported game features. The results are then compared with the expected values +* from the Sink_HDMIIN.yaml profile. Finally, the dsHdmiInTerm function is invoked +* to terminate the HDMI input. The test ensures that all these operations are successful +* and the supported game features list is as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 006@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + dsSupportedGameFeatureList_t features = {0}; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSupportedGameFeaturesList with valid buffer"); + ret = dsGetSupportedGameFeaturesList(&features); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsGetSupportedGameFeaturesList"); + } + + UT_LOG_DEBUG("Game feature count: %d",features.gameFeatureCount); + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(features.gameFeatureCount, "dsHdmiIn/gameFeatures/count"); + + for ( uint8_t i = 0; i < features.gameFeatureCount; i++ ){ + UT_LOG_DEBUG("Game feature list: %s",features.gameFeatureList); + UT_ASSERT_KVP_EQUAL_PROFILE_STRING(features.gameFeatureList,"dsHdmiIn/gameFeatures/feature") + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief This test aims to verify the functionality of setting and getting the ALLM support for HDMI input. * -* TODO: Add the description of what is tested and why in this test +* In this test, the dsHdmiInInit function is first invoked to initialize the HDMI input. +* Then, the dsSetEdid2AllmSupport function is called to set the ALLM support for HDMI input to true. +* The dsGetEdid2AllmSupport function is then called to get the current ALLM support status, +* which should be true. The same process is repeated with the ALLM support set to false. +* Finally, the dsHdmiInTerm function is invoked to terminate the HDMI input. +* The test ensures that all these operations return no error. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) */ -void test_l2_dsHdmiIn (void) + +void test_l2_dsHdmiIn_SetAndGetAllmSupport_sink(void) { - UT_FAIL("This function needs to be implemented!"); + dsError_t ret = dsERR_NONE; + bool allmSupport = false; + dsHdmiInPort_t iHdmiPort = dsHDMI_IN_PORT_0; + uint8_t numInputs = 0; // Initialize to 0 + dsSupportedGameFeatureList_t features = {0}; + + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + ret = dsGetSupportedGameFeaturesList(&features); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + if ( strstr(features.gameFeatureList, "allm" ) ){ + + for ( iHdmiPort = dsHDMI_IN_PORT_0; iHdmiPort < numInputs; iHdmiPort++ ){ + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to true", iHdmiPort); + + ret = dsSetEdid2AllmSupport(iHdmiPort, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, true); + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to false", iHdmiPort); + ret = dsSetEdid2AllmSupport(iHdmiPort, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, false); + } + } + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsHdmiIn_register ( void ) + +int test_l2_dsHdmiIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsHdmiIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + ut_kvp_status_t status; + int32_t source_type = 0; - - UT_add_test( pSuite, "test_l2_dsHdmiIn" ,test_l2_dsHdmiIn ); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); - return 0; -} + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Source]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for sink type + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + // List of test function names and strings + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsHdmiIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_GetStatus", test_l2_dsHdmiIn_GetStatus); + UT_add_test( pSuite, "L2_VerifyHdmiInputPortStatus", test_l2_dsHdmiIn_VerifyHdmiInputPortStatus); + + if ( source_type == 0 ){ + UT_add_test( pSuite, "L2_VerifyHdmiArcPort_sink", test_l2_dsHdmiIn_VerifyHdmiArcPort_sink); + UT_add_test( pSuite, "L2_SetAndGetEdidVersionAndValidateEdidLength_sink", test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink); + UT_add_test( pSuite, "L2_GetSupportedGameFeaturesList_sink", test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink); + UT_add_test( pSuite, "L2_SetAndGetAllmSupport_sink", test_l2_dsHdmiIn_SetAndGetAllmSupport_sink); + } + + return 0; +} /** @} */ // End of DS_HDMIIn_HALTEST_L2 /** @} */ // End of DS_HDMIIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsHost.c b/src/test_l2_dsHost.c index c8904d7f..b14c5d71 100644 --- a/src/test_l2_dsHost.c +++ b/src/test_l2_dsHost.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ */ /** - * @addtogroup DS_Host_HALTEST Device Settings Host HAL Tests + * @defgroup DS_Host_HALTEST Device Settings Host HAL Tests * @{ */ @@ -58,59 +58,258 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-host_halSpec.md](../../docs/pages/ds-host_halSpec.md) + * * @endparblock */ /** - * @file test_l2_dsHost.c + * @file test_l2_dsAudio.c * */ - -#include -#include - #include #include +#include +#include "dsHost.h" +#include "test_parse_configuration.h" + +#define DSHOST_SOC_LENGTH 20 + +static int gTestGroup = 2; +static int gTestID = 1; /** -* @brief TODO: Describe the object of the test +* @brief Test for getting CPU temperature from the Host HAL sub-system * -* TODO: Add the description of what is tested and why in this test +* This test function initializes the Host HAL sub-system, gets the CPU temperature, +* checks if the temperature is within the valid range, and then terminates the +* Host sub-system. It uses the provided macro to check if the returned CPU temperature +* is equal to the value specified in the 'Sink_HostSettings.yaml' configuration file. +* If any of the API calls fail, the test function will immediately return, as +* indicated by the use of the UT_ASSERT_EQUAL_FATAL macro. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsHost (void) + +void test_l2_dsHost_GetCPUTemperature(void) { - //This function needs to be implemented! - UT_FAIL(""); + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus = dsERR_NONE; + float cpuTemperature = 0.0; + int32_t minTemparature = 0; + int32_t maxTemparature = 0; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + retStatus = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetCPUTemperature with valid buffer"); + retStatus = dsGetCPUTemperature(&cpuTemperature); + UT_LOG_DEBUG("CPU Temperature: %f, Return status: %d", cpuTemperature, retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetCPUTemperature failed with status: %d", retStatus); + } + + minTemparature = UT_KVP_PROFILE_GET_UINT32("dsHost.cpuTemperature.0"); + maxTemparature = UT_KVP_PROFILE_GET_UINT32("dsHost.cpuTemperature.1"); + + UT_LOG_DEBUG("CPU Temperature from Profile: min:%d, max:%d", minTemparature, maxTemparature); + + if(cpuTemperature > maxTemparature || cpuTemperature < minTemparature) + { + UT_FAIL("Invalid temperature"); + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + retStatus = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to get and verify the SoC ID from the Host HAL sub-system +* +* This test function initializes the Host HAL sub-system, gets the SoC ID, +* verifies it with the value from the configuration file, and then terminates +* the Host HAL sub-system. It uses the provided macro to compare the SoC ID +* with the value from the configuration file. The function logs all the +* steps and checks the return values of the API calls. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsHost_GetAndVerifySocID(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + ut_kvp_status_t status; + + dsError_t ret; + char socID[DSHOST_SOC_LENGTH] = {0}; + char socIDProfile[DSHOST_SOC_LENGTH] = {0}; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + ret = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSocIDFromSDK with valid buffer"); + ret = dsGetSocIDFromSDK(socID); + UT_LOG_DEBUG("Return status: %d, socID: %s", ret, socID); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetSocIDFromSDK failed with status: %d", ret); + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost.socID", socIDProfile, DSHOST_SOC_LENGTH); + UT_ASSERT( status == UT_KVP_STATUS_SUCCESS ); + if(!strstr(socID, socIDProfile)) + { + UT_FAIL("Invalid SocID"); + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + ret = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test validates the Host EDID sink of the L2 dsHost module +* +* This test function initializes the dsHost module, retrieves the Host EDID, +* validates the retrieved EDID and length, and then terminates the dsHost module. +* The purpose of this test is to ensure that the dsHost module correctly retrieves +* and validates the Host EDID. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsHost_L2_Low-Level_TestSpecification.md](../docs/pages/ds-host_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsHost_ValidateHostEDID_sink(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + unsigned char edid[EDID_MAX_DATA_SIZE]; + unsigned char edid_profile; + char key_string[TEST_DS_KEY_SIZE]; + int i = 0; + int length; + + UT_LOG_DEBUG("Invoking dsHostInit with no input parameters"); + ret = dsHostInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetHostEDID with valid pointers for edid and length"); + ret = dsGetHostEDID(edid, &length); + UT_LOG_DEBUG("Return status: %d, EDID: %s, Length: %d", ret, edid, length); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetHostEDID failed with status: %d", ret); + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(length, "dsHost.edidbytesLength"); + + /* Checking only manufacture ID */ + for( i = 8; i < 9; i++) + { + snprintf(key_string, TEST_DS_KEY_SIZE, "dsHost.edidBytes.%d", i); + edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); + if(edid_profile != edid[i]) + { + UT_FAIL("edid check failed"); + UT_LOG_ERROR("edid byte: %x, expected value: %x", edid[i], edid_profile); + break; + } + } + + UT_LOG_DEBUG("Invoking dsHostTerm with no input parameters"); + ret = dsHostTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsHost_register ( void ) + +int test_l2_dsHost_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsHost]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + ut_kvp_status_t status; + int32_t source_type = 0; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); + + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHost - Source]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for sink type + pSuite = UT_add_suite("[L2 dsHost - Sink]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + // List of test function names and strings - - UT_add_test( pSuite, "test_l2_dsHost" ,test_l2_dsHost ); + UT_add_test( pSuite, "L2_GetCPUTemperature", test_l2_dsHost_GetCPUTemperature); + UT_add_test( pSuite, "L2_GetAndVerifySocID", test_l2_dsHost_GetAndVerifySocID); + if(source_type == 0) { + UT_add_test( pSuite, "L2_ValidateHostEDID", test_l2_dsHost_ValidateHostEDID_sink); + } - return 0; + return 0; } /** @} */ // End of DS_Host_HALTEST_L2 diff --git a/src/test_l2_dsVideoDevice.c b/src/test_l2_dsVideoDevice.c index eb10ab1d..72bfc96b 100644 --- a/src/test_l2_dsVideoDevice.c +++ b/src/test_l2_dsVideoDevice.c @@ -1,34 +1,72 @@ -/* -* If not stated otherwise in this file or this component's LICENSE file the -* following copyright and licenses apply:* -* Copyright 2024 RDK Management +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** -* @file test_l2_dsVideoDevice.c -* @page dsVideoDevice Level 2 Tests -* -* ## Module's Role -* This module includes Level 2 functional tests (success and failure scenarios). -* This is to ensure that the dsVideoDevice APIs meet the requirements across all vendors. -* -* **Pre-Conditions:** None@n -* **Dependencies:** None@n -* -* Ref to API Definition specification documentation : [ds-video-device_halSpec.md](../../docs/pages/ds-video-device_halSpec.md) -*/ + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup DS_VideoDevice_HALTEST Device Settings Video Device HAL Tests + * @{ + */ + +/** + * @defgroup DS_VideoDevice_HALTEST_L2 Device Settings Video Device HAL Tests L1 File + * @{ + * @parblock + * + * ### L2 Tests for DS Video Device HAL : + * + * Level 2 unit test cases for all APIs of Device Settings Video Device HAL + * + * **Pre-Conditions:** None@n + * **Dependencies:** None@n + * + * Refer to API Definition specification documentation : [ds-video-device_halSpec.md](../../docs/pages/ds-video-device_halSpec.md) + * + * @endparblock + */ + +/** + * @file test_l2_dsVideoDevice.c + * + */ #include #include @@ -42,20 +80,18 @@ static int gTestGroup = 2; static int gTestID = 1; - - /** * @brief Test for setting and getting DFC source in dsVideoDevice * * This test case is designed to verify the functionality of setting and getting DFC source in dsVideoDevice. -* The test involves initializing the video device, getting the video device, setting the DFC, getting the DFC and terminating the video device. -* The test asserts that the DFC set is the same as the DFC get. +* The test involves initializing the video device, getting the video device, setting the DFC, +* getting the DFC and terminating the video device. The test asserts that the DFC set is the same as the DFC get. * * **Test Group ID:** 02@n * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) */ void test_l2_dsVideoDevice_SetAndGetDFC_source(void) @@ -83,7 +119,7 @@ void test_l2_dsVideoDevice_SetAndGetDFC_source(void) UT_LOG_ERROR("dsGetVideoDevice failed with status: %d", retStatus); continue; } - for (int j=0;jprofile); @@ -275,8 +326,8 @@ void test_l2_dsVideoDevice_GetVideoCodecInfo_source(void) //UT_ASSERT_EQUAL(info.entries->level,gDSVideoDeviceConfiguration[i].level); } codec = (0x01 << (j++)); - } - } + } /* for(codec)*/ + } /* for(i)*/ UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); retStatus = dsVideoDeviceTerm(); UT_LOG_DEBUG("dsVideoDeviceTerm return status: %d", retStatus); @@ -288,23 +339,25 @@ void test_l2_dsVideoDevice_GetVideoCodecInfo_source(void) /** * @brief Test to verify the setting and getting of display framerate for dsVideoDevice * -* This test case is designed to validate the functionality of dsSetDisplayframerate and dsGetCurrentDisplayframerate APIs. -* The test involves setting a display framerate for a video device and then getting the current display framerate to verify if the set value is correctly retrieved. +* This test case is designed to validate the functionality of dsSetDisplayframerate and +* dsGetCurrentDisplayframerate APIs. The test involves setting a display framerate for +* a video device and then getting the current display framerate to verify if the set value +* is correctly retrieved. * * **Test Group ID:** 02@n -* **Test Case ID:** 007@n +* **Test Case ID:** 005@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) */ void test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink(void) { - gTestID = 7; + gTestID = 5; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); dsError_t ret; intptr_t handle; - char getframerate[50] = {0}; + char getframerate[dsVIDEO_FRAMERATE_MAX] = {0}; UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); ret = dsVideoDeviceInit(); @@ -340,9 +393,9 @@ void test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink(void) UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_LOG_DEBUG("dsGetCurrentDisplayframerate return status: %d, framerate: %s", ret, getframerate); UT_ASSERT_STRING_EQUAL(gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate, getframerate); + } /* for(j) */ + } /* for(i) */ - } - } UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); ret = dsVideoDeviceTerm(); UT_LOG_DEBUG("dsVideoDeviceTerm return status: %d", ret); @@ -361,8 +414,16 @@ static UT_test_suite_t * pSuite = NULL; int test_l2_dsVideoDevice_register(void) { - // Create the test suite - pSuite = UT_add_suite("[L2 dsVideoDevice]", NULL, NULL); + if(gSourceType == 0) { + // Create the test suite + pSuite = UT_add_suite("[L2 dsVideoDevice - Sink]", NULL, NULL); + } + else + { + // Create the test suite + pSuite = UT_add_suite("[L2 dsVideoDevice - Source]", NULL, NULL); + } + if (pSuite == NULL) { return -1; @@ -381,4 +442,10 @@ int test_l2_dsVideoDevice_register(void) } return 0; -} \ No newline at end of file +} + +/** @} */ // End of DS_VideoDevice_HALTEST_L2 +/** @} */ // End of DS_VideoDevice_HALTEST +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_parse_configuration.c b/src/test_parse_configuration.c index b4b89860..bc5bcba8 100644 --- a/src/test_parse_configuration.c +++ b/src/test_parse_configuration.c @@ -42,13 +42,13 @@ */ /** - * @defgroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @defgroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File * @{ * @parblock * - * ### Parse configuration functions for Device Settings HAL : + * ### Parse configuraion functions for Device Settings HAL : * - * Parse configuration functions required for the module across all vendors. + * Parse configuraion functions required for the module across all vendors. * * **Pre-Conditions:** None @n * **Dependencies:** None @n @@ -68,19 +68,18 @@ #include "test_parse_configuration.h" -/* Global Variables */ +/* Global Vairables */ int32_t gSourceType = -1; int32_t gDSModule = dsNone; char gDeviceType[TEST_DEVICE_TYPE_SIZE] = {0}; - /* Parse configuration file */ int test_parse_configuration() { ut_kvp_status_t status; char szReturnedString[UT_KVP_MAX_ELEMENT_SIZE]; -#if 0 + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); if(status == UT_KVP_STATUS_SUCCESS) { gDSModule |= dsAudioPort; @@ -90,7 +89,7 @@ int test_parse_configuration() return -1; } } -#endif + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); if(status == UT_KVP_STATUS_SUCCESS) { gDSModule |= dsVideoDevice; @@ -100,7 +99,7 @@ int test_parse_configuration() return -1; } } -#if 0 + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); if(status == UT_KVP_STATUS_SUCCESS) { gDSModule |= dsVideoPort; @@ -135,18 +134,17 @@ int test_parse_configuration() if(status == UT_KVP_STATUS_SUCCESS) { gDSModule |= dsHdmiIn; } -#endif return 0; } void test_parse_configuration_term() { - //test_dsAudio_parse_configuration_term(); - //test_dsVideoPort_parse_configuration_term(); + test_dsAudio_parse_configuration_term(); + test_dsVideoPort_parse_configuration_term(); test_dsVideoDevice_parse_configuration_term(); } /** @} */ // End of Device_Settings_PARSE_CONFIG /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_parse_configuration.h b/src/test_parse_configuration.h index 245c427f..713e2072 100644 --- a/src/test_parse_configuration.h +++ b/src/test_parse_configuration.h @@ -61,10 +61,12 @@ * @file test_parse_configuration.h * */ -#ifndef __TEST_DS_PARSE_CONFIG_H__ -#define __TEST_DS_PARSE_CONFIG_H__ +#ifndef __TEST_PARSE_CONFIG_H__ +#define __TEST_PARSE_CONFIG_H__ +#include "test_dsAudio_parse_configuration.h" #include "test_dsVideoDevice_parse_configuration.h" +#include "test_dsVideoPort_parse_configuration.h" #define TEST_DEVICE_TYPE_SIZE 8 #define TEST_DS_MODULE_NAME_SIZE 32 @@ -93,9 +95,9 @@ typedef enum _dsModule_t { int test_parse_configuration(); void test_parse_configuration_term(); -#endif //__TEST_DS_PARSE_CONFIG_H__ +#endif //__TEST_PARSE_CONFIG_H__ /** @} */ // End of Device_Settings_PARSE_CONFIG_HEADER /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK From d86fc04552dcfff6a71a0f63f8becece4f05bd13 Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:09:07 +0100 Subject: [PATCH 59/64] gh #14 Update the L2 code and file names & updated ut version --- build.sh | 2 +- ...deo-port_L2_Low-Level_TestSpecification.md | 500 +--- profiles/source/Source_4K_VideoPort.yaml | 104 +- src/main.c | 10 +- ...=> test_dsVideoPort_parse_configuration.c} | 158 +- ...=> test_dsVideoPort_parse_configuration.h} | 73 +- src/test_l2_dsAudio.c | 2257 ++++++++++++++++- src/test_l2_dsCompositeIn.c | 252 +- src/test_l2_dsDisplay.c | 233 +- src/test_l2_dsFPD.c | 4 +- src/test_l2_dsHdmiIn.c | 546 +++- src/test_l2_dsHost.c | 4 +- src/test_l2_dsVideoDevice.c | 380 ++- src/test_l2_dsVideoPort.c | 436 ++-- src/test_parse_configuration.c | 151 ++ src/test_parse_configuration.h | 103 + src/test_register.c | 4 +- 17 files changed, 4224 insertions(+), 993 deletions(-) rename src/{test_utils.c => test_dsVideoPort_parse_configuration.c} (60%) rename src/{test_utils.h => test_dsVideoPort_parse_configuration.h} (64%) create mode 100644 src/test_parse_configuration.c create mode 100644 src/test_parse_configuration.h diff --git a/build.sh b/build.sh index 5dc562bc..8915f6ba 100755 --- a/build.sh +++ b/build.sh @@ -30,7 +30,7 @@ NC="\e[39m" # When the major version changes in the ut-core, what that signals is that the testings will have to be upgraded to support that version # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your UT-Core Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_PROJECT_MAJOR_VERSION="2." +UT_PROJECT_MAJOR_VERSION="3." # Clone the Unit Test Requirements TEST_REPO=git@github.com:rdkcentral/ut-core.git diff --git a/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md index 9b8b3f55..b9f94f4b 100644 --- a/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md +++ b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md @@ -10,7 +10,7 @@ ## Overview -This document describes the level 2 testing suite for the Device Settings Video Port module. +This document describes the L2 Low Level Test Specification and Procedure Documentation for the Device Settings Video Port module. ### Acronyms, Terms and Abbreviations @@ -25,7 +25,8 @@ This document describes the level 2 testing suite for the Device Settings Video ### References -- `High Level Test Specification` - [ds-video-port_High-Level_TestSpec.md](ds-video-port_High-Level_TestSpec.md) +- `High Level Test Specification` - [dsVideoPort High Level TestSpec](ds-video-port_High-Level_TestSpec.md) +- `Interface header` - [dsVideoPort HAL header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsVideoPort.h) ## Level 2 Test Procedure @@ -35,8 +36,8 @@ The following functions are expecting to test the module operates correctly. |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_EnableDisabledVideoPorts_sink`| -|Description|Get the handle for each video port, check the status of each video port to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port.| +|Function Name|`test_l2_dsVideoPort_EnableDisabledVideoPorts`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid` to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port.| |Test Group|02| |Test Case ID|001| |Priority|High| @@ -56,7 +57,7 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Get the handle for each video port using dsGetVideoPort() | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 02 | Get the handle for each supported video port using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index` | dsERR_NONE | Should be successful | | 03 | Check the status of each video port using dsIsVideoPortEnabled() | handle = obtained from dsGetVideoPort() | dsERR_NONE | Should be successful | | 04 | If a port is disabled, enable it using dsEnableVideoPort() | handle = obtained from dsGetVideoPort(), enabled = true | dsERR_NONE | Should be successful | | 05 | Verify the status of each port using dsIsVideoPortEnabled() | handle = obtained from dsGetVideoPort() | dsERR_NONE, enabled = true | Should be successful | @@ -64,12 +65,15 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A[Call dsVideoPortInit API] -->|dsERR_NONE| B{For supported video port type
call dsGetVideoPort API} A -->|Not dsERR_NONE| A1[Test case fail] B -->|dsERR_NONE and valid handle| D[Call dsIsVideoPortEnabled API] + D -->|Not dsERR_NONE| A2[Test case fail] D -->|dsERR_NONE| E[Check if video port is enabled] E -->|Enabled flag is false| F[Call dsEnableVideoPort API] + F -->|Not dsERR_NONE| A2[Test case fail] F -->|dsERR_NONE| G[Call dsIsVideoPortEnabled API] + G -->|Not dsERR_NONE| A2[Test case fail] G -->|dsERR_NONE and enabled flag is true| B B -->|End of loop|I[Call dsVideoPortTerm API] I -->|dsERR_NONE| J[Test case success] @@ -80,8 +84,8 @@ graph TB |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_EnableDisabledVideoPorts_source`| -|Description|Get the handle for each video port, check the status of each video port to see if it's enabled or disabled. If a port is disabled, enable it, and then verify the status of each port.| +|Function Name|`test_l2_dsVideoPort_VerifyDisplayAndPortStatus`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid` .Verify the connected/disconnected status of each supported port's display when no video port is connected.| |Test Group|02| |Test Case ID|002| |Priority|High| @@ -97,61 +101,17 @@ If user chose to run the test in interactive mode, then the test case has to be **Test Procedure :** -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the handle for each video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | -| 03 | Check the status of each video port using dsIsVideoPortEnabled | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | -| 04 | If a port is disabled, enable it using dsEnableVideoPort | handle = obtained from dsGetVideoPort, enabled = true | dsERR_NONE | Should be successful | -| 05 | Verify the status of each port using dsIsVideoPortEnabled | handle = obtained from dsGetVideoPort | dsERR_NONE, enabled = true | Should be successful | -| 06 | Terminate video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE| B{For each video port type
call dsGetVideoPort API} - A -->|Not dsERR_NONE| A1[Test case fail] - B -->|dsERR_NONE and valid handle| D[Call dsIsVideoPortEnabled API] - D -->|dsERR_NONE| E[Check if video port is enabled] - E -->|Enabled flag is false| F[Call dsEnableVideoPort API] - F -->|dsERR_NONE| G[Call dsIsVideoPortEnabled API] - G -->|dsERR_NONE and enabled flag is true| B - B -->|End of loop|I[Call dsVideoPortTerm API] - I -->|dsERR_NONE| J[Test case success] - I -->|Not dsERR_NONE| I1[Test case fail] -``` - -### Test 3 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_VerifyDisplayAndPortStatus_sink`| -|Description|Verify the connected/disconnected status of each port's display when no video port is connected.| -|Test Group|02| -|Test Case ID|003| -|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 :** - | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle for each type of video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index` | dsERR_NONE | Should be successful | | 03 | Check if the display is connected for the obtained video port handle using dsIsDisplayConnected | handle = obtained from dsGetVideoPort | dsERR_NONE, connected = false | Should be successful | | 04 | Check if the video port is active for the obtained video port handle using dsIsVideoPortActive | handle = obtained from dsGetVideoPort | dsERR_NONE, active = false | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | ```mermaid graph TB - A[Call dsVideoPortInit] -->|dsERR_NONE| B{For each type and index
call dsGetVideoPort} + A[Call dsVideoPortInit] -->|dsERR_NONE| B{For each supported type and index
call dsGetVideoPort} A -->|Not dsERR_NONE| A1[Test case fail] B -->|dsERR_NONE and valid handle| C[Call dsIsDisplayConnected for each handle] C -->|dsERR_NONE and connected is false| D[Call dsIsVideoPortActive for each handle] @@ -161,55 +121,14 @@ graph TB I -->|Not dsERR_NONE| I1[Test case fail] ``` -### Test 4 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_VerifyDisplayAndPortStatus_source`| -|Description|Verify the connected/disconnected status of each port's display when no video port is connected.| -|Test Group|02| -|Test Case ID|004| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle for each type of video port using dsGetVideoPort | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0 | dsERR_NONE | Should be successful | -| 03 | Check if the display is connected for each video port using dsIsDisplayConnected | handle = obtained from dsGetVideoPort | dsERR_NONE, connected = false | Should be successful | -| 04 | Check if the video port is active for each video port using dsIsVideoPortActive | handle = obtained from dsGetVideoPort | dsERR_NONE, active = false | Should be successful | -| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit] -->|dsERR_NONE| B{For each type and index
call dsGetVideoPort} - A -->|Not dsERR_NONE| A1[Test case fail] - B -->|dsERR_NONE and valid handle| C[Call dsIsDisplayConnected for each handle] - C -->|dsERR_NONE and connected is false| D[Call dsIsVideoPortActive for each handle] - D -->|dsERR_NONE and enabled flag is true| B - B -->|End of loop|I[Call dsVideoPortTerm API] - I -->|dsERR_NONE| J[Test case success] - I -->|Not dsERR_NONE| I1[Test case fail] -``` - -### Test 5 +### Test 3 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities_sink`| -|Description|Retrieve the surround mode capabilities of each port and verify them with the configuration YAML file. If it is a sink device, retrieve the value from 'Sink_4K_VideoPort.yaml' using the path Ports/1/Display_surround" since the sink device has only an INTERNAL port. It is not supported for the source devices.| +|Function Name|`test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Retrieve the surround mode capabilities of each supported port and verify them with the configuration YAML file. If it is a sink device, retrieve the value from 'profile file using the path `dsVideoPort/Ports/port no/Display_surround` since the sink device has only an INTERNAL port. It is not supported for the source devices.| |Test Group|02| -|Test Case ID|005| +|Test Case ID|003| |Priority|High| **Pre-Conditions :** @@ -226,9 +145,9 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index` | dsERR_NONE | Should be successful | | 03 | Check if the display is in surround mode using dsIsDisplaySurround() with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | -| 04 | Verify if the surround mode from previous step matches with the configuration YAML file | surrond, "Ports/1/Display_surrond" | None | Should be successful | +| 04 | Verify if the surround mode from previous step matches with the profile file | get_surround = `dsVideoPort/Ports/port no/Display_surround` | None | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | ```mermaid @@ -237,64 +156,24 @@ graph TB Step1 -->|dsERR_NONE| Step2[Call dsGetVideoPort API] Step1 -->|Not dsERR_NONE| Fail1[Test Case Failed] Step2 -->|dsERR_NONE and valid handle| Step3[Call dsIsDisplaySurround API] + Step3 -->|Not dsERR_NONE| Fail4[Test Case Failed] Step3 -->|dsERR_NONE and boolean value| Step4[Retrieve surround mode capabilities] + Step4 -->|Not dsERR_NONE| Fail3[Test Case Failed] Step4 --> Step5[Verify if dsIsDisplaySurround value matches with configuration file value] Step5 --> Step6[Call dsVideoPortTerm API] + Step5 -->|Not match| Fail5[Test Case Failed] Step6 -->|dsERR_NONE| End[Test Case Passed] Step6 -->|Not dsERR_NONE| Fail5[Test Case Failed] ``` -### Test 6 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_VerifyDisplaySurround_source`| -|Description|Verify the each port surround mode capabilities of connected display and verify with configuration file. It is not supported of Sink devices. If it is a source devices, the value has to be retrieved from the Source_4K_VideoPort.yaml" using the path "Ports/1/Display_surround" supported by the HDMI device.| -|Test Group|02| -|Test Case ID|006| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort() with HDMI and index 0 | dsVIDEOPORT_TYPE_HDMI, 0, &handle | dsERR_NONE | Should be successful | -| 03 | Check if the display is surround using dsIsDisplaySurround() with valid handle | handle, &surround | dsERR_NONE | Should be successful | -| 04 | If display is surround, get the surround mode using dsGetSurroundMode() with valid handle | handle, &surround_mode | dsERR_NONE | Should be successful | -| 05 | Verify if the surround mode from previous step matches with the configuration YAML file | surrond, "Ports/1/Display_surrond" | True | Should be successful | -| 06 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB -A[Call dsVideoPortInit] -->|dsERR_NONE| B[Call dsGetVideoPort] -A -->|Not dsERR_NONE| A1[Test case fail] -B -->|dsERR_NONE and valid handle| C[Call dsIsDisplaySurround] -C -->|dsERR_NONE and display supports surround| D[Call dsGetSurroundMode] -C -->|Not dsERR_NONE| C1[Test case fail] -D -->|dsERR_NONE and valid surround mode| E[Verify if surround mode matches with value from Source_4K_VideoPort.yaml] -E -->G[Call dsVideoPortTerm] -G -->|dsERR_NONE| G1[Test case success] -G -->|Not dsERR_NONE| G2[Test case fail] -``` - -### Test 7 +### Test 4 |Title|Details| |--|--| |Function Name|`test_l2_dsVideoPort_SetAndGetResolution_source`| -|Description|Set properties for each video port, including pixel resolution, aspect ratio, stereoscopic modes, frame rates, and scan modes, looping through supported values. Verify the settings using the get function.| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Set properties for each supported video port, including pixel resolution, aspect ratio, stereoscopic modes, frame rates, and scan modes, looping through supported values. Verify the settings using the get function.| |Test Group|02| -|Test Case ID|007| +|Test Case ID|004| |Priority|High| **Pre-Conditions :** @@ -309,9 +188,9 @@ If user chose to run the test in interactive mode, then the test case has to be **Test Procedure :** | Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | +| ------------------| ----------- | ----------| -------------- | ----- | | 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through each video port and get the handle using dsGetVideoPort() | type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0, &handle | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Loop through all possible pixel resolutions, aspect ratios, stereoscopic modes, frame rates, and scan modes | pixelResolution = dsVIDEO_PIXELRES_720x480 to dsVIDEO_PIXELRES_MAX, aspectRatio = dsVIDEO_ASPECT_RATIO_4x3 to dsVIDEO_ASPECT_RATIO_MAX, stereoScopicMode = dsVIDEO_SSMODE_UNKNOWN to dsVIDEO_SSMODE_MAX, frameRate = dsVIDEO_FRAMERATE_UNKNOWN to dsVIDEO_FRAMERATE_MAX, interlaced = false | dsERR_NONE | Should be successful | | 04 | Set resolution using dsSetResolution() with handle and setResolution | handle, &setResolution | dsERR_NONE | Should be successful | | 05 | Get resolution using dsGetResolution() with handle and getResolution | handle, &getResolution | dsERR_NONE | Should be successful | @@ -326,20 +205,20 @@ graph TB C --> E[Set values using dsSetResolution API] E --> F[Get values using dsGetResolution API] F --> G[Compare returned and set resolution] - G --> C + G --> |Not dsERR_NONE| I1[Test case Fail] F --> I[Call dsVideoPortTerm] I -->|dsERR_NONE| J[Test case Success] I -->|Not dsERR_NONE| I1[Test case Fail] ``` -### Test 8 +### Test 5 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_VerifySupportedTvResolutions_sink`| -|Description|Gets the each port supported resolutions of TV and verify with the configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by HDMI port.| +|Function Name|`test_l2_dsVideoPort_VerifySupportedTvResolutions`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Gets the supported port Resolutions of TV and verify with the profile file 'dsVideoPort/Ports/port no/Supported_tv_resolutions_capabilities'| |Test Group|02| -|Test Case ID|008| +|Test Case ID|005| |Priority|High| **Pre-Conditions :** @@ -356,9 +235,9 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0 | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Get the supported TV resolutions using dsSupportedTvResolutions with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | -| 04 | Verify the obtained resolutions with the expected resolutions from the configuration YAML file | resolutions = value in "Ports/1/Supported_tv_resolutions_capabilities" | dsERR_NONE | Should be successful | +| 04 | Verify the obtained resolutions with the expected resolutions from the configuration YAML file | resolutions = value in `dsVideoPort/Ports/port no/Supported_tv_resolutions_capabilities` | dsERR_NONE | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | ```mermaid @@ -367,61 +246,21 @@ graph TB Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] Step1 -- Not dsERR_NONE --> Fail1[Test case fail] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsSupportedTvResolutions API] - Step3 -- dsERR_NONE and valid resolutions --> Step4[Verfiy if resolutions match with Sink_4K_VideoPort.yaml file value] - Step4 --> Step5[Call dsVideoPortTerm API] - Step5 -- dsERR_NONE --> End[Test Case Passed] - Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed: dsVideoPortTerm API failed] -``` - -### Test 9 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_VerifySupportedTvResolutions_source`| -|Description|Gets the each port supported resolutions of TV and verify with the configuration YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/Supported_tv_resolutions_capabilities', supported by HDMI port.| -|Test Group|02| -|Test Case ID|009| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort with type=dsVIDEOPORT_TYPE_HDMI and index=1 | type=dsVIDEOPORT_TYPE_HDMI, index=1 | dsERR_NONE | Should be successful | -| 03 | Get the supported TV resolutions using dsSupportedTvResolutions with the obtained handle | handle=obtained handle | dsERR_NONE | Should be successful | -| 04 | Verify the obtained resolutions with the configuration YAML file | resolutions= value in "Ports/1/Supported_tv_resolutions_capabilities" | dsERR_NONE | Should be successful | -| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - Step1[Call dsVideoPortInit API] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] - Step1 -- Not dsERR_NONE --> Fail1[Test case fail] - Step2 -- dsERR_NONE and valid handle --> Step3[Call dsSupportedTvResolutions API] - Step3 -- dsERR_NONE and valid resolutions --> Step4[Verfiy if resolutions match with Source_4K_VideoPort.yaml file value] + Step3 -- dsERR_NONE and valid resolutions --> Step4[Verify if resolutions match with profile file value] + Step4 -- Not Match --> Fail2[Test case fail] Step4 --> Step5[Call dsVideoPortTerm API] Step5 -- dsERR_NONE --> End[Test Case Passed] Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed: dsVideoPortTerm API failed] ``` -### Test 10 +### Test 6 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_GetHDRCapabilities_sink`| -|Description|Get the each port HDR capabilities & verify with the configuration YAML file YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported only by HDMI port.| +|Function Name|`test_l2_dsVideoPort_GetHDRCapabilities`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Get the each supported port HDR capabilities & verify with the profile file `dsVideoPort/Ports/port no/hdr_capabilities`| |Test Group|02| -|Test Case ID|10| +|Test Case ID|06| |Priority|High| **Pre-Conditions :** @@ -438,9 +277,9 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort() with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Get the HDR capabilities of the TV using dsGetTVHDRCapabilities() with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | -| 04 | Verify the obtained capabilities with the configuration YAML file | capabilities = obtained from previous step | capabilities = value in "Ports/1/hdr_capabilities | Should be successful | +| 04 | Verify the obtained capabilities with the configuration YAML file `dsVideoPort/Ports/port no/hdr_capabilities` | capabilities = `dsVideoPort/Ports/port no/hdr_capabilities` | capabilities = value in "Ports/1/hdr_capabilities | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | ```mermaid @@ -448,146 +287,21 @@ graph TB A[Call dsVideoPortInit API] -->|dsERR_NONE| B[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] A -->|Not dsERR_NONE| A1[Test case fail] B -->|dsERR_NONE and valid handle| C[Call dsGetTVHDRCapabilities API with handle] - C -->|dsERR_NONE and bitwise OR-ed value| D[Verify if output matches with value from Sink_4K_VideoPort.yaml] - D --> E[Call dsVideoPortTerm API] - E -->|dsERR_NONE| F[Test case success] - E -->|Not dsERR_NONE| E1[Test case fail] -``` - -### Test 11 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_GetHDRCapabilities_source`| -|Description|Get the each port HDR capabilities & verify with the configuration YAML file YAML file. If it is a sink device, the value to be retrieved from the 'Sink_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported by INTERNAL port. For source devices, the value to be retrieved from the 'Source_4K_VideoPort.yaml' by using the path 'Ports/1/hdr_capabilities', supported only by HDMI port.| -|Test Group|02| -|Test Case ID|011| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle for HDMI type using dsGetVideoPort | type = dsVIDEOPORT_TYPE_HDMI, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | -| 03 | Get the HDR capabilities of the TV using dsGetTVHDRCapabilities with the handle obtained from previous step | handle = obtained from step 02, capabilities = valid pointer | dsERR_NONE | Should be successful | -| 04 | Verify the obtained capabilities with the configuration YAML file | capabilities = obtained from step 03 | capabilities = value in 'Ports/1/hdr_capabilities' | Should be successful | -| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE| B[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] - A -->|Not dsERR_NONE| A1[Test case fail] - B -->|dsERR_NONE and valid handle| C[Call dsGetTVHDRCapabilities API with handle] - C -->|dsERR_NONE and bitwise OR-ed value| D[Verify if output matches with value from Source_4K_VideoPort.yaml] + C -->|dsERR_NONE | D[Verify if output matches with value from Sink_4K_VideoPort.yaml] + D -->|Not dsERR_NONE| A2[Test case fail] D --> E[Call dsVideoPortTerm API] E -->|dsERR_NONE| F[Test case success] E -->|Not dsERR_NONE| E1[Test case fail] ``` -### Test 12 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_sink`| -|Description|Set Force-disable 4K support for each port and verify it using the get function.| -|Test Group|02| -|Test Case ID|12| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0, &handle | dsERR_NONE | Should be successful | -| 03 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable set to true | handle, true | dsERR_NONE | Should be successful | -| 04 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle, &getDisable | dsERR_NONE, true | Should be successful | -| 05 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable set to false | handle, false | dsERR_NONE | Should be successful | -| 06 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle, &getDisable | dsERR_NONE, false | Should be successful | -| 07 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit API] -->|Not dsERR_NONE| A1[Test case fail] - A --> P{For each video port type
call dsGetVideoPort API} --> B[Call dsGetVideoPort API] - B[Call dsGetVideoPort API] --> |dsERR_NONE and valid handle|C[Set disable to true/false using dsSetForceDisable4KSupport API] - C --> |dsERR_NONE| D[Get the disable value using dsGetForceDisable4KSupport API] - D --> |dsERR_NONE| E[Verify if the disable values retrieved from set and get APIs match] - E --> |Iterate through all possible values | P - E --> |End of loop| F -->|Not dsERR_NONE| G[Test case fail] - F[Call dsVideoPortTerm API] -->|dsERR_NONE| F1[Test case success] -``` - -### Test 13 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_source`| -|Description|Set Force-disable 4K support for each port and verify it using the get function.| -|Test Group|02| -|Test Case ID|013| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, 0 , handle = valid pointer | dsERR_NONE | Should be successful | -| 03 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable = true | handle = obtained handle, disable = true | dsERR_NONE | Should be successful | -| 04 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle = obtained handle, getDisable = valid pointer | dsERR_NONE, getDisable = true | Should be successful | -| 05 | Set Force-disable 4K support using dsSetForceDisable4KSupport() with handle and disable = false | handle = obtained handle, disable = false | dsERR_NONE | Should be successful | -| 06 | Get Force-disable 4K support using dsGetForceDisable4KSupport() with handle | handle = obtained handle, getDisable = valid pointer | dsERR_NONE, getDisable = false | Should be successful | -| 07 | Terminate video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit API] -->|Not dsERR_NONE| A1[Test case fail] - A --> P{For each video port type
call dsGetVideoPort API} --> B[Call dsGetVideoPort API] - B[Call dsGetVideoPort API] --> |dsERR_NONE and valid handle|C[Set disable to true/false using dsSetForceDisable4KSupport API] - C --> |dsERR_NONE| D[Get the disable value using dsGetForceDisable4KSupport API] - D --> |dsERR_NONE| E[Verify if the disable values retrieved from set and get APIs match] - E --> |Iterate through all possible values | P - E --> |End of loop| F -->|Not dsERR_NONE| G[Test case fail] - F[Call dsVideoPortTerm API] -->|dsERR_NONE| F1[Test case success] -``` - -### Test 14 +### Test 7 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_GetHDCPStatus_sink`| -|Description|Check the HDCP status of each port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources.| +|Function Name|`test_l2_dsVideoPort_GetHDCPStatus`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Check the HDCP status of each supported port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources.| |Test Group|02| -|Test Case ID|14| +|Test Case ID|07| |Priority|High| **Pre-Conditions :** @@ -604,14 +318,14 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Get the HDCP status for each handle using dsGetHDCPStatus() | handle = obtained from dsGetVideoPort() | dsERR_NONE | Should be successful | | 04 | Check if the HDCP status is authenticated | status = obtained from dsGetHDCPStatus() | dsHDCP_STATUS_AUTHENTICATED | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | ```mermaid graph TB - A[Call dsVideoPortInit API] --> |dsERR_NONE| B{For each video port type
call dsGetVideoPort API} + A[Call dsVideoPortInit API] --> |dsERR_NONE| B{For each supported video port type
call dsGetVideoPort API} A -->|Not dsERR_NONE| A1[Test Case Fail] B -->|dsERR_NONE and valid handle| C[Call dsGetHDCPStatus API with handle] C -->|dsERR_NONE and HDCP status| D[Verify HDCP status is dsHDCP_STATUS_AUTHENTICATED] @@ -621,55 +335,14 @@ graph TB E -->|Not dsERR_NONE| E1[Test Case Fail] ``` -### Test 15 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_GetHDCPStatus_source`| -|Description|Check the HDCP status of each port and verify if dsHDCP_STATUS_AUTHENTICATED is returned for sinks and dsHDCP_STATUS_UNPOWERED/dsHDCP_STATUS_PORTDISABLED is returned for sources.| -|Test Group|02| -|Test Case ID|015| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through all video ports and get the video port handle using dsGetVideoPort()| type = dsVIDEOPORT_TYPE_RF to dsVIDEOPORT_TYPE_MAX, index = 0, handle = valid pointer | dsERR_NONE | Should be successful | -| 03 | Get the HDCP status using dsGetHDCPStatus() with the valid handle | handle = obtained handle, status = valid pointer | dsERR_NONE | Should be successful | -| 04 | Check if the HDCP status is either dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED | status = obtained status | dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED | Should be successful | -| 05 | Terminate the video port using dsVideoPortTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsVideoPortInit API] --> |dsERR_NONE| B{For each video port type
call dsGetVideoPort API} - A -->|Not dsERR_NONE| A1[Test Case Fail] - B -->|dsERR_NONE and valid handle| C[Call dsGetHDCPStatus API with handle] - C -->|dsERR_NONE and HDCP status| D[Verify HDCP status is dsHDCP_STATUS_UNPOWERED or dsHDCP_STATUS_PORTDISABLED] - D --> |Iterate through all possible values| B - D -->|End of loop|E[Call dsVideoPortTerm API] - E -->|dsERR_NONE| F[Test Case Success] - E -->|Not dsERR_NONE| E1[Test Case Fail] -``` - -### Test 16 +### Test 8 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_VerifyHDCPProtocolStatus_sink`| -|Description|Check the HDCP protocol status of each port and verify it with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by HDMI port.| +|Function Name|`test_l2_dsVideoPort_VerifyHDCPProtocolStatus`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Check the HDCP protocol status of each supported port and verify it with the configuration YAML file `dsVideoPort/Ports/port no/hdcp_protocol_version` supported by HDMI port.| |Test Group|02| -|Test Case ID|16| +|Test Case ID|08| |Priority|High| **Pre-Conditions :** @@ -686,72 +359,31 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort with dsVIDEOPORT_TYPE_INTERNAL and index 0 | dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from previous step | dsERR_NONE | Should be successful | -| 04 | Verify the obtained protocol version with the value from the configuration YAML file | protocolVersion = obtained from previous step | Ports/1/hdcp_protocol_version | Should be successful | +| 04 | Verify the obtained protocol version with the value from the configuration YAML file | protocolVersion = `dsVideoPort/Ports/port no/hdcp_protocol_version` | dsERR_NONE | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | ```mermaid graph TB Step1[Call dsVideoPortInit API] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL port] - Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] - Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetHDCPProtocol API and get HDCP protocol version] - Step3 -- dsERR_NONE --> Step5[Compare the version with the value from Sink_4K_VideoPort.yaml file ] - Step5 --> Step6[Call dsVideoPortTerm API] - Step6 -- dsERR_NONE --> End[Test Case Passed] - Step6 -- Not dsERR_NONE --> Fail6[Test Case Failed] -``` - -### Test 17 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsVideoPort_VerifyHDCPProtocolStatus_source`| -|Description|Check the HDCP protocol status of each port and verify it with the configuration YAML file. If it is a sink device, retrieve the value from the 'Sink_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by INTERNAL port. For a source device, retrieve the value from the 'Source_4K_VideoPort.yaml' file using the path 'Ports/1/hdcp_protocol_version' supported by HDMI port.| -|Test Group|02| -|Test Case ID|017| -|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 :** - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort with HDMI type and index 0 | type = dsVIDEOPORT_TYPE_HDMI, index = 0 | dsERR_NONE | Should be successful | -| 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | -| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value in "Ports/1/hdcp_protocol_version" | "Ports/1/hdcp_protocol_version" from YAML file | Should be successful | -| 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - Start(Start) --> Step1[Call dsVideoPortInit API] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI port] + Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with supported port type] Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetHDCPProtocol API and get HDCP protocol version] - Step3 -- dsERR_NONE --> Step5[Compare the version with the value from Source_4K_VideoPort.yaml file ] + Step3 -- dsERR_NONE --> Step5[Compare the version with the value from profile file ] Step5 --> Step6[Call dsVideoPortTerm API] Step6 -- dsERR_NONE --> End[Test Case Passed] Step6 -- Not dsERR_NONE --> Fail6[Test Case Failed] ``` -### Test 18 +### Test 9 |Title|Details| |--|--| -|Function Name|`test_l2_dsVideoPort_SetAndGetHdmiPreference_sink`| -|Description|Set the preferred HDCP Protocol version for each valid port and verify it using the get function.| +|Function Name|`test_l2_dsVideoPort_SetAndGetHdmiPreference`| +|Description|Get the handle for supported video port from profile file(`dsVideoPort/Number_of_ports`), check the status of each supported video port type `dsVideoPort/Ports/port no/Typeid`.Set the HDMI preference for each valid port and verify it using the get function.| |Test Group|02| -|Test Case ID|018| +|Test Case ID|09| |Priority|High| **Pre-Conditions :** @@ -768,14 +400,14 @@ If user chose to run the test in interactive mode, then the test case has to be | Variation / Steps | Description | Test Data | Expected Result | Notes| | -- | --------- | ---------- | -------------- | ----- | | 01 | Initialize the video port using dsVideoPortInit | None | dsERR_NONE | Should be successful | -| 02 | Get the video port handle using dsGetVideoPort with INTERNAL type and index 0 | type = dsVIDEOPORT_TYPE_INTERNAL, index = 0 | dsERR_NONE | Should be successful | +| 02 | Get the video port handle for supported type of video port using dsGetVideoPort Loop through each video port and get the handle using dsGetVideoPort() | type = `dsVideoPort/Ports/port no/Typeid` index = `dsVideoPort/Ports/port no/Index`. | dsERR_NONE | Should be successful | | 03 | Get the HDCP protocol version using dsGetHDCPProtocol with the obtained handle | handle = obtained from dsGetVideoPort | dsERR_NONE | Should be successful | -| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value in "Ports/1/hdcp_protocol_version" | "Ports/1/hdcp_protocol_version" from YAML file | Should be successful | +| 04 | Verify the HDCP protocol version with the value from the configuration YAML file | protocolVersion = value `dsVideoPort/Ports/port no/hdcp_protocol_version` | dsERR_NONE | Should be successful | | 05 | Terminate the video port using dsVideoPortTerm | None | dsERR_NONE | Should be successful | ```mermaid graph TB - A[Call dsVideoPortInit] -->|return dsERR_NONE| B[Call dsGetVideoPort] -->|return dsERR_NONE and valid handle| P{Loop through all the valid ports and protocol versions} + A[Call dsVideoPortInit] -->|return dsERR_NONE| B[Call dsGetVideoPort] -->|return dsERR_NONE and valid handle| P{Loop through all the supported ports and
protocol versions} A -->|Not dsERR_NONE| C[Test case fail] P --> D[Call dsSetHdmiPreference API] D -->|dsERR_NONE| F[Call dsGetHdmiPreference API] --> |Proceed to other values| P diff --git a/profiles/source/Source_4K_VideoPort.yaml b/profiles/source/Source_4K_VideoPort.yaml index c1aa3251..6e3e83c7 100644 --- a/profiles/source/Source_4K_VideoPort.yaml +++ b/profiles/source/Source_4K_VideoPort.yaml @@ -21,7 +21,7 @@ dsVideoPort: #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - 0x06 # HDMI - 0x00 # RF - - 0x01 # BB + - 0x01 # BB # 8-Bit, 10-bit and 12 bit color_depth: 8 @@ -59,7 +59,7 @@ dsVideoPort: # "HDMI" # "HDMI_INPUT" # "INTERNAL" - Name: "HDMI" + Name: "HDMI" # if dtcp supported @true , if dtcp not supported @false dtcp_supported: false # if hdcp supported @true , if hdcp not supported @false @@ -284,22 +284,22 @@ dsVideoPort: #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed # HDR Capabilities: hdr_capabilities: 0x20 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range hdcp_protocol_version: 0x01 #VERSION_2X # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range quantization_ranges: 0x02 #FULL # Matrix Coefficients @@ -320,16 +320,16 @@ dsVideoPort: matrix_coefficients: 0x07 #BT_2020_CL 2: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range Typeid: 0x00 # dsVIDEOPORT_TYPE_RF # An index value used to access a specific port within an array of ports with the same type. Index: 0 @@ -342,7 +342,7 @@ dsVideoPort: # "HDMI" # "HDMI_INPUT" # "INTERNAL" - Name: "RF" + Name: "RF" # if dtcp supported @true , if dtcp not supported @false dtcp_supported: false # if hdcp supported @true , if hdcp not supported @false @@ -352,17 +352,17 @@ dsVideoPort: #"768p60" #"1080p" #"2160p60" - supportedResolutionNames: + supportedResolutionNames: - "768p60" - "1080p" - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range defaultResolution: "480p" #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space @@ -414,20 +414,20 @@ dsVideoPort: #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed # HDR Capabilities: hdr_capabilities: 0x0 # NONE # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range quantization_ranges: 0x0 #UNKNOWN # Matrix Coefficients #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient @@ -447,16 +447,16 @@ dsVideoPort: matrix_coefficients: 0x00 #UNKNOWN 3: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range Typeid: 0x01 # dsVIDEOPORT_TYPE_BB # An index value used to access a specific port within an array of ports with the same type. Index: 0 @@ -479,16 +479,16 @@ dsVideoPort: #"768p60" #"1080p" #"2160p60" - supportedResolutionNames: + supportedResolutionNames: - "768p60" - "1080p" - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack + #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output + #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output + #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output + #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output + #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output + #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range defaultResolution: "480p" @@ -541,20 +541,20 @@ dsVideoPort: #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed # HDR Capabilities: hdr_capabilities: 0x0 # NONE # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range quantization_ranges: 0x0 #UNKNOWN # Matrix Coefficients #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient diff --git a/src/main.c b/src/main.c index f9db3667..7fe41889 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ */ #include -#include "test_utils.h" +#include "test_parse_configuration.h" extern int UT_register_APIDEF_l1_tests( void ); extern int UT_register_APIDEF_l2_tests( void ); @@ -77,10 +77,10 @@ int main(int argc, char** argv) /* Register tests as required, then call the UT-main to support switches and triggering */ UT_init( argc, argv ); - if ( test_utils_parseConfig() == -1 ) + if ( test_parse_configuration() == -1 ) { printf("\n Failed to parse the configuration file"); - test_utils_parseConfig_term(); + test_parse_configuration_term(); return -1; } @@ -103,7 +103,7 @@ int main(int argc, char** argv) /* Begin test executions */ UT_run_tests(); - test_utils_parseConfig_term(); + test_parse_configuration_term(); return 0; diff --git a/src/test_utils.c b/src/test_dsVideoPort_parse_configuration.c similarity index 60% rename from src/test_utils.c rename to src/test_dsVideoPort_parse_configuration.c index d91d251d..de992588 100644 --- a/src/test_utils.c +++ b/src/test_dsVideoPort_parse_configuration.c @@ -42,50 +42,52 @@ */ /** - * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @defgroup DS_VideoPort_HALTEST Device Settings Video Port HAL Tests + * @{ + */ + +/** + * @defgroup DS_VideoPort_HALTEST_PARSE_CONFIG Device Settings Video Port Parse Config File * @{ * @parblock * - * ### Utility functions for Device Settings HAL : + * ### Configuration file for DS Video Port test suit : * - * Utility functions required for the module across all vendors. + * DS Video Port Parse Configuration file * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * **Pre-Conditions:** None@n + * **Dependencies:** None@n * - * @endparblock * + * @endparblock */ + /** -* @file test_utils.c -* -*/ + * @file test_dsVideoPort_parse_configuration.c + * + */ + +#include #include #include #include -#include -#include "test_utils.h" - -/* Global Variables */ -int32_t gSourceType = -1; - -int32_t gDSModule = 0x0; - -char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE] = {0}; -char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; +#include +#include "test_parse_configuration.h" +#include "test_dsVideoPort_parse_configuration.h" +/* Global variables */ dsVideoPortConfiguration_t* gDSVideoPortConfiguration = NULL; +char gDSVideoPortName[DS_VIDEO_PORT_NAME_SIZE] = {0}; int32_t gDSvideoPort_NumberOfPorts = 0; int32_t gDSvideoPort_color_depth = 0; int32_t gDSvideoPort_connectedAOP = 0; -//char gDSvideoPort_defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE] = {0}; -/* Parse Video Configuration file */ -static int test_utils_parse_dsVideoPort() +/* Parse Video Port Configuration */ +int test_dsVideoPort_parse_configuration() { - char key_string[TEST_UTIL_KVP_SIZE]; + char key_string[DS_VIDEO_PORT_KVP_SIZE]; ut_kvp_status_t status; gDSvideoPort_NumberOfPorts = ut_kvp_getUInt32Field( ut_kvp_profile_getInstance(), "dsVideoPort/Number_of_ports" ); @@ -98,110 +100,100 @@ static int test_utils_parse_dsVideoPort() return -1; } + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Name", gDSVideoPortName, DS_VIDEO_PORT_NAME_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDSVideoPortName); + } + else { + UT_LOG_ERROR("Failed to get the platform Device Name"); + return -1; + } + + + for(int i = 0; i < gDSvideoPort_NumberOfPorts; i++) { - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Typeid" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Typeid" , i+1); gDSVideoPortConfiguration[i].typeid = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Index" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Index" , i+1); gDSVideoPortConfiguration[i].index = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Name" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Name" , i+1); status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoPortConfiguration[i].port_name, DS_VIDEO_PORT_NAME_SIZE); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/dtcp_supported" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/dtcp_supported" , i+1); gDSVideoPortConfiguration[i].dtcp_supported = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_supported" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_supported" , i+1); gDSVideoPortConfiguration[i].hdcp_supported = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/numSupportedResolutions" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/numSupportedResolutions" , i+1 ); gDSVideoPortConfiguration[i].numSupportedResolutions = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/defaultResolution" , i+1); - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoPortConfiguration[i].defaultResolution, TEST_UTIL_DEVICE_NAME_SIZE); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/defaultResolution" , i+1); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoPortConfiguration[i].defaultResolution, DS_VIDEO_PORT_NAME_SIZE); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/colorspaces" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/colorspaces" , i+1 ); gDSVideoPortConfiguration[i].colorspaces = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_color_depth_capabilities" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_color_depth_capabilities" , i+1 ); gDSVideoPortConfiguration[i].Supported_color_depth_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/DisplaySurround" , i+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/DisplaySurround" , i+1); gDSVideoPortConfiguration[i].DisplaySurround = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/SurroundMode" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/SurroundMode" , i+1 ); gDSVideoPortConfiguration[i].SurroundMode = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_tv_resolutions_capabilities" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_tv_resolutions_capabilities" , i+1 ); gDSVideoPortConfiguration[i].Supported_tv_resolutions_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdr_capabilities" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/hdr_capabilities" , i+1 ); gDSVideoPortConfiguration[i].hdr_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_protocol_version" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/hdcp_protocol_version" , i+1 ); gDSVideoPortConfiguration[i].hdcp_protocol_version = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/quantization_ranges" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/quantization_ranges" , i+1 ); gDSVideoPortConfiguration[i].quantization_ranges = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, TEST_UTIL_KVP_SIZE, "dsVideoPort/Ports/%d/matrix_coefficients" , i+1 ); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/matrix_coefficients" , i+1 ); gDSVideoPortConfiguration[i].matrix_coefficients = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); } - if(status);//warning fix - return 0; -} - -/* Parse configuration file */ -int test_utils_parseConfig() -{ - ut_kvp_status_t status; - - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", gDeviceType, TEST_UTIL_DEVICE_TYPE_SIZE); - UT_LOG_DEBUG("gDeviceType: %s ",gDeviceType); - if (status == UT_KVP_STATUS_SUCCESS ) { - if (!strncmp(gDeviceType, TEST_UTIL_TYPE_SOURCE_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { - gSourceType = 1; - } - else if(!strncmp(gDeviceType, TEST_UTIL_TYPE_SINK_VALUE, TEST_UTIL_DEVICE_TYPE_SIZE)) { - gSourceType = 0; - } - else { - UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); - return -1; - } - } - else { - UT_LOG_ERROR("Failed to get the platform type"); - return -1; - } - - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Name", gDeviceName, TEST_UTIL_DEVICE_NAME_SIZE); - - UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDeviceName); - - gDSModule = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), "dsVideoPort/Module"); - UT_LOG_DEBUG("gDSModule: %d dsVideoPort:%d ",gDSModule,dsVideoPort); - if(gDSModule & dsVideoPort) { - status = test_utils_parse_dsVideoPort(); - if (status != UT_KVP_STATUS_SUCCESS ) { - UT_LOG_ERROR("Failed to parse dsAudio configurations"); - return -1; - } - } return 0; } -void test_utils_parseConfig_term() +/* Free Parse Video Port Configuration */ +void test_dsVideoPort_parse_term() { if(gDSVideoPortConfiguration) { free(gDSVideoPortConfiguration); } } -/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of DS_VideoPort_HALTEST_PARSE_CONFIG +/** @} */ // End of DS_VideoPort_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_utils.h b/src/test_dsVideoPort_parse_configuration.h similarity index 64% rename from src/test_utils.h rename to src/test_dsVideoPort_parse_configuration.h index 7738ed81..bd60f01d 100644 --- a/src/test_utils.h +++ b/src/test_dsVideoPort_parse_configuration.h @@ -42,40 +42,42 @@ */ /** - * @defgroup Device_Settings_UTILS Device Settings HAL Tests Utility File + * @defgroup DS_VideoPort_HALTEST Device Settings Video Port HAL Tests + * @{ + */ + +/** + * @defgroup DS_VideoPort_HALTEST_PARSE_CONFIG_HEADER Device Settings Video Port Parse Config Header File * @{ * @parblock * - * ### Utility functions for Device Settings HAL : + * ### Configuration Header file for DS Video Port test suit : * - * Utility functions required for the module across all vendors. - * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * DS Video Port Parse Configuration Header file * * @endparblock - * */ + /** -* @file test_utils.h -* -*/ -#ifndef __TEST_UTILS_H__ -#define __TEST_UTILS_H__ + * @file test_dsVideoPort_parse_configuration.h + * + */ + +#ifndef __TEST_DS_VIDEO_PARSE_CONFIG_H__ +#define __TEST_DS_VIDEO_PARSE_CONFIG_H__ #include "dsVideoPort.h" -#define TEST_UTIL_KVP_SIZE 256 -#define TEST_UTIL_DEVICE_TYPE_SIZE 8 -#define TEST_UTIL_DEVICE_NAME_SIZE 64 -#define TEST_UTIL_DS_MODULE_NAME_SIZE 32 -#define TEST_UTIL_TYPE_SOURCE_VALUE "source" -#define TEST_UTIL_TYPE_SINK_VALUE "sink" +#define DS_VIDEO_PORT_KVP_SIZE 128 +#define DS_VIDEO_PORT_TYPE_SIZE 8 +#define DS_VIDEO_PORT_NAME_SIZE 64 +#define DS_VIDEO_PORT_MODULE_NAME_SIZE 32 +#define DS_VIDEO_PORT_RESOLUTION_MAX 32 +#define DS_VIDEO_PORT_RESOLUTION_NAME_MAX 32 -#define DS_VIDEO_PORT_NAME_SIZE 32 -#define dsVideoPortRESOLUTION_NUMMAX 32 +#define DS_VIDEO_PORT_MODULE_NAME "dsVideoPort" /* Video Port configuration */ typedef struct _dsVideoPortConfiguration_t { @@ -85,8 +87,8 @@ typedef struct _dsVideoPortConfiguration_t { bool dtcp_supported; bool hdcp_supported; int32_t numSupportedResolutions; - char supportedResolutons[dsVideoPortRESOLUTION_NUMMAX][DS_VIDEO_PORT_NAME_SIZE]; - char defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE]; + //char supportedResolutons[DS_VIDEO_PORT_RESOLUTION_NMAX][]; + char defaultResolution[DS_VIDEO_PORT_RESOLUTION_NAME_MAX]; int32_t colorspaces; int32_t Supported_color_depth_capabilities; bool DisplaySurround; @@ -98,23 +100,7 @@ typedef struct _dsVideoPortConfiguration_t { int32_t matrix_coefficients; }dsVideoPortConfiguration_t; -typedef enum _dsModule_t { - dsAudioPort = (0x1 << 0), - dsVideoPort = (0x1 << 1), - dsComposite = (0x1 << 2), - dsHdmiIn = (0x1 << 3), - dsVideoDevice = (0x1 << 4), - dsDisplay = (0x1 << 5), - dsFPD = (0x1 << 6), - dsHost = (0x1 << 7), -}dsModule_t; - /* Global variables */ -extern char gDeviceType[TEST_UTIL_DEVICE_TYPE_SIZE]; -extern char gDeviceName[TEST_UTIL_DEVICE_NAME_SIZE]; -extern int32_t gSourceType; -extern int32_t gDSModule; - extern dsVideoPortConfiguration_t* gDSVideoPortConfiguration; extern int32_t gDSvideoPort_NumberOfPorts; extern int32_t gDSvideoPort_color_depth; @@ -122,11 +108,14 @@ extern int32_t gDSvideoPort_connectedAOP; //extern char gDSvideoPort_defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE]; /*Function prototypes */ -int test_utils_parseConfig(); -void test_utils_parseConfig_term(); +int test_dsVideoPort_parse_configuration(); +void test_dsVideoPort_parse_term(); + + +#endif //__TEST_DS_VIDEO_PARSE_CONFIG_H__ -#endif //__TEST_UTILS_H__ -/** @} */ // End of Device_Settings_UTILS +/** @} */ // End of DS_VideoPort_HALTEST_PARSE_CONFIG_HEADER +/** @} */ // End of DS_VideoPort_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index aad82185..bc038a9a 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ /** * @defgroup DS_Audio_HALTEST_L2 Device Settings Audio HAL Tests L2 File * @{ - * @parblock + * @parblock * * ### L2 Tests for DS Audio HAL : * @@ -58,7 +58,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-audio_halSpec.md](../../docs/pages/ds-audio_halSpec.md) * * @endparblock */ @@ -68,52 +68,2257 @@ * @file test_l2_dsAudio.c * */ -#include + +#include +#include + +#include #include +#include "dsAudio.h" +#include "test_parse_configuration.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief This test verifies the functionality of enabling, disabling and +* verifying the status of an audio port. +* +* This test function initializes an audio port, enables it, verifies its status, +* disables it, and then verifies its status again. This is done for all types of +* audio ports and for all indices. The test ensures that the audio port can be +* successfully enabled and disabled, and that the status of the port accurately +* reflects these changes. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: true", handle); + ret = dsEnableAudioPort(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not enabled", ret); + } + + UT_LOG_DEBUG("Invoking dsEnableAudioPort with handle: %p and enabled: false", handle); + ret = dsEnableAudioPort(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableAudioPort failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsIsAudioPortEnabled with handle: %p", handle); + ret = dsIsAudioPortEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled, false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsAudioPortEnabled failed with error: %d or port is not disabled", ret); + } + } //for (port) + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the connection status of the headphone port on sink platform +* +* This test initializes the audio port, gets the audio port for each type, checks +* if the headphone port is connected, and finally terminates the audio port. The test +* is designed to verify the correct functioning of the dsAudio module's headphone +* connection status checking mechanism. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool isConnected; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HEADPHONE) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsAudioOutIsConnected with handle: %p", handle); + ret = dsAudioOutIsConnected(handle, &isConnected); + UT_LOG_DEBUG("Return status: %d, isConnected: %d", ret, isConnected); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(isConnected, false); + if (ret != dsERR_NONE || isConnected) { + UT_LOG_ERROR("dsAudioOutIsConnected failed with error %d or Audio out is connected", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to retrieve and verify MS12 capabilities of the platform +* +* This test function is designed to retrieve and verify the MS12 capabilities +* of the audio sink. It initializes the audio port, gets the audio port with a +* specific type and index, retrieves the MS12 capabilities, and then terminates +* the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_capabilites == 0) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", + gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12Capabilities with handle: %p", handle); + retStatus = dsGetMS12Capabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12Capabilities failed with error %d", retStatus); + } + UT_ASSERT_EQUAL(capabilities, gDSAudioPortConfiguration[port].ms12_capabilites); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* audio compression for different audio port types. +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is invoked to get the handle of the audio port. For each compression level +* from 0 to 10, the dsSetAudioCompression function is invoked to set the +* audio compression level, and the dsGetAudioCompression function is invoked +* to get the set compression level. The set and got compression levels are then +* compared to verify if they are equal. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioCompression(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int compression, getCompression; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + + if(gDSAudioPortConfiguration[port].no_of_supported_compression == 0) { + continue; + } + + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error: %d", ret); + continue; + } + + for (compression = 0; compression < gDSAudioPortConfiguration[port].no_of_supported_compression; compression++) { + UT_LOG_DEBUG("Invoking dsSetAudioCompression with handle: %p and compression: %d", + handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + ret = dsSetAudioCompression(handle, gDSAudioPortConfiguration[port].supported_compressions[compression]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetAudioCompression failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioCompression with handle: %p", handle); + ret = dsGetAudioCompression(handle, &getCompression); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioCompression failed with error: %d", ret); + } + + UT_LOG_DEBUG("Compression set: %d, Compression got: %d", gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + UT_ASSERT_EQUAL(gDSAudioPortConfiguration[port].supported_compressions[compression], getCompression); + } /* for (compression) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dialog Enhancement for dsAudio +* +* This test sets the Dialog Enhancement for dsAudio and then gets the +* Dialog Enhancement to verify if the set operation was successful. +* This is done for all audio port types and for two indexes. The test is +* designed to ensure the proper functioning of the dsAudio's Dialog Enhancement +* set and get operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDialogEnhancement(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DialogueEnhancer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort() failed with error: %d", ret); + continue; + } + + for (level = 0; level <= 16; level++) { + UT_LOG_DEBUG("Invoking dsSetDialogEnhancement() with handle: %p and level: %d", handle, level); + ret = dsSetDialogEnhancement(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDialogEnhancement() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDialogEnhancement() with handle: %p", handle); + ret = dsGetDialogEnhancement(handle, &getLevel); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDialogEnhancement() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level: %d", getLevel); + UT_ASSERT_EQUAL(getLevel, level); + }/* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test is designed to set and get the Dolby volume mode for different audio port types. +* +* This test initializes the audio port, then for each audio port type, +* it gets the audio port, sets the Dolby volume mode to true, gets the +* Dolby volume mode and checks if it is true, sets the Dolby volume mode +* to false, gets the Dolby volume mode and checks if it is false, and +* finally terminates the audio port. The test is designed to verify the +* functionality of setting and getting the Dolby volume mode for different audio port types. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 06@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDolbyVolumeMode(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_DolbyVolume)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode true", handle); + ret = dsSetDolbyVolumeMode(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,true); + if (ret != dsERR_NONE || !mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + + UT_LOG_DEBUG("Invoking dsSetDolbyVolumeMode with handle %p and mode false", handle); + ret = dsSetDolbyVolumeMode(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDolbyVolumeMode failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDolbyVolumeMode with handle %p", handle); + ret = dsGetDolbyVolumeMode(handle, &mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mode,false); + if (ret != dsERR_NONE || mode) { + UT_LOG_ERROR("dsGetDolbyVolumeMode failed with error %d and mode %d", ret, mode); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the Intelligent Equalizer Mode for dsAudio +* +* In this test, the Intelligent Equalizer Mode for dsAudio is set and then +* retrieved to verify if the set operation was successful. This is done for +* all audio port types and for all modes from 0 to 6. The test is crucial +* to ensure the correct functioning of the Intelligent Equalizer Mode +* setting and retrieval operations in dsAudio. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetIntelligentEqualizerMode(void) +{ + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & dsMS12SUPPORT_InteligentEqualizer)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 6; mode++) { + UT_LOG_DEBUG("Invoking dsSetIntelligentEqualizerMode with handle %p and mode %d", handle, mode); + ret = dsSetIntelligentEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetIntelligentEqualizerMode failed with error %d", ret); + continue; + } + + int getMode = 0; + UT_LOG_DEBUG("Invoking dsGetIntelligentEqualizerMode with handle %p", handle); + ret = dsGetIntelligentEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetIntelligentEqualizerMode failed with error %d", ret); + } + + UT_LOG_DEBUG("Returned mode %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting +* the volume leveller for a given audio sink +* +* In this test, the dsAudioPortInit function is first invoked to initialize +* the audio port. Then, for each audio port type, the dsGetAudioPort function +* is called to get the handle of the audio port. The dsSetVolumeLeveller function +* is then used to set the volume leveller for the obtained audio port. +* The dsGetVolumeLeveller function is subsequently called to retrieve the volume +* leveller that was set. The retrieved volume leveller is then compared with the set +* volume leveller to verify if they match. Finally, the dsAudioPortTerm function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 08@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetVolumeLeveller(void) +{ + gTestID = 8; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + dsVolumeLeveller_t volLevellerSet = {0, 0}, volLevellerGet; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_Volumeleveller is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x08)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", retStatus); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int level = 0; level <= 10; level++) { + volLevellerSet.mode = mode; + volLevellerSet.level = level; + UT_LOG_DEBUG("Invoking dsSetVolumeLeveller with handle: %p and volLeveller: {mode: %d, level: %d}", handle, volLevellerSet.mode, volLevellerSet.level); + retStatus = dsSetVolumeLeveller(handle, volLevellerSet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsSetVolumeLeveller failed with status: %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetVolumeLeveller with handle: %p", handle); + retStatus = dsGetVolumeLeveller(handle, &volLevellerGet); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) { + UT_LOG_ERROR("dsGetVolumeLeveller failed with status: %d", retStatus); + } + + UT_LOG_DEBUG("Retrieved volLeveller: {mode: %d, level: %d}", volLevellerGet.mode, volLevellerGet.level); + UT_ASSERT_EQUAL(volLevellerGet.mode, volLevellerSet.mode); + UT_ASSERT_EQUAL(volLevellerGet.level, volLevellerSet.level); + } /* for (mode) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Bass Enhancer for audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. A random boost value is set using dsSetBassEnhancer() +* function and then retrieved using dsGetBassEnhancer() function. The set and retrieved +* boost values are then compared for equality. Finally, the dsAudioPortTerm() function is +* invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 09@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetBassEnhancer(void) +{ + gTestID = 9; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int boost = 0; + int setBoost = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_BassEnhancer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x10)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (setBoost = 0; setBoost <= 100; setBoost++) { + UT_LOG_DEBUG("Invoking dsSetBassEnhancer() with handle: %p and boost: %d", handle, setBoost); + ret = dsSetBassEnhancer(handle, setBoost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetBassEnhancer() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetBassEnhancer() with handle: %p", handle); + ret = dsGetBassEnhancer(handle, &boost); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetBassEnhancer() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Boost value: %d", boost); + UT_ASSERT_EQUAL(boost, setBoost); + } /* for (setBoost) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the enabling and functionality of the +* Surround Decoder sink in the L2 dsAudio module +* +* This test initializes the dsAudio port, gets the audio port for each type, +* enables the surround decoder, checks if the surround decoder is enabled, and +* finally terminates the dsAudio port. The test is designed to ensure that the +* surround decoder can be successfully enabled and function as expected in the +* L2 dsAudio module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 010@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableAndVerifySurroundDecoder(void) +{ + gTestID = 10; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = true; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundDecoder is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x20)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to true", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,true); + if (ret != dsERR_NONE || !enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + + enabled = false; + UT_LOG_DEBUG("Invoking dsEnableSurroundDecoder with handle %p and enabled set to false", handle); + ret = dsEnableSurroundDecoder(handle, enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableSurroundDecoder failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsSurroundDecoderEnabled with handle %p", handle); + ret = dsIsSurroundDecoderEnabled(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(enabled,false); + if (ret != dsERR_NONE || enabled) { + UT_LOG_ERROR("dsIsSurroundDecoderEnabled failed with error %d or enabled is not set", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting DRC mode in dsAudio. +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index, the dsGetAudioPort() function +* is invoked to get the audio port. For each mode (0 and 1), the dsSetDRCMode() function +* is invoked to set the DRC mode and the dsGetDRCMode() function is invoked to +* get the DRC mode. The test asserts that the mode set is the same as the mode got. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 011@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetDRCMode(void) +{ + gTestID = 11; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mode; + int getMode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_DRCMode is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x40)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (mode = 0; mode <= 1; mode++) { + UT_LOG_DEBUG("Invoking dsSetDRCMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetDRCMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetDRCMode() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDRCMode() with handle=%p", handle); + ret = dsGetDRCMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetDRCMode() failed with status: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(getMode, mode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Surround Virtualizer in dsAudio +* +* In this test, the dsAudioPortInit function is invoked to initialize the audio port. +* Then, for each audio port type and index, the dsGetAudioPort function is invoked +* to get the audio port handle. The dsSetSurroundVirtualizer function is then invoked +* to set the surround virtualizer for the obtained handle. The dsGetSurroundVirtualizer +* function is then invoked to get the surround virtualizer for the same handle. +* The obtained virtualizer is then compared with the set virtualizer to validate +* the set and get functionality. Finally, the dsAudioPortTerm function is invoked +* to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 012@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetSurroundVirtualizer(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsSurroundVirtualizer_t virtualizer = {0, 0}, getVirtualizer; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_SurroundVirtualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x80)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for(int mode = 0; mode <= 2; mode++) { + for(int boost = 0; boost <= 96; boost +=16) { + virtualizer.mode = mode; + virtualizer.boost = boost; + UT_LOG_DEBUG("Invoking dsSetSurroundVirtualizer with handle: %p and virtualizer: {mode: %d, boost: %d}", handle, virtualizer.mode, virtualizer.boost); + ret = dsSetSurroundVirtualizer(handle, virtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetSurroundVirtualizer failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSurroundVirtualizer with handle: %p", handle); + ret = dsGetSurroundVirtualizer(handle, &getVirtualizer); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetSurroundVirtualizer failed with error: %d", ret); + } + + UT_LOG_DEBUG("Received virtualizer: {mode: %d, boost: %d}", getVirtualizer.mode, getVirtualizer.boost); + UT_ASSERT_EQUAL(getVirtualizer.mode, virtualizer.mode); + UT_ASSERT_EQUAL(getVirtualizer.boost, virtualizer.boost); + } /* for (boost) */ + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of setting and getting MISteering in dsAudio. +* +* In this test, we initialize the audio port and then for each type of audio port +* and for each index, we set the MISteering to true and then get the MISteering +* to verify if it has been set correctly. If any of these operations fail, +* we log the error and continue with the next iteration. Finally, we terminate +* the audio port and assert that the operation was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 013@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMISteering(void) +{ + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool enabled; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_MISteering is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x100)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=true", handle); + ret = dsSetMISteering(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, true); + + UT_LOG_DEBUG("Invoking dsSetMISteering() with handle=%p and enabled=false", handle); + ret = dsSetMISteering(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMISteering() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMISteering() with handle=%p", handle); + ret = dsGetMISteering(handle, &enabled); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMISteering() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Enabled status: %d", enabled); + UT_ASSERT_EQUAL(enabled, false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Graphic Equalizer Mode in dsAudio +* +* In this test, the dsAudioPortInit() function is first invoked to initialize +* the audio port. Then, for each type of audio port and for each index, +* the dsGetAudioPort() function is invoked to get the audio port. +* For each mode from 0 to 3, the dsSetGraphicEqualizerMode() function is +* invoked to set the graphic equalizer mode and the dsGetGraphicEqualizerMode() +* function is invoked to get the graphic equalizer mode. The mode set and +* the mode got are then compared to ensure they are equal. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 014@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetGraphicEqualizerMode(void) +{ + gTestID = 14; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + int mode = 0; + int getMode = 0; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_GraphicEqualizer is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x200)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (mode = 0; mode <= 3; mode++) { + UT_LOG_DEBUG("Invoking dsSetGraphicEqualizerMode() with handle: %p and mode: %d", handle, mode); + ret = dsSetGraphicEqualizerMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetGraphicEqualizerMode() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetGraphicEqualizerMode() with handle: %p", handle); + ret = dsGetGraphicEqualizerMode(handle, &getMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetGraphicEqualizerMode() failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned mode: %d", getMode); + UT_ASSERT_EQUAL(mode, getMode); + } /* for (mode) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to enable, disable and retrieve the LE configuration for the audio sink +* +* In this test, the dsAudioPortInit() function is invoked to initialize the audio port. +* Then, for each type of audio port and for each index up to 10, the dsGetAudioPort() +* function is invoked to get the audio port. If successful, the dsEnableLEConfig() +* function is invoked to enable the LE configuration. The dsGetLEConfig() function is +* then invoked to retrieve the LE configuration. If successful, the dsEnableLEConfig() +* function is invoked again to disable the LE configuration. The dsGetLEConfig() function +* is then invoked again to check if the LE configuration has been disabled. +* Finally, the dsAudioPortTerm() function is invoked to terminate the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 015@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableAndRetrieveLEConfig(void) +{ + gTestID = 15; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enable = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + //Note: dsMS12SUPPORT_LEConfig is not defined yet in interface file + if(!(gDSAudioPortConfiguration[port].ms12_capabilites & 0x400)) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=true", handle); + ret = dsEnableLEConfig(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || !enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,true); + + UT_LOG_DEBUG("Invoking dsEnableLEConfig() with handle=%p and enable=false", handle); + ret = dsEnableLEConfig(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsEnableLEConfig() failed with error: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetLEConfig() with handle=%p", handle); + ret = dsGetLEConfig(handle, &enable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE || enable) { + UT_LOG_ERROR("dsGetLEConfig() failed with error: %d", ret); + } + UT_ASSERT_EQUAL(enable,false); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to check MS12 decode support for dsAudio +* +* This test checks if the MS12 decode support is available for dsAudio. +* It initializes the audio port, gets the audio port for each type and index, +* checks if MS12 decode is available, and finally terminates the audio port. +* The test is designed to ensure the correct functioning of dsAudio's MS12 decode support. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 016@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS12DecodeSupport(void) +{ + gTestID = 16; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + bool hasMS12Decode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("dsGetAudioPort returned handle %p", handle); + + UT_LOG_DEBUG("Invoking dsIsAudioMS12Decode with handle %p", handle); + ret = dsIsAudioMS12Decode(handle, &hasMS12Decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMS12Decode returned %d", ret); + } + UT_LOG_DEBUG("dsIsAudioMS12Decode returned %d", hasMS12Decode); + + UT_ASSERT_EQUAL(hasMS12Decode, gDSAudioPortConfiguration[port].isms12decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the support for MS11 decoding in dsAudio +* +* This test initializes the audio port and checks if MS11 decoding is supported +* for each audio port type. If the decoding is supported, it verifies the obtained +* values with the values retrieved from the 'Sink_AudioSettings.yaml' file. +* The test ends by terminating the audio port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 017@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_CheckMS11DecodeSupport(void) +{ + gTestID = 17; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool HasMS11Decode = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); -#include -#include + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsIsAudioMSDecode with handle: %p", handle); + ret = dsIsAudioMSDecode(handle, &HasMS11Decode); + UT_LOG_DEBUG("Return status: %d, HasMS11Decode: %d, SupportedMS11: %d", + ret, HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(HasMS11Decode, gDSAudioPortConfiguration[port].isms11decode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the MS12 Audio Profiles for a given sink +* +* This test case verifies the MS12 Audio Profiles for a given sink. +* It checks if the correct audio profiles are returned for a valid sink. +* This is important to ensure that the audio profiles are correctly configured and retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 018@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyMS12AudioProfiles_sink(void) +{ + gTestID = 18; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList with valid handle"); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_LOG_DEBUG("Return status: %d, Profiles: %s, Profile Count: %d", ret, profiles.audioProfileList, profiles.audioProfileCount); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(profiles.audioProfileCount, gDSAudioPortConfiguration[port].ms12_audioprofilecount); + + for (int i = 0; i < profiles.audioProfileCount; i++) { + if(strstr(profiles.audioProfileList, gDSAudioPortConfiguration[port].ms12_audio_profiles[i]) == NULL) { + UT_FAIL("Audioprofile mismatch"); + UT_LOG_ERROR("%s is not in %s", gDSAudioPortConfiguration[port].ms12_audio_profiles[i], profiles.audioProfileList); + } + } /* for (i) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of MS12 Audio Profile for different audio ports. +* +* In this test, the dsAudioPortInit() function is first invoked to +* initialize the audio port. Then, for each type of audio port, +* the dsGetAudioPort() function is invoked to get the handle of the audio port. +* The dsGetMS12AudioProfileList() function is then invoked to get the list of MS12 audio profiles. +* For each profile in the list, the dsSetMS12AudioProfile() function is invoked to set +* the profile, and the dsGetMS12AudioProfile() function is invoked to get the profile. +* The set and get profiles are then compared for equality. Finally, the dsAudioPortTerm() +* function is invoked to terminate the audio port. The test ensures that all these functions +* work as expected for different types of audio ports and profiles. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 019@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetMS12AudioProfile_sink(void) +{ + gTestID = 19; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsMS12AudioProfileList_t profiles; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].ms12_audioprofilecount <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfileList() with handle=%p", handle); + ret = dsGetMS12AudioProfileList(handle, &profiles); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfileList() failed with status=%d", ret); + } + + char *profileName = strtok(profiles.audioProfileList, ","); + char profile[DS_AUDIO_MAX_MS12_PROFILE_LEN]; + while (profileName != NULL) { + UT_LOG_DEBUG("Invoking dsSetMS12AudioProfile() with handle=%p and profile=%s", handle, profileName); + ret = dsSetMS12AudioProfile(handle, profileName); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsSetMS12AudioProfile() failed with status=%d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetMS12AudioProfile() with handle=%p", handle); + ret = dsGetMS12AudioProfile(handle, profile); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetMS12AudioProfile() failed with status=%d", ret); + } + + UT_ASSERT_STRING_EQUAL(profile, profileName); + profileName = strtok(NULL, ","); + } /* while (profileName) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting the stereo mode of an audio sink +* +* This test checks if the stereo mode of an audio sink can be set and +* retrieved correctly. It does this by first initializing the audio port, +* then getting the audio port for each type and index. It then sets the +* stereo mode for the retrieved audio port and checks if the set mode +* can be retrieved correctly. If any of these operations fail, it logs +* an error and continues with the next iteration. Finally, it terminates +* the audio port and checks if the termination was successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 020@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoMode(void) +{ + gTestID = 20; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + dsAudioStereoMode_t getmode ,mode; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + if(gDSAudioPortConfiguration[port].no_of_supported_stereo_mode <= 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + for (int j = 0; j < gDSAudioPortConfiguration[port].no_of_supported_stereo_mode; j++) { + mode = gDSAudioPortConfiguration[port].supported_stereo_mode[j]; + UT_LOG_DEBUG("Invoking dsSetStereoMode() with handle=%p and mode=%d", handle, mode); + ret = dsSetStereoMode(handle, mode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetStereoMode() with handle=%p", handle); + ret = dsGetStereoMode(handle, &getmode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Stereo mode: %d and return status: %d", getmode, ret); + UT_ASSERT_EQUAL(mode, getmode); + } /* for (j) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of Stereo Auto mode in dsAudio API +* +* This test function tests the setting and getting of Stereo Auto mode +* in dsAudio API. It first initializes the audio port, then for each +* audio port type, it gets the audio port, sets the Stereo Auto mode, +* gets the Stereo Auto mode and validates it. The test is designed +* to ensure that the dsAudio API's set and get functions for +* Stereo Auto mode are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 021@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetStereoAuto_sink(void) +{ + gTestID = 21; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int autoMode = 1; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(!gDSAudioPortConfiguration[port].stereo_auto_mode) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + UT_LOG_DEBUG("Handle: %p", handle); + + UT_LOG_DEBUG("Invoking dsSetStereoAuto with handle %p and autoMode %d", handle, autoMode); + ret = dsSetStereoAuto(handle, autoMode); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getAutoMode; + UT_LOG_DEBUG("Invoking dsGetStereoAuto with handle %p", handle); + ret = dsGetStereoAuto(handle, &getAutoMode); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetStereoAuto failed with error %d", ret); + } + UT_LOG_DEBUG("AutoMode: %d", getAutoMode); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getAutoMode, autoMode); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for setting and getting audio gain for different audio ports +* +* This test is designed to verify the functionality of setting and getting +* audio gain for different audio ports. It tests the dsSetAudioGain and +* dsGetAudioGain functions by setting a range of gain values and then +* getting the gain value to verify if the set value is correctly retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 022@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioGain_sink(void) +{ + gTestID = 22; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float gain, getGain; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (gain = -2080; gain <= 480; gain += 10) { + UT_LOG_DEBUG("Invoking dsSetAudioGain with handle=%p and gain=%f", handle, gain); + ret = dsSetAudioGain(handle, gain); + + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioGain with handle=%p", handle); + ret = dsGetAudioGain(handle, &getGain); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioGain failed with status=%d", ret); + } + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(gain, getGain); + } /* for (gain) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio level for a sink +* +* In this test, the audio level for a sink is set and then retrieved +* to verify if the set operation was successful. This is done for all +* audio port types and for all ports. The test is crucial to ensure +* the correct functioning of the audio level setting and getting operations. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 023@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioLevel_sink(void) +{ + gTestID = 23; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + float level, getLevel; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPEAKER) { + continue; + } + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + for (level = 0; level <= 100; level+=10) { + UT_LOG_DEBUG("Invoking dsSetAudioLevel with handle=%p and level=%f", handle, level); + ret = dsSetAudioLevel(handle, level); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioLevel with handle=%p", handle); + ret = dsGetAudioLevel(handle, &getLevel); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioLevel failed with error: %d", ret); + } + + UT_LOG_DEBUG("Returned level=%f and status=%d", getLevel, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(level, getLevel); + } /* for (level) */ + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the functionality of audio mute in dsAudio API +* +* This test case is designed to verify the audio mute functionality of +* the dsAudio API. It tests the ability of the API to mute and unmute the audio, +* and to correctly report the mute status. This is important to ensure that +* the API is correctly controlling the audio output and that it can +* accurately report the current mute status. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 024@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioMuteVerification(void) +{ + gTestID = 24; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mute = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: true", handle); + ret = dsSetAudioMute(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, true); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + + UT_LOG_DEBUG("Invoking dsSetAudioMute with handle: %p and mute: false", handle); + ret = dsSetAudioMute(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsIsAudioMute with handle: %p", handle); + ret = dsIsAudioMute(handle, &mute); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mute, false); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsIsAudioMute failed with error: %d", ret); + } + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to set and get the audio delay for a sink +* +* In this test, the audio delay for a sink is set and then retrieved +* to verify if the set value is correctly stored and retrieved. +* This is done for all audio port types. The test is crucial to ensure +* the correct functioning of audio delay setting and retrieval in the system. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 025@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetAudioDelay(void) +{ + gTestID = 25; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + uint32_t setDelay = 100; + uint32_t getDelay; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_SPDIF && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI_ARC && + gDSAudioPortConfiguration[port].typeid != dsAUDIOPORT_TYPE_HDMI) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsSetAudioDelay with handle and delay %d ms", setDelay); + ret = dsSetAudioDelay(handle, setDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioDelay with handle"); + ret = dsGetAudioDelay(handle, &getDelay); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioDelay failed with error %d", ret); + } + + UT_LOG_DEBUG("Retrieved audio delay: %d ms", getDelay); + UT_ASSERT_EQUAL(getDelay, setDelay); + } /* for (port) */ + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the Atmos capabilities of the sink +* +* In this test, the Atmos capabilities of the sink are verified by +* initializing the audio port, getting the audio port with type speaker and index 1, +* getting the sink device Atmos capability, and finally terminating the audio port. +* The test ensures that all these operations are successful and the returned values are as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 026@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_VerifyAtmosCapabilities_sink(void) +{ + gTestID = 26; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + dsATMOSCapability_t capability; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("dsAudioPortInit returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int port = 0; port < gDSAudioNumberOfPorts; port++) { + if(gDSAudioPortConfiguration[port].atmos_capabilites == 0) { + continue; + } + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[port].typeid, gDSAudioPortConfiguration[port].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { + UT_LOG_ERROR("dsGetAudioPort failed with error %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSinkDeviceAtmosCapability with handle=%p", handle); + ret = dsGetSinkDeviceAtmosCapability(handle, &capability); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsGetSinkDeviceAtmosCapability returned %d and capability=%d", ret, capability); + + UT_ASSERT_EQUAL(capability, gDSAudioPortConfiguration[port].atmos_capabilites); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("dsAudioPortTerm returned %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the functionality of the dsAudio_GetAudioCapabilities_sink API +* +* This test case is designed to validate the dsAudio_GetAudioCapabilities_sink API. +* The test case will initialize the audio port, get the audio port with type as +* sink and index as 0, get the audio capabilities with the handle obtained from +* the previous step, and finally terminate the audio port. The test case will +* assert the return status of each operation to ensure they are successful. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 027@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_GetAudioCapabilities(void) +{ + gTestID = 27; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + retStatus = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type as sink and index as 0"); + retStatus = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioCapabilities with handle obtained from previous step"); + retStatus = dsGetAudioCapabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", retStatus, capabilities); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_ASSERT_EQUAL(capabilities, gAudioCapabilities); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + retStatus = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the enabling, disabling and +* retrieval of audio mixing in the dsAudio API. +* +* This test function iterates over all audio ports, enabling and disabling +* audio mixing, and then retrieving the state to verify the operation was successful. +* It tests the robustness and correctness of the dsAudio API's audio mixing functionality. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 028@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_EnableDisableRetrieveAudioMixing(void) +{ + gTestID = 28; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool mixing = false; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with type: %d and index: %d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, true); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing with handle: %p and mixing: false", handle); + ret = dsSetAssociatedAudioMixing(handle, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAssociatedAudioMixing with handle: %p", handle); + ret = dsGetAssociatedAudioMixing(handle, &mixing); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(mixing, false); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test function is designed to test the audio port control sink in the L2 dsAudio module. +* +* This function tests the initialization, setting, and termination of +* the audio port in the L2 dsAudio module. It also tests the associated +* audio mixing and fader control functionalities. The test is performed +* for different types of audio ports and for different mixer balance values. +* The function asserts that all the invoked functions return no error and that +* the mixer balance value set is the same as the one retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 029@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_AudioPortControl(void) +{ + gTestID = 29; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int mixerbalance; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with type=%d and index=%d", gDSAudioPortConfiguration[0].typeid, + gDSAudioPortConfiguration[0].index); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetAssociatedAudioMixing() with handle=%p and mixing=true", handle); + ret = dsSetAssociatedAudioMixing(handle, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + for (mixerbalance = -32; mixerbalance <= 32; mixerbalance+=8) { + UT_LOG_DEBUG("Invoking dsSetFaderControl() with handle=%p and mixerbalance=%d", handle, mixerbalance); + ret = dsSetFaderControl(handle, mixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + int getMixerbalance; + UT_LOG_DEBUG("Invoking dsGetFaderControl() with handle=%p", handle); + ret = dsGetFaderControl(handle, &getMixerbalance); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getMixerbalance, mixerbalance); + } + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of primary language in dsAudio +* +* In this test, we initialize the audio port, set a primary language, +* get the primary language and validate if the set and get languages are same. +* This is to ensure the dsAudio's set and get primary language +* functionalities are working as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 030@n +* +* **Test Procedure:** +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsAudio_SetAndGetPrimaryLanguage(void) +{ + gTestID = 30; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit()"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort() with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetPrimaryLanguage() with handle and valid language code"); + ret = dsSetPrimaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetPrimaryLanguage() with handle"); + ret = dsGetPrimaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm()"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test for setting and getting the secondary language for the audio port * -* TODO: Add the description of what is tested and why in this test +* This function tests the setting and getting of the secondary language +* for the audio port. It first initializes the audio port, gets the audio port handle, +* sets the secondary language, gets the secondary language, and finally terminates +* the audio port. It uses Cunit assertions to check the return values of the API calls. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 031@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation +* [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ -void test_l2_dsAudio (void) + +void test_l2_dsAudio_SetAndGetSecondaryLanguage(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 31; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + const char* setLang = "eng"; + char getLang[4]; + + UT_LOG_DEBUG("Invoking dsAudioPortInit"); + ret = dsAudioPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetAudioPort with valid parameters"); + ret = dsGetAudioPort(gDSAudioPortConfiguration[0].typeid, gDSAudioPortConfiguration[0].index, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %p", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsSetSecondaryLanguage with handle and valid language code"); + ret = dsSetSecondaryLanguage(handle, setLang); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSecondaryLanguage with handle"); + ret = dsGetSecondaryLanguage(handle, getLang); + UT_LOG_DEBUG("Return status: %d, Language: %s", ret, getLang); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_STRING_EQUAL(getLang, setLang); + + UT_LOG_DEBUG("Invoking dsAudioPortTerm"); + ret = dsAudioPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsAudio_register ( void ) + +int test_l2_dsAudio_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsAudio]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + if(gSourceType == 1) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsAudio - Source]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else if(gSourceType == 0) { + // Create the test suite for sink type + pSuite = UT_add_suite("[L2 dsAudio - Sink]", NULL, NULL); + if (pSuite == NULL) { + UT_LOG_ERROR("Failed to create the test suite"); + return -1; + } + } + else { + UT_LOG_ERROR("Invalid platform type"); + return -1; + } - - UT_add_test( pSuite, "test_l2_dsAudio" ,test_l2_dsAudio ); + // List of test function names and strings + UT_add_test( pSuite, "L2_EnableDisableAndVerifyAudioPortStatus", test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus); + if(gSourceType == 0) { + UT_add_test( pSuite, "l2_dsAudio_CheckHeadphoneConnectionStatus_sink", test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink); + } + UT_add_test( pSuite, "L2_RetrieveAndVerifyMS12Capabilities", test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities); + UT_add_test( pSuite, "L2_SetAndGetAudioCompression", test_l2_dsAudio_SetAndGetAudioCompression); + UT_add_test( pSuite, "L2_SetAndGetDialogEnhancement", test_l2_dsAudio_SetAndGetDialogEnhancement); + UT_add_test( pSuite, "L2_SetAndGetDolbyVolumeMode", test_l2_dsAudio_SetAndGetDolbyVolumeMode); + UT_add_test( pSuite, "L2_SetAndGetIntelligentEqualizerMode", test_l2_dsAudio_SetAndGetIntelligentEqualizerMode); + UT_add_test( pSuite, "L2_SetAndGetVolumeLeveller", test_l2_dsAudio_SetAndGetVolumeLeveller); + UT_add_test( pSuite, "L2_SetAndGetBassEnhancer", test_l2_dsAudio_SetAndGetBassEnhancer); + UT_add_test( pSuite, "L2_EnableAndVerifySurroundDecoder", test_l2_dsAudio_EnableAndVerifySurroundDecoder); + UT_add_test( pSuite, "L2_SetAndGetDRCMode", test_l2_dsAudio_SetAndGetDRCMode); + UT_add_test( pSuite, "L2_SetAndGetSurroundVirtualizer", test_l2_dsAudio_SetAndGetSurroundVirtualizer); + UT_add_test( pSuite, "L2_SetAndGetMISteering", test_l2_dsAudio_SetAndGetMISteering); + UT_add_test( pSuite, "L2_SetAndGetGraphicEqualizerMode", test_l2_dsAudio_SetAndGetGraphicEqualizerMode); + UT_add_test( pSuite, "L2_EnableDisableAndRetrieveLEConfig", test_l2_dsAudio_EnableDisableAndRetrieveLEConfig); + UT_add_test( pSuite, "L2_CheckMS12DecodeSupport", test_l2_dsAudio_CheckMS12DecodeSupport); + UT_add_test( pSuite, "L2_CheckMS11DecodeSupport", test_l2_dsAudio_CheckMS11DecodeSupport); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyMS12AudioProfiles_sink", test_l2_dsAudio_VerifyMS12AudioProfiles_sink); + UT_add_test( pSuite, "L2_SetAndGetMS12AudioProfile_sink", test_l2_dsAudio_SetAndGetMS12AudioProfile_sink); + } - return 0; -} + UT_add_test( pSuite, "L2_SetAndGetStereoMode", test_l2_dsAudio_SetAndGetStereoMode); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_SetAndGetStereoAuto_sink", test_l2_dsAudio_SetAndGetStereoAuto_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioGain_sink", test_l2_dsAudio_SetAndGetAudioGain_sink); + UT_add_test( pSuite, "L2_SetAndGetAudioLevel_sink", test_l2_dsAudio_SetAndGetAudioLevel_sink); + } + UT_add_test( pSuite, "L2_AudioMuteVerification", test_l2_dsAudio_AudioMuteVerification); + UT_add_test( pSuite, "L2_SetAndGetAudioDelay", test_l2_dsAudio_SetAndGetAudioDelay); + if(gSourceType == 0) { + UT_add_test( pSuite, "L2_VerifyAtmosCapabilities_sink", test_l2_dsAudio_VerifyAtmosCapabilities_sink); + } + UT_add_test( pSuite, "L2_GetAudioCapabilities", test_l2_dsAudio_GetAudioCapabilities); + UT_add_test( pSuite, "L2_EnableDisableRetrieveAudioMixing", test_l2_dsAudio_EnableDisableRetrieveAudioMixing); + UT_add_test( pSuite, "L2_AudioPortControl", test_l2_dsAudio_AudioPortControl); + UT_add_test( pSuite, "L2_SetAndGetPrimaryLanguage", test_l2_dsAudio_SetAndGetPrimaryLanguage); + UT_add_test( pSuite, "L2_SetAndGetSecondaryLanguage", test_l2_dsAudio_SetAndGetSecondaryLanguage); + + return 0; +} /** @} */ // End of DS_Audio_HALTEST_L2 /** @} */ // End of DS_Audio_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index d9ad8a17..9318b4af 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests + * @defgroup DS_CompositeIn_HALTEST Device Settings Composite Input HAL Tests * @{ */ @@ -58,62 +57,237 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-composite-in_halSpec.md](../../docs/pages/ds-composite-in_halSpec.md) * * @endparblock */ + /** * @file test_l2_dsCompositeIn.c * */ -#include -#include - #include #include +#include +#include "dsCompositeIn.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of COMPOSITE Input ports +* +* This test function initializes the COMPOSITE Input module, +* gets the number of COMPOSITE Input ports, compares the returned value with the value +* from the YAML file, and then terminates the COMPOSITE Input module. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + uint8_t numInputs = 0; // Initialize to 0. + + // Call the pre-requisite API dsCompositeInInit to initialize the COMPOSITE Input module. + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Call the API dsCompositeInGetNumberOfInputs and pass a pointer to a uint8_t variable to store the number of COMPOSITE Input ports. + ret = dsCompositeInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Invoking dsCompositeInGetNumberOfInputs with valid buffer\n"); + + // Check the return status of dsCompositeInGetNumberOfInputs. It should return dsERR_NONE for success. Any other return value indicates an error. + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get number of COMPOSITE Input ports with error: %d\n", ret); + } + + //composite Input number of inputs + UT_LOG_INFO("Composite Number of Inputs: %d\n", numInputs); + + // Compare the value returned by dsCompositeInGetNumberOfInputs with the value retrieved from the YAML file. They should match. + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numInputs, "dsCompositeIn/composite_input_configurations/number_of_ports"); + + // Call the post-requisite API dsCompositeInTerm to terminate the COMPOSITE Input module. + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm\n"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the status of the Composite Input +* +* This test function initializes the Composite Input, gets its status, +* checks if it is in disable status and then terminates the Composite Input. +* The purpose of this test is to ensure that the Composite Input is functioning as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsCompositeIn_VerifyCompositeInputStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0 + uint8_t numberOfInputs = 0; // Initialize to 0. + + + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + ret = dsCompositeInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInGetStatus()"); + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsCompositeInGetStatus failed with error: %d\n", ret); + } + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + UT_LOG_INFO("IsPortConnected: %d\n", status.isPortConnected[port]); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + UT_LOG_INFO("IsPresented: %d, activePort: %d\n", + status.isPresented, + status.activePort); + + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsCOMPOSITE_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + ret = dsCompositeInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test to verify the selection and status of Composite In Port * -* TODO: Add the description of what is tested and why in this test +* This test verifies the functionality of Composite In Port selection and its status. +* It checks if the port is initialized, selected, and terminated correctly. +* It also checks the status of the port after selection. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ -void test_l2_dsCompositeIn (void) + +void test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + dsCompositeInStatus_t status = { 0 }; // Initialize all fields to 0. + uint8_t numberOfInputs = 0; // Initialize to 0. + + ret = dsCompositeInInit(); + UT_LOG_DEBUG("Invoking dsCompositeInInit()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsCompositeInGetNumberOfInputs(&numberOfInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of composite inputs\n"); + dsCompositeInTerm(); + return; + } + + for (dsCompositeInPort_t port = dsCOMPOSITE_IN_PORT_0; port < numberOfInputs; port++) + { + ret = dsCompositeInSelectPort(port); + UT_LOG_DEBUG("Invoking dsCompositeInSelectPort()"); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to select COMPOSITE Input port %d\n", port); + continue; + } + + ret = dsCompositeInGetStatus(&status); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get status of COMPOSITE Input ports\n"); + } + + UT_LOG_INFO("IsPresented: %d, IsPortConnected[0]: %d, activePort: %d\n", + status.isPresented, + status.isPortConnected[port], + status.activePort); + + UT_ASSERT_EQUAL(status.activePort, port); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.isPortConnected[port], false); + } + + ret = dsCompositeInTerm(); + UT_LOG_DEBUG("Invoking dsCompositeInTerm()"); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsCompositeIn_register ( void ) + +int test_l2_dsCompositeIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsCompositeIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + // Create the test suite + pSuite = UT_add_suite("[L2 dsCompositeIn sink devices]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + // List of test function names and strings - - UT_add_test( pSuite, "test_l2_dsCompositeIn" ,test_l2_dsCompositeIn ); + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsCompositeIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_VerifyCompositeInputStatus", test_l2_dsCompositeIn_VerifyCompositeInputStatus); + UT_add_test( pSuite, "L2_VerifyCompositeInPortSelectionAndStatus", test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus); - return 0; -} + return 0; +} /** @} */ // End of DS_CompositeIn_HALTEST_L2 /** @} */ // End of DS_CompositeIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index 14733d1d..3363bc3b 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License atS +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_Display_HALTEST Device Settings Display HAL Tests + * @defgroup DS_Display_HALTEST Device Settings Display HAL Tests * @{ */ @@ -58,7 +57,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-display_halSpec.md](../../docs/pages/ds-display_halSpec.md) * * @endparblock */ @@ -69,53 +68,207 @@ * */ -#include -#include - #include #include +#include +#include "dsDisplay.h" +#include "test_parse_configuration.h" +static int gTestGroup = 2; +static int gTestID = 1; /** -* @brief TODO: Describe the object of the test +* @brief This test aims to retrieve and validate the EDID of a sink in the L2 dsDisplay module * -* TODO: Add the description of what is tested and why in this test +* This test function tests the retrieval and validation of the Extended Display Identification Data (EDID) of a sink in the L2 dsDisplay module. It ensures that the functions dsDisplayInit, dsGetDisplay, dsGetEDID, dsGetEDIDBytes, and dsDisplayTerm are working as expected. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) */ -void test_l2_dsDisplay (void) + +void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; // Initialize handle to 0. + dsDisplayEDID_t edid = { 0 }; // Initialize all edid fields to 0. + unsigned char edidBytes[MAX_EDID_BYTES_LEN] = { 0 }; // Initialize the edidbytes to 0. + int length = 0; // Initialize the length to 0. + unsigned char edid_profile; + char key_string[TEST_DS_KEY_SIZE]; + + // Step 1: Call dsDisplayInit + ret = dsDisplayInit(); + UT_LOG_INFO("Invoked dsDisplayInit(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay + ret = dsGetDisplay(dsVIDEOPORT_TYPE_INTERNAL, 0, &handle); + UT_LOG_INFO("Invoked dsGetDisplay() with dsVIDEOPORT_TYPE_INTERNAL and index 0, returned: %d, handle: %ld\n", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDID fails + dsDisplayTerm(); + return; + } + + // Step 3: Call dsGetEDID + ret = dsGetEDID(handle, &edid); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDID() with handle %ld, returned: %d, productCode: %d\n", handle, ret, edid.productCode); + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(edid.productCode, "dsDisplay/EDID_Data/productCode"); + + // Step 4: Call dsGetEDIDBytes + ret = dsGetEDIDBytes(handle, edidBytes, &length); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_INFO("Invoked dsGetEDIDBytes() with handle %ld, returned: %d, Manufacturer ID: %d\n", handle, ret, edidBytes[8] << 8 | edidBytes[9]); + if (ret != dsERR_NONE) + { + // Call dsDisplayTerm if dsGetEDIDBytes fails + dsDisplayTerm(); + return; + } + + // Manufacturer ID + for( uint8_t i = 8; i < 9; i++) + { + snprintf(key_string, MAX_EDID_BYTES_LEN, "dsDisplay.edidBytes.%d", i); + edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); + if(edid_profile != edidBytes[i]) + { + UT_FAIL("edid check failed"); + UT_LOG_ERROR("edid byte: %x, expected value: %x", edidBytes[i], edid_profile); + break; + } + } + + // Step 5: Call dsDisplayTerm + ret = dsDisplayTerm(); + UT_LOG_INFO("Invoked dsDisplayTerm(), returned: %d\n", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } -static UT_test_suite_t * pSuite = NULL; +/** +* @brief This test aims to verify the default aspect ratio of the source in the L2 dsDisplay module +* +* In this test, the dsDisplayInit(), dsGetDisplay(), dsGetDisplayAspectRatio(), and dsDisplayTerm() functions are called in sequence to check the default aspect ratio of the source. The test verifies that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9. If any of the function calls fail or the aspect ratio is not as expected, the test fails. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [dsDisplay_L2_Low-Level_TestSpecification.md](../docs/pages/ds-display-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsDisplay_TestDefaultAspectRatio_source(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize the return status to dsERR_NONE. + intptr_t handle = 0; //Initialize handle to 0. + dsVideoAspectRatio_t aspectRatio = dsVIDEO_ASPECT_RATIO_MAX; // Initialize aspect ratio with MAX value. + + // Step 1: Call dsDisplayInit() + UT_LOG_DEBUG("Invoking dsDisplayInit()"); + ret = dsDisplayInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + // Step 2: Call dsGetDisplay() + UT_LOG_DEBUG("Invoking dsGetDisplay() with dsVIDEOPORT_TYPE_HDMI and index 0"); + ret = dsGetDisplay(dsVIDEOPORT_TYPE_HDMI, 0, &handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetDisplay() failed with error: %d\n", ret); + dsDisplayTerm(); + return; + } + // Step 3: Call dsGetDisplayAspectRatio() + UT_LOG_DEBUG("Invoking dsGetDisplayAspectRatio() with handle obtained from dsGetDisplay()"); + ret = dsGetDisplayAspectRatio(handle, &aspectRatio); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + if (ret != dsERR_NONE || aspectRatio != dsVIDEO_ASPECT_RATIO_16x9) + { + UT_LOG_ERROR("dsGetDisplayAspectRatio() failed with error: %d\n", ret); + } + + // Step 4: Verify aspect ratio + UT_LOG_DEBUG("Verifying that the aspect ratio is dsVIDEO_ASPECT_RATIO_16x9"); + UT_ASSERT_EQUAL(aspectRatio, dsVIDEO_ASPECT_RATIO_16x9); + + // Step 5: Call dsDisplayTerm() + UT_LOG_DEBUG("Invoking dsDisplayTerm()"); + ret = dsDisplayTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsDisplay_register ( void ) + +int test_l2_dsDisplay_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsDisplay]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + int32_t source_type = 0; + ut_kvp_status_t status; - - UT_add_test( pSuite, "test_l2_dsDisplay" ,test_l2_dsDisplay ); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); - return 0; -} + // Create the test suite + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + pSuite = UT_add_suite("[L2 dsDisplay Source ]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + // List of test function names and strings + if(source_type == 0) { + UT_add_test( pSuite, "L2_RetrieveAndValidateEDID_sink", test_l2_dsDisplay_RetrieveAndValidateEDID_sink); + } + else if ( source_type == 1 ){ + UT_add_test( pSuite, "L2_TestDefaultAspectRatio_source", test_l2_dsDisplay_TestDefaultAspectRatio_source); + } + return 0; +} /** @} */ // End of DS_Display_HALTEST_L2 /** @} */ // End of DS_Display_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index 79072ee0..2bb456d9 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -88,7 +88,7 @@ */ void test_l2_dsFPD (void) { - UT_FAIL("This function needs to be implemented!"); + UT_FAIL("This function needs to be implemented!"); } static UT_test_suite_t * pSuite = NULL; @@ -117,4 +117,4 @@ int test_l2_dsFPD_register ( void ) /** @} */ // End of DS_FPD_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 3a6b6aa3..1215753f 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -42,7 +41,7 @@ */ /** - * @addtogroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests + * @defgroup DS_HDMIIn_HALTEST Device Settings HDMI Input HAL Tests * @{ */ @@ -58,7 +57,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-hdmi-in_halSpec.md](../../docs/pages/ds-hdmi-in_halSpec.md) * @endparblock */ @@ -68,52 +67,521 @@ * */ -#include -#include - #include #include +#include +#include "dsHdmiIn.h" +#include "test_parse_configuration.h" + +#define DS_HDMIIN_KEY_SIZE 64 + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for getting the number of HDMI inputs from the source +* +* This test checks if the function dsHdmiInGetNumberOfInputs correctly retrieves the number of HDMI inputs from the source. +* It first initializes the HDMI input, then retrieves the number of inputs, and finally terminates the HDMI input. +* The test asserts that all these operations return no errors and that the retrieved number of inputs matches the expected value. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetNumberOfInputs(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; //Initialize to dsERR_NONE. + uint8_t numberOfInputs = 0; //Initialize to 0. + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs with valid buffer"); + ret = dsHdmiInGetNumberOfInputs(&numberOfInputs); + UT_LOG_DEBUG("Number of Inputs: %d, Return status: %d", numberOfInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsHdmiInGetNumberOfInputs"); + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(numberOfInputs, "dsHdmiIn/numberOfPorts"); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test for getting the status of HDMI input source +* +* This test function initializes the HDMI input subsystem, gets the status of the HDMI input ports, verifies the returned status, +* and then terminates the HDMI input subsystem. It uses the Cunit assertion macros to check the return values of the API calls +* and the values of the returned status structure. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetStatus(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; // Initialize to dsERR_NONE + dsHdmiInStatus_t status = {0}; // Initialize all fields to 0 + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus() with valid status pointer"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("IsPortConnected: %d\n", status.isPortConnected[i]); + UT_ASSERT_EQUAL(status.isPortConnected[i], false); + } + + UT_LOG_DEBUG("isPresented: %d, activePort: %d", status.isPresented, status.activePort); + UT_ASSERT_EQUAL(status.isPresented, false); + UT_ASSERT_EQUAL(status.activePort, dsHDMI_IN_PORT_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI input port status for a given source +* +* This test function initializes the HDMI input, gets the number of inputs, selects each port, +* gets the status of each port, and finally terminates the HDMI input. The test is designed to +* ensure that the HDMI input port status is correctly reported for each source. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiInputPortStatus(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = 0; //Initialize to 0 + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInStatus_t status = {0}; //Initialize all fields to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit()"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsHdmiInGetNumberOfInputs()"); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + UT_LOG_DEBUG("Number of inputs: %d, Return status: %d", numInputs, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (uint8_t i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + UT_LOG_DEBUG("Invoking dsHdmiInSelectPort() with port number %d", i); + ret = dsHdmiInSelectPort(i, false, dsVideoPlane_PRIMARY, false); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + continue; + } + + UT_LOG_DEBUG("Invoking dsHdmiInGetStatus()"); + ret = dsHdmiInGetStatus(&status); + UT_LOG_DEBUG("Active port: %d, Is presented: %d, Is port connected: %d, Return status: %d", status.activePort, status.isPresented, status.isPortConnected[i], ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(status.activePort, i); + UT_ASSERT_FALSE(status.isPortConnected[i]); + UT_ASSERT_FALSE(status.isPresented); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm()"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test verifies the HDMI ARC Port sink functionality +* +* This test initializes the HDMI input, checks if the HDMI ARC Port is available and validates +* the number of ports and their status. It then terminates the HDMI input. The test is designed +* to ensure the proper functioning of HDMI ARC Port sink. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_VerifyHdmiArcPort_sink(void) +{ + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus = dsERR_NONE; //Initialize to dsERR_NONE + bool isArcPort = false; //Initialize to 0 + dsHdmiInPort_t iPort = dsHDMI_IN_PORT_NONE; //Initialize to default dsHDMI_IN_PORT_NONE + uint8_t numInputs = 0; // Initialize to 0 + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + retStatus = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + retStatus = dsHdmiInGetNumberOfInputs(&numInputs); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for(iPort = dsHDMI_IN_PORT_0; iPort < numInputs; iPort++) + { + UT_LOG_DEBUG("Invoking dsIsHdmiARCPort with iPort: %d", iPort); + retStatus = dsIsHdmiARCPort(iPort, &isArcPort); + UT_LOG_DEBUG("Return status: %d, isArcPort: %d", retStatus, isArcPort); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if(isArcPort == false) + { + continue; + } + + UT_ASSERT_KVP_EQUAL_PROFILE_UINT8(iPort, "dsHdmiIn/HdmiArcPortID"); + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + retStatus = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to set and get EDID version and validate EDID length for HDMI input +* +* This test sets the EDID version for HDMI input ports and then gets the EDID version to validate it. +* It also retrieves the EDID bytes info to validate the length. This is done to ensure the correct +* functioning of HDMI input related APIs. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + uint8_t numInputs = 0; // Initialize to 0 + dsHdmiInPort_t hdmiPort[] = {dsHDMI_IN_PORT_0, dsHDMI_IN_PORT_1, dsHDMI_IN_PORT_2}; + tv_hdmi_edid_version_t edidVersion[] = {HDMI_EDID_VER_14, HDMI_EDID_VER_20}; + tv_hdmi_edid_version_t getEdidVersion = HDMI_EDID_VER_MAX; + unsigned char edid[256] = { 0 }; + char keyString[DS_HDMIIN_KEY_SIZE] = {0}; + int length = 0; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + for (int i = dsHDMI_IN_PORT_0; i < numInputs; i++) + { + tv_hdmi_edid_version_t supportedEdidVersion; + + snprintf(keyString, DS_HDMIIN_KEY_SIZE, "dsHdmiIn/EdidVersion/%d", i); + + supportedEdidVersion = UT_KVP_PROFILE_GET_UINT8(keyString); + + for (int j = HDMI_EDID_VER_14; j < supportedEdidVersion; j++) + { + UT_LOG_DEBUG("Invoking dsSetEdidVersion with hdmiPort=%d, edidVersion=%d\n", hdmiPort[i], edidVersion[j]); + ret = dsSetEdidVersion(hdmiPort[i], edidVersion[j]); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to set EDID version\n"); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetEdidVersion with hdmiPort=%d\n", hdmiPort[i]); + ret = dsGetEdidVersion(hdmiPort[i], &getEdidVersion); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get EDID version\n"); + } + UT_ASSERT_EQUAL(getEdidVersion, edidVersion[j]); + } + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the supported game features list for HDMI input +* +* In this test, the dsHdmiInInit function is invoked to initialize the HDMI input. +* Then, the dsGetSupportedGameFeaturesList function is called to get the list of +* supported game features. The results are then compared with the expected values +* from the Sink_HDMIIN.yaml profile. Finally, the dsHdmiInTerm function is invoked +* to terminate the HDMI input. The test ensures that all these operations are successful +* and the supported game features list is as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 006@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink(void) +{ + gTestID = 6; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + dsSupportedGameFeatureList_t features = {0}; + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_DEBUG("Invoking dsGetSupportedGameFeaturesList with valid buffer"); + ret = dsGetSupportedGameFeaturesList(&features); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsGetSupportedGameFeaturesList"); + } + + UT_LOG_DEBUG("Game feature count: %d",features.gameFeatureCount); + UT_ASSERT_KVP_EQUAL_PROFILE_UINT32(features.gameFeatureCount, "dsHdmiIn/gameFeatures/count"); + + for ( uint8_t i = 0; i < features.gameFeatureCount; i++ ){ + UT_LOG_DEBUG("Game feature list: %s",features.gameFeatureList); + UT_ASSERT_KVP_EQUAL_PROFILE_STRING(features.gameFeatureList,"dsHdmiIn/gameFeatures/feature") + } + + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief This test aims to verify the functionality of setting and getting the ALLM support for HDMI input. * -* TODO: Add the description of what is tested and why in this test +* In this test, the dsHdmiInInit function is first invoked to initialize the HDMI input. +* Then, the dsSetEdid2AllmSupport function is called to set the ALLM support for HDMI input to true. +* The dsGetEdid2AllmSupport function is then called to get the current ALLM support status, +* which should be true. The same process is repeated with the ALLM support set to false. +* Finally, the dsHdmiInTerm function is invoked to terminate the HDMI input. +* The test ensures that all these operations return no error. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 07@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to UT specification documentation [ds-hdmi-in-L2-Low-Level_TestSpec.md](../docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md) */ -void test_l2_dsHdmiIn (void) + +void test_l2_dsHdmiIn_SetAndGetAllmSupport_sink(void) { - UT_FAIL("This function needs to be implemented!"); + dsError_t ret = dsERR_NONE; + bool allmSupport = false; + dsHdmiInPort_t iHdmiPort = dsHDMI_IN_PORT_0; + uint8_t numInputs = 0; // Initialize to 0 + dsSupportedGameFeatureList_t features = {0}; + + gTestID = 7; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + UT_LOG_DEBUG("Invoking dsHdmiInInit"); + ret = dsHdmiInInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + ret = dsHdmiInGetNumberOfInputs(&numInputs); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Failed to get the number of hdmi inputs\n"); + } + + UT_ASSERT_TRUE(numInputs >= 0 && numInputs <= UT_KVP_PROFILE_GET_UINT8("dsHdmiIn/numberOfPorts")); + + ret = dsGetSupportedGameFeaturesList(&features); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + if ( strstr(features.gameFeatureList, "allm" ) ){ + + for ( iHdmiPort = dsHDMI_IN_PORT_0; iHdmiPort < numInputs; iHdmiPort++ ){ + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to true", iHdmiPort); + + ret = dsSetEdid2AllmSupport(iHdmiPort, true); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, true); + + UT_LOG_DEBUG("Invoking dsSetEdid2AllmSupport with iHdmiPort set to %d and allmSupport set to false", iHdmiPort); + ret = dsSetEdid2AllmSupport(iHdmiPort, false); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("Invoking dsHdmiInTerm due to failure of dsSetEdid2AllmSupport"); + } + + UT_LOG_DEBUG("Invoking dsGetEdid2AllmSupport with iHdmiPort set to %d", iHdmiPort); + ret = dsGetEdid2AllmSupport(iHdmiPort, &allmSupport); + UT_LOG_DEBUG("allmSupport: %d and return status: %d", allmSupport, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(allmSupport, false); + } + } + UT_LOG_DEBUG("Invoking dsHdmiInTerm"); + ret = dsHdmiInTerm(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); } static UT_test_suite_t * pSuite = NULL; /** - * @brief Register the main test(s) for this module + * @brief Register the main tests for this module * * @return int - 0 on success, otherwise failure */ -int test_l2_dsHdmiIn_register ( void ) + +int test_l2_dsHdmiIn_register(void) { - /* add a suite to the registry */ - pSuite = UT_add_suite( "[L2 dsHdmiIn]", NULL, NULL ); - if ( NULL == pSuite ) - { - return -1; - } + ut_kvp_status_t status; + int32_t source_type = 0; - - UT_add_test( pSuite, "test_l2_dsHdmiIn" ,test_l2_dsHdmiIn ); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); - return 0; -} + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Source]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + // Create the test suite for sink type + // Create the test suite for source type + pSuite = UT_add_suite("[L2 dsHdmiIn - Sink]", NULL, NULL); + if (pSuite == NULL) + { + return -1; + } + source_type = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + // List of test function names and strings + UT_add_test( pSuite, "L2_GetNumberOfInputs", test_l2_dsHdmiIn_GetNumberOfInputs); + UT_add_test( pSuite, "L2_GetStatus", test_l2_dsHdmiIn_GetStatus); + UT_add_test( pSuite, "L2_VerifyHdmiInputPortStatus", test_l2_dsHdmiIn_VerifyHdmiInputPortStatus); + + if ( source_type == 0 ){ + UT_add_test( pSuite, "L2_VerifyHdmiArcPort_sink", test_l2_dsHdmiIn_VerifyHdmiArcPort_sink); + UT_add_test( pSuite, "L2_SetAndGetEdidVersionAndValidateEdidLength_sink", test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink); + UT_add_test( pSuite, "L2_GetSupportedGameFeaturesList_sink", test_l2_dsHdmiIn_GetSupportedGameFeaturesList_sink); + UT_add_test( pSuite, "L2_SetAndGetAllmSupport_sink", test_l2_dsHdmiIn_SetAndGetAllmSupport_sink); + } + + return 0; +} /** @} */ // End of DS_HDMIIn_HALTEST_L2 /** @} */ // End of DS_HDMIIn_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsHost.c b/src/test_l2_dsHost.c index d3fc6f35..0ecf3cca 100644 --- a/src/test_l2_dsHost.c +++ b/src/test_l2_dsHost.c @@ -88,7 +88,7 @@ void test_l2_dsHost (void) { //This function needs to be implemented! - UT_FAIL(""); + UT_FAIL(); } static UT_test_suite_t * pSuite = NULL; @@ -117,4 +117,4 @@ int test_l2_dsHost_register ( void ) /** @} */ // End of DS_Host_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_l2_dsVideoDevice.c b/src/test_l2_dsVideoDevice.c index 86a94228..72bfc96b 100644 --- a/src/test_l2_dsVideoDevice.c +++ b/src/test_l2_dsVideoDevice.c @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE * file the following copyright and licenses apply: * -* Copyright 2022 RDK Management +* Copyright 2024 RDK Management * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ */ /** - * @defgroup DS_VideoDevice_HALTEST_L2 Device Settings Video Device HAL Tests L2 File + * @defgroup DS_VideoDevice_HALTEST_L2 Device Settings Video Device HAL Tests L1 File * @{ * @parblock * @@ -58,7 +58,7 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Refer to API Definition specification documentation : [ds-video-device_halSpec.md](../../docs/pages/ds-video-device_halSpec.md) * * @endparblock */ @@ -68,52 +68,384 @@ * */ -#include #include - #include #include +#include +#include + +#include "test_parse_configuration.h" +#include "dsVideoDevice.h" + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief Test for setting and getting DFC source in dsVideoDevice +* +* This test case is designed to verify the functionality of setting and getting DFC source in dsVideoDevice. +* The test involves initializing the video device, getting the video device, setting the DFC, +* getting the DFC and terminating the video device. The test asserts that the DFC set is the same as the DFC get. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsVideoDevice_SetAndGetDFC_source(void) +{ + dsError_t retStatus; + intptr_t handle; + dsVideoZoom_t dfc_get; + + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + retStatus = dsVideoDeviceInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index: %d", i); + retStatus = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %ld", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with status: %d", retStatus); + continue; + } + for (int j = 0;j < gDSVideoDeviceConfiguration[j].NoOfSupportedDFCs; j++) + { + UT_LOG_DEBUG("Invoking dsSetDFC with handle: %ld, dfc: %d", handle, gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); + retStatus = dsSetDFC(handle, gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + if (retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsSetDFC failed with status: %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetDFC with handle: %ld", handle); + retStatus = dsGetDFC(handle, &dfc_get); + UT_LOG_DEBUG("Return status: %d, dfc_get: %d", retStatus, dfc_get); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_ASSERT_EQUAL(gDSVideoDeviceConfiguration[i].SupportedDFCs[j], dfc_get); + } /* for(j)*/ + } /* for(i)*/ + + UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); + retStatus = dsVideoDeviceTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to verify the HDR capabilities of the video device +* +* In this test, the HDR capabilities of the video device are retrieved and checked +* against the expected capabilities. This is done to ensure that the video device +* is functioning as expected and can support the required HDR capabilities. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 002@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsVideoDevice_GetHDRCapabilities(void) +{ + gTestID = 2; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + int capabilities; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + ret = dsVideoDeviceInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index: %d", i); + ret = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %ld", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetHDRCapabilities with handle: %ld", handle); + ret = dsGetHDRCapabilities(handle, &capabilities); + UT_LOG_DEBUG("Return status: %d, Capabilities: %d", ret, capabilities); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + + UT_ASSERT_EQUAL(capabilities, gDSVideoDeviceConfiguration[i].HDRCapabilities); + } /* for(i)*/ + + UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); + ret = dsVideoDeviceTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test checks the functionality of getting supported video coding formats for a video device +* +* This test initializes the video device, gets the video device for each index, +* checks the supported video coding formats for each device and finally terminates +* the video device. The test ensures that all the API calls return the expected status +* and the supported video coding formats are as expected. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 003@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +*/ + +void test_l2_dsVideoDevice_GetSupportedVideoCodingFormats(void) +{ + gTestID = 3; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + unsigned int supported_formats; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit()"); + retStatus = dsVideoDeviceInit(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice() with index: %d", i); + retStatus = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("Return status: %d, Handle: %ld", retStatus, handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + UT_ASSERT_PTR_NOT_NULL(handle); + if(retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with error %d", retStatus); + continue; + } + + UT_LOG_DEBUG("Invoking dsGetSupportedVideoCodingFormats() with handle: %ld", handle); + retStatus = dsGetSupportedVideoCodingFormats(handle, &supported_formats); + UT_LOG_DEBUG("Return status: %d, Supported formats: %u", retStatus, supported_formats); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + + UT_ASSERT_EQUAL(supported_formats, gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); + } /* for(i)*/ + + UT_LOG_DEBUG("Invoking dsVideoDeviceTerm()"); + retStatus = dsVideoDeviceTerm(); + UT_LOG_DEBUG("Return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} /** -* @brief TODO: Describe the object of the test +* @brief Test for getting video codec information from a source * -* TODO: Add the description of what is tested and why in this test +* This test verifies if the dsGetVideoCodecInfo function can successfully +* retrieve video codec information from a source. It checks if the function +* returns the correct status and if the retrieved information matches the expected values. * -* **Test Group ID:** TODO: Add the group this test belongs to - Basic (for L1): 01 / Module (L2): 02 / Stress (L2): 03)@n -* **Test Case ID:** TODO: Add the ID of the test case so that it can be logically tracked in the logs@n +* **Test Group ID:** 02@n +* **Test Case ID:** 004@n * * **Test Procedure:** -* TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) */ -void test_l2_dsVideoDevice (void) + +void test_l2_dsVideoDevice_GetVideoCodecInfo_source(void) { - UT_FAIL("This function needs to be implemented!"); + gTestID = 4; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t retStatus; + intptr_t handle; + dsVideoCodecInfo_t info; + dsVideoCodingFormat_t codec = dsVIDEO_CODEC_MPEGHPART2; + int j = 1; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + retStatus = dsVideoDeviceInit(); + UT_LOG_DEBUG("dsVideoDeviceInit return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index: %d", i); + retStatus = dsGetVideoDevice(i, &handle); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + UT_LOG_DEBUG("dsGetVideoDevice return status: %d, handle: %ld", retStatus, handle); + if(retStatus != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with error %d", retStatus); + continue; + } + + for(codec = dsVIDEO_CODEC_MPEGHPART2 ; codec < dsVIDEO_CODEC_MAX; ) + { + if(!(gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats & codec)) + { + continue; + } + UT_LOG_DEBUG("Invoking dsGetVideoCodecInfo with handle: %ld, codec: %d", handle, codec); + retStatus = dsGetVideoCodecInfo(handle, codec, &info); + UT_ASSERT_EQUAL(retStatus, dsERR_NONE); + UT_LOG_DEBUG("dsGetVideoCodecInfo return status: %d, num_entries: %d", retStatus, info.num_entries); + + UT_ASSERT_EQUAL(info.num_entries, gDSVideoDeviceConfiguration[i].num_codec_entries); + /* for now hal get info supports only MPEGHPART2 */ + if(codec == dsVIDEO_CODEC_MPEGHPART2) + { + UT_LOG_DEBUG("Profile: %d", info.entries->profile); + UT_ASSERT_EQUAL(info.entries->profile,gDSVideoDeviceConfiguration[i].profile); + //TODO : kvp profile support for float type is not available now + //UT_ASSERT_EQUAL(info.entries->level,gDSVideoDeviceConfiguration[i].level); + } + codec = (0x01 << (j++)); + } /* for(codec)*/ + } /* for(i)*/ + UT_LOG_DEBUG("Invoking dsVideoDeviceTerm"); + retStatus = dsVideoDeviceTerm(); + UT_LOG_DEBUG("dsVideoDeviceTerm return status: %d", retStatus); + UT_ASSERT_EQUAL_FATAL(retStatus, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief Test to verify the setting and getting of display framerate for dsVideoDevice +* +* This test case is designed to validate the functionality of dsSetDisplayframerate and +* dsGetCurrentDisplayframerate APIs. The test involves setting a display framerate for +* a video device and then getting the current display framerate to verify if the set value +* is correctly retrieved. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 005@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-device_L2-Low-Level_TestSpec.md](../docs/pages/ds-video-device_L2-Low-Level_TestSpec.md) +*/ +void test_l2_dsVideoDevice_SetAndVerifyDisplayframerate_sink(void) +{ + gTestID = 5; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret; + intptr_t handle; + char getframerate[dsVIDEO_FRAMERATE_MAX] = {0}; + + UT_LOG_DEBUG("Invoking dsVideoDeviceInit"); + ret = dsVideoDeviceInit(); + UT_LOG_DEBUG("dsVideoDeviceInit return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) + { + UT_LOG_DEBUG("Invoking dsGetVideoDevice with index :%d",i); + ret = dsGetVideoDevice(i, &handle); + UT_LOG_DEBUG("dsGetVideoDevice return status: %d, handle: %ld", ret, handle); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if(ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoDevice failed with error %d", ret); + continue; + } + + for (int j=0;j #include -#include "test_utils.h" +#include "test_parse_configuration.h" +#include "test_dsVideoPort_parse_configuration.h" #include "dsVideoPort.h" static int gTestGroup = 2; @@ -84,13 +85,14 @@ static int gTestID = 1; /** * @brief This test aims to enable disabled video ports and verify their status * -* In this test, we initialize the video port, get the video port for each type, check if it's enabled. If not, we enable it and verify if it's enabled successfully. +* In this test, we initialize the video port, get the video port for supported type, check if it's enabled. +* If not, we enable it and verify if it's enabled successfully. * * **Test Group ID:** 02@n * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) @@ -98,9 +100,9 @@ void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) gTestID = 1; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; - bool enabled; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool enabled = false; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); ret = dsVideoPortInit(); @@ -145,15 +147,17 @@ void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) } /** -* @brief This test verifies the display and port status of the sink in the L2 dsVideoPort +* @brief This test verifies the display and port status of the L2 dsVideoPort * -* This test function initializes the video port, gets the video port for each type, checks if the display is connected and if the video port is active, and finally terminates the video port. The test is designed to ensure that the video port functionalities are working as expected. +* This test function initializes the video port, gets the video port for each type, +* checks if the display is connected and if the video port is active, and finally terminates the video port. +* The test is designed to ensure that the video port functionalities are working as expected. * * **Test Group ID:** 02@n * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) @@ -161,9 +165,10 @@ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) gTestID = 2; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; - bool connected, active; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool connected = false; + bool active = false; UT_LOG_DEBUG("Invoking dsVideoPortInit"); ret = dsVideoPortInit(); @@ -213,15 +218,18 @@ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) } /** -* @brief This test aims to retrieve and verify the surround mode capabilities of the video port sink +* @brief This test aims to retrieve and verify the surround mode capabilities of the video port * -* In this test, the dsVideoPortInit() function is invoked to initialize the video port. Then, the dsGetVideoPort() function is called with dsVIDEOPORT_TYPE_INTERNAL and index 0 to get the video port. The dsIsDisplaySurround() function is then invoked with the obtained handle to check if the display is in surround mode. The result is then compared with the expected value. Finally, the dsVideoPortTerm() function is invoked to terminate the video port. +* In this test, the dsVideoPortInit() function is invoked to initialize the video port. +* Then, the dsGetVideoPort() function is called with dsVIDEOPORT_TYPE_INTERNAL and index 0 to get the video port. +* The dsIsDisplaySurround() function is then invoked with the obtained handle to check if the display is in surround mode. +* The result is then compared with the expected value. Finally, the dsVideoPortTerm() function is invoked to terminate the video port. * * **Test Group ID:** 02@n * **Test Case ID:** 003@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) @@ -229,10 +237,10 @@ void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) gTestID = 3; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; - bool surround; - int surround_mode; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool surround = false; + int surround_mode = 0; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); ret = dsVideoPortInit(); @@ -279,15 +287,17 @@ void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) } /** -* @brief Test for setting and getting the resolution of a video source +* @brief Test for setting and getting the resolution of a video Port * -* This test checks if the dsSetResolution and dsGetResolution functions work as expected. It sets the resolution of a video source and then gets the resolution to verify if the set resolution is correctly applied. This is done for all possible combinations of pixel resolution, aspect ratio, stereoscopic mode, and frame rate. +* This test checks if the dsSetResolution and dsGetResolution functions work as expected. +* It sets the resolution of a video port and then gets the resolution to verify if the set resolution is correctly applied. +* This is done for all possible combinations of pixel resolution, aspect ratio, stereoscopic mode, and frame rate. * * **Test Group ID:** 02@n * **Test Case ID:** 004@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_SetAndGetResolution_source(void) @@ -295,8 +305,8 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) gTestID = 4; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsVideoPortResolution_t setResolution, getResolution; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -321,7 +331,7 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) { for (int l = dsVIDEO_FRAMERATE_UNKNOWN; l < dsVIDEO_FRAMERATE_MAX; l++) { - strcpy(setResolution.name, "TestResolution"); + strncpy(setResolution.name, "TestResolution",sizeof(setResolution.name)); setResolution.pixelResolution = i; setResolution.aspectRatio = j; setResolution.stereoScopicMode = k; @@ -374,13 +384,14 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) /** * @brief Test to verify the supported TV resolutions * -* This test verifies if the dsVideoPort API correctly identifies and returns the supported TV resolutions . The test is crucial to ensure the correct functioning of the video port in different resolution settings. +* This test verifies if the dsVideoPort API correctly identifies and returns the supported TV resolutions. +* The test is crucial to ensure the correct functioning of the video port in different resolution settings. * * **Test Group ID:** 02@n * **Test Case ID:** 005@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) @@ -388,8 +399,8 @@ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) gTestID = 5; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; int resolutions; UT_LOG_DEBUG("Invoking dsVideoPortInit"); @@ -430,13 +441,15 @@ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) /** * @brief Test for getting HDR capabilities * -* This test verifies if the dsGetTVHDRCapabilities() function can successfully get the HDR capabilities. The test first initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL and index 0, then gets the HDR capabilities. It asserts that all these operations return dsERR_NONE, and that the obtained capabilities match the expected value. +* This test verifies if the dsGetTVHDRCapabilities() function can successfully get the HDR capabilities. +* The test first initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL and index 0, +* then gets the HDR capabilities. It asserts that all these operations return dsERR_NONE, and that the obtained capabilities match the expected value. * * **Test Group ID:** 02@n * **Test Case ID:** 06@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetHDRCapabilities(void) @@ -444,8 +457,8 @@ void test_l2_dsVideoPort_GetHDRCapabilities(void) gTestID = 6; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; int capabilities; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -484,141 +497,17 @@ void test_l2_dsVideoPort_GetHDRCapabilities(void) UT_LOG_INFO("Out %s\n", __FUNCTION__); } -#if 0 - -/** -* @brief Test for setting and getting the ForceDisable4KSupport for a video port -* -* This test verifies the functionality of the dsSetForceDisable4KSupport() and dsGetForceDisable4KSupport() APIs. -* It checks if the APIs are able to correctly set and retrieve the ForceDisable4KSupport status for a video port. -* -* **Test Group ID:** 02@n -* **Test Case ID:** 012@n -* -* **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) -*/ - -void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_sink(void) -{ - gTestID = 12; - UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - - dsError_t ret; - intptr_t handle; - bool disable; - - UT_LOG_DEBUG("Invoking dsVideoPortInit()"); - ret = dsVideoPortInit(); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); - - for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) - { - UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); - ret = dsGetVideoPort(type, 0, &handle); - UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - if (ret != dsERR_NONE) - { - UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); - continue; - } - for (int i = 0; i < 2; i++) { - disable = (i == 0) ? true : false; - UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); - ret = dsSetForceDisable4KSupport(handle, disable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_LOG_DEBUG("Return status: %d", ret); - - bool getDisable; - UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); - ret = dsGetForceDisable4KSupport(handle, &getDisable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_ASSERT_EQUAL(getDisable, disable); - UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); - } - } - - UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); - ret = dsVideoPortTerm(); - UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - - UT_LOG_INFO("Out %s\n", __FUNCTION__); -} - -/** -* @brief This test aims to validate the setting and getting of ForceDisable4KSupport in dsVideoPort -* -* This test function tests the setting and getting of ForceDisable4KSupport in dsVideoPort. It first initializes the video port, then gets the video port with valid parameters. It then sets the ForceDisable4KSupport and gets the same to validate if the set value is correctly retrieved. The test is performed for both true and false values of ForceDisable4KSupport. Finally, it terminates the video port. The test is designed to ensure the correct functioning of the dsSetForceDisable4KSupport and dsGetForceDisable4KSupport functions. -* -* **Test Group ID:** 02@n -* **Test Case ID:** 013@n -* -* **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) -*/ - -void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_source(void) -{ - gTestID = 13; - UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - - dsError_t ret; - intptr_t handle; - bool disable; - - UT_LOG_DEBUG("Invoking dsVideoPortInit()"); - ret = dsVideoPortInit(); - UT_LOG_DEBUG("Return status: %d", ret); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - - for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) - { - UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); - ret = dsGetVideoPort(type, 0, &handle); - UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - if (ret != dsERR_NONE) - { - UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); - continue; - } - for (int i = 0; i < 2; i++) { - disable = (i == 0) ? true : false; - UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); - ret = dsSetForceDisable4KSupport(handle, disable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_LOG_DEBUG("Return status: %d", ret); - - bool getDisable; - UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); - ret = dsGetForceDisable4KSupport(handle, &getDisable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_ASSERT_EQUAL(getDisable, disable); - UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); - } - } - - UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); - ret = dsVideoPortTerm(); - UT_LOG_DEBUG("Return status: %d", ret); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - - UT_LOG_INFO("Out %s\n", __FUNCTION__); -} -#endif /** * @brief This test checks the HDCP status of the video port * -* This test initializes the video port, gets the video port handle for each type, checks the HDCP status and finally terminates the video port. The test is designed to verify if the HDCP status is authenticated for each video port type. +* This test initializes the video port, gets the video port handle for each type, checks the HDCP status and finally terminates the video port. +* The test is designed to verify if the HDCP status is authenticated for each video port type. * * **Test Group ID:** 02@n * **Test Case ID:** 007@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetHDCPStatus(void) @@ -626,8 +515,8 @@ void test_l2_dsVideoPort_GetHDCPStatus(void) gTestID = 7; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsHdcpStatus_t status; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -681,13 +570,14 @@ void test_l2_dsVideoPort_GetHDCPStatus(void) /** * @brief Test to verify the HDCP Protocol Status * -* This test case verifies the HDCP Protocol Status by invoking the dsVideoPortInit, dsGetVideoPort, dsGetHDCPProtocol and dsVideoPortTerm APIs. The HDCP protocol version obtained from the API is compared with the one retrieved from the yaml file. +* This test case verifies the HDCP Protocol Status by invoking the dsVideoPortInit, dsGetVideoPort, dsGetHDCPProtocol and dsVideoPortTerm APIs. +* The HDCP protocol version obtained from the API is compared with the one retrieved from the yaml file. * * **Test Group ID:** 02@n * **Test Case ID:** 008@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) @@ -695,8 +585,8 @@ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) gTestID = 8; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsHdcpProtocolVersion_t protocolVersion; UT_LOG_DEBUG("Invoking dsVideoPortInit"); @@ -732,13 +622,15 @@ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) /** * @brief This test aims to set and get the HDMI preference for a video port * -* In this test, the HDMI preference for each type of video port is set and then retrieved to verify if the set operation was successful. This is done for all types of HDCP protocol versions. The test is important to ensure the correct functioning of the HDMI preference setting and getting operations for different types of video ports and HDCP protocol versions. +* In this test, the HDMI preference for each type of video port is set and then retrieved to verify if the set operation was successful. +* This is done for all types of HDCP protocol versions. +* The test is important to ensure the correct functioning of the HDMI preference setting and getting operations for different types of video ports and HDCP protocol versions. * * **Test Group ID:** 02@n * **Test Case ID:** 009@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) @@ -746,9 +638,9 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) gTestID = 9; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; - dsHdcpProtocolVersion_t hdcpCurrentProtocol, hdcpCurrentProtocolGet; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + dsHdcpProtocolVersion_t protocolVersion,hdcpCurrentProtocolGet; UT_LOG_DEBUG("Invoking dsVideoPortInit"); ret = dsVideoPortInit(); @@ -765,14 +657,18 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) continue; } - for (hdcpCurrentProtocol = dsHDCP_VERSION_1X; hdcpCurrentProtocol < dsHDCP_VERSION_MAX; hdcpCurrentProtocol++) + UT_LOG_DEBUG("Invoking dsGetHDCPProtocol with handle: %ld", handle); + ret = dsGetHDCPProtocol(handle, &protocolVersion); + UT_LOG_DEBUG("Return status: %d, Protocol Version: %d", ret, protocolVersion); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(protocolVersion, gDSVideoPortConfiguration[port].hdcp_protocol_version); + if(protocolVersion == gDSVideoPortConfiguration[port].hdcp_protocol_version) { - UT_LOG_DEBUG("Invoking dsSetHdmiPreference with handle: %ld and hdcpCurrentProtocol: %d", handle, hdcpCurrentProtocol); - ret = dsSetHdmiPreference(handle, &hdcpCurrentProtocol); + UT_LOG_DEBUG("Invoking dsSetHdmiPreference with handle: %ld and hdcpCurrentProtocol: %d", handle, protocolVersion); + ret = dsSetHdmiPreference(handle, &protocolVersion); if (ret != dsERR_NONE) { UT_LOG_ERROR("dsSetHdmiPreference failed with error: %d", ret); - continue; } UT_LOG_DEBUG("Invoking dsGetHdmiPreference with handle: %ld", handle); @@ -780,11 +676,9 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) if (ret != dsERR_NONE) { UT_LOG_ERROR("dsGetHdmiPreference failed with error: %d", ret); - continue; } - - UT_LOG_DEBUG("HDCP protocol version set: %d, HDCP protocol version get: %d", hdcpCurrentProtocol, hdcpCurrentProtocolGet); - UT_ASSERT_EQUAL(hdcpCurrentProtocol, hdcpCurrentProtocolGet); + UT_LOG_DEBUG("HDCP protocol version set: %d, HDCP protocol version get: %d", protocolVersion, hdcpCurrentProtocolGet); + UT_ASSERT_EQUAL(protocolVersion, hdcpCurrentProtocolGet); } } @@ -799,13 +693,16 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) /** * @brief This test aims to verify the functionality of dsVideoPort_GetColorSpace * -* This test is designed to check the correct operation of the dsVideoPort_GetColorSpace function. It does this by initializing the video port, getting the video port with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0, then getting the color space with the handle obtained from the previous step. The test asserts that all these operations return dsERR_NONE, indicating successful operation. The color space obtained is then compared with the expected value. +* This test is designed to check the correct operation of the dsVideoPort_GetColorSpace function. +* It does this by initializing the video port, getting the video port with type as dsVIDEOPORT_TYPE_INTERNAL and index as 0, +* then getting the color space with the handle obtained from the previous step. The test asserts that all these operations return dsERR_NONE, +* indicating successful operation. The color space obtained is then compared with the expected value. * * **Test Group ID:** 02@n * **Test Case ID:** 010@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetColorSpace(void) @@ -813,8 +710,8 @@ void test_l2_dsVideoPort_GetColorSpace(void) gTestID = 10; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsDisplayColorSpace_t color_space; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -851,13 +748,15 @@ void test_l2_dsVideoPort_GetColorSpace(void) /** * @brief Test to check the color depth capabilities of the video port * -* This test checks the color depth capabilities of the video port by invoking the dsVideoPortInit, dsGetVideoPort, dsColorDepthCapabilities, and dsVideoPortTerm functions. The test verifies that all these functions return the expected status and that the color depth capability matches the expected value. +* This test checks the color depth capabilities of the video port by invoking the dsVideoPortInit, +* dsGetVideoPort, dsColorDepthCapabilities, and dsVideoPortTerm functions. +* The test verifies that all these functions return the expected status and that the color depth capability matches the expected value. * * **Test Group ID:** 02@n * **Test Case ID:** 011@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) @@ -865,8 +764,8 @@ void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) gTestID = 11; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; unsigned int colorDepthCapability; UT_LOG_DEBUG("Invoking dsVideoPortInit"); @@ -902,13 +801,15 @@ void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) /** * @brief This test aims to verify the functionality of the dsVideoPort_GetColorDepth * -* In this test, the dsVideoPort_GetColorDepth is tested to ensure it correctly retrieves the color depth of the video port. The test involves initializing the video port, getting the video port with type=dsVIDEOPORT_TYPE_INTERNAL and index=0, getting the color depth, and then terminating the video port. The test asserts that all these operations return dsERR_NONE, indicating successful execution. +* In this test, the dsVideoPort_GetColorDepth is tested to ensure it correctly retrieves the color depth of the video port. +* The test involves initializing the video port, getting the video port with type=dsVIDEOPORT_TYPE_INTERNAL and index=0, getting the color depth, +* and then terminating the video port. The test asserts that all these operations return dsERR_NONE, indicating successful execution. * * **Test Group ID:** 02@n * **Test Case ID:** 012@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetColorDepth(void) @@ -916,8 +817,8 @@ void test_l2_dsVideoPort_GetColorDepth(void) gTestID = 12; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; unsigned int color_depth; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -961,7 +862,7 @@ void test_l2_dsVideoPort_GetColorDepth(void) * **Test Case ID:** 013@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) { @@ -1022,13 +923,16 @@ void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) /** * @brief This test aims to verify the functionality of dsVideoPort_GetQuantizationRang * -* This test case is designed to test the dsVideoPort_GetQuantizationRange function. It checks if the function correctly initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL as type and 0 as index, gets the quantization range with the handle obtained from the previous step, and finally terminates the video port. The test asserts that all these operations return dsERR_NONE, indicating successful execution. +* This test case is designed to test the dsVideoPort_GetQuantizationRange function. +* It checks if the function correctly initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL as type and 0 as index, +* gets the quantization range with the handle obtained from the previous step, and finally terminates the video port. +* The test asserts that all these operations return dsERR_NONE, indicating successful execution. * * **Test Group ID:** 02@n * **Test Case ID:** 014@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetQuantizationRange(void) @@ -1036,8 +940,8 @@ void test_l2_dsVideoPort_GetQuantizationRange(void) gTestID = 14; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsDisplayQuantizationRange_t quantization_range; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -1079,13 +983,15 @@ void test_l2_dsVideoPort_GetQuantizationRange(void) /** * @brief Test to verify the functionality of dsVideoPort_GetMatrixCoefficients API * -* This test case verifies the functionality of dsVideoPort_GetMatrixCoefficients API. The test case initializes the video port, gets the video port handle, retrieves the matrix coefficients and verifies it with the expected value. The test case also ensures that the API returns the correct status codes at each step. +* This test case verifies the functionality of dsVideoPort_GetMatrixCoefficients API. +* The test case initializes the video port, gets the video port handle, retrieves the matrix coefficients and verifies it with the expected value. +* The test case also ensures that the API returns the correct status codes at each step. * * **Test Group ID:** 02@n * **Test Case ID:** 015@n * * **Test Procedure:** -* Refer to UT specification documentation [dsVideoPort_L2_Low-Level_TestSpecification.md](../../docs/pages/dsVideoPort_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) */ void test_l2_dsVideoPort_GetMatrixCoefficients(void) @@ -1093,8 +999,8 @@ void test_l2_dsVideoPort_GetMatrixCoefficients(void) gTestID = 15; UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - dsError_t ret; - intptr_t handle; + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; dsDisplayMatrixCoefficients_t matrix_coefficients; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); @@ -1132,6 +1038,132 @@ void test_l2_dsVideoPort_GetMatrixCoefficients(void) UT_LOG_INFO("Out %s\n", __FUNCTION__); } +#if 0 + +/** +* @brief Test for setting and getting the ForceDisable4KSupport for a video port +* +* This test verifies the functionality of the dsSetForceDisable4KSupport() and dsGetForceDisable4KSupport() APIs. +* It checks if the APIs are able to correctly set and retrieve the ForceDisable4KSupport status for a video port. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 016@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_sink(void) +{ + gTestID = 12; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool disable; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); + + for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) + { + UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); + ret = dsGetVideoPort(type, 0, &handle); + UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); + continue; + } + for (int i = 0; i < 2; i++) { + disable = (i == 0) ? true : false; + UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); + ret = dsSetForceDisable4KSupport(handle, disable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Return status: %d", ret); + + bool getDisable; + UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); + ret = dsGetForceDisable4KSupport(handle, &getDisable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getDisable, disable); + UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} + +/** +* @brief This test aims to validate the setting and getting of ForceDisable4KSupport in dsVideoPort +* +* This test function tests the setting and getting of ForceDisable4KSupport in dsVideoPort. It first initializes the video port, then gets the video port with valid parameters. It then sets the ForceDisable4KSupport and gets the same to validate if the set value is correctly retrieved. The test is performed for both true and false values of ForceDisable4KSupport. Finally, it terminates the video port. The test is designed to ensure the correct functioning of the dsSetForceDisable4KSupport and dsGetForceDisable4KSupport functions. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 017@n +* +* **Test Procedure:** +* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport_source(void) +{ + gTestID = 13; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + intptr_t handle = 0; + bool disable; + + UT_LOG_DEBUG("Invoking dsVideoPortInit()"); + ret = dsVideoPortInit(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) + { + UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); + ret = dsGetVideoPort(type, 0, &handle); + UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); + continue; + } + for (int i = 0; i < 2; i++) { + disable = (i == 0) ? true : false; + UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); + ret = dsSetForceDisable4KSupport(handle, disable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Return status: %d", ret); + + bool getDisable; + UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); + ret = dsGetForceDisable4KSupport(handle, &getDisable); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_ASSERT_EQUAL(getDisable, disable); + UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); + } + } + + UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); + ret = dsVideoPortTerm(); + UT_LOG_DEBUG("Return status: %d", ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + UT_LOG_INFO("Out %s\n", __FUNCTION__); +} +#endif + static UT_test_suite_t * pSuite = NULL; /** diff --git a/src/test_parse_configuration.c b/src/test_parse_configuration.c new file mode 100644 index 00000000..a0656737 --- /dev/null +++ b/src/test_parse_configuration.c @@ -0,0 +1,151 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup DS_HALTEST_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @{ + * @parblock + * + * ### Parse configuration functions for Device Settings HAL : + * + * Parse configuration functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.c +* +*/ +#include +#include +#include +#include + +#include "test_parse_configuration.h" + +/* Global Variables */ +int32_t gSourceType = -1; +int32_t gDSModule = dsNone; + +char gDeviceType[TEST_DEVICE_TYPE_SIZE] = {0}; + + +/* Parse configuration file */ +int test_parse_configuration() +{ + ut_kvp_status_t status; + char szReturnedString[UT_KVP_MAX_ELEMENT_SIZE]; + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsAudioPort; + status = test_dsAudio_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse audio configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoDevice; + status = test_dsVideoDevice_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video device configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsVideoPort; + status = test_dsVideoPort_parse_configuration(); + if(status != UT_KVP_STATUS_SUCCESS) { + UT_LOG_ERROR("Failed to parse video port configuration file"); + return -1; + } + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsCompositeIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsComposite; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsFPD/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsFPD; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsDisplay/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsDisplay; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHost/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHost; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsHdmiIn/Type", szReturnedString, UT_KVP_MAX_ELEMENT_SIZE); + if(status == UT_KVP_STATUS_SUCCESS) { + gDSModule |= dsHdmiIn; + } + return 0; +} + +void test_parse_configuration_term() +{ + test_dsAudio_parse_configuration_term(); + test_dsVideoPort_parse_configuration_term(); + test_dsVideoDevice_parse_configuration_term(); +} + +/** @} */ // End of DS_HALTEST_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_parse_configuration.h b/src/test_parse_configuration.h new file mode 100644 index 00000000..486ba63f --- /dev/null +++ b/src/test_parse_configuration.h @@ -0,0 +1,103 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup DS_PARSE_CONFIG_HEADER Device Settings HAL Tests configuration parser Header File + * @{ + * @parblock + * + * ### Configuration parser functions for Device Settings HAL : + * + * Configuration parser functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_parse_configuration.h +* +*/ +#ifndef __TEST_PARSE_CONFIG_H__ +#define __TEST_PARSE_CONFIG_H__ + +#include "test_dsAudio_parse_configuration.h" +#include "test_dsVideoDevice_parse_configuration.h" +#include "test_dsVideoPort_parse_configuration.h" + +#define TEST_DEVICE_TYPE_SIZE 8 +#define TEST_DS_MODULE_NAME_SIZE 32 + +#define TEST_TYPE_SOURCE_VALUE "source" +#define TEST_TYPE_SINK_VALUE "sink" + +/* Global variables */ +extern char gDeviceType[TEST_DEVICE_TYPE_SIZE]; +extern int32_t gSourceType; +extern int32_t gDSModule; + +typedef enum _dsModule_t { + dsNone = (0x0 << 0), + dsAudioPort = (0x1 << 0), + dsVideoPort = (0x1 << 1), + dsComposite = (0x1 << 2), + dsHdmiIn = (0x1 << 3), + dsVideoDevice = (0x1 << 4), + dsDisplay = (0x1 << 5), + dsFPD = (0x1 << 6), + dsHost = (0x1 << 7), +}dsModule_t; + +/*Function prototypes */ +int test_parse_configuration(); +void test_parse_configuration_term(); + +#endif //__TEST_PARSE_CONFIG_H__ + +/** @} */ // End of DS_PARSE_CONFIG_HEADER +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_register.c b/src/test_register.c index 910f5a74..05763513 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -65,11 +65,11 @@ */ #include -#include "test_utils.h" +#include "test_parse_configuration.h" /** * @brief Register test functionality - * + * */ /* L1 Testing Functions */ From 9ce412172a3913490130d01a08add51fd6f9fdb9 Mon Sep 17 00:00:00 2001 From: bhanucbp <141142298+bhanucbp@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:16:26 +0100 Subject: [PATCH 60/64] gh #14 Update test case and configuration --- bin/run.sh | 25 - ...deo-port_L2_Low-Level_TestSpecification.md | 127 ++-- profiles/sink/Sink_4K_VideoPort.yaml | 523 +++++++------ profiles/source/Source_4K_VideoPort.yaml | 698 ++++-------------- src/test_dsAudio_parse_configuration.c | 6 +- src/test_dsVideoDevice_parse_configuration.c | 205 +++++ src/test_dsVideoDevice_parse_configuration.h | 111 +++ src/test_dsVideoPort_parse_configuration.c | 39 +- src/test_dsVideoPort_parse_configuration.h | 9 +- src/test_l2_dsDisplay.c | 6 +- src/test_l2_dsVideoPort.c | 263 +++---- src/test_parse_configuration.c | 15 +- src/test_parse_configuration.h | 10 +- src/test_register.c | 1 + 14 files changed, 911 insertions(+), 1127 deletions(-) delete mode 100755 bin/run.sh create mode 100644 src/test_dsVideoDevice_parse_configuration.c create mode 100644 src/test_dsVideoDevice_parse_configuration.h diff --git a/bin/run.sh b/bin/run.sh deleted file mode 100755 index faa6dddd..00000000 --- a/bin/run.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -#* ****************************************************************************** -# * -# * If not stated otherwise in this file or this component's LICENSE file the -# * following copyright and licenses apply: -# * -# * Copyright 2023 RDK Management -# * -# * Licensed under the Apache License, Version 2.0 (the "License"); -# * you may not use this file except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.apache.org/licenses/LICENSE-2.0 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -#* ****************************************************************************** - -cd "$(dirname "$0")" -export LD_LIBRARY_PATH=/usr/lib:/lib:/home/root -./hal_test $@ diff --git a/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md index 791bbec9..db0efe43 100644 --- a/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md +++ b/docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md @@ -68,12 +68,10 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE|B{For supported video port type
call dsGetVideoPort API} + A[Call dsVideoPortInit API] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case fail] B -->|dsERR_NONE and valid handle|D[Call dsEnableVideoPort API with true] - D -->|Not dsERR_NONE|A2[Test case fail] D -->|dsERR_NONE|E[verify the port is true with dsIsVideoPortEnabled] - E -->|Not dsERR_NONE|A3[Test case fail] E -->|check Enabled flag is true|F[Call dsEnableVideoPort API with false] F -->|dsERR_NONE|G[verify the port is false with dsIsVideoPortEnabled] G -->|Not dsERR_NONE|A4[Test case fail] @@ -114,10 +112,11 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit] -->|dsERR_NONE|B{For each supported type and index
call dsGetVideoPort} + A[Call dsVideoPortInit] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case fail] B -->|dsERR_NONE and valid handle|C[Call dsIsDisplayConnected for each handle] C -->|dsERR_NONE and connected is false|D[Call dsIsVideoPortActive for each handle] + D -->|Not dsERR_NONE|A2[Test case fail] D -->|dsERR_NONE and enabled flag is true|B B -->|End of loop|I[Call dsVideoPortTerm API] I -->|dsERR_NONE|J[Test case success] @@ -156,15 +155,14 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB Step1[Call dsVideoPortInit API] - Step1 -->|dsERR_NONE|Step2[Call dsGetVideoPort API] + Step1 -->|dsERR_NONE|Step2{For each supported
type and index
call dsGetVideoPort} Step1 -->|Not dsERR_NONE|Fail1[Test Case Failed] Step2 -->|dsERR_NONE and valid handle|Step3[Call dsIsDisplaySurround API] - Step3 -->|Not dsERR_NONE|Fail4[Test Case Failed] Step3 -->|dsERR_NONE and boolean value|Step4[Retrieve surround mode capabilities] - Step4 -->|Not dsERR_NONE|Fail3[Test Case Failed] - Step4 --> Step5[Verify if dsIsDisplaySurround value matches with configuration file value] - Step5 --> Step6[Call dsVideoPortTerm API] - Step5 -->|Not match|Fail5[Test Case Failed] + Step4 -->|Not dsERR_NONE|Step5[Verify if dsIsDisplaySurround value matches with configuration file value] + Step5 -->|loop through |Step2 + Step2 -->|End of loop|Step6[Call dsVideoPortTerm API] + Step5 -->|Not match|Fail6[Test Case Failed] Step6 -->|dsERR_NONE|End[Test Case Passed] Step6 -->|Not dsERR_NONE|Fail5[Test Case Failed] ``` @@ -202,16 +200,16 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit] -->|dsERR_NONE|B[Call dsGetVideoPort] + A[Call dsVideoPortInit] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case Fail] - B -->|dsERR_NONE and valid handle|C{Loop through supported values} - C --> E[Set values using dsSetResolution API] - E --> F[Get values using dsGetResolution API] - F --> G[Compare returned and set resolution] + B -->|Not dsERR_NONE|E[Set supported values
using dsSetResolution API] + E -->|Not dsERR_NONE| F[Get values using dsGetResolution API] + F -->|Not dsERR_NONE|G[Compare returned and set resolution] + G -->|loop through | B G -->|Not dsERR_NONE|I1[Test case Fail] - F --> I[Call dsVideoPortTerm] + B -->|End of Iteration| I[Call dsVideoPortTerm] I -->|dsERR_NONE|J[Test case Success] - I -->|Not dsERR_NONE|I1[Test case Fail] + I -->|Not dsERR_NONE|I2[Test case Fail] ``` ### Test 5 @@ -246,14 +244,15 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB Step1[Call dsVideoPortInit API] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] + Step1 -- dsERR_NONE --> Step2{For each supported
type and index
call dsGetVideoPort} Step1 -- Not dsERR_NONE --> Fail1[Test case fail] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsSupportedTvResolutions API] Step3 -- dsERR_NONE and valid resolutions --> Step4[Verify if resolutions match with configuration file value] + Step4 -->|loop through | Step2 Step4 -- Not Match --> Fail2[Test case fail] - Step4 --> Step5[Call dsVideoPortTerm API] + Step2 -->|End of Iteration| Step5[Call dsVideoPortTerm API] Step5 -- dsERR_NONE --> End[Test Case Passed] - Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed: dsVideoPortTerm API failed] + Step5 -- Not dsERR_NONE --> Fail5[Test Case Failed] ``` ### Test 6 @@ -287,12 +286,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE|B[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_INTERNAL] + A[Call dsVideoPortInit API] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case fail] B -->|dsERR_NONE and valid handle|C[Call dsGetTVHDRCapabilities API with handle] C -->|dsERR_NONE|D[Verify if output matches with value from configuration file] D -->|Not dsERR_NONE|A2[Test case fail] - D --> E[Call dsVideoPortTerm API] + D -->|loop through | B + B -->|End of Iteration| E[Call dsVideoPortTerm API] E -->|dsERR_NONE|F[Test case success] E -->|Not dsERR_NONE|E1[Test case fail] ``` @@ -328,12 +328,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit API] -->|dsERR_NONE|B{For each supported video port type
call dsGetVideoPort API} + A[Call dsVideoPortInit API] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test Case Fail] B -->|dsERR_NONE and valid handle|C[Call dsGetHDCPStatus API with handle] C -->|dsERR_NONE and HDCP status|D[Verify HDCP status is dsHDCP_STATUS_AUTHENTICATED] + D -->|Not dsERR_NONE|E2[Test Case Fail] D -->|Iterate through all possible values|B - D -->|End of loop|E[Call dsVideoPortTerm API] + B -->|End of loop|E[Call dsVideoPortTerm API] E -->|dsERR_NONE|F[Test Case Success] E -->|Not dsERR_NONE|E1[Test Case Fail] ``` @@ -370,11 +371,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB Step1[Call dsVideoPortInit API] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort API with supported port type] + Step1 -- dsERR_NONE --> Step2{For each supported
type and index
call dsGetVideoPort} Step1 -- Not dsERR_NONE --> Fail1[Test Case Failed] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetHDCPProtocol API and get HDCP protocol version] Step3 -- dsERR_NONE --> Step5[Compare the version with the value from configuration file ] - Step5 --> Step6[Call dsVideoPortTerm API] + Step5 -->|loop through | Step2 + Step5 -- Not dsERR_NONE --> Fail3[Test Case Failed] + Step2 -->|End of Iteration| Step6[Call dsVideoPortTerm API] Step6 -- dsERR_NONE --> End[Test Case Passed] Step6 -- Not dsERR_NONE --> Fail6[Test Case Failed] ``` @@ -410,11 +413,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit] -->|return dsERR_NONE|B[Call dsGetVideoPort] -->|return dsERR_NONE and valid handle|P{Loop through all the supported ports and
protocol versions} + A[Call dsVideoPortInit] -->|return dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} + B -->|return dsERR_NONE and valid handle|D[Call dsSetHdmiPreference
to set supported protocol version] A -->|Not dsERR_NONE|C[Test case fail] - P --> D[Call dsSetHdmiPreference API] - D -->|dsERR_NONE|F[Call dsGetHdmiPreference API] -->|Proceed to other values|P - F --> J[Call dsVideoPortTerm API] + D -->|dsERR_NONE|F[Call dsGetHdmiPreference API] + F -->|Not dsERR_NONE|A2[Test case fail] + F -->|loop through | B + B -->|End of Iteration|J[Call dsVideoPortTerm API] J -->|dsERR_NONE|K[Test case success] J -->|Not dsERR_NONE|L[Test case fail] ``` @@ -450,11 +455,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB -A[Call dsVideoPortInit] -->|dsERR_NONE|B[Call dsGetVideoPort with type as dsVIDEOPORT_TYPE_INTERNAL] +A[Call dsVideoPortInit] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case fail] B -->|dsERR_NONE and valid handle|C[Call dsGetColorSpace API] -C -->|dsERR_NONE|D[Compare color space with value from configuration file] -D --> E[Call dsVideoPortTerm] +C -->|dsERR_NONE|D[Compare color space
with value from profile file] +D -->|loop through | B +D -->|dsERR_NONE|E2[Test case fail] +B -->|End of Iteration| E[Call dsVideoPortTerm] E -->|dsERR_NONE|F[Test case success] E -->|dsERR_NONE|E1[Test case fail] ``` @@ -490,14 +497,15 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - Start(Start) --> Step1[Call dsVideoPortInit API] - Step1 -- "dsERR_NONE" --> Step2[Call dsGetVideoPort API with dsVIDEOPORT_TYPE_HDMI] + Step1[Call dsVideoPortInit] -->|dsERR_NONE| Step2{For each supported
type and index
call dsGetVideoPort} Step1 -- "Not dsERR_NONE" --> Fail1[Test Case Failed] Step2 -- "dsERR_NONE and valid handle" --> Step3[Call dsColorDepthCapabilities API with handle] - Step3 -- "dsERR_NONE" --> Step4[Compare if value retrieved from API and configuration file matches] - Step4 --> Step6[Call dsVideoPortTerm API] + Step3 -- "dsERR_NONE" --> Step4[Compare if value retrieved
from API and configuration file matches] + Step4 -->|loop through | Step2 + Step4 -- "dsERR_NONE" --> Fail6[Test Case Failed] + Step2 -->|End of Iteration| Step6[Call dsVideoPortTerm API] Step6 -- "dsERR_NONE" --> End[Test Case Passed] - Step6 -- "Not dsERR_NONE" --> Fail6[Test Case Failed] + Step6 -- "Not dsERR_NONE" --> Fail4[Test Case Failed] ``` ### Test 12 @@ -531,11 +539,13 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - A[Call dsVideoPortInit] -->|dsERR_NONE|B[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_INTERNAL] + A[Call dsVideoPortInit] -->|dsERR_NONE|B{For each supported
type and index
call dsGetVideoPort} A -->|Not dsERR_NONE|A1[Test case fail] B -->|dsERR_NONE and valid handle|C[Call dsGetColorDepth with handle from previous step] - C -->|dsERR_NONE|D[Compare the color depth values from API and configuration file] - D --> F[Call dsVideoPortTerm] + C -->|dsERR_NONE|D[Compare the color depth
values from API and configuration file] + D -->|loop through | B + D -->|dsERR_NONE|E2[Test case fail] + B -->|End of Iteration| F[Call dsVideoPortTerm] F -->|dsERR_NONE|G[Test case success] F -->|Not dsERR_NONE|F1[Test case fail] ``` @@ -572,14 +582,15 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - Step1[Call dsVideoPortInit API] - Step1 --> Step{Loop through all possible ports and color depths} --> Step2[Call dsGetVideoPort API] - Step1 -->|Failure|TestcaseFail1[Testcase Fail] + Step1[Call dsVideoPortInit] -->|dsERR_NONE| Step2{For each supported
type and index
call dsGetVideoPort} + Step1 -- "Not dsERR_NONE" --> Fail1[Test Case Failed] Step2 -->|dsERR_NONE and valid handle|Step3[Call dsSetPreferredColorDepth API] Step3 -->|dsERR_NONE|Step4[Call dsGetPreferredColorDepth API] - Step4 -->|dsERR_NONE|Step5[Compare color depth values] -->|Continue to next set of values|Step - Step5 -->|End of Iteration|Step7[Call dsVideoPortTerm API] - Step7 -->|dsERR_NONE|End(End) + Step4 -->|dsERR_NONE|Step5[Compare color depth values] + Step5 -->|loop through | Step2 + Step5 -- "dsERR_NONE" --> Fail6[Test Case Failed] + Step2 -->|End of Iteration|Step7[Call dsVideoPortTerm API] + Step7 -->|dsERR_NONE|End[Test Case success] Step7 -->|Failure|TestcaseFail6[Testcase Fail] ``` @@ -615,13 +626,15 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB Start(Start) --> Step1[Call dsVideoPortInit] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with dsVIDEOPORT_TYPE_INTERNAL port] + Step1 -- dsERR_NONE --> Step2{For each supported
type and index
call dsGetVideoPort} Step1 -- Not dsERR_NONE --> TestcaseFail1[Test case fail] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetQuantizationRange with handle] - Step3 -- dsERR_NONE and valid quantization range --> Step4[Compare quantization range with configuration file] - Step4 --> Step5[Call dsVideoPortTerm] + Step3 -- dsERR_NONE and valid quantization range --> Step4[Compare quantization
range with configuration file] + Step4 -->|loop through | Step2 + Step4 -- Not dsERR_NONE --> TestcaseFail5[Test case fail] + Step2 --> |End of Iteration|Step5[Call dsVideoPortTerm] Step5 -- dsERR_NONE --> End[Test case success] - Step5 -- Not dsERR_NONE --> TestcaseFail5[Test case fail] + Step5 -- Not dsERR_NONE --> TestcaseFail6[Test case fail] ``` ### Test 15 @@ -655,12 +668,14 @@ If user chose to run the test in interactive mode, then the test case has to be ```mermaid graph TB - Step1[Call dsVideoPortInit] - Step1 -- dsERR_NONE --> Step2[Call dsGetVideoPort with type=dsVIDEOPORT_TYPE_INTERNAL] - Step1 -- Not dsERR_NONE --> Fail1[Test Case Fail] + Start(Start) --> Step1[Call dsVideoPortInit] + Step1 -- dsERR_NONE --> Step2{For each supported
type and index
call dsGetVideoPort} + Step1 -- Not dsERR_NONE --> TestcaseFail1[Test case fail] Step2 -- dsERR_NONE and valid handle --> Step3[Call dsGetMatrixCoefficients with handle] - Step3 -- dsERR_NONE --> Step4[Compare the retrieved matrix_coefficients with value from configuration file] - Step4 --> Step6[Call dsVideoPortTerm] + Step3 -- dsERR_NONE --> Step4[Compare the retrieved matrix_coefficients
with value from configuration file] + Step4 -->|loop through | Step2 + Step4 -- Not dsERR_NONE --> Fail7[Test Case Fail] + Step2 -->|End of Iteration| Step6[Call dsVideoPortTerm] Step6 -- dsERR_NONE --> End[Test Case Success] Step6 -- Not dsERR_NONE --> Fail6[Test Case Fail] ``` diff --git a/profiles/sink/Sink_4K_VideoPort.yaml b/profiles/sink/Sink_4K_VideoPort.yaml index f4af15a3..5a5d5a72 100644 --- a/profiles/sink/Sink_4K_VideoPort.yaml +++ b/profiles/sink/Sink_4K_VideoPort.yaml @@ -1,277 +1,248 @@ dsVideoPort: - Type: sink - Name: TV -# OR-ed value of DS module -# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort - Module: 0x2 #dsVideoPort - features: - extendedEnumsSupported: false - Number_of_ports: 1 - Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - - 0x08 #INTERNAL - - # 8-Bit, 10-bit and 12 bit - color_depth: 10 - - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connectedAOP: 0x03 #dsAUDIOPORT_TYPE_SPEAKER = 0x03 - - defaultResolution: "1080i50" - Ports: - 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL - - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "INTERNAL" - - #if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - - #if hdcp supported @true , if hdcp not supported @false - hdcp_supported: true - - #Number of the supported resolutions - numSupportedResolutions: 3 - - #768p60 - #1080p - #2160p60 - supportedResolutons: - - name : "480i" - #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution - #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution - #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution - #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution - #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution - #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution - pixelResolution: 0 - - #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio - #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio - #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range - aspectRatio : 0 - - #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode - #dsVIDEO_SSMODE_2D = 1 ///< 2D mode - #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode - #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode - #dsVIDEO_SSMODE_MAX ///< Out of range - stereoscopicMode: 1 - - #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate - #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second - #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second - #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second - #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second - #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second - #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second - #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second - #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second - #dsVIDEO_FRAMERATE_MAX ///< Out of range - frameRate: 6 - - #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video - #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video - #dsVIDEO_SCANMODE_MAX ///< Out of range - interlaced: 0 - - - name: "480p" - pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "576p50" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "720p" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "720p50" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "768p60" - pixelResolution: 3 # dsVIDEO_PIXELRES_1366x768 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080p24" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 1 # dsVIDEO_FRAMERATE_24 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080p" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "1080i50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED - - - name: "1080i" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED - - - name: "2160p30" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 3 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - - name: "2160p60" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE - - defaultResolution: "1080i50" - - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x01 # RGB - - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - - #@a true if display supports surround sound or @a false otherwise - DisplaySurround: true - - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode : 0 - - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x1FFBFB #OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 - - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - #HDR Capabilities: - hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - - #HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - hdcp_protocol_version: 0x01 #VERSION_2X - - - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x02 #FULL - - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x07 #BT_2020_CL + Type: sink + Name: TV + features: + extendedEnumsSupported: false + Number_of_ports: 1 + + # 8-Bit, 10-bit and 12 bit + color_depth: 10 + + Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x08 # dsVIDEOPORT_TYPE_INTERNAL + + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "INTERNAL" + + #if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + + #if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + + #Number of the supported resolutions + numSupportedResolutions: 12 + + #768p60 + #1080p + #2160p60 + supportedResolutons: + 1: + name : "480i" + #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution + #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution + #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution + #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution + #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution + #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution + #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution + pixelResolution: 0 + + #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio + #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio + #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range + aspectRatio : 0 + + #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode + #dsVIDEO_SSMODE_2D = 1 ///< 2D mode + #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode + #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode + #dsVIDEO_SSMODE_MAX ///< Out of range + stereoScopicMode: 1 + + #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate + #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second + #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second + #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second + #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second + #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second + #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second + #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second + #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second + #dsVIDEO_FRAMERATE_MAX ///< Out of range + frameRate: 6 + + #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video + #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video + #dsVIDEO_SCANMODE_MAX ///< Out of range + interlaced: 0 + + 2: + name: "480p" + pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 3: + name: "576p50" + pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 + aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 4: + name: "720p" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 5: + name: "720p50" + pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 6: + name: "768p60" + pixelResolution: 3 # dsVIDEO_PIXELRES_1366x768 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 7: + name: "1080p24" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 1 # dsVIDEO_FRAMERATE_24 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 8: + name: "1080p" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 9: + name: "1080i50" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 7 # dsVIDEO_FRAMERATE_50 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + 10: + name: "1080i" + pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 0 # dsVIDEO_SCANMODE_INTERLACED + 11: + name: "2160p30" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 3 # dsVIDEO_FRAMERATE_30 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + 12: + name: "2160p60" + pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 + aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 + stereoScopicMode: 1 # dsVIDEO_SSMODE_2D + frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 + interlaced: 1 # dsVIDEO_SCANMODE_PROGRESSIVE + + defaultResolution: "1080i50" + + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x01 # RGB + + #@a true if display supports surround sound or @a false otherwise + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode : 0 + + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1FFBFB #OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + #HDR Capabilities: + hdr_capabilities: 0x37 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + + #HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + hdcp_protocol_version: 0x01 #VERSION_2X + + + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL diff --git a/profiles/source/Source_4K_VideoPort.yaml b/profiles/source/Source_4K_VideoPort.yaml index 6e3e83c7..4f8b9de1 100644 --- a/profiles/source/Source_4K_VideoPort.yaml +++ b/profiles/source/Source_4K_VideoPort.yaml @@ -1,574 +1,126 @@ dsVideoPort: - Type: source - Name: STB -# OR-ed value of DS module -# dsHost|dsFPD|dsDisplay|dsVideoDevice|dsHdmiIn|dsComposite|dsVideoPort|dsAudioPort - Module: 0x2 #dsVideoPort - features: - extendedEnumsSupported: false - Number_of_ports: 1 - - Port_types: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - - 0x06 # HDMI - - 0x00 # RF - - 0x01 # BB - - # 8-Bit, 10-bit and 12 bit - color_depth: 8 - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - connectedAOP: 0x01 - defaultResolution: "1080i50" - - Ports: - 1: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x06 # HDMI - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "HDMI" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: true - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutons: - - name : "480i" - #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution - #dsVIDEO_PIXELRES_720x576 = 1 ///< 720x576 Resolution - #dsVIDEO_PIXELRES_1280x720 = 2 ///< 1280x720 Resolution - #dsVIDEO_PIXELRES_1366x768 = 3 ///< 1366x768 Resolution - #dsVIDEO_PIXELRES_1920x1080 = 4 ///< 1920x1080 Resolution - #dsVIDEO_PIXELRES_3840x2160 = 5 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_4096x2160 = 6 ///< 3840x2160 Resolution - #dsVIDEO_PIXELRES_MAX - pixelResolution: 0 - - #dsVIDEO_ASPECT_RATIO_4x3 = 0 ///< 4:3 aspect ratio - #dsVIDEO_ASPECT_RATIO_16x9 = 1 ///< 16:9 aspect ratio - #dsVIDEO_ASPECT_RATIO_MAX ///< Out of range - aspectRatio: 0 - - #dsVIDEO_SSMODE_UNKNOWN = 0 ///< Unknown mode - #dsVIDEO_SSMODE_2D = 1 ///< 2D mode - #dsVIDEO_SSMODE_3D_SIDE_BY_SIDE = 2 ///< 3D side by side (L/R) stereo mode - #dsVIDEO_SSMODE_3D_TOP_AND_BOTTOM = 3 ///< 3D top & bottom stereo mode - #dsVIDEO_SSMODE_MAX ///< Out of range - stereoscopicMode: 1 - - #dsVIDEO_FRAMERATE_UNKNOWN = 0 ///< Unknown frame rate - #dsVIDEO_FRAMERATE_24 = 1 ///< Played at 24 frames per second - #dsVIDEO_FRAMERATE_25 = 2 ///< Played at 25 frames per second - #dsVIDEO_FRAMERATE_30 = 3 ///< Played at 30 frames per second - #dsVIDEO_FRAMERATE_60 = 4 ///< Played at 60 frames per second - #dsVIDEO_FRAMERATE_23dot98 = 5 ///< Played at 23.98 frames per second - #dsVIDEO_FRAMERATE_29dot97 = 6 ///< Played at 29.97 frames per second - #dsVIDEO_FRAMERATE_50 = 7 ///< Played at 50 frames per second - #dsVIDEO_FRAMERATE_59dot94 = 8 ///< Played at 59.94 frames per second - #dsVIDEO_FRAMERATE_MAX ///< Out of range - frameRate: 6 - - #dsVIDEO_SCANMODE_INTERLACED = 0 ///< Interlaced video - #dsVIDEO_SCANMODE_PROGRESSIVE = 1 ///< Progressive video - #dsVIDEO_SCANMODE_MAX ///< Out of range - interlaced: 0 - - - name: "480p" - pixelResolution: 0 # dsVIDEO_PIXELRES_720x480 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - name: "576i" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # _INTERLACED - - - name: "576p" - pixelResolution: 1 # dsVIDEO_PIXELRES_720x576 - aspectRatio: 0 # dsVIDEO_ASPECT_RATIO_4x3 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "720p" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - - name: "720p50" - pixelResolution: 2 # dsVIDEO_PIXELRES_1280x720 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p24" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p25" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_25 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p30" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 9 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "1080p60" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - - name: "1080i50" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 0 # _INTERLACED - - - name: "1080i59.94" - pixelResolution: 4 # dsVIDEO_PIXELRES_1920x1080 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 0 # _INTERLACED - - - name: "2160p24" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 5 # dsVIDEO_FRAMERATE_23dot98 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p25" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_25 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p30" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 9 # dsVIDEO_FRAMERATE_30 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p50" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 7 # dsVIDEO_FRAMERATE_50 - interlaced: 1 # _PROGRESSIVE - - - name: "2160p60" - pixelResolution: 5 # dsVIDEO_PIXELRES_3840x2160 - aspectRatio: 1 # dsVIDEO_ASPECT_RATIO_16x9 - stereoscopicMode: 1 # dsVIDEO_SSMODE_2D - frameRate: 8 # dsVIDEO_FRAMERATE_59dot94 - interlaced: 1 # _PROGRESSIVE - - defaultResolution: "720p" - - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x05 # RGB - - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x04 # OR value of 8bit, 10 bit, 12 bit and Auto - - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: true - - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 2 - - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 - - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x20 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG - - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x01 #VERSION_2X - - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x02 #FULL - - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x07 #BT_2020_CL - - 2: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x00 # dsVIDEOPORT_TYPE_RF - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "RF" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: false - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - - defaultResolution: "480p" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x00 # UNKNOWN - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: false - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 0 - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x0 # NONE - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x0 #UNKNOWN - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x00 #UNKNOWN - - 3: - #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output - #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output - #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output - #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output - #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output - #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output - #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output - #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input - #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output - #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range - Typeid: 0x01 # dsVIDEOPORT_TYPE_BB - # An index value used to access a specific port within an array of ports with the same type. - Index: 0 - # "RF" - # "BB" - # "SVIDEO" - # "1394" - # "DVI" - # "COMPONENT" - # "HDMI" - # "HDMI_INPUT" - # "INTERNAL" - Name: "BB" - # if dtcp supported @true , if dtcp not supported @false - dtcp_supported: false - # if hdcp supported @true , if hdcp not supported @false - hdcp_supported: false - # Number of the supported resolutions - numSupportedResolutions: 3 - #"768p60" - #"1080p" - #"2160p60" - supportedResolutionNames: - - "768p60" - - "1080p" - - "2160p60" - #dsAUDIOPORT_TYPE_ID_LR = 0x00, ///< RCA audio output - #dsAUDIOPORT_TYPE_HDMI = 0x01, ///< HDMI audio output - #dsAUDIOPORT_TYPE_SPDIF = 0x02, ///< SPDIF audio output - #dsAUDIOPORT_TYPE_SPEAKER = 0x03, ///< SPEAKER audio output - #dsAUDIOPORT_TYPE_HDMI_ARC = 0x04, ///< HDMI ARC/EARC audio output - #dsAUDIOPORT_TYPE_HEADPHONE = 0x05, ///< Headphone jack - #dsAUDIOPORT_TYPE_MAX = 0x06 ///< Out of range - - defaultResolution: "480p" - #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space - #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space - #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space - #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space - #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space - #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space - #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range - colorspaces: 0x00 # UNKNOWN - # Color Depth Capabilities: - #dsDISPLAY_COLORDEPTH_UNKNOWN = 0x00, ///< Unknown color depth - #dsDISPLAY_COLORDEPTH_8BIT = 0x01, ///< 8 bit color depth - #dsDISPLAY_COLORDEPTH_10BIT = 0x02, ///< 10 bit color depth - #dsDISPLAY_COLORDEPTH_12BIT = 0x04, ///< 12 bit color depth - #dsDISPLAY_COLORDEPTH_AUTO = 0x08, ///< Automatic color depth - Supported_color_depth_capabilities: 0x0F # OR value of 8bit, 10 bit, 12 bit and Auto - # @a true if display supports surround sound or @a false otherwise - DisplaySurround: false - #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode - #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital - #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus - SurroundMode: 0 - # Supported TV Resolutions: - #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution - #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution - #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution - #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution - #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution - #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution - #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution - #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution - #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution - #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution - #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution - #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution - #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution - #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution - #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution - #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution - #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution - #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution - #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution - #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution - #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution - Supported_tv_resolutions_capabilities: 0x00 # NOT_SUPPORTED - #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded - #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR - #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG - #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision - #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime - #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus - #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR - #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed - # HDR Capabilities: - hdr_capabilities: 0x0 # NONE - # HDCP Protocol Version: - #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x - #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x - #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range - hdcp_protocol_version: 0x02 #OUT OF RANGE - # Quantization Ranges: - #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range - #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range - #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range - quantization_ranges: 0x0 #UNKNOWN - # Matrix Coefficients - #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient - #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range - matrix_coefficients: 0x00 #UNKNOWN + Type: source + Name: STB + features: + extendedEnumsSupported: false + Number_of_ports: 1 + + # 8-Bit, 10-bit and 12 bit + color_depth: 8 + + defaultResolution: "1080i50" + + Ports: + 1: + #dsVIDEOPORT_TYPE_RF = 0x00, ///< RF modulator (channel 3/4) video output + #dsVIDEOPORT_TYPE_BB = 0x01, ///< Baseband (composite, RCA) video output + #dsVIDEOPORT_TYPE_SVIDEO = 0x02, ///< S-Video video output + #dsVIDEOPORT_TYPE_1394 = 0x03, ///< IEEE 1394 (Firewire) video output + #dsVIDEOPORT_TYPE_DVI = 0x04, ///< DVI (Panel-Link, HDCP) video output + #dsVIDEOPORT_TYPE_COMPONENT = 0x05, ///< Component video output + #dsVIDEOPORT_TYPE_HDMI = 0x06, ///< HDMI video output + #dsVIDEOPORT_TYPE_HDMI_INPUT = 0x07, ///< HDMI video input + #dsVIDEOPORT_TYPE_INTERNAL = 0x08, ///< Internal (integrated/internal display) video output + #dsVIDEOPORT_TYPE_MAX = 0x09 ///< Out of range + Typeid: 0x06 # HDMI + # An index value used to access a specific port within an array of ports with the same type. + Index: 0 + # "RF" + # "BB" + # "SVIDEO" + # "1394" + # "DVI" + # "COMPONENT" + # "HDMI" + # "HDMI_INPUT" + # "INTERNAL" + Name: "HDMI" + # if dtcp supported @true , if dtcp not supported @false + dtcp_supported: false + # if hdcp supported @true , if hdcp not supported @false + hdcp_supported: true + # Number of the supported resolutions + numSupportedResolutions: 0 + supportedResolutons: + defaultResolution: "720p" + + #dsDISPLAY_COLORSPACE_UNKNOWN = 0x0, ///< Unknown color space + #dsDISPLAY_COLORSPACE_RGB = 0x1, ///< RGB color space + #dsDISPLAY_COLORSPACE_YCbCr422 = 0x2, ///< YCbCr4.2.2 color space + #dsDISPLAY_COLORSPACE_YCbCr444 = 0x3, ///< YCbCr4.4.4 color space + #dsDISPLAY_COLORSPACE_YCbCr420 = 0x4, ///< YCbCr4.2.0 color space + #dsDISPLAY_COLORSPACE_AUTO = 0x5, ///< Automatic color space + #dsDISPLAY_COLORSPACE_MAX = 0x6 ///< Out of range + colorspaces: 0x05 # RGB + + # @a true if display supports surround sound or @a false otherwise + DisplaySurround: true + + #dsSURROUNDMODE_NONE = 0x0, ///< No surround mode + #dsSURROUNDMODE_DD = 1 ///< Surround mode Dolby Digital + #dsSURROUNDMODE_DDPLUS = 2 ///< Surround mode Dolby Digital Plus + SurroundMode: 2 + + # Supported TV Resolutions: + #dsTV_RESOLUTION_480i = 0x000001, ///< 480i Resolution + #dsTV_RESOLUTION_480p = 0x000002, ///< 480p Resolution + #dsTV_RESOLUTION_576i = 0x000004, ///< 576i Resolution + #dsTV_RESOLUTION_576p = 0x000008, ///< 576p Resolution + #dsTV_RESOLUTION_576p50 = 0x000010, ///< 576p50 Resolution + #dsTV_RESOLUTION_720p = 0x000020, ///< 720p Resolution + #dsTV_RESOLUTION_720p50 = 0x000040, //< 720p50 Resolution + #dsTV_RESOLUTION_1080i = 0x000080, ///< 1080i Resolution + #dsTV_RESOLUTION_1080p = 0x000100, ///< 1080p Resolution + #dsTV_RESOLUTION_1080p24 = 0x000200, ///< 1080p24 Resolution + #dsTV_RESOLUTION_1080i25 = 0x000400, ///< 1080i25 Resolution + #dsTV_RESOLUTION_1080p25 = 0x000800, ///< 1080p25 Resolution + #dsTV_RESOLUTION_1080p30 = 0x001000, ///< 1080p30 Resolution + #dsTV_RESOLUTION_1080i50 = 0x002000, ///< 1080i50 Resolution + #dsTV_RESOLUTION_1080p50 = 0x004000, ///< 1080p50 Resolution + #dsTV_RESOLUTION_1080p60 = 0x008000, ///< 1080p60 Resolution + #dsTV_RESOLUTION_2160p24 = 0x010000, ///< 2160p24 Resolution + #dsTV_RESOLUTION_2160p25 = 0x020000, ///< 2160p25 Resolution + #dsTV_RESOLUTION_2160p30 = 0x040000, ///< 2160p30 Resolution + #dsTV_RESOLUTION_2160p50 = 0x080000, ///< 2160p50 Resolution + #dsTV_RESOLUTION_2160p60 = 0x100000 ///< 2160p60 Resolution + Supported_tv_resolutions_capabilities: 0x1443F3 # OR-ed value of 480i | 480p | 576p50 | 720p | 720p50 | 1080i | 1080p | 1080p24 | 1080i50 | 2160p30 | 2160p60 + + #dsHDRSTANDARD_NONE = 0x0, ///< When No video format is decoded + #dsHDRSTANDARD_HDR10 = 0x01, ///< Video Format HDR + #dsHDRSTANDARD_HLG = 0x02, ///< Video Format HLG + #dsHDRSTANDARD_DolbyVision = 0x04, ///< Video Format Dolby Vision + #dsHDRSTANDARD_TechnicolorPrime = 0x08, ///< Video Format Techinicolor Prime + #dsHDRSTANDARD_HDR10PLUS = 0x10, ///< Video Format HDRPlus + #dsHDRSTANDARD_SDR = 0x20, ///< Video Format SDR + #dsHDRSTANDARD_Invalid = 0x80 ///< When invalid value observed + # HDR Capabilities: + hdr_capabilities: 0x20 # OR-ed value of SDR | HDR10 | HDR10PLUS | DolbyVision | HLG + + # HDCP Protocol Version: + #dsHDCP_VERSION_1X = 00x0, ///< HDCP Protocol version 1.x + #dsHDCP_VERSION_2X = 0x01 , ///< HDCP Protocol version 2.x + #dsHDCP_VERSION_MAX = 0x02 , ///< Out of range + hdcp_protocol_version: 0x01 #VERSION_2X + + # Quantization Ranges: + #dsDISPLAY_QUANTIZATIONRANGE_UNKNOWN = 0x0, ///< Unknown quantization range + #dsDISPLAY_QUANTIZATIONRANGE_LIMITED = 0x01, ///< Limited quantization range + #dsDISPLAY_QUANTIZATIONRANGE_FULL = 0x02, ///< Full quantization range + quantization_ranges: 0x02 #FULL + + # Matrix Coefficients + #dsDISPLAY_MATRIXCOEFFICIENT_UNKNOWN = 0x00, ///< Unknown Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_709 = 0x01, ///< ITU BT 709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_470_2_BG = 0x02, ///< ITU BT 470_2_BG Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_SMPTE_170M = 0x03, ///< SMPTE 170M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_XvYCC_709 = 0x04, ///< XvYCC_709 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eXvYCC_601 = 0x05, ///< XvYCC_601 Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_NCL = 0x06, ///< ITU BT 2020 non constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_BT_2020_CL = 0x07, ///< ITU BT 2020 constant luminance Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eDVI_FR_RGB = 0x08, ///< eDVI Full Range RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_RGB = 0x09, ///< eHDMI RGB Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eFCC = 0x0A, ///< eFCC Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eSMPTE_240M = 0x0B, ///< eSMPTE 240M Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_eHDMI_FR_YCbCr = 0x0C, ///< eHDMI Full Range YcbCr Matrix Coefficient + #dsDISPLAY_MATRIXCOEFFICIENT_MAX = 0xFF ///< Out of range + matrix_coefficients: 0x07 #BT_2020_CL diff --git a/src/test_dsAudio_parse_configuration.c b/src/test_dsAudio_parse_configuration.c index 93e9e2d6..b47469b8 100644 --- a/src/test_dsAudio_parse_configuration.c +++ b/src/test_dsAudio_parse_configuration.c @@ -86,13 +86,13 @@ int test_dsAudio_parse_configuration() char key_string[DS_AUDIO_KVP_SIZE]; ut_kvp_status_t status; - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio.Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsAudio.Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); if (status == UT_KVP_STATUS_SUCCESS ) { - if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DEVICE_TYPE_SIZE)) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { gSourceType = 1; } - else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DEVICE_TYPE_SIZE)) { + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { gSourceType = 0; } else { diff --git a/src/test_dsVideoDevice_parse_configuration.c b/src/test_dsVideoDevice_parse_configuration.c new file mode 100644 index 00000000..335ec59d --- /dev/null +++ b/src/test_dsVideoDevice_parse_configuration.c @@ -0,0 +1,205 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @defgroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings Video Device HAL Tests + * @{ + */ + +/** + * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG Device Settings Video Device Parse Config File + * @{ + * @parblock + * + * ### L2 Tests for DS Video Device HAL : + * + * Level 2 unit test cases for all APIs of Device Settings Video Device HAL + * + * **Pre-Conditions:** None@n + * **Dependencies:** None@n + * + * + * @endparblock + */ + +/** + * @file test_dsVideoDevice_parse_configuration.c + * + */ +#include +#include +#include +#include + +#include "test_parse_configuration.h" +#include "test_dsVideoDevice_parse_configuration.h" + +/* Global variables */ +dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration = NULL; +char gDSVideoDeviceName[DS_VIDEO_DEVICE_NAME_SIZE] = {0}; +int32_t gDSvideoDevice_NumVideoDevices = 0; + + +/* Parse Video Device Configuration file */ +int test_dsVideoDevice_parse_configuration() +{ + char key_string[DS_VIDEO_DEVICE_KVP_SIZE]; + ut_kvp_status_t status; + + gDSvideoDevice_NumVideoDevices = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoDevice/NumVideoDevices" ); + + UT_LOG_DEBUG("gDSvideoDevice_NumVideoDevices: %d",gDSvideoDevice_NumVideoDevices); + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + gSourceType = 1; + } + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { + gSourceType = 0; + } + else { + UT_LOG_ERROR("Invalid platform type: %s", gDeviceType); + return -1; + } + } + else { + UT_LOG_ERROR("Failed to get the platform type"); + return -1; + } + + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoDevice/Name", gDSVideoDeviceName, DS_VIDEO_DEVICE_NAME_SIZE); + if (status == UT_KVP_STATUS_SUCCESS ) { + UT_LOG_DEBUG("Device Type: %s, Device Name: %s", gDeviceType, gDSVideoDeviceName); + } + else { + UT_LOG_ERROR("Failed to get the Device Name "); + return -1; + } + + gDSVideoDeviceConfiguration = (dsVideoDeviceConfiguration_t*) calloc(gDSvideoDevice_NumVideoDevices, sizeof(dsVideoDeviceConfiguration_t)); + if(gDSVideoDeviceConfiguration == NULL) { + UT_LOG_ERROR("Failed to allocate memory for Video Device configuration structure"); + return -1; + } + + for(int i = 0; i < gDSvideoDevice_NumVideoDevices; i++) { + if(gSourceType == 1){ + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs" , i+1); + gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); + UT_LOG_DEBUG("NoOfSupportedDFCs: %d",gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs); + + // loop to get supported SupportedDFCs in array + for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFCs; j++) { + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDFCs/%d" , i+1 , j); + gDSVideoDeviceConfiguration[i].SupportedDFCs[j] = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + UT_LOG_DEBUG("SupportedDFCs: %d",gDSVideoDeviceConfiguration[i].SupportedDFCs[j]); + } + } + + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/DefaultDFC" , i+1); + gDSVideoDeviceConfiguration[i].DefaultDFC = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].DefaultDFC :%d",gDSVideoDeviceConfiguration[i].DefaultDFC); + + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/HDRCapabilities" , i+1); + gDSVideoDeviceConfiguration[i].HDRCapabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].HDRCapabilities :%d",gDSVideoDeviceConfiguration[i].HDRCapabilities); + + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedVideoCodingFormats" , i+1); + gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG_DEBUG("SupportedVideoCodingFormats: %d ",gDSVideoDeviceConfiguration[i].SupportedVideoCodingFormats); + + if(gSourceType == 0){ + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate" , i+1); + gDSVideoDeviceConfiguration[i].NoOfSupportedDFR = ut_kvp_getListCount(ut_kvp_profile_getInstance(), key_string); + UT_LOG_DEBUG("NoOfSupportedDFR: %d ",gDSVideoDeviceConfiguration[i].NoOfSupportedDFR); + // loop to get supported SupportedDFR in array + for(int j = 0; j < gDSVideoDeviceConfiguration[i].NoOfSupportedDFR; j++) { + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/SupportedDisplayFramerate/%d" , i+1 , j); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate, sizeof(gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate)); + if (status == UT_KVP_STATUS_SUCCESS ) { + UT_LOG_DEBUG("SupportedDisplayFramerate: %s ",gDSVideoDeviceConfiguration[i].SupportedDisplayFramerate); + } + else { + UT_LOG_ERROR("Failed to get the platform Device SupportedDisplayFramerate"); + return -1; + } + } + } + + UT_LOG_DEBUG("gSourceType %d ",gSourceType); + /* check for only source */ + if(gSourceType == 1){ + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/num_entries" , i+1); + gDSVideoDeviceConfiguration[i].num_codec_entries = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG_DEBUG("num_codec_entries %d",gDSVideoDeviceConfiguration[i].num_codec_entries); + + //TODO : kvp profile support for float type is not available now + //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, gDSVideoDeviceConfiguration[i].level, sizeof(key_string)); + //snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/level" , i+1); + //gDSVideoDeviceConfiguration[i].level = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + //UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].level:%d",gDSVideoDeviceConfiguration[i].level); + snprintf(key_string, DS_VIDEO_DEVICE_KVP_SIZE, "dsVideoDevice/Device/%d/VideoCodecInfo/VideoCodec0/profile" , i+1); + gDSVideoDeviceConfiguration[i].profile = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string ); + UT_LOG_DEBUG("gDSVideoDeviceConfiguration[i].profile :%d",gDSVideoDeviceConfiguration[i].profile); + } + } + + return 0; +} + +/* Free Parse Video Device Configuration */ +void test_dsVideoDevice_parse_configuration_term() +{ + if(gDSVideoDeviceConfiguration) { + free(gDSVideoDeviceConfiguration); + } +} + + +/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_dsVideoDevice_parse_configuration.h b/src/test_dsVideoDevice_parse_configuration.h new file mode 100644 index 00000000..e806918e --- /dev/null +++ b/src/test_dsVideoDevice_parse_configuration.h @@ -0,0 +1,111 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/** + * @addtogroup HPK Hardware Porting Kit + * @{ + * @par The Hardware Porting Kit + * HPK is the next evolution of the well-defined Hardware Abstraction Layer + * (HAL), but augmented with more comprehensive documentation and test suites + * that OEM or SOC vendors can use to self-certify their ports before taking + * them to RDKM for validation or to an operator for final integration and + * deployment. The Hardware Porting Kit effectively enables an OEM and/or SOC + * vendor to self-certify their own Video Accelerator devices, with minimal RDKM + * assistance. + * + */ + +/** + * @addtogroup Device_Settings Device Settings Module + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST Device Settings HAL Tests + * @{ + */ + +/** + * @addtogroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @{ + */ + +/** + * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H Device Settings HAL Tests video device parse configuration Header File + * @{ + * @parblock + * + * ### Video Device Parse configuration functions for Device Settings HAL : + * + * Parse configuration functions required for the module across all vendors. + * + * **Pre-Conditions:** None @n + * **Dependencies:** None @n + * + * @endparblock + * + */ + +/** +* @file test_dsVideoDevice_parse_configuration.h +* +*/ +#ifndef __TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ +#define __TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ + +#include "dsVideoDevice.h" + +#define DS_VIDEO_DEVICE_KVP_SIZE 128 +#define DS_VIDEO_DEVICE_PORT_NAME_SIZE 32 +#define DS_VIDEO_DEVICE_MAX_MS12_PROFILE_LIST 10 +#define DS_VIDEO_DEVICE_MAX_MS12_PROFILE_LEN 32 +#define DS_VIDEO_DEVICE_NAME_SIZE 64 + +#define DS_VIDEO_DEVICE_MODULE_NAME "dsVideoDevice" + +/* Video Device configuration */ +typedef struct _dsVideoDeviceConfiguration_t { + int32_t NoOfSupportedDFCs; + int32_t SupportedDFCs[dsVIDEO_ZOOM_MAX]; + int32_t DefaultDFC; + int32_t HDRCapabilities; + int32_t SupportedVideoCodingFormats; + int32_t NoOfSupportedDFR; + char SupportedDisplayFramerate[dsVIDEO_FRAMERATE_MAX]; + int32_t num_codec_entries; + float level; + int32_t profile; +}dsVideoDeviceConfiguration_t; + +/* Global variables */ +extern dsVideoDeviceConfiguration_t* gDSVideoDeviceConfiguration; +extern char gDSVideoDeviceName[]; +extern int32_t gDSvideoDevice_NumVideoDevices; + +/*Function prototypes */ +int test_dsVideoDevice_parse_configuration(); +void test_dsVideoDevice_parse_configuration_term(); + +#endif //__TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ + +/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H +/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG +/** @} */ // End of Device_Settings_HALTEST +/** @} */ // End of Device_Settings +/** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_dsVideoPort_parse_configuration.c b/src/test_dsVideoPort_parse_configuration.c index de992588..29436594 100644 --- a/src/test_dsVideoPort_parse_configuration.c +++ b/src/test_dsVideoPort_parse_configuration.c @@ -82,7 +82,6 @@ dsVideoPortConfiguration_t* gDSVideoPortConfiguration = NULL; char gDSVideoPortName[DS_VIDEO_PORT_NAME_SIZE] = {0}; int32_t gDSvideoPort_NumberOfPorts = 0; int32_t gDSvideoPort_color_depth = 0; -int32_t gDSvideoPort_connectedAOP = 0; /* Parse Video Port Configuration */ int test_dsVideoPort_parse_configuration() @@ -92,7 +91,6 @@ int test_dsVideoPort_parse_configuration() gDSvideoPort_NumberOfPorts = ut_kvp_getUInt32Field( ut_kvp_profile_getInstance(), "dsVideoPort/Number_of_ports" ); gDSvideoPort_color_depth = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoPort/color_depth" ); - gDSvideoPort_connectedAOP = ut_kvp_getUInt16Field( ut_kvp_profile_getInstance(), "dsVideoPort/connectedAOP" ); gDSVideoPortConfiguration = (dsVideoPortConfiguration_t*) calloc(gDSvideoPort_NumberOfPorts, sizeof(dsVideoPortConfiguration_t)); if(gDSVideoPortConfiguration == NULL) { @@ -100,12 +98,12 @@ int test_dsVideoPort_parse_configuration() return -1; } - status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", gDeviceType, TEST_DEVICE_TYPE_SIZE); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), "dsVideoPort/Type", gDeviceType, TEST_DS_DEVICE_TYPE_SIZE); if (status == UT_KVP_STATUS_SUCCESS ) { - if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DEVICE_TYPE_SIZE)) { + if (!strncmp(gDeviceType, TEST_TYPE_SOURCE_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { gSourceType = 1; } - else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DEVICE_TYPE_SIZE)) { + else if(!strncmp(gDeviceType, TEST_TYPE_SINK_VALUE, TEST_DS_DEVICE_TYPE_SIZE)) { gSourceType = 0; } else { @@ -127,10 +125,7 @@ int test_dsVideoPort_parse_configuration() return -1; } - - for(int i = 0; i < gDSvideoPort_NumberOfPorts; i++) { - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Typeid" , i+1); gDSVideoPortConfiguration[i].typeid = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); @@ -155,9 +150,6 @@ int test_dsVideoPort_parse_configuration() snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/colorspaces" , i+1 ); gDSVideoPortConfiguration[i].colorspaces = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/Supported_color_depth_capabilities" , i+1 ); - gDSVideoPortConfiguration[i].Supported_color_depth_capabilities = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/DisplaySurround" , i+1); gDSVideoPortConfiguration[i].DisplaySurround = ut_kvp_getBoolField( ut_kvp_profile_getInstance(), key_string ); @@ -179,7 +171,28 @@ int test_dsVideoPort_parse_configuration() snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/matrix_coefficients" , i+1 ); gDSVideoPortConfiguration[i].matrix_coefficients = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - } + for(int j = 0; j < gDSVideoPortConfiguration[i].numSupportedResolutions; j++) { + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/name", i+1, j+1); + status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, + gDSVideoPortConfiguration[i].supportedResolutons[j].name, + DS_VIDEO_PORT_RESOLUTION_NAME_MAX); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/pixelResolution", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutons[j].pixelResolution = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/aspectRatio", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutons[j].aspectRatio = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/stereoScopicMode", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutons[j].stereoScopicMode = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/frameRate", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutons[j].frameRate = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/interlaced", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutons[j].interlaced = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + } /* for(j) */ + } /* for(i) */ return 0; } @@ -196,4 +209,4 @@ void test_dsVideoPort_parse_term() /** @} */ // End of DS_VideoPort_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_dsVideoPort_parse_configuration.h b/src/test_dsVideoPort_parse_configuration.h index 54993a63..500da1f9 100644 --- a/src/test_dsVideoPort_parse_configuration.h +++ b/src/test_dsVideoPort_parse_configuration.h @@ -69,13 +69,13 @@ #include "dsVideoPort.h" - #define DS_VIDEO_PORT_KVP_SIZE 128 #define DS_VIDEO_PORT_TYPE_SIZE 8 #define DS_VIDEO_PORT_NAME_SIZE 64 #define DS_VIDEO_PORT_MODULE_NAME_SIZE 32 #define DS_VIDEO_PORT_RESOLUTION_MAX 32 #define DS_VIDEO_PORT_RESOLUTION_NAME_MAX 32 +#define DS_VIDEO_PORT_RESOLUTION_NUM_MAX 32 #define DS_VIDEO_PORT_MODULE_NAME "dsVideoPort" @@ -87,10 +87,9 @@ typedef struct _dsVideoPortConfiguration_t { bool dtcp_supported; bool hdcp_supported; int32_t numSupportedResolutions; - char supportedResolutons[DS_VIDEO_PORT_RESOLUTION_NMAX][]; + dsVideoPortResolution_t supportedResolutons[DS_VIDEO_PORT_RESOLUTION_NUM_MAX]; char defaultResolution[DS_VIDEO_PORT_RESOLUTION_NAME_MAX]; int32_t colorspaces; - int32_t Supported_color_depth_capabilities; bool DisplaySurround; int32_t SurroundMode; int32_t Supported_tv_resolutions_capabilities; @@ -105,17 +104,15 @@ extern dsVideoPortConfiguration_t* gDSVideoPortConfiguration; extern int32_t gDSvideoPort_NumberOfPorts; extern int32_t gDSvideoPort_color_depth; extern int32_t gDSvideoPort_connectedAOP; -//extern char gDSvideoPort_defaultResolution[TEST_UTIL_DEVICE_NAME_SIZE]; /*Function prototypes */ int test_dsVideoPort_parse_configuration(); void test_dsVideoPort_parse_term(); - #endif //__TEST_DS_VIDEO_PARSE_CONFIG_H__ /** @} */ // End of DS_VideoPort_HALTEST_PARSE_CONFIG_HEADER /** @} */ // End of DS_VideoPort_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_l2_dsDisplay.c b/src/test_l2_dsDisplay.c index a98302a9..c2d8d8eb 100644 --- a/src/test_l2_dsDisplay.c +++ b/src/test_l2_dsDisplay.c @@ -74,6 +74,8 @@ #include "dsDisplay.h" #include "test_parse_configuration.h" +#define DS_DSIPLAY_KVP_SIZE 128 + static int gTestGroup = 2; static int gTestID = 1; /** @@ -99,7 +101,7 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) unsigned char edidBytes[MAX_EDID_BYTES_LEN] = { 0 }; // Initialize the edidbytes to 0. int length = 0; // Initialize the length to 0. unsigned char edid_profile; - char key_string[TEST_DS_KEY_SIZE]; + char key_string[DS_DSIPLAY_KVP_SIZE]; // Step 1: Call dsDisplayInit ret = dsDisplayInit(); @@ -138,7 +140,7 @@ void test_l2_dsDisplay_RetrieveAndValidateEDID_sink(void) // Manufacturer ID for( uint8_t i = 8; i < 9; i++) { - snprintf(key_string, MAX_EDID_BYTES_LEN, "dsDisplay.edidBytes.%d", i); + snprintf(key_string, DS_DSIPLAY_KVP_SIZE, "dsDisplay.edidBytes.%d", i); edid_profile = UT_KVP_PROFILE_GET_UINT8(key_string); if(edid_profile != edidBytes[i]) { diff --git a/src/test_l2_dsVideoPort.c b/src/test_l2_dsVideoPort.c index 5c570aab..eeda7eda 100644 --- a/src/test_l2_dsVideoPort.c +++ b/src/test_l2_dsVideoPort.c @@ -76,7 +76,6 @@ #include #include "test_parse_configuration.h" -#include "test_dsVideoPort_parse_configuration.h" #include "dsVideoPort.h" static int gTestGroup = 2; @@ -112,6 +111,7 @@ void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -134,12 +134,13 @@ void test_l2_dsVideoPort_EnableDisabledVideoPorts(void) ret = dsEnableVideoPort(handle, false); UT_LOG_DEBUG("Return status: %d", ret); UT_ASSERT_EQUAL(ret, dsERR_NONE); + UT_LOG_DEBUG("Invoking dsIsVideoPortEnabled() with handle: %ld", handle); ret = dsIsVideoPortEnabled(handle, &enabled); UT_LOG_DEBUG("Return status: %d, Enabled: %d", ret, enabled); UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_ASSERT_EQUAL(enabled, false); - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -181,6 +182,7 @@ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -192,15 +194,16 @@ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) ret = dsIsDisplayConnected(handle, &connected); UT_LOG_DEBUG("Return status: %d, Connected: %d", ret, connected); UT_ASSERT_EQUAL(ret, dsERR_NONE); + /* check for source */ if(gSourceType == 1) { UT_ASSERT_EQUAL(connected, false); } else if(gSourceType == 0) { - if(gDSVideoPortConfiguration[port].typeid == dsVIDEOPORT_TYPE_INTERNAL){ + if(gDSVideoPortConfiguration[port].typeid == dsVIDEOPORT_TYPE_INTERNAL) { UT_ASSERT_EQUAL(connected, true); } - else{ + else { UT_ASSERT_EQUAL(connected, false); } } @@ -213,14 +216,14 @@ void test_l2_dsVideoPort_VerifyDisplayAndPortStatus(void) UT_ASSERT_EQUAL(connected, false); } else if(gSourceType == 0) { - if(gDSVideoPortConfiguration[port].typeid == dsVIDEOPORT_TYPE_INTERNAL){ + if(gDSVideoPortConfiguration[port].typeid == dsVIDEOPORT_TYPE_INTERNAL) { UT_ASSERT_EQUAL(connected, true); } - else{ + else { UT_ASSERT_EQUAL(connected, false); } } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm"); ret = dsVideoPortTerm(); @@ -263,6 +266,7 @@ void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -287,9 +291,9 @@ void test_l2_dsVideoPort_RetrieveAndVerifySurroundModeCapabilities(void) } else if(gSourceType == 0){ /*check for sink device*/ - UT_ASSERT_EQUAL(surround, gDSVideoPortConfiguration[i].DisplaySurround); + UT_ASSERT_EQUAL(surround, gDSVideoPortConfiguration[port].DisplaySurround); } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -320,7 +324,6 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) dsError_t ret = dsERR_NONE; intptr_t handle = 0; - dsVideoPortResolution_t setResolution, getResolution; UT_LOG_DEBUG("Invoking dsVideoPortInit()"); ret = dsVideoPortInit(); @@ -329,6 +332,7 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -336,56 +340,44 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) continue; } - for (int i = dsVIDEO_PIXELRES_720x480; i < dsVIDEO_PIXELRES_MAX; i++) - { - for (int j = dsVIDEO_ASPECT_RATIO_4x3; j < dsVIDEO_ASPECT_RATIO_MAX; j++) + for (int i = 0; i < gDSVideoPortConfiguration[i].numSupportedResolutions; i++) { + dsVideoPortResolution_t getResolution; + dsVideoPortResolution_t *pSetResolution = &gDSVideoPortConfiguration[port].supportedResolutons[i]; + + UT_LOG_DEBUG("Invoking dsSetResolution() with handle and setResolution"); + + ret = dsSetResolution(handle, pSetResolution); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) { - for (int k = dsVIDEO_SSMODE_UNKNOWN; k < dsVIDEO_SSMODE_MAX; k++) - { - for (int l = dsVIDEO_FRAMERATE_UNKNOWN; l < dsVIDEO_FRAMERATE_MAX; l++) - { - strncpy(setResolution.name, "TestResolution",sizeof(setResolution.name)); - setResolution.pixelResolution = i; - setResolution.aspectRatio = j; - setResolution.stereoScopicMode = k; - setResolution.frameRate = l; - setResolution.interlaced = false; - - UT_LOG_DEBUG("Invoking dsSetResolution() with handle and setResolution"); - ret = dsSetResolution(handle, &setResolution); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - if (ret != dsERR_NONE) - { - UT_LOG_ERROR("dsSetResolution() failed with status: %d", ret); - continue; - } - - UT_LOG_DEBUG("Invoking dsGetResolution() with handle and getResolution"); - ret = dsGetResolution(handle, &getResolution); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - if (ret != dsERR_NONE) - { - UT_LOG_ERROR("dsGetResolution() failed with status: %d", ret); - continue; - } - - UT_LOG_DEBUG("Comparing setResolution and getResolution"); - UT_LOG_DEBUG("getResolution.pixelResolution= %d ",getResolution.pixelResolution); - UT_LOG_DEBUG("getResolution.aspectRatio= %d ",getResolution.aspectRatio); - UT_LOG_DEBUG("getResolution.stereoScopicMode= %d ",getResolution.stereoScopicMode); - UT_LOG_DEBUG("getResolution.frameRate= %d ",getResolution.frameRate); - UT_LOG_DEBUG("getResolution.interlaced= %d ",getResolution.interlaced); - - UT_ASSERT_EQUAL(setResolution.pixelResolution, getResolution.pixelResolution); - UT_ASSERT_EQUAL(setResolution.aspectRatio, getResolution.aspectRatio); - UT_ASSERT_EQUAL(setResolution.stereoScopicMode, getResolution.stereoScopicMode); - UT_ASSERT_EQUAL(setResolution.frameRate, getResolution.frameRate); - UT_ASSERT_EQUAL(setResolution.interlaced, getResolution.interlaced); - } - } + UT_LOG_ERROR("dsSetResolution() failed with status: %d", ret); + continue; } - } - } + + UT_LOG_DEBUG("Invoking dsGetResolution() with handle and getResolution"); + ret = dsGetResolution(handle, &getResolution); + UT_ASSERT_EQUAL(ret, dsERR_NONE); + if (ret != dsERR_NONE) + { + UT_LOG_ERROR("dsGetResolution() failed with status: %d", ret); + continue; + } + + UT_LOG_DEBUG("Comparing setResolution and getResolution"); + UT_LOG_DEBUG("getResolution.pixelResolution= %d ",getResolution.pixelResolution); + UT_LOG_DEBUG("getResolution.aspectRatio= %d ",getResolution.aspectRatio); + UT_LOG_DEBUG("getResolution.stereoScopicMode= %d ",getResolution.stereoScopicMode); + UT_LOG_DEBUG("getResolution.frameRate= %d ",getResolution.frameRate); + UT_LOG_DEBUG("getResolution.interlaced= %d ",getResolution.interlaced); + + UT_ASSERT_STRING_EQUAL(pSetResolution->name, getResolution.name); + UT_ASSERT_EQUAL(pSetResolution->pixelResolution, getResolution.pixelResolution); + UT_ASSERT_EQUAL(pSetResolution->aspectRatio, getResolution.aspectRatio); + UT_ASSERT_EQUAL(pSetResolution->stereoScopicMode, getResolution.stereoScopicMode); + UT_ASSERT_EQUAL(pSetResolution->frameRate, getResolution.frameRate); + UT_ASSERT_EQUAL(pSetResolution->interlaced, getResolution.interlaced); + } /* for (i) */ + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -424,6 +416,7 @@ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -441,7 +434,7 @@ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) else if(gSourceType == 0) { UT_ASSERT_EQUAL(resolutions, gDSVideoPortConfiguration[port].Supported_tv_resolutions_capabilities); } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm"); ret = dsVideoPortTerm(); @@ -456,7 +449,8 @@ void test_l2_dsVideoPort_VerifySupportedTvResolutions(void) * * This test verifies if the dsGetTVHDRCapabilities() function can successfully get the HDR capabilities. * The test first initializes the video port, gets the video port with dsVIDEOPORT_TYPE_INTERNAL and index 0, -* then gets the HDR capabilities. It asserts that all these operations return dsERR_NONE, and that the obtained capabilities match the expected value. +* then gets the HDR capabilities. It asserts that all these operations return dsERR_NONE, +* and that the obtained capabilities match the expected value. * * **Test Group ID:** 02@n * **Test Case ID:** 06@n @@ -482,6 +476,7 @@ void test_l2_dsVideoPort_GetHDRCapabilities(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -500,7 +495,7 @@ void test_l2_dsVideoPort_GetHDRCapabilities(void) else if(gSourceType == 0) { UT_ASSERT_EQUAL(capabilities, gDSVideoPortConfiguration[port].hdr_capabilities); } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -513,8 +508,9 @@ void test_l2_dsVideoPort_GetHDRCapabilities(void) /** * @brief This test checks the HDCP status of the video port * -* This test initializes the video port, gets the video port handle for each type, checks the HDCP status and finally terminates the video port. -* The test is designed to verify if the HDCP status is authenticated for each video port type. +* This test initializes the video port, gets the video port handle for each type, checks the +* HDCP status and finally terminates the video port. The test is designed to verify if the +* HDCP status is authenticated for each video port type. * * **Test Group ID:** 02@n * **Test Case ID:** 007@n @@ -540,6 +536,7 @@ void test_l2_dsVideoPort_GetHDCPStatus(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -566,11 +563,11 @@ void test_l2_dsVideoPort_GetHDCPStatus(void) else if(gSourceType == 0) { /*check for sink*/ UT_ASSERT_EQUAL(status, dsHDCP_STATUS_AUTHENTICATED); - if (status != dsHDCP_STATUS_AUTHENTICATED) { - UT_LOG_ERROR("HDCP status is not authenticated. Status: %d", status); - } + if (status != dsHDCP_STATUS_AUTHENTICATED) { + UT_LOG_ERROR("HDCP status is not authenticated. Status: %d", status); + } } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -610,6 +607,7 @@ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -622,7 +620,7 @@ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) UT_LOG_DEBUG("Return status: %d, Protocol Version: %d", ret, protocolVersion); UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_ASSERT_EQUAL(protocolVersion, gDSVideoPortConfiguration[port].hdcp_protocol_version); - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm"); ret = dsVideoPortTerm(); @@ -635,9 +633,10 @@ void test_l2_dsVideoPort_VerifyHDCPProtocolStatus(void) /** * @brief This test aims to set and get the HDMI preference for a video port * -* In this test, the HDMI preference for each type of video port is set and then retrieved to verify if the set operation was successful. -* This is done for all types of HDCP protocol versions. -* The test is important to ensure the correct functioning of the HDMI preference setting and getting operations for different types of video ports and HDCP protocol versions. +* In this test, the HDMI preference for each type of video port is set and then +* retrieved to verify if the set operation was successful. This is done for all types of +* HDCP protocol versions. The test is important to ensure the correct functioning of the +* HDMI preference setting and getting operations for different types of video ports and HDCP protocol versions. * * **Test Group ID:** 02@n * **Test Case ID:** 009@n @@ -653,7 +652,7 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) dsError_t ret = dsERR_NONE; intptr_t handle = 0; - dsHdcpProtocolVersion_t protocolVersion,hdcpCurrentProtocolGet; + dsHdcpProtocolVersion_t protocolVersion, hdcpCurrentProtocolGet; UT_LOG_DEBUG("Invoking dsVideoPortInit"); ret = dsVideoPortInit(); @@ -663,6 +662,7 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -675,25 +675,23 @@ void test_l2_dsVideoPort_SetAndGetHdmiPreference(void) UT_LOG_DEBUG("Return status: %d, Protocol Version: %d", ret, protocolVersion); UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_ASSERT_EQUAL(protocolVersion, gDSVideoPortConfiguration[port].hdcp_protocol_version); - if(protocolVersion == gDSVideoPortConfiguration[port].hdcp_protocol_version) - { - UT_LOG_DEBUG("Invoking dsSetHdmiPreference with handle: %ld and hdcpCurrentProtocol: %d", handle, protocolVersion); - ret = dsSetHdmiPreference(handle, &protocolVersion); - if (ret != dsERR_NONE) - { + + for(dsHdcpProtocolVersion_t version = dsHDCP_VERSION_1X; version <= protocolVersion; version++) { + UT_LOG_DEBUG("Invoking dsSetHdmiPreference with handle: %ld and hdcpCurrentProtocol: %d", handle, version); + ret = dsSetHdmiPreference(handle, &version); + if (ret != dsERR_NONE) { UT_LOG_ERROR("dsSetHdmiPreference failed with error: %d", ret); } UT_LOG_DEBUG("Invoking dsGetHdmiPreference with handle: %ld", handle); ret = dsGetHdmiPreference(handle, &hdcpCurrentProtocolGet); - if (ret != dsERR_NONE) - { + if (ret != dsERR_NONE) { UT_LOG_ERROR("dsGetHdmiPreference failed with error: %d", ret); } - UT_LOG_DEBUG("HDCP protocol version set: %d, HDCP protocol version get: %d", protocolVersion, hdcpCurrentProtocolGet); - UT_ASSERT_EQUAL(protocolVersion, hdcpCurrentProtocolGet); - } - } + UT_LOG_DEBUG("HDCP protocol version set: %d, HDCP protocol version get: %d", version, hdcpCurrentProtocolGet); + UT_ASSERT_EQUAL(version, hdcpCurrentProtocolGet); + } /* for (version) */ + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm"); ret = dsVideoPortTerm(); @@ -735,6 +733,7 @@ void test_l2_dsVideoPort_GetColorSpace(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -748,7 +747,7 @@ void test_l2_dsVideoPort_GetColorSpace(void) UT_LOG_DEBUG("dsGetColorSpace() returned color_space %d and status %d", color_space, ret); UT_ASSERT_EQUAL(color_space, gDSVideoPortConfiguration[port].colorspaces); - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -789,6 +788,7 @@ void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -801,7 +801,7 @@ void test_l2_dsVideoPort_CheckColorDepthCapabilities_source(void) UT_LOG_DEBUG("Return status: %d, Color Depth Capability: %u", ret, colorDepthCapability); UT_ASSERT_EQUAL(ret, dsERR_NONE); UT_ASSERT_EQUAL(colorDepthCapability, dsDISPLAY_COLORDEPTH_8BIT); - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm"); ret = dsVideoPortTerm(); @@ -842,6 +842,7 @@ void test_l2_dsVideoPort_GetColorDepth(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -855,7 +856,7 @@ void test_l2_dsVideoPort_GetColorDepth(void) UT_LOG_DEBUG("dsGetColorDepth() returned color_depth=%u and status=%d", color_depth, ret); UT_ASSERT_EQUAL(color_depth, gDSvideoPort_color_depth); - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -894,6 +895,7 @@ void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -901,8 +903,7 @@ void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) continue; } - for (int j = dsDISPLAY_COLORDEPTH_8BIT; j <= dsDISPLAY_COLORDEPTH_AUTO; j++) - { + for (int j = dsDISPLAY_COLORDEPTH_8BIT; j <= dsDISPLAY_COLORDEPTH_AUTO; j++) { colorDepthSet = j; UT_LOG_DEBUG("Invoking dsSetPreferredColorDepth() with handle %ld and colorDepth %d", handle, colorDepthSet); ret = dsSetPreferredColorDepth(handle, colorDepthSet); @@ -922,8 +923,8 @@ void test_l2_dsVideoPort_SetAndGetPreferredColorDepth_source(void) UT_LOG_DEBUG("Color depth set: %d, Color depth got: %d", colorDepthSet, colorDepthGet); UT_ASSERT_EQUAL(colorDepthGet, dsDISPLAY_COLORDEPTH_UNKNOWN); - } - } + } /* for (j) */ + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -965,6 +966,7 @@ void test_l2_dsVideoPort_GetQuantizationRange(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -983,7 +985,7 @@ void test_l2_dsVideoPort_GetQuantizationRange(void) else if(gSourceType == 0) { UT_ASSERT_EQUAL(quantization_range, gDSVideoPortConfiguration[port].quantization_ranges); } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -1024,6 +1026,7 @@ void test_l2_dsVideoPort_GetMatrixCoefficients(void) for (int port = 0; port < gDSvideoPort_NumberOfPorts; port++) { UT_LOG_DEBUG("Invoking dsGetVideoPort with type: %d and index: %d", gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index); + ret = dsGetVideoPort(gDSVideoPortConfiguration[port].typeid, gDSVideoPortConfiguration[port].index, &handle); UT_ASSERT_EQUAL(ret, dsERR_NONE); if (ret != dsERR_NONE) { @@ -1041,7 +1044,7 @@ void test_l2_dsVideoPort_GetMatrixCoefficients(void) else if(gSourceType == 0) { UT_ASSERT_EQUAL(matrix_coefficients, gDSVideoPortConfiguration[port].matrix_coefficients); } - } + } /* for (port) */ UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); ret = dsVideoPortTerm(); @@ -1051,72 +1054,6 @@ void test_l2_dsVideoPort_GetMatrixCoefficients(void) UT_LOG_INFO("Out %s\n", __FUNCTION__); } -#ifdef DS_VIDEO_PORT_FORCE_DISABLE4K - -/** -* @brief Test for setting and getting the ForceDisable4KSupport for a video port -* -* This test verifies the functionality of the dsSetForceDisable4KSupport() and dsGetForceDisable4KSupport() APIs. -* It checks if the APIs are able to correctly set and retrieve the ForceDisable4KSupport status for a video port. -* -* **Test Group ID:** 02@n -* **Test Case ID:** 016@n -* -* **Test Procedure:** -* Refer to Test specification documentation [ds-video-port_L2_Low-Level_TestSpecification.md](../docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md) -*/ - -void test_l2_dsVideoPort_SetAndGetForceDisable4KSupport(void) -{ - gTestID = 12; - UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); - - dsError_t ret = dsERR_NONE; - intptr_t handle = 0; - bool disable; - - UT_LOG_DEBUG("Invoking dsVideoPortInit()"); - ret = dsVideoPortInit(); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - UT_LOG_DEBUG("dsVideoPortInit() returned %d", ret); - - for (int type = dsVIDEOPORT_TYPE_RF; type < dsVIDEOPORT_TYPE_MAX; type++) - { - UT_LOG_DEBUG("Invoking dsGetVideoPort() with type: %d and index: 0", type); - ret = dsGetVideoPort(type, 0, &handle); - UT_LOG_DEBUG("Handle: %ld, Return status: %d", handle, ret); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - if (ret != dsERR_NONE) - { - UT_LOG_ERROR("dsGetVideoPort failed with ret: %d", ret); - continue; - } - for (int i = 0; i < 2; i++) { - disable = (i == 0) ? true : false; - UT_LOG_DEBUG("Invoking dsSetForceDisable4KSupport() with handle: %ld, disable: %d", handle, disable); - ret = dsSetForceDisable4KSupport(handle, disable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_LOG_DEBUG("Return status: %d", ret); - - bool getDisable; - UT_LOG_DEBUG("Invoking dsGetForceDisable4KSupport() with handle: %ld", handle); - ret = dsGetForceDisable4KSupport(handle, &getDisable); - UT_ASSERT_EQUAL(ret, dsERR_NONE); - UT_ASSERT_EQUAL(getDisable, disable); - UT_LOG_DEBUG("Disable: %d, Return status: %d", disable, ret); - } - } - - UT_LOG_DEBUG("Invoking dsVideoPortTerm()"); - ret = dsVideoPortTerm(); - UT_LOG_DEBUG("dsVideoPortTerm() returned %d", ret); - UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); - - UT_LOG_INFO("Out %s\n", __FUNCTION__); -} - -#endif - static UT_test_suite_t * pSuite = NULL; /** @@ -1127,9 +1064,13 @@ static UT_test_suite_t * pSuite = NULL; int test_l2_dsVideoPort_register(void) { - // Create the test suite - pSuite = UT_add_suite("[L2 dsVideoPort]", NULL, NULL); + if(gSourceType == 1) { + pSuite = UT_add_suite("[L2 dsVideoPort - Source]", NULL, NULL); + } + else { + pSuite = UT_add_suite("[L2 dsVideoPort - Sink]", NULL, NULL); + } if (pSuite == NULL) { return -1; } diff --git a/src/test_parse_configuration.c b/src/test_parse_configuration.c index 9ccb74c9..9084b46d 100644 --- a/src/test_parse_configuration.c +++ b/src/test_parse_configuration.c @@ -42,13 +42,13 @@ */ /** - * @defgroup DS_HALTEST_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @defgroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File * @{ * @parblock * - * ### Parse configuration functions for Device Settings HAL : + * ### Parse configuraion functions for Device Settings HAL : * - * Parse configuration functions required for the module across all vendors. + * Parse configuraion functions required for the module across all vendors. * * **Pre-Conditions:** None @n * **Dependencies:** None @n @@ -68,11 +68,11 @@ #include "test_parse_configuration.h" -/* Global Variables */ +/* Global Vairables */ int32_t gSourceType = -1; int32_t gDSModule = dsNone; -char gDeviceType[TEST_DEVICE_TYPE_SIZE] = {0}; +char gDeviceType[TEST_DS_DEVICE_TYPE_SIZE] = {0}; /* Parse configuration file */ int test_parse_configuration() @@ -134,17 +134,18 @@ int test_parse_configuration() if(status == UT_KVP_STATUS_SUCCESS) { gDSModule |= dsHdmiIn; } + return 0; } void test_parse_configuration_term() { test_dsAudio_parse_configuration_term(); - test_dsVideoPort_parse_configuration_term(); + test_dsVideoDevice_parse_configuration_term(); test_dsVideoDevice_parse_configuration_term(); } -/** @} */ // End of DS_HALTEST_PARSE_CONFIG +/** @} */ // End of Device_Settings_PARSE_CONFIG /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK diff --git a/src/test_parse_configuration.h b/src/test_parse_configuration.h index 486ba63f..960553f0 100644 --- a/src/test_parse_configuration.h +++ b/src/test_parse_configuration.h @@ -42,7 +42,7 @@ */ /** - * @defgroup DS_PARSE_CONFIG_HEADER Device Settings HAL Tests configuration parser Header File + * @defgroup Device_Settings_PARSE_CONFIG_HEADER Device Settings HAL Tests configuration parser Header File * @{ * @parblock * @@ -68,14 +68,14 @@ #include "test_dsVideoDevice_parse_configuration.h" #include "test_dsVideoPort_parse_configuration.h" -#define TEST_DEVICE_TYPE_SIZE 8 +#define TEST_DS_DEVICE_TYPE_SIZE 8 #define TEST_DS_MODULE_NAME_SIZE 32 #define TEST_TYPE_SOURCE_VALUE "source" #define TEST_TYPE_SINK_VALUE "sink" /* Global variables */ -extern char gDeviceType[TEST_DEVICE_TYPE_SIZE]; +extern char gDeviceType[TEST_DS_DEVICE_TYPE_SIZE]; extern int32_t gSourceType; extern int32_t gDSModule; @@ -97,7 +97,7 @@ void test_parse_configuration_term(); #endif //__TEST_PARSE_CONFIG_H__ -/** @} */ // End of DS_PARSE_CONFIG_HEADER +/** @} */ // End of Device_Settings_PARSE_CONFIG_HEADER /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings -/** @} */ // End of HPK \ No newline at end of file +/** @} */ // End of HPK diff --git a/src/test_register.c b/src/test_register.c index 1c529931..41f344a4 100644 --- a/src/test_register.c +++ b/src/test_register.c @@ -64,6 +64,7 @@ * */ +#include #include #include "test_parse_configuration.h" From 157f4f652e8ffe2d2a3a7cc6394c334f8fbc0878 Mon Sep 17 00:00:00 2001 From: anbukannadhasan <154507930+Anbukannadhasan@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:20:58 +0100 Subject: [PATCH 61/64] gh #23 Modified the Code changes for L2 --- ...front-panel-display_High-Level_TestSpec.md | 81 +- ...display__L2_Low-Level_TestSpecification.md | 349 ++++++++ profiles/sink/Sink_FPD.yaml | 23 +- profiles/source/Source_FPD.yaml | 48 +- src/test_l2_dsFPD.c | 742 +++++++++++++++++- 5 files changed, 1093 insertions(+), 150 deletions(-) create mode 100755 docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md diff --git a/docs/pages/ds-front-panel-display_High-Level_TestSpec.md b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md index 37d85386..5d7b2537 100644 --- a/docs/pages/ds-front-panel-display_High-Level_TestSpec.md +++ b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md @@ -1,4 +1,4 @@ -# Device Settings Front Panel Display Test Document +# Device Settings Front Panel Display High Level Test Specification Documentation ## Table of Contents @@ -19,10 +19,12 @@ ## Introduction -This document provides an overview of the testing requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements, and expected deliverables. +This document provides an overview of the High Level Test Specification requirements for the `dsFPD` module. It outlines the scope of testing, objectives, testing levels and approaches, specific test requirements, emulator requirements, control plane requirements, and expected deliverables. The interface of the test is available here: [ds-fdp HAl Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) +`Note: There will be no test case implemented to verify the 7-segment front panel display LEDs.` + ## Module Description High-level overview: @@ -31,7 +33,6 @@ High-level overview: - It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. Interface specification is available here: [ds-fdp HAl Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-front-panel-display_halSpec.md) -`Note: There will be no test case implemented to verify the 7-segment front panel display LEDs.` ## Testing Scope @@ -41,10 +42,6 @@ Interface specification is available here: [ds-fdp HAl Spec](https://github.com/ |2|[Discrete `LED` Blink Control](#discrete-led-blink-control)|The test aims to set and verify the blink activity of the discrete `LED`s supported on the platform| |3|[Discrete `LED` Color Control](#discrete-led-color-control)|The test aims to set and verify the color control activities of the discrete `LED`s supported on the platform| |4|[Discrete Power `LED` Control](#discrete-power-led-control)|The test aims to set and verify the discrete Power `LED` supported on the platform| -|5|[FrontPanel Text and Brightness Display Control](#frontpanel-text-and-brightness-display-control)|The test aims to set and verify the text display and its brightness on the 7-Segment `LED` Display supported on the platform| -|6|[FrontPanel Display Text Mode and Scroll control](#frontpanel-display-text-mode-and-scroll-control)|The test aims to verify the `FPD` Mode control (Text/Time) and scroll control)| -|7|[FrontPanel Clock display control](#frontpanel-clock-display-control)|The test aims to set and verify the time display, Clock Display and set the Timer format on the 7-Segment `LED` Display supported on the platform| ------------ ## Discrete `LED` Brightness Control @@ -135,73 +132,3 @@ The emulator will boot with the `LED` configurations that should include ### Control Plane Requirement-Discrete Power `LED` control Due to platform-specific requirements, it may not be possible to capture the `LED` behavior in each state. - -## Frontpanel Text and Brightness Display Control - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|if the device supports a 7-Segment `LED` display, Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). Validate the displayed "Text" with help of the control plane |dsSetFPDMode(), dsSetFPText()|`N`|`Y`|`Y`|`Y`|`Y`| -|if the device supports a 7-Segment `LED` display, Set the `FPD` mode to "ANY" mode and set the valid "Text" using dsSetFPText(). Validate the displayed "Text" with help of the control plane |dsSetFPDMode(), dsSetFPText()|`N`|`Y`|||`Y`| -|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3.Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). 4.Set the brightness of the `LED` within the specified range (min-max) using dsSetFPTextBrightness() and verify using get function dsGetFPTextBrightness()|dsGetFPState(), dsSetFPState(), dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness(), dsGetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3.Set the `FPD` mode to "Text" mode and set the valid "Text" using dsSetFPText(). 4. Set the brightness of the `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.|dsGetFPState(), dsSetFPState(),dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|if the device supports a 7-Segment `LED` display,Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3.Set the `FPD` mode to "ANY" mode and set the valid "Text" using dsSetFPText(). 4.Set the brightness of the `LED` within the specified range (min-max) using dsSetFPTextBrightness() and verify using get function dsGetFPTextBrightness()|dsGetFPState(), dsSetFPState(), dsSetFPDMode(), dsSetFPText(), dsSetFPTextBrightness(), dsGetFPTextBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| - -### Test Startup Requirement-Frontpanel Text and Brightness Display Control - -NA - -### Emulator Requirement-Frontpanel Text and Brightness Display Control - -The emulator will boot with the configurations that should include - -1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. - -### Control Plane Requirement-Frontpanel Text and Brightness Display Control - -The control Panel should be able to read the data from the tool that can recognize the text display and brightness level. This data should be validated to declare the test result. - -## Frontpanel Display Text Mode and Scroll control - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Set the `FPD` mode to "Text" mode, "Any" mode, and "clock" mode to validate the "Text" display. The test should fail to display the "Text" when "Clock" mode is set ||Y|Y|||Read the "Text"| -|Set the `FPD` mode to "Text" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` ||N|Y|||Read the scroll rate| -|Set the `FPD` mode to "Any" mode, set the "Text" scroll duration, and set the "Text" to display using dsSetFPText `API` ||N|Y|||Read the scroll rate| - -### Test Startup Requirement-Frontpanel Display Text Mode and Scroll control - -NA - -### Emulator Requirement-Frontpanel Display Text Mode and Scroll control - -The emulator will boot with the configurations that should include - -1. 7-seg `FPD` Text/Clock mode, Brightness, cyclerate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. - -### Control Plane Requirement-Frontpanel Display Text Mode and Scroll control - -The control Panel should be able to read the data from the tool that shall recognize the text display and validate the scroll activity. This data should be validated to declare the test result. - -## Frontpanel Clock Display Control - -|Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| -|-----------|--------|--|--|------|----|--------------------------| -|Set the `FPD` Time Format using set `API` and validate the same with get `API` ||Y|N|||NA| -|Set the `FPD` Time with supported formats. ||N|Y|||Read the Time and Time Format| -|Enable the `FPD` Clock display and validate||N|Y|||Read the Time and Time Format| -|Disable the `FPD` Clock display and validate ||N|Y|||validate that NO Time is displayed| - -### Test Startup Requirement-Frontpanel Clock Display Control - -NA - -### Emulator Requirement-Frontpanel Clock Display Control - -The emulator will boot with the configurations that should include - -1. 7-seg `FPD` Text/Clock mode, Brightness, cycle rate, supported characters, Rows, columns, and Vertical/Horizontal scroll supported on the platform. - -### Control Plane Requirement-Frontpanel Clock Display Control - -The control Panel should be able to read the data from the tool that shall recognize the "Time" display and validate. This data should be read and validated to declare the test result. diff --git a/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md b/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md new file mode 100755 index 00000000..a71c7082 --- /dev/null +++ b/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md @@ -0,0 +1,349 @@ +# Device Setting FPD L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the Low level l2 Specification and Procedure Documentation for the DSFPD module. + +### 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 + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [ds-front-panel-display_High-Level_TestSpec.md](ds-front-panel-display_High-Level_TestSpec.md) +- `HAL Interface file` - [dsFPD Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateON_SetBrightness`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check profile file using path `dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type` 2. for Brightness range checking by profile file using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS or MIN_BRIGHTNESS` using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS or MIN_BRIGHTNESS`| +|Test Group|02| +|Test Case ID|001| +|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 1 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) sub-module using dsFPInit() | None | dsERR_NONE | Should be successful | +| 02 | Iterate over the supported FPD indicators from profile file and get the current state of the FP using dsGetFPState() | eIndicator = list of supported FPD indicators | dsERR_NONE, state = current state | Should be successful | +| 03 | If the current state of the FP is OFF, set it to ON using dsSetFPState() |eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | +| 04 | Set the brightness of the LED using dsSetFPBrightness() | eIndicator = current indicator, eBrightness = random value within minimum and maximum brightness from profile| dsERR_NONE | Should be successful | +| 05 | Verify the brightness of the LED using dsGetFPBrightness() | eIndicator = current indicator | dsERR_NONE, brightness = eBrightness | Should be successful | +| 06 | Terminate the Front Panel Display (FPD) sub-module using dsFPTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators from profile} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState API for each indicator] + C -->|FP OFF| E[Call dsSetFPState API to set FP ON] + C -->|FP ON| G[Call dsSetFPBrightness API
within min and max from profile] + E -->|Success| G + G -->|Success| H[Call dsGetFPBrightness API] + H -->|Success| I[Check if brightness matches value set] + I -->|Yes| B + B -->|End of loop| K[Call dsFPTerm API] + K -->|Success| L[Test case success] + K -->|Failure| K1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBrightness`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| +|Test Group|02| +|Test Case ID|002| +|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 2 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) sub-module using dsFPInit() | None | dsERR_NONE | Should be successful | +| 02 | Iterate over the supported FPD indicators from profile file and check the current state of the FP using dsGetFPState() | eIndicator = eIndicator = list of supported FPD indicators | dsERR_NONE, state = current state | Should be successful | +| 03 | If the state is ON, set it to OFF using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | +| 04 | Set the brightness of the discrete LED using dsSetFPBrightness() | eIndicator = current indicator, eBrightness = random value 0-100 | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | +| 05 | Terminate the Front Panel Display sub-module using dsFPTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit] -->|Success| B{Iterate over
supported FPD
indicators} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState] + C --> |state is
dsFPD_STATE_ON| E[Call dsSetFPState with
dsFPD_STATE_OFF] + C --> |state is
dsFPD_STATE_OFF| G + E -->|Success| G[Call dsSetFPBrightness] + G -->|dsERR_OPERATION_NOT_SUPPORTED| B + B -->|End of loop| L[Call dsFPTerm] + L -->|Success| M[Test case success] + L -->|Failure| L1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBlink`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| +|Test Group|02| +|Test Case ID|003| +|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 3 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) using dsFPInit() | None | dsERR_NONE | Should be successful | +| 02 | Iterate over all FPD indicators from profile and get the current state using dsGetFPState() | eIndicator = list of supported FPD indicators | dsERR_NONE , state = current state| Should be successful | +| 03 | If the state is ON, set it to OFF using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | +| 04 | Set the blink functionality of discrete LED using dsSetFPBlink() | eIndicator = current indicator, uBlinkDuration = 500, uBlinkIterations = 10 | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | +| 05 | Terminate the FPD using dsFPTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success| B{Iterate over
supported FPD
indicators} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|Success| D[Check if FP state is ON] + D -->|State is ON| E[Call dsSetFPState API
to set it OFF] + D -->|State is OFF| F[Call dsSetFPBlink API] + E -->|Success| F + F --> |Return is
dsERR_OPERATION_NOT_SUPPORTED| B + B -->|End of loop| I[Call dsFPTerm API] + I -->|Success| J[Test case success] + I -->|Failure| I1[Test case fail] +``` + +### Test 4 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateON_Multi_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each SupportedFPDIndicators: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check profile file using path:`dsFPD/SupportedFPDIndicators` 2. for indicator color support check profile file using the path `dsFPD/SupportedFPDIndicators/DEFAULT_COLOR_MODE`) | +|Test Group|02| +|Test Case ID|004| +|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 4 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) using dsFPInit | None | dsERR_NONE | Should be successful | +| 02 | Iterate over all supported FPD indicators from profile | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | +| 03 | Get the current state of the FPD indicator using dsGetFPState | eIndicator = current indicator, state = valid buffer | dsERR_NONE, state = current state | Should be successful | +| 04 | If the state is OFF, set it to ON using dsSetFPState | eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | +| 05 | Set the color of the FPD indicator that supports multi-color using dsSetFPColor | eIndicator = current indicator, color = supported color from yaml file | dsERR_NONE | Should be successful | +| 06 | Get the color of the FPD indicator using dsGetFPColor | eIndicator = current indicator, getcolor = valid buffer | dsERR_NONE, getcolor = color | Should be successful | +| 07 | Terminate the FPD using dsFPTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit] -->|Success| B{Iterate over
the supported
FPD indicators} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState] + C -->|Success| D[Check if the state is OFF] + D -->|State is OFF| E[Call dsSetFPState to set it to ON] + D -->|State is ON| I + E -->|Success| I[Check if the indicator
supports multi-colored] + I -->|Multi-colored
is supported| G[Call dsSetFPColor
with supported colors] + I -->|Multi-colored
is not supported| B + G -->|Success| H[Call dsGetFPColor ] + H -->|get and set matches| B + B -->|No more indicators
to check| K[Call dsFPTerm] + K -->|Success| L[Test case success] + K -->|Failure| K1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| +|Test Group|02| +|Test Case ID|005| +|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 5 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) using dsFPInit | None | dsERR_NONE | Should be successful | +| 02 | Iterate over all supported FPD indicators | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | +| 03 | Get the current state of the FPD indicator using dsGetFPState | eIndicator = current indicator, state = address of state variable | dsERR_NONE , state = current state| Should be successful | +| 04 | If the state is ON, set it to OFF using dsSetFPState | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | +| 05 | Set the color functionality of the discrete LED using dsSetFPColor and check it returns dsERR_OPERATION_NOT_SUPPORTED | eIndicator = current indicator, eColor = supported colors from profile file | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | +| 06 | Terminate the FPD using dsFPTerm | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|State is ON| E[Call dsSetFPState API
to set it OFF] + C -->|State is OFF| F[Call dsSetFPColor API
with supported colors] + E -->|Success| F + F -->|Return is
dsERR_OPERATION_NOT_SUPPORTED| B + B --> I[Call dsFPTerm API] + I -->|Success| J[Test case success] + I -->|Failure| I1[Test case fail] +``` + +### Test 6 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_SetFPstateON_Single_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| +|Test Group|02| +|Test Case ID|006| +|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 6 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the Front Panel Display (FPD) using dsFPInit() | None | dsERR_NONE | Should be successful | +| 02 | Iterate over all FPD indicators and check if they are supported | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | +| 03 | Get the current state of the FPD indicator using dsGetFPState() | eIndicator = current indicator, state = valid buffer | dsERR_NONE, state = current state | Should be successful | +| 04 | If the state is OFF, set it to ON using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | +| 05 | Set the color of the FPD indicator that supports single-color using dsSetFPColor() | eIndicator = current indicator, eColor = valid color | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | +| 06 | Terminate the FPD using dsFPTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators} + A -->|Failure| A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|State is OFF| E[Call dsSetFPState API
to set it ON] + C -->|State is ON| F + E -->|Success| F[Check if indicator
supports single-color] + F -->|Supports single-colored| G[Call dsSetFPColor API
with supported color] + F -->|Doesn't support
single-color| B + G -->|Returns
dsERR_OPERATION_NOT_SUPPORTED| B + B -->|End of loop| I[Call dsFPTerm API] + I -->|Success| J[Test case success] + I -->|Failure| I1[Test case fail] +``` + +### Test 7 + +|Title|Details| +|--|--| +|Function Name|`test_l2_dsFPD_VerifyLEDStateTransitions`| +|Description|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.| +|Test Group|02| +|Test Case ID|007| +|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 7 + +| Variation / Steps | Description | Test Data | Expected Result | Notes| +| -- | --------- | ---------- | -------------- | ----- | +| 01 | Initialize the device using dsFPInit() | None | dsERR_NONE | Should be successful | +| 02 | Loop through all supported LED states and get the supported LED states using dsFPGetSupportedLEDStates() | supportedLEDStates = valid buffer | dsERR_NONE, supportedLEDStates = value from yaml file | Should be successful | +| 03 | For each state, set the LED to that state using dsFPSetLEDState() | setState = current LedState | dsERR_NONE | Should be successful | +| 04 | Verify the state using dsFPGetLEDState() | currentState = valid buffer | dsERR_NONE, currentState = setState | Should be successful | +| 05 | After looping through all states, terminate the device using dsFPTerm() | None | dsERR_NONE | Should be successful | + +```mermaid +graph TB +A[Call dsFPInit] -->|Success| C[Call dsFPGetSupportedLEDStates] +A -->|Failure| A1[Test case fail] +C -->|Success| D{Loop through all
supported LED states} +C -->|Failure| C1[Test case fail] +D --> E[Call dsFPSetLEDState
with current ledstate] +E -->|Success| G[Call dsFPGetLEDState] +G -->|Success| D +D -- End of loop--> I[Call dsFPTerm] +I -->|Success| J[Test case success] +I -->|Failure| I1[Test case fail] +``` diff --git a/profiles/sink/Sink_FPD.yaml b/profiles/sink/Sink_FPD.yaml index 6e509e78..dfabfb50 100644 --- a/profiles/sink/Sink_FPD.yaml +++ b/profiles/sink/Sink_FPD.yaml @@ -1,16 +1,17 @@ -dsFPD: +FPD: Type: sink - Name: element + Name: Panel_FPD_1_Indicator + Number_of_Indicators: 1 SupportedFPDIndicators : - - dsFPD_INDICATOR_POWER - dsFPD_INDICATOR_POWER : - MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs - MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs - DEFAULT_LEVELS : 10 # Default Brightness level for the FP text display - MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling - DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) - supportedColors : - - dsFPD_COLOR_RED + 1 : #dsFPD_INDICATOR_POWER + Indicator_Type : 0x01 #dsFPD_INDICATOR_POWER + MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs + MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs + DEFAULT_LEVELS : 10 # Default Brightness level for the FP text display + MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling + DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) + supportedColors : + - dsFPD_COLOR_RED 7segement_display_Support : false SupportedLEDStates: 0x1FE #dsFPD_LED_DEVICE_NONE, ///< Default state diff --git a/profiles/source/Source_FPD.yaml b/profiles/source/Source_FPD.yaml index a0bd6f5d..9da4a7ff 100644 --- a/profiles/source/Source_FPD.yaml +++ b/profiles/source/Source_FPD.yaml @@ -1,29 +1,29 @@ dsFPD: Type: source - Name: xi-one + Name: STB_FPD_1_Indicator SupportedFPDIndicators : - - dsFPD_INDICATOR_POWER - dsFPD_INDICATOR_POWER : - MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs - MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs - DEFAULT_LEVELS : 1 # Default Brightness level for the FP text display - MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling - DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) - MULTI_COLOR_MODE : 2 - supportedColors : - - dsFPD_COLOR_GREEN - - dsFPD_COLOR_RED - - dsFPD_COLOR_ORANGE - - dsFPD_COLOR_WHITE + 1: #dsFPD_INDICATOR_POWER + Indicator_Type : 0x01 #dsFPD_INDICATOR_POWER + MAX_BRIGHTNESS : 100 # Maximum brightness value of FPD LEDs + MIN_BRIGHTNESS : 0 # Minimum brightness value of FPD LEDs + DEFAULT_LEVELS : 1 # Default Brightness level for the FP text display + MAX_CYCLERATE : 2 # Maximum Rate at which LED is rotating during scrolling + DEFAULT_COLOR_MODE : 0 # Color Mode of LED (Single(0) or Multicolored(1)) + MULTI_COLOR_MODE : 2 + supportedColors : + - dsFPD_COLOR_GREEN + - dsFPD_COLOR_RED + - dsFPD_COLOR_ORANGE + - dsFPD_COLOR_WHITE SupportedLEDStates: 0x1FE - #dsFPD_LED_DEVICE_NONE, ///< Default state - #dsFPD_LED_DEVICE_ACTIVE, ///< Device is active - #dsFPD_LED_DEVICE_STANDBY, ///< Device is in standby mode - #dsFPD_LED_DEVICE_WPS_CONNECTING, ///< Device connecting to WPS - #dsFPD_LED_DEVICE_WPS_CONNECTED, ///< Device connected to WPS - #dsFPD_LED_DEVICE_WPS_ERROR, ///< Error when trying to connect to WPS - #dsFPD_LED_DEVICE_FACTORY_RESET, ///< Reset Device to factory base - #dsFPD_LED_DEVICE_USB_UPGRADE, ///< Updating from USB drive - #dsFPD_LED_DEVICE_SOFTWARE_DOWNLOAD_ERROR, ///< Error in downloading new software update - #dsFPD_LED_DEVICE_MAX ///< Out of range + #dsFPD_LED_DEVICE_NONE, ///< Default state + #dsFPD_LED_DEVICE_ACTIVE, ///< Device is active + #dsFPD_LED_DEVICE_STANDBY, ///< Device is in standby mode + #dsFPD_LED_DEVICE_WPS_CONNECTING, ///< Device connecting to WPS + #dsFPD_LED_DEVICE_WPS_CONNECTED, ///< Device connected to WPS + #dsFPD_LED_DEVICE_WPS_ERROR, ///< Error when trying to connect to WPS + #dsFPD_LED_DEVICE_FACTORY_RESET, ///< Reset Device to factory base + #dsFPD_LED_DEVICE_USB_UPGRADE, ///< Updating from USB drive + #dsFPD_LED_DEVICE_SOFTWARE_DOWNLOAD_ERROR, ///< Error in downloading new software update + #dsFPD_LED_DEVICE_MAX ///< Out of range 7segement_display_Support : false diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index 6298ba2f..93ea29a8 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -1,20 +1,19 @@ -/** -* If not stated otherwise in this file or this component's LICENSE -* file the following copyright and licenses apply: -* -* Copyright 2022 RDK Management +/* +* If not stated otherwise in this file or this component's LICENSE file the +* following copyright and licenses apply:* +* Copyright 2024 RDK Management * -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. */ /** @@ -58,63 +57,730 @@ * **Pre-Conditions:** None@n * **Dependencies:** None@n * - * TODO: Refer to L2 Specification documentation : [l2_module_test_specification_template.md](../docs/pages/l2_module_test_specification_template.md) + * Ref to API Definition specification documentation : [dsFPD_halSpec.md](../../docs/pages/ds-front-panel-display_halSpec.md) * * @endparblock */ - /** * @file test_l2_dsFPD.c * */ -#include -#include - #include #include +#include +#include "dsFPD.h" +#include + +#define DS_FPD_KEY_SIZE 64 + +static int gTestGroup = 2; +static int gTestID = 1; + +/** +* @brief This test function is designed to test the functionality of the Front Panel Display (FPD) indicators. +* +* This test function iterates over the supported FPD indicators, gets their current state, sets their state to ON +* if it's OFF, sets the brightness of the LED, verifies the brightness, and finally terminates the FPD sub-module. +* The purpose of this test is to ensure that the FPD indicators are functioning as expected and that the associated +* functions are working correctly. +* +* **Test Group ID:** 02@n +* **Test Case ID:** 001@n +* +* **Test Procedure:** +* Refer to UT specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +*/ + +void test_l2_dsFPD_SetFPstateON_SetBrightness(void) +{ + gTestID = 1; + UT_LOG_INFO("In %s [%02d%03d]\n", __FUNCTION__, gTestGroup, gTestID); + + dsError_t ret = dsERR_NONE; + dsFPDState_t state; + dsFPDBrightness_t brightness; + dsFPDBrightness_t getbrightness; + dsFPDBrightness_t minBrightness; + dsFPDBrightness_t maxBrightness; + dsFPDIndicator_t eIndicator; + int count = 0; + char buffer[DS_FPD_KEY_SIZE]; + char minbuffer[DS_FPD_KEY_SIZE], maxbuffer[DS_FPD_KEY_SIZE]; + ut_kvp_instance_t *pInstance = NULL; + + // Initialize the Front Panel Display (FPD) sub-module + UT_LOG_DEBUG("Invoking dsFPInit()"); + ret = dsFPInit(); + UT_LOG_DEBUG("dsFPInit returned : %d",ret); + UT_ASSERT_EQUAL_FATAL(ret, dsERR_NONE); + + pInstance = ut_kvp_profile_getInstance(); + count = ut_kvp_getUInt32Field(pInstance,"dsFPD/Number_of_Indicators"); + for (int i=0;i Date: Thu, 27 Jun 2024 19:10:22 +0100 Subject: [PATCH 62/64] gh #23 Updated l2 code --- ...front-panel-display_High-Level_TestSpec.md | 23 +- ...-display_L2_Low-Level_TestSpecification.md | 351 ++++++++++++++++++ ...display__L2_Low-Level_TestSpecification.md | 349 ----------------- profiles/sink/Sink_FPD.yaml | 2 +- src/test_l2_dsFPD.c | 73 ++-- 5 files changed, 406 insertions(+), 392 deletions(-) create mode 100755 docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md delete mode 100755 docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md diff --git a/docs/pages/ds-front-panel-display_High-Level_TestSpec.md b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md index 5d7b2537..d49b814e 100644 --- a/docs/pages/ds-front-panel-display_High-Level_TestSpec.md +++ b/docs/pages/ds-front-panel-display_High-Level_TestSpec.md @@ -33,7 +33,6 @@ High-level overview: - It facilitates the communication to `FP` `LED`s, aiding in their configuration and utilization within the system. The `LED`s is controlled by the caller based on the platform requirements. Interface specification is available here: [ds-fdp HAl Spec](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/ds-front-panel-display_halSpec.md) - ## Testing Scope |#|Test Functionality|Test Description| @@ -47,9 +46,9 @@ Interface specification is available here: [ds-fdp HAl Spec](https://github.com/ |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness(), dsGetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/MAX_BRIGHTNESS or MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS and dsFPD/SupportedFPDIndicators/[Indicator number]/MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS and dsFPD/SupportedFPDIndicators/[Indicator number]/MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness(), dsGetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1.Check the current state of the `FP`.2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` and verify brightness intensity with help of control plane.Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) 2. for Brightness range check Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS and dsFPD/SupportedFPDIndicators/[Indicator number]/MIN_BRIGHTNESS`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS and dsFPD/SupportedFPDIndicators/[Indicator number]/MIN_BRIGHTNESS`)|dsGetFPState(), dsSetFPState(), dsSetFPBrightness()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` Brightness Control @@ -71,8 +70,8 @@ Read the brightness intensity of the `LED` when set to a different level and com |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the blink functionality of discrete `LED` and verify Blink interval with help of control plane.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`NA`|`Y`|`Y`|`Y`|`Y`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. set the blink functionality of discrete `LED` and verify Blink interval with help of control plane.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsGetFPState(), dsSetFPState(), dsSetFPBlink()|`Y`|`NA`|`Y`|`Y`|`NA`| ### Test Startup Requirement-Discrete `LED` blink control @@ -92,10 +91,10 @@ Read the Blink interval from the `LED` detector device. |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor(), dsGetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and verify Blink interval with help of control plane. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/supported indicator/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor(), dsGetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`.Note: For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and verify Blink interval with help of control plane. Note: 1. For supported `FPD` indicators check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) 2. for indicator color support check Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/DEFAULT_COLOR_MODE`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/DEFAULT_COLOR_MODE`)|dsGetFPState(), dsSetFPState(), dsSetFPColor()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete `LED` color control @@ -116,8 +115,8 @@ The control panel should be able to read the color of the `LED` through the spec |Description|HAL APIs|L2|L3|Source|Sink|Control plane requirements| |-----------|--------|--|--|------|----|--------------------------| -|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.Note: 1.For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedLEDStates`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedLEDStates`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState(), dsFPGetLEDState()|`Y`|`NA`|`Y`|`Y`|`NA`| -|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state with control plane. 4. Ensure each state transition is valid.Note: For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedLEDStates`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedLEDStates`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState()|`NA`|`Y`|`Y`|`Y`|`Y`| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.Note: 1.For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState(), dsFPGetLEDState()|`Y`|`NA`|`Y`|`Y`|`NA`| +|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state with control plane. 4. Ensure each state transition is valid.Note: For supported `LED` states check profile file for Sink `Sink_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`) and for Source `Source_FPD.yaml`(path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`)|dsFPGetSupportedLEDStates(), dsFPSetLEDState()|`NA`|`Y`|`Y`|`Y`|`Y`| ### Test Startup Requirement-Discrete Power `LED` control diff --git a/docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md b/docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md new file mode 100755 index 00000000..ee743850 --- /dev/null +++ b/docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md @@ -0,0 +1,351 @@ +# Device Setting FPD L2 Low Level Test Specification and Procedure Documentation + +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Overview](#overview) +- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) +- [Definitions](#definitions) +- [References](#references) +- [Level 2 Test Procedure](#level-2-test-procedure) + +## Overview + +This document describes the Low level l2 Specification and Procedure Documentation for the DSFPD module. + +### 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 +- `FPD` \- Front Panel Display +- `LED` \- Light Emitting Diode + +### Definitions + +- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. + +### References + +- `High Level Test Specification` - [ds-front-panel-display_High-Level_TestSpec.md](ds-front-panel-display_High-Level_TestSpec.md) +- `HAL Interface file` - [dsFPD Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) + +## Level 2 Test Procedure + +The following functions are expecting to test the module operates correctly. + +### Test 1 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateON_SetBrightness`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FPD`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check configuration file using path `dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type` 2. for Brightness range checking by configuration file using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MIN_BRIGHTNESS` and `dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS`| +|Test Group|02| +|Test Case ID|001| +|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 1 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (`FPD`) sub-module using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over the supported `FPD` indicators from configuration file and get the current state of the `FPD` using `dsGetFPState`|eIndicator = list of supported FPD indicators|`dsERR_NONE`, state = current state|Should be successful| +|03|If the current state of the FP is OFF, set it to ON using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_ON`|`dsERR_NONE`|Should be successful| +|04|Set the brightness of the `LED` using `dsSetFPBrightness`|eIndicator = current indicator, eBrightness = random value within minimum and maximum brightness from profile|`dsERR_NONE`|Should be successful| +|05|Verify the brightness of the `LED` using `dsGetFPBrightness`|eIndicator = current indicator|`dsERR_NONE`, brightness = eBrightness|Should be successful| +|06|Terminate the Front Panel Display (`FPD`) sub-module using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success|B{Iterate over supported
FPD indicators from profile} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState API for each indicator] + C -->|FP OFF|E[Call dsSetFPState API to set FP ON] + C -->|FP ON|G[Call dsSetFPBrightness API
within min and max from profile] + E -->|Success|G + G -->|Success|H[Call dsGetFPBrightness API] + H -->|Success|I[Check if brightness matches value set] + I -->|Yes|B + B -->|End of loop|K[Call dsFPTerm API] + K -->|Success|L[Test case success] + K -->|Failure|K1[Test case fail] +``` + +### Test 2 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBrightness`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FPD`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check configuration file using the path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`| +|Test Group|02| +|Test Case ID|002| +|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 2 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (FPD) sub-module using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over the supported `FPD` indicators from configuration file and check the current state of the `FPD` using `dsGetFPState`|eIndicator = eIndicator = list of supported `FPD` indicators|`dsERR_NONE`, state = current state|Should be successful| +|03|If the state is ON, set it to OFF using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_OFF`|`dsERR_NONE`|Should be successful| +|04|Set the brightness of the discrete `LED` using `dsSetFPBrightness`|eIndicator = current indicator, eBrightness = random value 0-100|`dsERR_OPERATION_NOT_SUPPORTED`|Should be successful| +|05|Terminate the Front Panel Display sub-module using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit] -->|Success|B{Iterate over
supported FPD
indicators} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState] + C -->|state is
dsFPD_STATE_ON|E[Call dsSetFPState with
dsFPD_STATE_OFF] + C -->|state is
dsFPD_STATE_OFF|G + E -->|Success|G[Call dsSetFPBrightness] + G -->|dsERR_OPERATION_NOT_SUPPORTED|B + B -->|End of loop|L[Call dsFPTerm] + L -->|Success|M[Test case success] + L -->|Failure|L1[Test case fail] +``` + +### Test 3 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBlink`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check configuration file using the path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`| +|Test Group|02| +|Test Case ID|003| +|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 3 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (`FPD`) using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over all `FPD` indicators from profile and get the current state using `dsGetFPState`|eIndicator = list of supported `FPD` indicators |`dsERR_NONE` , state = current state|Should be successful| +|03|If the state is ON, set it to OFF using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_OFF`|`dsERR_NONE`|Should be successful| +|04|Set the blink functionality of discrete `LED` using `dsSetFPBlink`|eIndicator = current indicator, uBlinkDuration = 500, uBlinkIterations = 10|`dsERR_OPERATION_NOT_SUPPORTED`|Should be successful| +|05|Terminate the `FPD` using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success|B{Iterate over
supported FPD
indicators} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|Success|D[Check if FP state is ON] + D -->|State is ON|E[Call dsSetFPState API
to set it OFF] + D -->|State is OFF|F[Call dsSetFPBlink API] + E -->|Success|F + F -->|Return is
dsERR_OPERATION_NOT_SUPPORTED|B + B -->|End of loop|I[Call dsFPTerm API] + I -->|Success|J[Test case success] + I -->|Failure|I1[Test case fail] +``` + +### Test 4 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateON_Multi_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each SupportedFPDIndicators: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check configuration file using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type` 2. for indicator color support check configuration file using the path `dsFPD/SupportedFPDIndicators/[Indicator number]/DEFAULT_COLOR_MODE`)| +|Test Group|02| +|Test Case ID|004| +|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 4 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (`FPD`) using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over all supported `FPD` indicators from profile|eIndicator = list of supported `FPD` indicators |`dsERR_NONE`|Should be successful| +|03|Get the current state of the `FPD` indicator using `dsGetFPState`|eIndicator = current indicator, state = valid buffer|`dsERR_NONE`, state = current state|Should be successful| +|04|If the state is OFF, set it to ON using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_ON`|`dsERR_NONE`|Should be successful| +|05|Set the color of the `FPD` indicator that supports multi-color using `dsSetFPColor` |eIndicator = current indicator, color = supported color from configuration file|`dsERR_NONE`|Should be successful| +|06|Get the color of the `FPD` indicator using `dsGetFPColor`|eIndicator = current indicator, getcolor = valid buffer|`dsERR_NONE`, getcolor = color|Should be successful| +|07|Terminate the FPD using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit] -->|Success|B{Iterate over
the supported
FPD indicators} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState] + C -->|Success|D[Check if the state is OFF] + D -->|State is OFF|E[Call dsSetFPState to set it to ON] + D -->|State is ON|I + E -->|Success|I[Check if the indicator
supports multi-colored] + I -->|Multi-colored
is supported|G[Call dsSetFPColor
with supported colors] + I -->|Multi-colored
is not supported|B + G -->|Success|H[Call dsGetFPColor ] + H -->|get and set matches|B + B -->|No more indicators
to check|K[Call dsFPTerm] + K -->|Success|L[Test case success] + K -->|Failure|K1[Test case fail] +``` + +### Test 5 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FPD`. 2. If it's ON, set it to OFF. 3. Set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check configuration file using the path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`| +|Test Group|02| +|Test Case ID|005| +|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 5 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (`FPD`) using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over all supported `FPD` indicators|eIndicator = list of supported `FPD` indicators|`dsERR_NONE`|Should be successful| +|03|Get the current state of the `FPD` indicator using `dsGetFPState`|eIndicator = current indicator, state = address of state variable|`dsERR_NONE` , state = current state|Should be successful| +|04|If the state is ON, set it to OFF using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_OFF`|`dsERR_NONE`|Should be successful| +|05|Set the color functionality of the discrete `LED` using `dsSetFPColor` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`|eIndicator = current indicator, eColor = supported colors from configuration file|`dsERR_OPERATION_NOT_SUPPORTED`|Should be successful| +|06|Terminate the `FPD` using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success|B{Iterate over supported
FPD indicators} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|State is ON|E[Call dsSetFPState API
to set it OFF] + C -->|State is OFF|F[Call dsSetFPColor API
with supported colors] + E -->|Success|F + F -->|Return is
dsERR_OPERATION_NOT_SUPPORTED|B + B --> I[Call dsFPTerm API] + I -->|Success|J[Test case success] + I -->|Failure|I1[Test case fail] +``` + +### Test 6 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_SetFPstateON_Single_SetColor`| +|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FPD`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check configuration file using the path:`dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type`| +|Test Group|02| +|Test Case ID|006| +|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 6 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the Front Panel Display (`FPD`) using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Iterate over all `FPD` indicators and check if they are supported|eIndicator = list of supported `FPD` indicators|`dsERR_NONE`|Should be successful| +|03|Get the current state of the `FPD` indicator using `dsGetFPState`|eIndicator = current indicator, state = valid buffer|`dsERR_NONE`, state = current state|Should be successful| +|04|If the state is OFF, set it to ON using `dsSetFPState`|eIndicator = current indicator, state = `dsFPD_STATE_ON`|`dsERR_NONE`|Should be successful| +|05|Set the color of the `FPD` indicator that supports single-color using `dsSetFPColor` |eIndicator = current indicator, eColor = valid color|`dsERR_OPERATION_NOT_SUPPORTED`|Should be successful| +|06|Terminate the FPD using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB + A[Call dsFPInit API] -->|Success|B{Iterate over supported
FPD indicators} + A -->|Failure|A1[Test case fail] + B --> C[Call dsGetFPState API] + C -->|State is OFF|E[Call dsSetFPState API
to set it ON] + C -->|State is ON|F + E -->|Success|F[Check if indicator
supports single-color] + F -->|Supports single-colored|G[Call dsSetFPColor API
with supported color] + F -->|Doesn't support
single-color|B + G -->|Returns
dsERR_OPERATION_NOT_SUPPORTED|B + B -->|End of loop|I[Call dsFPTerm API] + I -->|Success|J[Test case success] + I -->|Failure|I1[Test case fail] +``` + +### Test 7 + +|Title|Details| +|-----|-------| +|Function Name|`test_l2_dsFPD_VerifyLEDStateTransitions`| +|Description|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using `dsFPSetLEDState`. 3. Verify the state using `dsFPGetLEDState`. 4. Ensure each state transition is valid.| +|Test Group|02| +|Test Case ID|007| +|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 7 + +|Variation / Steps|Description|Test Data|Expected Result|Notes| +|-----------------|-----------|---------|---------------|-----| +|01|Initialize the device using `dsFPInit`|None|`dsERR_NONE`|Should be successful| +|02|Loop through all supported `LED` states and get the supported `LED` states using `dsFPGetSupportedLEDStates`|supportedLEDStates = valid buffer|`dsERR_NONE`, supportedLEDStates = value from configuration file|Should be successful| +|03|For each state, set the `LED` to that state using `dsFPSetLEDState`|setState = current LedState|`dsERR_NONE`|Should be successful| +|04|Verify the state using `dsFPGetLEDState`|currentState = valid buffer|`dsERR_NONE`, currentState = setState|Should be successful| +|05|After looping through all states, terminate the device using `dsFPTerm`|None|`dsERR_NONE`|Should be successful| + +```mermaid +graph TB +A[Call dsFPInit] -->|Success|C[Call dsFPGetSupportedLEDStates] +A -->|Failure|A1[Test case fail] +C -->|Success|D{Loop through all
supported LED states} +C -->|Failure|C1[Test case fail] +D --> E[Call dsFPSetLEDState
with current ledstate] +E -->|Success|G[Call dsFPGetLEDState] +G -->|Success|D +D -- End of loop--> I[Call dsFPTerm] +I -->|Success|J[Test case success] +I -->|Failure|I1[Test case fail] +``` diff --git a/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md b/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md deleted file mode 100755 index a71c7082..00000000 --- a/docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md +++ /dev/null @@ -1,349 +0,0 @@ -# Device Setting FPD L2 Low Level Test Specification and Procedure Documentation - -## Table of Contents - -- [Table of Contents](#table-of-contents) -- [Overview](#overview) -- [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) -- [Definitions](#definitions) -- [References](#references) -- [Level 2 Test Procedure](#level-2-test-procedure) - -## Overview - -This document describes the Low level l2 Specification and Procedure Documentation for the DSFPD module. - -### 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 - -### Definitions - -- `ut-core` \- Common Testing Framework , which wraps a open-source framework that can be expanded to the requirements for future framework. - -### References - -- `High Level Test Specification` - [ds-front-panel-display_High-Level_TestSpec.md](ds-front-panel-display_High-Level_TestSpec.md) -- `HAL Interface file` - [dsFPD Header](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/include/dsFPD.h) - -## Level 2 Test Procedure - -The following functions are expecting to test the module operates correctly. - -### Test 1 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateON_SetBrightness`| -|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Set the brightness of the discrete `LED` within the specified range (min-max) and verify using the get function. Note: 1. For supported `FPD` indicators check profile file using path `dsFPD/SupportedFPDIndicators/[Indicator number]/Indicator_type` 2. for Brightness range checking by profile file using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS or MIN_BRIGHTNESS` using path:`dsFPD/SupportedFPDIndicators/[Indicator number]/MAX_BRIGHTNESS or MIN_BRIGHTNESS`| -|Test Group|02| -|Test Case ID|001| -|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 1 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) sub-module using dsFPInit() | None | dsERR_NONE | Should be successful | -| 02 | Iterate over the supported FPD indicators from profile file and get the current state of the FP using dsGetFPState() | eIndicator = list of supported FPD indicators | dsERR_NONE, state = current state | Should be successful | -| 03 | If the current state of the FP is OFF, set it to ON using dsSetFPState() |eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | -| 04 | Set the brightness of the LED using dsSetFPBrightness() | eIndicator = current indicator, eBrightness = random value within minimum and maximum brightness from profile| dsERR_NONE | Should be successful | -| 05 | Verify the brightness of the LED using dsGetFPBrightness() | eIndicator = current indicator | dsERR_NONE, brightness = eBrightness | Should be successful | -| 06 | Terminate the Front Panel Display (FPD) sub-module using dsFPTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators from profile} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState API for each indicator] - C -->|FP OFF| E[Call dsSetFPState API to set FP ON] - C -->|FP ON| G[Call dsSetFPBrightness API
within min and max from profile] - E -->|Success| G - G -->|Success| H[Call dsGetFPBrightness API] - H -->|Success| I[Check if brightness matches value set] - I -->|Yes| B - B -->|End of loop| K[Call dsFPTerm API] - K -->|Success| L[Test case success] - K -->|Failure| K1[Test case fail] -``` - -### Test 2 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBrightness`| -|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the brightness of the discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| -|Test Group|02| -|Test Case ID|002| -|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 2 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) sub-module using dsFPInit() | None | dsERR_NONE | Should be successful | -| 02 | Iterate over the supported FPD indicators from profile file and check the current state of the FP using dsGetFPState() | eIndicator = eIndicator = list of supported FPD indicators | dsERR_NONE, state = current state | Should be successful | -| 03 | If the state is ON, set it to OFF using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | -| 04 | Set the brightness of the discrete LED using dsSetFPBrightness() | eIndicator = current indicator, eBrightness = random value 0-100 | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | -| 05 | Terminate the Front Panel Display sub-module using dsFPTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit] -->|Success| B{Iterate over
supported FPD
indicators} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState] - C --> |state is
dsFPD_STATE_ON| E[Call dsSetFPState with
dsFPD_STATE_OFF] - C --> |state is
dsFPD_STATE_OFF| G - E -->|Success| G[Call dsSetFPBrightness] - G -->|dsERR_OPERATION_NOT_SUPPORTED| B - B -->|End of loop| L[Call dsFPTerm] - L -->|Success| M[Test case success] - L -->|Failure| L1[Test case fail] -``` - -### Test 3 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetBlink`| -|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the blink functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| -|Test Group|02| -|Test Case ID|003| -|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 3 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) using dsFPInit() | None | dsERR_NONE | Should be successful | -| 02 | Iterate over all FPD indicators from profile and get the current state using dsGetFPState() | eIndicator = list of supported FPD indicators | dsERR_NONE , state = current state| Should be successful | -| 03 | If the state is ON, set it to OFF using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | -| 04 | Set the blink functionality of discrete LED using dsSetFPBlink() | eIndicator = current indicator, uBlinkDuration = 500, uBlinkIterations = 10 | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | -| 05 | Terminate the FPD using dsFPTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit API] -->|Success| B{Iterate over
supported FPD
indicators} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState API] - C -->|Success| D[Check if FP state is ON] - D -->|State is ON| E[Call dsSetFPState API
to set it OFF] - D -->|State is OFF| F[Call dsSetFPBlink API] - E -->|Success| F - F --> |Return is
dsERR_OPERATION_NOT_SUPPORTED| B - B -->|End of loop| I[Call dsFPTerm API] - I -->|Success| J[Test case success] - I -->|Failure| I1[Test case fail] -``` - -### Test 4 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateON_Multi_SetColor`| -|Description|Iterate over supported `FPD` indicators. For each SupportedFPDIndicators: 1. Check the current state of the `FP`. 2. If it's OFF, set it to ON. 3. Check the indicator supports multi-colored 4. set the color functionality of discrete `LED` available by setting and getting different colors supported by the discrete `LED` Note: 1. For supported `FPD` indicators check profile file using path:`dsFPD/SupportedFPDIndicators` 2. for indicator color support check profile file using the path `dsFPD/SupportedFPDIndicators/DEFAULT_COLOR_MODE`) | -|Test Group|02| -|Test Case ID|004| -|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 4 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) using dsFPInit | None | dsERR_NONE | Should be successful | -| 02 | Iterate over all supported FPD indicators from profile | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | -| 03 | Get the current state of the FPD indicator using dsGetFPState | eIndicator = current indicator, state = valid buffer | dsERR_NONE, state = current state | Should be successful | -| 04 | If the state is OFF, set it to ON using dsSetFPState | eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | -| 05 | Set the color of the FPD indicator that supports multi-color using dsSetFPColor | eIndicator = current indicator, color = supported color from yaml file | dsERR_NONE | Should be successful | -| 06 | Get the color of the FPD indicator using dsGetFPColor | eIndicator = current indicator, getcolor = valid buffer | dsERR_NONE, getcolor = color | Should be successful | -| 07 | Terminate the FPD using dsFPTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit] -->|Success| B{Iterate over
the supported
FPD indicators} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState] - C -->|Success| D[Check if the state is OFF] - D -->|State is OFF| E[Call dsSetFPState to set it to ON] - D -->|State is ON| I - E -->|Success| I[Check if the indicator
supports multi-colored] - I -->|Multi-colored
is supported| G[Call dsSetFPColor
with supported colors] - I -->|Multi-colored
is not supported| B - G -->|Success| H[Call dsGetFPColor ] - H -->|get and set matches| B - B -->|No more indicators
to check| K[Call dsFPTerm] - K -->|Success| L[Test case success] - K -->|Failure| K1[Test case fail] -``` - -### Test 5 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateOFF_SetColor`| -|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| -|Test Group|02| -|Test Case ID|005| -|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 5 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) using dsFPInit | None | dsERR_NONE | Should be successful | -| 02 | Iterate over all supported FPD indicators | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | -| 03 | Get the current state of the FPD indicator using dsGetFPState | eIndicator = current indicator, state = address of state variable | dsERR_NONE , state = current state| Should be successful | -| 04 | If the state is ON, set it to OFF using dsSetFPState | eIndicator = current indicator, state = dsFPD_STATE_OFF | dsERR_NONE | Should be successful | -| 05 | Set the color functionality of the discrete LED using dsSetFPColor and check it returns dsERR_OPERATION_NOT_SUPPORTED | eIndicator = current indicator, eColor = supported colors from profile file | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | -| 06 | Terminate the FPD using dsFPTerm | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState API] - C -->|State is ON| E[Call dsSetFPState API
to set it OFF] - C -->|State is OFF| F[Call dsSetFPColor API
with supported colors] - E -->|Success| F - F -->|Return is
dsERR_OPERATION_NOT_SUPPORTED| B - B --> I[Call dsFPTerm API] - I -->|Success| J[Test case success] - I -->|Failure| I1[Test case fail] -``` - -### Test 6 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_SetFPstateON_Single_SetColor`| -|Description|Iterate over supported `FPD` indicators. For each supported indicator: 1. Check the current state of the `FP`. 2. If it's ON, set it to OFF. 3. Check the indicator supports `single-colored` 4. set the color functionality of discrete `LED` and check it returns `dsERR_OPERATION_NOT_SUPPORTED`. Note: For supported `FPD` indicators check profile file using the path:`dsFPD/SupportedFPDIndicators`| -|Test Group|02| -|Test Case ID|006| -|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 6 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the Front Panel Display (FPD) using dsFPInit() | None | dsERR_NONE | Should be successful | -| 02 | Iterate over all FPD indicators and check if they are supported | eIndicator = list of supported FPD indicators | dsERR_NONE | Should be successful | -| 03 | Get the current state of the FPD indicator using dsGetFPState() | eIndicator = current indicator, state = valid buffer | dsERR_NONE, state = current state | Should be successful | -| 04 | If the state is OFF, set it to ON using dsSetFPState() | eIndicator = current indicator, state = dsFPD_STATE_ON | dsERR_NONE | Should be successful | -| 05 | Set the color of the FPD indicator that supports single-color using dsSetFPColor() | eIndicator = current indicator, eColor = valid color | dsERR_OPERATION_NOT_SUPPORTED | Should be successful | -| 06 | Terminate the FPD using dsFPTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB - A[Call dsFPInit API] -->|Success| B{Iterate over supported
FPD indicators} - A -->|Failure| A1[Test case fail] - B --> C[Call dsGetFPState API] - C -->|State is OFF| E[Call dsSetFPState API
to set it ON] - C -->|State is ON| F - E -->|Success| F[Check if indicator
supports single-color] - F -->|Supports single-colored| G[Call dsSetFPColor API
with supported color] - F -->|Doesn't support
single-color| B - G -->|Returns
dsERR_OPERATION_NOT_SUPPORTED| B - B -->|End of loop| I[Call dsFPTerm API] - I -->|Success| J[Test case success] - I -->|Failure| I1[Test case fail] -``` - -### Test 7 - -|Title|Details| -|--|--| -|Function Name|`test_l2_dsFPD_VerifyLEDStateTransitions`| -|Description|Verify the `LED` state transitions 1.Loop through all supported `LED` states. 2. For each state, set the `LED` to that state using dsFPSetLEDState(). 3. Verify the state using dsFPGetLEDState(). 4. Ensure each state transition is valid.| -|Test Group|02| -|Test Case ID|007| -|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 7 - -| Variation / Steps | Description | Test Data | Expected Result | Notes| -| -- | --------- | ---------- | -------------- | ----- | -| 01 | Initialize the device using dsFPInit() | None | dsERR_NONE | Should be successful | -| 02 | Loop through all supported LED states and get the supported LED states using dsFPGetSupportedLEDStates() | supportedLEDStates = valid buffer | dsERR_NONE, supportedLEDStates = value from yaml file | Should be successful | -| 03 | For each state, set the LED to that state using dsFPSetLEDState() | setState = current LedState | dsERR_NONE | Should be successful | -| 04 | Verify the state using dsFPGetLEDState() | currentState = valid buffer | dsERR_NONE, currentState = setState | Should be successful | -| 05 | After looping through all states, terminate the device using dsFPTerm() | None | dsERR_NONE | Should be successful | - -```mermaid -graph TB -A[Call dsFPInit] -->|Success| C[Call dsFPGetSupportedLEDStates] -A -->|Failure| A1[Test case fail] -C -->|Success| D{Loop through all
supported LED states} -C -->|Failure| C1[Test case fail] -D --> E[Call dsFPSetLEDState
with current ledstate] -E -->|Success| G[Call dsFPGetLEDState] -G -->|Success| D -D -- End of loop--> I[Call dsFPTerm] -I -->|Success| J[Test case success] -I -->|Failure| I1[Test case fail] -``` diff --git a/profiles/sink/Sink_FPD.yaml b/profiles/sink/Sink_FPD.yaml index dfabfb50..ac6d0d6b 100644 --- a/profiles/sink/Sink_FPD.yaml +++ b/profiles/sink/Sink_FPD.yaml @@ -1,4 +1,4 @@ -FPD: +dsFPD: Type: sink Name: Panel_FPD_1_Indicator Number_of_Indicators: 1 diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index 93ea29a8..d04278fd 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -90,7 +90,7 @@ static int gTestID = 1; * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateON_SetBrightness(void) @@ -196,7 +196,7 @@ void test_l2_dsFPD_SetFPstateON_SetBrightness(void) * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateOFF_SetBrightness(void) @@ -222,7 +222,7 @@ void test_l2_dsFPD_SetFPstateOFF_SetBrightness(void) count = ut_kvp_getListCount(pInstance,"dsFPD/Number_of_Indicators"); for (int i=0;i Date: Fri, 28 Jun 2024 07:26:18 +0100 Subject: [PATCH 63/64] gh #76 Updated L2 code, README.md,doxygen --- README.md | 44 +++++++++---- ...l_4K_Display.yaml => Sink_4K_Display.yaml} | 2 +- ...iteInput.yaml => Sink_CompositeInput.yaml} | 0 ...4K_Display.yaml => Source_4K_Display.yaml} | 0 src/test_dsAudio_parse_configuration.c | 21 ++++--- src/test_dsAudio_parse_configuration.h | 16 ++--- src/test_dsVideoDevice_parse_configuration.c | 12 ++-- src/test_dsVideoDevice_parse_configuration.h | 16 ++--- src/test_dsVideoPort_parse_configuration.c | 26 ++++---- src/test_dsVideoPort_parse_configuration.h | 2 +- src/test_l2_dsAudio.c | 62 +++++++++---------- src/test_l2_dsCompositeIn.c | 6 +- src/test_l2_dsFPD.c | 14 ++--- src/test_l2_dsHdmiIn.c | 2 - src/test_l2_dsVideoPort.c | 2 +- 15 files changed, 117 insertions(+), 108 deletions(-) rename profiles/sink/{Panel_4K_Display.yaml => Sink_4K_Display.yaml} (99%) rename profiles/sink/{Panel_CompositeInput.yaml => Sink_CompositeInput.yaml} (100%) rename profiles/source/{Puck_4K_Display.yaml => Source_4K_Display.yaml} (100%) diff --git a/README.md b/README.md index 402ef508..62773053 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,24 @@ - [Description](#description) - [Reference Documents](#reference-documents) - [Notes](#notes) +- [Known Issues](#known-issues) ## Acronyms, Terms and Abbreviations - `L1` - Functional Tests +- `L2` - Module functional Testing - `HAL` - Hardware Abstraction Layer - `API` - Application Programming Interface - `DS` - Device Settings - `FPD` - Front Panel Display - `HDMIIn` - HDMI Input - `CompositeIn` - Composite Input +- `High-Level Test Specification` : These specification will provide a broad overview of the system's functionality from the callers' perspective. It focuses on major use cases, system behavior, and overall caller experience. +- `Low-Level Test Specification` : These specification will delve deeper into the technical details. They will define specific test cases with inputs, expected outputs, and pass/fail criteria for individual functionalities, modules, or APIs. ## Description -This repository contains the Unit Test Suites (L1) for the following submodules of Device Settings `HAL` : +This repository contains the Unit Test Suites (L1 & L2) for the following submodules of Device Settings `HAL` : - `DS` Audio `HAL` - `DS` Video Device `HAL` @@ -34,20 +38,34 @@ This repository contains the Unit Test Suites (L1) for the following submodules |SNo|Document Name|Document Description|Document Link| |---|-------------|--------------------|-------------| -|1|Device Settings `HAL`|This document provides specific information on each `DS` sub-module's `APIs` for which tests are written in this module|[`DS` `HAL` Guide - v2.0.0]( https://github.com/rdkcentral/rdk-halif-device_settings/blob/2.0.0 "Device Settings `HAL` Guide" )| -|2|`DS` Audio `L1` Tests |`L1` Test Case File for `DS` Audio `HAL`|[test_l1_dsAudio.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsAudio.c "test_l1_dsAudio.c" )| -|3|`DS` Video Device `L1` Tests|`L1` Test Case File for `DS` Video Device `HAL`|[test_l1_dsVideoDevice.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsVideoDevice.c "test_l1_dsVideoDevice.c" )| -|4|`DS` Video Port `L1` Tests |`L1` Test Case File for `DS` Video Port `HAL`|[test_l1_dsVideoPort.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsVideoPort.c "test_l1_dsVideoPort.c" )| -|5|`DS` Display `L1` Tests |`L1` Test Case File for `DS` Display `HAL`|[test_l1_dsDisplay.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsDisplay.c "test_l1_dsDisplay.c" )| -|6|`DS` Front Panel Display `L1` Tests |`L1` Test Case File for `DS` Front Panel Display `HAL`|[test_l1_dsFPD.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsFPD.c "test_l1_dsFPD.c" )| -|7|`DS` Host `L1` Tests |`L1` Test Case File for `DS` Host `HAL`|[test_l1_dsHost.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsHost.c "test_l1_dsHost.c")| -|8|`DS` HDMI Input `L1` Tests |`L1` Test Case File for `DS` HDMI Input `HAL`|[test_l1_dsHdmiIn.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsHdmiIn.c "test_l1_dsHdmiIn.c" )| -|9|`DS` Composite Input `L1` Tests |`L1` Test Case File for `DS` Composite Input `HAL`|[test_l1_dsCompositeIn.c]( https://github.com/rdkcentral/rdk-halif-test-device_settings/blob/main/src/test_l1_dsCompositeIn.c "test_l1_dsCompositeIn.c" )| +|1|Device Settings `HAL`|This document provides specific information on each `DS` sub-module's `APIs` for which tests are written in this module|[`DS` `HAL` Guide](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/README.md)| +|2|`DS` Audio High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Audio module.|[ds-audio_High-Level_TestSpecification.md]( docs/pages/ds-audio_High-Level_TestSpecification.md)| +|3|`DS` Audio `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Audio module|[ds-audio_High-Level_TestSpecification.md]( docs/pages/ds-audio_L2_Low-Level_TestSpecification.md)| +|4|`DS` Video Device High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Video Device module.|[ds-video-device_High-Level_TestSpec.md]( docs/pages/ds-video-device_High-Level_TestSpec.md)| +|5|`DS` Video Device `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Video Device module|[ds-video-device_L2-Low-Level_TestSpec.md]( docs/pages/ds-video-device_L2-Low-Level_TestSpec.md)| +|6|`DS` Video Port High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Video Port module.|[ds-video-port_High-Level_TestSpec.md]( docs/pages/ds-video-port_High-Level_TestSpec.md)| +|7|`DS` Video Port `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Video Port module|[ds-video-port_L2_Low-Level_TestSpecification.md]( docs/pages/ds-video-port_L2_Low-Level_TestSpecification.md)| +|8|`DS` Display High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Display module.|[ds-display-high-Level_TestSpec.md]( docs/pages/ds-display-high-Level_TestSpec.md)| +|9|`DS` Display `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Display module|[ds-display-L2-Low-Level_TestSpec.md]( docs/pages/ds-display-L2-Low-Level_TestSpec.md)| +|10|`DS` Front Panel Display High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Front Panel Display module.|[ds-front-panel-display_High-Level_TestSpec.md]( docs/pages/ds-front-panel-display_High-Level_TestSpec.md)| +|11|`DS` Front Panel Display `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Front Panel Display module|[ds-front-panel-display_L2_Low-Level_TestSpecification.md]( docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md)| +|12|`DS` Host High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Host module.|[ds-host_High-Level_TestSpecification.md]( docs/pages/ds-host_High-Level_TestSpecification.md)| +|13|`DS` Host `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Host module|[ds-host_L2_Low-Level_TestSpecification.md]( docs/pages/ds-host_L2_Low-Level_TestSpecification.md)| +|14|`DS` HDMI Input High-Level Test Spec |`High Level Test Specification` Documentation for `DS` HDMI Input module.|[ds-hdmi-in-High-Level_TestSpec.md]( docs/pages/ds-hdmi-in-High-Level_TestSpec.md)| +|15|`DS` HDMI Input `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` HDMI Input module|[ds-hdmi-in-L2-Low-Level_TestSpec.md]( docs/pages/ds-hdmi-in-L2-Low-Level_TestSpec.md)| +|16|`DS` Composite Input High-Level Test Spec |`High Level Test Specification` Documentation for `DS` Composite Input module.|[ds-compositeIn-High-Level_TestSpec.md]( docs/pages/ds-compositeIn-High-Level_TestSpec.md)| +|17|`DS` Composite Input `L2` Low-Level Test Spec |`L2` `Low Level Test Specification` Documentation for `DS` Composite Input module|[ds-compositeIn-L2-Low-Level_TestSpec.md]( docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md)| ## Notes - All APIs in each individual sub-module need to be implemented in this current version. If any API is not supported, please add stub implementation with return type dsERR_OPERATION_NOT_SUPPORTED for the same. - Building against the actual library may introduce SOC dependencies. Hence, a template SKELETON library is created without SOC dependencies. On the real platform (target), it can be mounted, copied and bound with the actual library. -- The configuration/settings file(s) for certain `DS` sub-modules, specific to a platform (templates in [DS HAL README.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/README.md "DS HAL README.md")), should be added in the `profiles/include` directory within the root directory of the DS HAL Test repository. -- When running the binary, remember to include a profile file as an argument for designated test cases. The following example illustrates this: `./hal_test -p deviceSettingsExtendedEnumsNotSupported.yaml` -- Profiles file available in [profile yaml file](./profiles/deviceSettingsExtendedEnumsNotSupported.yaml) +- The configuration/settings file(s) for certain `DS` sub-modules, specific to a platform (templates in [DS HAL README.md](https://github.com/rdkcentral/rdk-halif-device_settings/blob/main/docs/pages/README.md "DS HAL README.md")), should be added in the `profiles/include` directory within the root directory of the DS HAL Test repository for compilation. +- `L1` test cases currently use the setting file to configure platform capabilities during the test. This functionality will be migrated to use test profiles in YAML format in upcoming releases. +- `L2` test cases already use test profiles in YAML format to configure platform capabilities during the test. +- When running the binary, remember to include a profile file as an argument for designated test cases. The following example illustrates this: `./hal_test -p Sink_AudioSettings.yaml` +- Profiles files defines the configuration for the platform available for sink and source [profile yaml file](./profiles/) + +## known issues + +- `L1` code may generate compilation warnings due to the removal of `APIs` from a header file. These warnings are caused by deprecated `APIs` and will not affect functionality. They will be resolved in the next release. diff --git a/profiles/sink/Panel_4K_Display.yaml b/profiles/sink/Sink_4K_Display.yaml similarity index 99% rename from profiles/sink/Panel_4K_Display.yaml rename to profiles/sink/Sink_4K_Display.yaml index c134b34a..a13b6bcf 100644 --- a/profiles/sink/Panel_4K_Display.yaml +++ b/profiles/sink/Sink_4K_Display.yaml @@ -1,6 +1,6 @@ dsDisplay: Type: sink - Name: element + Name: TV features: extendedEnumsSupported: false EDID_Data: diff --git a/profiles/sink/Panel_CompositeInput.yaml b/profiles/sink/Sink_CompositeInput.yaml similarity index 100% rename from profiles/sink/Panel_CompositeInput.yaml rename to profiles/sink/Sink_CompositeInput.yaml diff --git a/profiles/source/Puck_4K_Display.yaml b/profiles/source/Source_4K_Display.yaml similarity index 100% rename from profiles/source/Puck_4K_Display.yaml rename to profiles/source/Source_4K_Display.yaml diff --git a/src/test_dsAudio_parse_configuration.c b/src/test_dsAudio_parse_configuration.c index b47469b8..47159e3d 100644 --- a/src/test_dsAudio_parse_configuration.c +++ b/src/test_dsAudio_parse_configuration.c @@ -42,26 +42,27 @@ */ /** - * @addtogroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File + * @defgroup DS_Audio_HALTEST Device Settings Audio HAL Tests * @{ */ /** - * @defgroup Device_Settings_DS_AUDIO_PARSE_CONFIG Device Settings HAL Tests audio parse configuraion File + * @defgroup DS_Audio_HALTEST_PARSE_CONFIG Device Settings Audio Parse Config File * @{ * @parblock * - * ### Audio Parse configuraion functions for Device Settings HAL : + * ### Configuration file for DS Audio test suit : * - * Parse configuraion functions required for the module across all vendors. + * DS Audio Parse Configuration file * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * **Pre-Conditions:** None@n + * **Dependencies:** None@n * - * @endparblock * + * @endparblock */ + /** * @file test_dsAudio_parse_configuration.c * @@ -74,7 +75,7 @@ #include "dsAudio.h" #include "test_parse_configuration.h" -/* Global Vairables */ +/* Global variables */ dsAudioPortConfiguration_t* gDSAudioPortConfiguration = NULL; char gDSAudioDeviceName[DS_AUDIO_DEVICE_NAME_SIZE] = {0}; int32_t gDSAudioNumberOfPorts = 0; @@ -188,8 +189,8 @@ void test_dsAudio_parse_configuration_term() } } -/** @} */ // End of Device_Settings_DS_AUDIO_PARSE_CONFIG -/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of DS_HALTEST_PARSE_CONFIG_AUDIO +/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK diff --git a/src/test_dsAudio_parse_configuration.h b/src/test_dsAudio_parse_configuration.h index 0d3379d3..437ceeaf 100644 --- a/src/test_dsAudio_parse_configuration.h +++ b/src/test_dsAudio_parse_configuration.h @@ -42,24 +42,20 @@ */ /** - * @addtogroup Device_Settings_PARSE_CONFIG Device Settings HAL Tests parse configuraion File + * @defgroup DS_Audio_HALTEST Device Settings Audio HAL Tests * @{ */ /** - * @defgroup Device_Settings_DS_AUDIO_PARSE_CONFIG_H Device Settings HAL Tests audio parse configuraion Header File + * @defgroup DS_Audio_HALTEST_PARSE_CONFIG_HEADER Device Settings Audio Parse Config Header File * @{ * @parblock * - * ### Audio Parse configuraion functions for Device Settings HAL : + * ### Configuration Header file for DS Audio test suit : * - * Parse configuraion functions required for the module across all vendors. - * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * DS Audio Parse Configuration Header file * * @endparblock - * */ /** @@ -109,8 +105,8 @@ void test_dsAudio_parse_configuration_term(); #endif //__TEST_DSAUDIO_PARSE_CONFIG_H__ -/** @} */ // End of Device_Settings_DS_AUDIO_PARSE_CONFIG_H -/** @} */ // End of Device_Settings_PARSE_CONFIG +/** @} */ // End of DS_Audio_HALTEST_PARSE_CONFIG +/** @} */ // End of DS_Audio_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK diff --git a/src/test_dsVideoDevice_parse_configuration.c b/src/test_dsVideoDevice_parse_configuration.c index 335ec59d..2cdc8473 100644 --- a/src/test_dsVideoDevice_parse_configuration.c +++ b/src/test_dsVideoDevice_parse_configuration.c @@ -42,18 +42,18 @@ */ /** - * @defgroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings Video Device HAL Tests + * @defgroup DS_VIdeoDevice_HALTEST Device Settings VIdeo Device HAL Tests * @{ */ /** - * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG Device Settings Video Device Parse Config File + * @defgroup DS_VIdeoDevice_HALTEST_PARSE_CONFIG Device Settings VIdeo Device Parse Config File * @{ * @parblock * - * ### L2 Tests for DS Video Device HAL : + * ### Configuration file for DS VIdeo Device test suit : * - * Level 2 unit test cases for all APIs of Device Settings Video Device HAL + * DS VIdeo Device Parse Configuration file * * **Pre-Conditions:** None@n * **Dependencies:** None@n @@ -198,8 +198,8 @@ void test_dsVideoDevice_parse_configuration_term() } -/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG -/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG +/** @} */ // End of DS_VideoDevice_HALTEST_PARSE_CONFIG +/** @} */ // End of DS_VideoDevice_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_dsVideoDevice_parse_configuration.h b/src/test_dsVideoDevice_parse_configuration.h index e806918e..fbc26bf3 100644 --- a/src/test_dsVideoDevice_parse_configuration.h +++ b/src/test_dsVideoDevice_parse_configuration.h @@ -42,24 +42,20 @@ */ /** - * @addtogroup Device_Settings_HALTEST_PARSE_CONFIG Device Settings HAL Tests parse configuration File + * @defgroup DS_VideoDevice_HALTEST Device Settings Video Device HAL Tests * @{ */ /** - * @defgroup DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H Device Settings HAL Tests video device parse configuration Header File + * @defgroup DS_VideoDevice_HALTEST_PARSE_CONFIG_HEADER Device Settings Video Device Parse Config Header File * @{ * @parblock * - * ### Video Device Parse configuration functions for Device Settings HAL : + * ### Configuration Header file for DS Video Device test suit : * - * Parse configuration functions required for the module across all vendors. - * - * **Pre-Conditions:** None @n - * **Dependencies:** None @n + * DS Video Device Parse Configuration Header file * * @endparblock - * */ /** @@ -104,8 +100,8 @@ void test_dsVideoDevice_parse_configuration_term(); #endif //__TEST_DS_VIDEO_DEVICE_PARSE_CONFIG_H__ -/** @} */ // End of DS_HALTEST_VIDEO_DEVICE_PARSE_CONFIG_H -/** @} */ // End of Device_Settings_HALTEST_PARSE_CONFIG +/** @} */ // End of DS_VideoDevice_HALTEST_PARSE_CONFIG_HEADER +/** @} */ // End of DS_VideoDevice_HALTEST /** @} */ // End of Device_Settings_HALTEST /** @} */ // End of Device_Settings /** @} */ // End of HPK \ No newline at end of file diff --git a/src/test_dsVideoPort_parse_configuration.c b/src/test_dsVideoPort_parse_configuration.c index 29436594..fca6cbe8 100644 --- a/src/test_dsVideoPort_parse_configuration.c +++ b/src/test_dsVideoPort_parse_configuration.c @@ -172,25 +172,25 @@ int test_dsVideoPort_parse_configuration() gDSVideoPortConfiguration[i].matrix_coefficients = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); for(int j = 0; j < gDSVideoPortConfiguration[i].numSupportedResolutions; j++) { - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/name", i+1, j+1); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/name", i+1, j+1); status = ut_kvp_getStringField(ut_kvp_profile_getInstance(), key_string, - gDSVideoPortConfiguration[i].supportedResolutons[j].name, + gDSVideoPortConfiguration[i].supportedResolutions[j].name, DS_VIDEO_PORT_RESOLUTION_NAME_MAX); - - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/pixelResolution", i+1, j+1); - gDSVideoPortConfiguration[i].supportedResolutons[j].pixelResolution = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/aspectRatio", i+1, j+1); - gDSVideoPortConfiguration[i].supportedResolutons[j].aspectRatio = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/pixelResolution", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutions[j].pixelResolution = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/stereoScopicMode", i+1, j+1); - gDSVideoPortConfiguration[i].supportedResolutons[j].stereoScopicMode = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/aspectRatio", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutions[j].aspectRatio = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/frameRate", i+1, j+1); - gDSVideoPortConfiguration[i].supportedResolutons[j].frameRate = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/stereoScopicMode", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutions[j].stereoScopicMode = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); - snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutons/%d/interlaced", i+1, j+1); - gDSVideoPortConfiguration[i].supportedResolutons[j].interlaced = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/frameRate", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutions[j].frameRate = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); + + snprintf(key_string, DS_VIDEO_PORT_KVP_SIZE, "dsVideoPort/Ports/%d/supportedResolutions/%d/interlaced", i+1, j+1); + gDSVideoPortConfiguration[i].supportedResolutions[j].interlaced = ut_kvp_getUInt32Field(ut_kvp_profile_getInstance(), key_string); } /* for(j) */ } /* for(i) */ diff --git a/src/test_dsVideoPort_parse_configuration.h b/src/test_dsVideoPort_parse_configuration.h index 500da1f9..80256fe9 100644 --- a/src/test_dsVideoPort_parse_configuration.h +++ b/src/test_dsVideoPort_parse_configuration.h @@ -87,7 +87,7 @@ typedef struct _dsVideoPortConfiguration_t { bool dtcp_supported; bool hdcp_supported; int32_t numSupportedResolutions; - dsVideoPortResolution_t supportedResolutons[DS_VIDEO_PORT_RESOLUTION_NUM_MAX]; + dsVideoPortResolution_t supportedResolutions[DS_VIDEO_PORT_RESOLUTION_NUM_MAX]; char defaultResolution[DS_VIDEO_PORT_RESOLUTION_NAME_MAX]; int32_t colorspaces; bool DisplaySurround; diff --git a/src/test_l2_dsAudio.c b/src/test_l2_dsAudio.c index bc038a9a..75c8a255 100644 --- a/src/test_l2_dsAudio.c +++ b/src/test_l2_dsAudio.c @@ -94,7 +94,7 @@ static int gTestID = 1; * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -173,7 +173,7 @@ void test_l2_dsAudio_EnableDisableAndVerifyAudioPortStatus(void) * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -238,7 +238,7 @@ void test_l2_dsAudio_CheckHeadphoneConnectionStatus_sink(void) * **Test Case ID:** 003@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -308,7 +308,7 @@ void test_l2_dsAudio_RetrieveAndVerifyMS12Capabilities(void) * **Test Case ID:** 004@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -381,7 +381,7 @@ void test_l2_dsAudio_SetAndGetAudioCompression(void) * **Test Case ID:** 005@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -453,7 +453,7 @@ void test_l2_dsAudio_SetAndGetDialogEnhancement(void) * **Test Case ID:** 06@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -536,7 +536,7 @@ void test_l2_dsAudio_SetAndGetDolbyVolumeMode(void) * **Test Case ID:** 07@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -612,7 +612,7 @@ void test_l2_dsAudio_SetAndGetIntelligentEqualizerMode(void) * **Test Case ID:** 08@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -690,7 +690,7 @@ void test_l2_dsAudio_SetAndGetVolumeLeveller(void) * **Test Case ID:** 09@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -763,7 +763,7 @@ void test_l2_dsAudio_SetAndGetBassEnhancer(void) * **Test Case ID:** 010@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -849,7 +849,7 @@ void test_l2_dsAudio_EnableAndVerifySurroundDecoder(void) * **Test Case ID:** 011@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -925,7 +925,7 @@ void test_l2_dsAudio_SetAndGetDRCMode(void) * **Test Case ID:** 012@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1002,7 +1002,7 @@ void test_l2_dsAudio_SetAndGetSurroundVirtualizer(void) * **Test Case ID:** 013@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1093,7 +1093,7 @@ void test_l2_dsAudio_SetAndGetMISteering(void) * **Test Case ID:** 014@n * * **Test Procedure:** -* Refer to UT specification documentation [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ void test_l2_dsAudio_SetAndGetGraphicEqualizerMode(void) @@ -1167,7 +1167,7 @@ void test_l2_dsAudio_SetAndGetGraphicEqualizerMode(void) * **Test Case ID:** 015@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1250,7 +1250,7 @@ void test_l2_dsAudio_EnableDisableAndRetrieveLEConfig(void) * **Test Case ID:** 016@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1310,7 +1310,7 @@ void test_l2_dsAudio_CheckMS12DecodeSupport(void) * **Test Case ID:** 017@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1365,7 +1365,7 @@ void test_l2_dsAudio_CheckMS11DecodeSupport(void) * **Test Case ID:** 018@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1435,7 +1435,7 @@ void test_l2_dsAudio_VerifyMS12AudioProfiles_sink(void) * **Test Case ID:** 019@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1517,7 +1517,7 @@ void test_l2_dsAudio_SetAndGetMS12AudioProfile_sink(void) * **Test Case ID:** 020@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1582,7 +1582,7 @@ void test_l2_dsAudio_SetAndGetStereoMode(void) * **Test Case ID:** 021@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1647,7 +1647,7 @@ void test_l2_dsAudio_SetAndGetStereoAuto_sink(void) * **Test Case ID:** 022@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1712,7 +1712,7 @@ void test_l2_dsAudio_SetAndGetAudioGain_sink(void) * **Test Case ID:** 023@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1779,7 +1779,7 @@ void test_l2_dsAudio_SetAndGetAudioLevel_sink(void) * **Test Case ID:** 024@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1850,7 +1850,7 @@ void test_l2_dsAudio_AudioMuteVerification(void) * **Test Case ID:** 025@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1916,7 +1916,7 @@ void test_l2_dsAudio_SetAndGetAudioDelay(void) * **Test Case ID:** 026@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -1975,7 +1975,7 @@ void test_l2_dsAudio_VerifyAtmosCapabilities_sink(void) * **Test Case ID:** 027@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -2025,7 +2025,7 @@ void test_l2_dsAudio_GetAudioCapabilities(void) * **Test Case ID:** 028@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -2086,7 +2086,7 @@ void test_l2_dsAudio_EnableDisableRetrieveAudioMixing(void) * **Test Case ID:** 029@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -2143,7 +2143,7 @@ void test_l2_dsAudio_AudioPortControl(void) * **Test Case ID:** 030@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ @@ -2198,7 +2198,7 @@ void test_l2_dsAudio_SetAndGetPrimaryLanguage(void) * **Test Case ID:** 031@n * * **Test Procedure:** -* Refer to UT specification documentation +* Refer to Test specification documentation * [dsAudio_L2_Low-Level_TestSpecification.md](../docs/pages/ds-audio_L2_Low-Level_TestSpecification.md) */ diff --git a/src/test_l2_dsCompositeIn.c b/src/test_l2_dsCompositeIn.c index 9318b4af..ada314c9 100644 --- a/src/test_l2_dsCompositeIn.c +++ b/src/test_l2_dsCompositeIn.c @@ -87,7 +87,7 @@ static int gTestID = 1; * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +* Refer to Test specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ void test_l2_dsCompositeIn_GetNumberOfInputs(void) @@ -139,7 +139,7 @@ void test_l2_dsCompositeIn_GetNumberOfInputs(void) * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +* Refer to Test specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ void test_l2_dsCompositeIn_VerifyCompositeInputStatus(void) @@ -202,7 +202,7 @@ void test_l2_dsCompositeIn_VerifyCompositeInputStatus(void) * **Test Case ID:** 003@n * * **Test Procedure:** -* Refer to UT specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) +* Refer to Test specification documentation [ds-compositeIn-L2-Low-Level_TestSpec.md](../docs/pages/ds-compositeIn-L2-Low-Level_TestSpec.md) */ void test_l2_dsCompositeIn_VerifyCompositeInPortSelectionAndStatus(void) diff --git a/src/test_l2_dsFPD.c b/src/test_l2_dsFPD.c index d04278fd..ff2c90d2 100644 --- a/src/test_l2_dsFPD.c +++ b/src/test_l2_dsFPD.c @@ -90,7 +90,7 @@ static int gTestID = 1; * **Test Case ID:** 001@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateON_SetBrightness(void) @@ -196,7 +196,7 @@ void test_l2_dsFPD_SetFPstateON_SetBrightness(void) * **Test Case ID:** 002@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateOFF_SetBrightness(void) @@ -282,7 +282,7 @@ void test_l2_dsFPD_SetFPstateOFF_SetBrightness(void) * **Test Case ID:** 003@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateOFF_SetBlink(void) @@ -365,7 +365,7 @@ void test_l2_dsFPD_SetFPstateOFF_SetBlink(void) * **Test Case ID:** 004@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateON_Multi_SetColor(void) @@ -498,7 +498,7 @@ void test_l2_dsFPD_SetFPstateON_Multi_SetColor(void) * **Test Case ID:** 005@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateOFF_SetColor(void) @@ -592,7 +592,7 @@ void test_l2_dsFPD_SetFPstateOFF_SetColor(void) * **Test Case ID:** 006@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_SetFPstateON_Single_SetColor(void) @@ -699,7 +699,7 @@ void test_l2_dsFPD_SetFPstateON_Single_SetColor(void) * **Test Case ID:** 007@n * * **Test Procedure:** -* Refer to Test specification documentation [ds-front-panel-display__L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display__L2_Low-Level_TestSpecification.md) +* Refer to Test specification documentation [ds-front-panel-display_L2_Low-Level_TestSpecification.md](../docs/pages/ds-front-panel-display_L2_Low-Level_TestSpecification.md) */ void test_l2_dsFPD_VerifyLEDStateTransitions(void) diff --git a/src/test_l2_dsHdmiIn.c b/src/test_l2_dsHdmiIn.c index 1215753f..68556254 100644 --- a/src/test_l2_dsHdmiIn.c +++ b/src/test_l2_dsHdmiIn.c @@ -328,9 +328,7 @@ void test_l2_dsHdmiIn_SetAndGetEdidVersionAndValidateEdidLength_sink(void) dsHdmiInPort_t hdmiPort[] = {dsHDMI_IN_PORT_0, dsHDMI_IN_PORT_1, dsHDMI_IN_PORT_2}; tv_hdmi_edid_version_t edidVersion[] = {HDMI_EDID_VER_14, HDMI_EDID_VER_20}; tv_hdmi_edid_version_t getEdidVersion = HDMI_EDID_VER_MAX; - unsigned char edid[256] = { 0 }; char keyString[DS_HDMIIN_KEY_SIZE] = {0}; - int length = 0; UT_LOG_DEBUG("Invoking dsHdmiInInit"); ret = dsHdmiInInit(); diff --git a/src/test_l2_dsVideoPort.c b/src/test_l2_dsVideoPort.c index eeda7eda..2be48ae7 100644 --- a/src/test_l2_dsVideoPort.c +++ b/src/test_l2_dsVideoPort.c @@ -342,7 +342,7 @@ void test_l2_dsVideoPort_SetAndGetResolution_source(void) for (int i = 0; i < gDSVideoPortConfiguration[i].numSupportedResolutions; i++) { dsVideoPortResolution_t getResolution; - dsVideoPortResolution_t *pSetResolution = &gDSVideoPortConfiguration[port].supportedResolutons[i]; + dsVideoPortResolution_t *pSetResolution = &gDSVideoPortConfiguration[port].supportedResolutions[i]; UT_LOG_DEBUG("Invoking dsSetResolution() with handle and setResolution"); From 1fb408596500bbcbcdb6a3557d7cdd01c1ec9d0b Mon Sep 17 00:00:00 2001 From: hari22yuva <56021398+hari22yuva@users.noreply.github.com> Date: Fri, 28 Jun 2024 09:26:29 +0100 Subject: [PATCH 64/64] Bumped CHANGELOG.md - 3.0.0 --- CHANGELOG.md | 17 +++++++++++++++++ profiles/sink/Sink_4K_VideoPort.yaml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cadded1f..382971af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,25 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [3.0.0](https://github.com/rdkcentral/rdk-halif-test-device_settings/compare/2.1.0...3.0.0) + +- gh #76 Updated L2 code, README.md,doxygen [`#77`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/77) +- gh #23 ds fp test spec & L2 code [`#33`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/33) +- gh #14 dsVideoPort High Level Test Spec & L2 Code [`#15`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/15) +- gh #18 dsVideoDevice High Level Test Specification Documentation [`#20`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/20) +- gh #24 High Level spec & L2 for Device Settings HDMI input & L2 code [`#32`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/32) +- gh #11 DS Display HL changes and YAML changes [`#48`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/48) +- gh #7 updating the dsHost test specification and the code [`#9`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/9) +- gh #10 L2 code & test spec [`#47`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/47) +- gh #29 dsAudio - L2 Low level Specification and test implementation [`#71`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/71) +- gh #29: dsAudio - L2 Low level Specification and test implementation [`20382e2`](https://github.com/rdkcentral/rdk-halif-test-device_settings/commit/20382e25c6c7781e915549c4b33419fc5c3e6f10) +- gh #14 Update the L2 code and file names & updated ut version [`d86fc04`](https://github.com/rdkcentral/rdk-halif-test-device_settings/commit/d86fc04552dcfff6a71a0f63f8becece4f05bd13) +- gh #18 Updated Specification document and test cases [`e681b80`](https://github.com/rdkcentral/rdk-halif-test-device_settings/commit/e681b8061ce22fa7e62e2f1cc3029316d2468a81) + #### [2.1.0](https://github.com/rdkcentral/rdk-halif-test-device_settings/compare/2.0.0...2.1.0) +> 5 June 2024 + - gh #43 deviceSettings: Enhanced Error code for device settings [`#45`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/45) - Updated with enhanced error code disabled checked in test_l1_dsAudio.c [`#46`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/46) - updating the dsDisplay test spec [`#13`](https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/13) diff --git a/profiles/sink/Sink_4K_VideoPort.yaml b/profiles/sink/Sink_4K_VideoPort.yaml index 5a5d5a72..94c197dc 100644 --- a/profiles/sink/Sink_4K_VideoPort.yaml +++ b/profiles/sink/Sink_4K_VideoPort.yaml @@ -48,7 +48,7 @@ dsVideoPort: #768p60 #1080p #2160p60 - supportedResolutons: + supportedResolutions: 1: name : "480i" #dsVIDEO_PIXELRES_720x480 = 0 ///< 720x480 Resolution