Skip to content

Commit

Permalink
Merge branch 'main' into DELIA-66118-main
Browse files Browse the repository at this point in the history
  • Loading branch information
npoltorapavlo authored Sep 25, 2024
2 parents 0576e7b + 22b1fff commit 938d8a5
Show file tree
Hide file tree
Showing 49 changed files with 2,323 additions and 592 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/L2-tests-R4-4-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,31 @@ jobs:
ninja -C build
sudo ninja -C build install
- name: Checkout rdkservices
uses: actions/checkout@v3
with:
path: rdkservices

- name: Checkout Thunder
uses: actions/checkout@v3
with:
repository: rdkcentral/Thunder
path: Thunder
ref: ${{env.THUNDER_REF}}

- name: Apply patches Thunder
run: |
cd ${{github.workspace}}/Thunder
patch -p1 < ${{github.workspace}}/rdkservices/Tests/L2Tests/patches/Use_Legact_Alt_Based_On_ThunderTools_R4.4.3.patch
cd -
- name: Checkout ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/ThunderTools
path: ThunderTools
ref: ${{env.THUNDER_REF}}
ref: R4.4.3

- name: Build ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -90,11 +101,6 @@ jobs:
&&
cmake --install build/ThunderTools
- name: Checkout rdkservices
uses: actions/checkout@v3
with:
path: rdkservices

- name: Checkout rdkservices
run: |
cd ${{github.workspace}}/rdkservices
Expand Down Expand Up @@ -138,6 +144,7 @@ jobs:
patch -p1 < ${{github.workspace}}/rdkservices/Tests/L2Tests/patches/0007-RDK-IDeviceInfo-Changes.patch
patch -p1 < ${{github.workspace}}/rdkservices/Tests/L2Tests/patches/0001-RDK-45037-Secure-Storage-Thunder-Plugin.patch
patch -p1 < ${{github.workspace}}/rdkservices/Tests/L2Tests/patches/RDKV-48604-User-Settings-Thunder-Plugin.patch
patch -p1 < ${{github.workspace}}/rdkservices/Tests/L2Tests/patches/Use_Legact_Alt_In_ThunderInterfaces_Based_On_ThunderTools_R4.4.3.patch
cd ..
- name: Build ThunderInterfaces
Expand Down
51 changes: 50 additions & 1 deletion AVInput/AVInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <algorithm>

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 6
#define API_VERSION_NUMBER_MINOR 7
#define API_VERSION_NUMBER_PATCH 0

#define HDMI 0
Expand All @@ -48,6 +48,7 @@
#define AVINPUT_METHOD_GET_EDID_VERSION "getEdidVersion"
#define AVINPUT_METHOD_SET_EDID_ALLM_SUPPORT "setEdid2AllmSupport"
#define AVINPUT_METHOD_GET_EDID_ALLM_SUPPORT "getEdid2AllmSupport"
#define AVINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION "getHdmiVersion"
#define AVINPUT_METHOD_SET_MIXER_LEVELS "setMixerLevels"
#define AVINPUT_METHOD_START_INPUT "startInput"
#define AVINPUT_METHOD_STOP_INPUT "stopInput"
Expand Down Expand Up @@ -223,6 +224,7 @@ void AVInput::RegisterAll()
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SET_MIXER_LEVELS), &AVInput::setMixerLevels, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SET_EDID_ALLM_SUPPORT), &AVInput::setEdid2AllmSupportWrapper, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_GET_EDID_ALLM_SUPPORT), &AVInput::getEdid2AllmSupportWrapper, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION), &AVInput::getHdmiVersionWrapper, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_START_INPUT), &AVInput::startInput, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_STOP_INPUT), &AVInput::stopInput, this);
Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SCALE_INPUT), &AVInput::setVideoRectangleWrapper, this);
Expand Down Expand Up @@ -1362,6 +1364,53 @@ uint32_t AVInput::setEdidVersionWrapper(const JsonObject& parameters, JsonObject
}
}

uint32_t AVInput::getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response)
{
LOGINFOMETHOD();
returnIfParamNotFound(parameters, "portId");
string sPortId = parameters["portId"].String();
int portId = 0;

try {
portId = stoi(sPortId);
}catch (const std::exception& err) {
LOGWARN("sPortId invalid paramater: %s ", sPortId.c_str());
returnResponse(false);
}

dsHdmiMaxCapabilityVersion_t hdmiCapVersion = HDMI_COMPATIBILITY_VERSION_14;

try {
device::HdmiInput::getInstance().getHdmiVersion(portId, &(hdmiCapVersion));
LOGWARN("AVInput::getHdmiVersion Hdmi Version:%d", hdmiCapVersion);
}
catch (const device::Exception& err) {
LOG_DEVICE_EXCEPTION1(std::to_string(portId));
returnResponse(false);
}


switch ((int)hdmiCapVersion){
case HDMI_COMPATIBILITY_VERSION_14:
response["HdmiCapabilityVersion"] = "1.4";
break;
case HDMI_COMPATIBILITY_VERSION_20:
response["HdmiCapabilityVersion"] = "2.0";
break;
case HDMI_COMPATIBILITY_VERSION_21:
response["HdmiCapabilityVersion"] = "2.1";
break;
}


if(hdmiCapVersion == HDMI_COMPATIBILITY_VERSION_MAX)
{
returnResponse(false);
}else{
returnResponse(true);
}
}

int AVInput::setEdidVersion(int iPort, int iEdidVer)
{
bool ret = true;
Expand Down
1 change: 1 addition & 0 deletions AVInput/AVInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class AVInput: public PluginHost::IPlugin, public PluginHost::JSONRPC
uint32_t getSupportedGameFeatures(const JsonObject& parameters, JsonObject& response);
uint32_t getGameFeatureStatusWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t setMixerLevels(const JsonObject& parameters, JsonObject& response);
uint32_t getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response);
//End methods

JsonArray getInputDevices(int iType);
Expand Down
29 changes: 28 additions & 1 deletion AVInput/AVInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,34 @@
}
]
},
"getSupportedGameFeatures":{
"getHdmiVersion": {
"summary": "Gets the maximum hdmi compatibility version supported for the given port",
"params": {
"type":"object",
"properties": {
"portId":{
"$ref": "#/definitions/portId"
}
},
"required": [
"portId"
]
},
"result": {
"type": "object",
"properties": {
"HdmiCapabilityVersion": {
"summary": "The Maximum Hdmi compatibility version supported by the given port",
"type": "string",
"example": "2.0"
},
"success": {
"$ref": "#/common/success"
}
}
}
},
"getSupportedGameFeatures":{
"summary": "Returns the list of supported game features.",
"result": {
"type": "object",
Expand Down
4 changes: 4 additions & 0 deletions AVInput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

##[1.7.0] - 2024-09-24
###Added
- Added support for Getting the Maximum HDMI Compatibility version for the given port.

##[1.6.0] - 2024-04-02
###Changed
- Added support for Setting the Audio Mixer level for the given audio input
Expand Down
4 changes: 4 additions & 0 deletions HdmiInput/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this RDK Service will be documented in this file.

* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.

##[1.4.0] - 2024-09-24
### Added
- Added support for Getting the Maximum HDMI compatibility version for the given port.

##[1.3.0] - 2024-04-02
### Changed
- Added support for setting the audio mixer level for given audio input
Expand Down
53 changes: 51 additions & 2 deletions HdmiInput/HdmiInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define HDMIINPUT_EVENT_ON_AVI_CONTENT_TYPE_CHANGED "hdmiContentTypeUpdate"
#define HDMIINPUT_METHOD_GET_LOW_LATENCY_MODE "getTVLowLatencyMode"
#define HDMIINPUT_METHOD_GET_AV_LATENCY "getAVLatency"
#define HDMIINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION "getHdmiVersion"

#define HDMICECSINK_CALLSIGN "org.rdk.HdmiCecSink"
#define HDMICECSINK_CALLSIGN_VER HDMICECSINK_CALLSIGN".1"
Expand All @@ -66,7 +67,7 @@
#define registerMethod(...) for (uint8_t i = 1; GetHandler(i); i++) GetHandler(i)->Register<JsonObject, JsonObject>(__VA_ARGS__)

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 3
#define API_VERSION_NUMBER_MINOR 4
#define API_VERSION_NUMBER_PATCH 0

static int audio_output_delay = 100;
Expand Down Expand Up @@ -126,7 +127,8 @@ namespace WPEFramework
registerMethod(HDMIINPUT_METHOD_GAME_FEATURE_STATUS, &HdmiInput::getHdmiGameFeatureStatusWrapper, this);
registerMethod(HDMIINPUT_METHOD_GET_AV_LATENCY, &HdmiInput::getAVLatency, this);
registerMethod(HDMIINPUT_METHOD_GET_LOW_LATENCY_MODE, &HdmiInput::getTVLowLatencyMode, this);
m_primVolume = DEFAULT_PRIM_VOL_LEVEL;
registerMethod(HDMIINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION, &HdmiInput::getHdmiVersionWrapper, this);
m_primVolume = DEFAULT_PRIM_VOL_LEVEL;
m_inputVolume = DEFAULT_INPUT_VOL_LEVEL;
}

Expand Down Expand Up @@ -1198,6 +1200,53 @@ namespace WPEFramework
}

}
uint32_t HdmiInput::getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response)
{
LOGINFOMETHOD();
returnIfParamNotFound(parameters, "portId");
string sPortId = parameters["portId"].String();
int portId = 0;

try {
portId = stoi(sPortId);
}catch (const std::exception& err) {
LOGWARN("sPortId invalid paramater: %s ", sPortId.c_str());
returnResponse(false);
}

dsHdmiMaxCapabilityVersion_t hdmiCapVersion = HDMI_COMPATIBILITY_VERSION_14;

try {
device::HdmiInput::getInstance().getHdmiVersion(portId, &(hdmiCapVersion));
LOGWARN("HdmiInput::getHdmiVersion Hdmi Version:%d", hdmiCapVersion);
}
catch (const device::Exception& err) {
LOG_DEVICE_EXCEPTION1(std::to_string(portId));
returnResponse(false);
}


switch ((int)hdmiCapVersion){
case HDMI_COMPATIBILITY_VERSION_14:
response["HdmiCapabilityVersion"] = "1.4";
break;
case HDMI_COMPATIBILITY_VERSION_20:
response["HdmiCapabilityVersion"] = "2.0";
break;
case HDMI_COMPATIBILITY_VERSION_21:
response["HdmiCapabilityVersion"] = "2.1";
break;
}


if(hdmiCapVersion == HDMI_COMPATIBILITY_VERSION_MAX)
{
returnResponse(false);
}else{
returnResponse(true);
}
}

uint32_t HdmiInput::getServiceState(PluginHost::IShell* shell, const string& callsign, PluginHost::IShell::state& state)
{
LOGINFO("entering getServiceState\n");
Expand Down
1 change: 1 addition & 0 deletions HdmiInput/HdmiInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ namespace WPEFramework {
uint32_t getHdmiGameFeatureStatusWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t getAVLatency(const JsonObject& parameters, JsonObject& response);
uint32_t getTVLowLatencyMode(const JsonObject& parameters, JsonObject& response);
uint32_t getHdmiVersionWrapper(const JsonObject& parameters, JsonObject& response);
//End methods

JsonArray getHDMIInputDevices();
Expand Down
29 changes: 28 additions & 1 deletion HdmiInput/HdmiInput.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,34 @@
"$ref": "#/common/result"
}
},
"setVideoRectangle": {
"getHdmiVersion": {
"summary": "Gets the maximum hdmi compatibility version supported for the given port",
"params": {
"type":"object",
"properties": {
"portId":{
"$ref": "#/definitions/portId"
}
},
"required": [
"portId"
]
},
"result": {
"type": "object",
"properties": {
"HdmiCapabilityVersion": {
"summary": "The Maximum Hdmi compatibility version supported by the given port",
"type": "string",
"example": "2.0"
},
"success": {
"$ref": "#/common/success"
}
}
}
},
"setVideoRectangle": {
"deprecated" : true,
"referenceUrl" : "https://rdkcentral.github.io/rdkservices/#/api/AVInputPlugin?id=setvideorectangle",
"summary": "Sets an HDMI Input video window.",
Expand Down
10 changes: 1 addition & 9 deletions RDKShell/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@ All notable changes to this RDK Service will be documented in this file.
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.


## [1.6.5] - 2024-09-09
## [1.6.3] - 2024-09-09
### Added
- Added for response is getting empty on launching DAC application

## [1.6.4] - 2024-09-05
### Added
- Fix to activate RA after the Graphics subsystem, handle mutex

## [1.6.3] - 2024-08-28
### Added
- Fix to activate RA after the Graphics subsystem

## [1.6.2] - 2024-08-26
### Added
- Added Delay of Auto Hibernation for Native Apps: 15sec for L2S, 5sec for others
Expand Down
Loading

0 comments on commit 938d8a5

Please sign in to comment.