Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 25 additions & 29 deletions .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
BUILD_TYPE: Debug
REPO_NAME: "inputoutput"
THUNDER_REF: "R4.4.1"
INTERFACES_REF: "develop"
AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME}}
Expand Down Expand Up @@ -45,25 +46,25 @@ jobs:
uses: actions/cache@v3
with:
path: |
thunder/build/Thunder
thunder/build/entservices-apis
thunder/build/ThunderTools
thunder/install
!thunder/install/etc/WPEFramework/plugins
!thunder/install/usr/bin/RdkServicesTest
!thunder/install/usr/include/gmock
!thunder/install/usr/include/gtest
!thunder/install/usr/lib/libgmockd.a
!thunder/install/usr/lib/libgmock_maind.a
!thunder/install/usr/lib/libgtestd.a
!thunder/install/usr/lib/libgtest_maind.a
!thunder/install/usr/lib/cmake/GTest
!thunder/install/usr/lib/pkgconfig/gmock.pc
!thunder/install/usr/lib/pkgconfig/gmock_main.pc
!thunder/install/usr/lib/pkgconfig/gtest.pc
!thunder/install/usr/lib/pkgconfig/gtest_main.pc
!thunder/install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}-4
build/Thunder
build/entservices-apis
build/ThunderTools
install
!install/etc/WPEFramework/plugins
!install/usr/bin/RdkServicesTest
!install/usr/include/gmock
!install/usr/include/gtest
!install/usr/lib/libgmockd.a
!install/usr/lib/libgmock_maind.a
!install/usr/lib/libgtestd.a
!install/usr/lib/libgtest_maind.a
!install/usr/lib/cmake/GTest
!install/usr/lib/pkgconfig/gmock.pc
!install/usr/lib/pkgconfig/gmock_main.pc
!install/usr/lib/pkgconfig/gtest.pc
!install/usr/lib/pkgconfig/gtest_main.pc
!install/usr/lib/wpeframework/plugins
key: ${{ runner.os }}-${{ env.REPO_NAME }}-${{ env.THUNDER_REF }}-${{ env.INTERFACES_REF }}-4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -103,7 +104,6 @@ jobs:
sudo ninja -C build install

- name: Checkout Thunder
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/Thunder
Expand Down Expand Up @@ -141,14 +141,14 @@ jobs:
ref: develop

- name: Checkout googletest
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: google/googletest
path: googletest
ref: v1.15.0

- name: Apply patches ThunderTools
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/ThunderTools
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/00010-R4.4-Add-support-for-project-dir.patch
Expand All @@ -170,6 +170,7 @@ jobs:
cmake --install build/ThunderTools

- name: Apply patches Thunder
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/Thunder
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/Use_Legact_Alt_Based_On_ThunderTools_R4.4.3.patch
Expand Down Expand Up @@ -198,7 +199,6 @@ jobs:
cmake --install build/Thunder

- name: Checkout entservices-apis
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: rdkcentral/entservices-apis
Expand Down Expand Up @@ -313,7 +313,6 @@ jobs:
run: echo "TOOLCHAIN_FILE=$GITHUB_WORKSPACE/entservices-testframework/Tests/gcc-with-coverage.cmake" >> $GITHUB_ENV

- name: Build googletest
if: steps.cache.outputs.cache-hit != 'true'
run: >
cmake -G Ninja
-S "$GITHUB_WORKSPACE/googletest"
Expand Down Expand Up @@ -360,8 +359,6 @@ jobs:
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/network
-I $GITHUB_WORKSPACE/entservices-testframework/Tests
-I $GITHUB_WORKSPACE/entservices-inputoutput/helpers
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I $GITHUB_WORKSPACE/install/usr/include
-I ./usr/include/libdrm
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/devicesettings.h
Expand Down Expand Up @@ -419,8 +416,6 @@ jobs:
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/ccec/drivers
-I $GITHUB_WORKSPACE/entservices-testframework/Tests/headers/network
-I $GITHUB_WORKSPACE/entservices-testframework/Tests
-I $GITHUB_WORKSPACE/Thunder/Source
-I $GITHUB_WORKSPACE/Thunder/Source/core
-I $GITHUB_WORKSPACE/install/usr/include
-I $GITHUB_WORKSPACE/install/usr/include/WPEFramework
-include $GITHUB_WORKSPACE/entservices-testframework/Tests/mocks/devicesettings.h
Expand Down Expand Up @@ -646,7 +641,7 @@ jobs:
rm -rf $(pwd)/rdkL1TestResults.json

- name: Run unit tests with valgrind
if: ${{ !env.ACT }}
if: ${{ !env.ACT && inputs.caller_source != 'testframework' }}
run: >
PATH=$GITHUB_WORKSPACE/install/usr/bin:${PATH}
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/usr/lib:$GITHUB_WORKSPACE/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH}
Expand All @@ -663,7 +658,7 @@ jobs:
rm -rf $(pwd)/rdkL1TestResults.json

- name: Generate coverage
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT && inputs.caller_source != 'testframework' }}
run: >
cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L1Tests/.lcovrc_l1 ~/.lcovrc
&&
Expand Down Expand Up @@ -699,3 +694,4 @@ jobs:
rdkL1TestResultsWithValgrind.json
if-no-files-found: warn


11 changes: 9 additions & 2 deletions .github/workflows/L2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/error_code_R4_4.patch
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/1004-Add-support-for-project-dir.patch
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/RDKEMW-733-Add-ENTOS-IDS.patch
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/Increase_Timout_For_L2Tests_Plugin.patch
cd -
- name: Build Thunder
run: >
Expand Down Expand Up @@ -179,6 +180,12 @@ jobs:
ref: ${{env.INTERFACES_REF}}
run: rm -rf $GITHUB_WORKSPACE/entservices-apis/jsonrpc/DTV.json

- name: Apply patches entservices-apis
run: |
cd $GITHUB_WORKSPACE/entservices-apis
patch -p1 < $GITHUB_WORKSPACE/entservices-testframework/patches/add-l2tests-interface.patch
cd -

- name: Build entservices-apis
run: >
cmake
Expand Down Expand Up @@ -717,7 +724,7 @@ jobs:
rm -rf $(pwd)/rdkL2TestResults.json

- name: Run unit tests with valgrind
if: ${{ !env.ACT }}
if: ${{ !env.ACT && inputs.caller_source != 'testframework' }}
run: >
PATH=$GITHUB_WORKSPACE/install/usr/bin:${PATH}
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/usr/lib:$GITHUB_WORKSPACE/install/usr/lib/wpeframework/plugins:${LD_LIBRARY_PATH}
Expand All @@ -733,7 +740,7 @@ jobs:
rm -rf $(pwd)/rdkL2TestResults.json

- name: Generate coverage
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT }}
if: ${{ matrix.coverage == 'with-coverage' && !env.ACT && inputs.caller_source != 'testframework' }}
run: >
cp $GITHUB_WORKSPACE/entservices-testframework/Tests/L2Tests/.lcovrc_l2 ~/.lcovrc
&&
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +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).

#### [1.11.0](https://github.com/rdkcentral/entservices-inputoutput/compare/1.10.3...1.11.0)

- RDKEMW-10832 : Intermittent failure on testframework while running entservices-inputoutput workflow [`#293`](https://github.com/rdkcentral/entservices-inputoutput/pull/293)
- Merge tag '1.10.3' into develop [`eb4921e`](https://github.com/rdkcentral/entservices-inputoutput/commit/eb4921e4724d9367e4a3f78edecf62b3ced97042)

#### [1.10.3](https://github.com/rdkcentral/entservices-inputoutput/compare/1.10.2...1.10.3)

> 28 January 2026

- RDKEMW-11398: Implement HdmiCecSink & UserSettings communication. [`#342`](https://github.com/rdkcentral/entservices-inputoutput/pull/342)
- 1.10.3 release changelog updates [`217e33a`](https://github.com/rdkcentral/entservices-inputoutput/commit/217e33a7333aacf33134d7cb469dc8f0106a784b)
- Merge tag '1.10.2' into develop [`e22d4a8`](https://github.com/rdkcentral/entservices-inputoutput/commit/e22d4a8db483fc7f6dbfeb67a43e207830ff7905)

#### [1.10.2](https://github.com/rdkcentral/entservices-inputoutput/compare/1.10.1...1.10.2)

> 13 January 2026

- RDKEMW-12459: ARC - SAD is not updating as expected. [`#358`](https://github.com/rdkcentral/entservices-inputoutput/pull/358)
- 1.10.2 release changelog updates [`67dca55`](https://github.com/rdkcentral/entservices-inputoutput/commit/67dca55a00bd3e9bc6f5b4be23723cc916166b3b)
- Merge tag '1.10.1' into develop [`168ed58`](https://github.com/rdkcentral/entservices-inputoutput/commit/168ed5828d53b3a411026b65cc53b866575ca31a)

#### [1.10.1](https://github.com/rdkcentral/entservices-inputoutput/compare/1.10.0...1.10.1)
Expand Down
88 changes: 85 additions & 3 deletions HdmiCecSink/HdmiCecSinkImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'HdmiCecSink/HdmiCecSinkImplementation.cpp' (Match: rdkcentral/rdkservices/2101, 3164 lines, url: https://github.com/rdkcentral/rdkservices/archive/refs/tags/sprint_2101.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'HdmiCecSink/HdmiCecSinkImplementation.cpp' (Match: rdkcentral/rdkservices/1, 3511 lines, url: https://github.com/rdkcentral/rdkservices/archive/refs/tags/GRT_v1.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'HdmiCecSink/HdmiCecSinkImplementation.cpp' (Match: rdkcentral/rdkservices/6.1.7, 3511 lines, url: https://github.com/rdkcentral/rdkservices/archive/refs/tags/AML_BSP_REL_VERSION_RDK6.1.7.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -92,7 +92,6 @@
static VendorID lgVendorId = {0x00,0xE0,0x91};
static PhysicalAddress physical_addr = {0x0F,0x0F,0x0F,0x0F};
static LogicalAddress logicalAddress = 0xF;
static Language defaultLanguage = "eng";
static OSDName osdName = "TV Box";
static int32_t powerState = DEVICE_POWER_STATE_OFF;
static std::vector<uint8_t> formatid = {0,0};
Expand Down Expand Up @@ -606,6 +605,8 @@
, m_connectedDevices()
, msgProcessor(nullptr)
, msgFrameListener(nullptr)
, _userSettingsPlugin(nullptr)
, _userSettingsNotification(*this)
, _powerManagerPlugin()
, _pwrMgrNotification(*this)
, _registeredEventHandlers(false)
Expand All @@ -621,6 +622,13 @@
_powerManagerPlugin.Reset();
}
_registeredEventHandlers = false;

if(_userSettingsPlugin)
{
_userSettingsPlugin->Unregister(&_userSettingsNotification);
_userSettingsPlugin->Release();
_userSettingsPlugin = nullptr;
}

CECDisable();
m_currentArcRoutingState = ARC_STATE_ARC_EXIT;
Expand Down Expand Up @@ -779,6 +787,29 @@
}
}
getCecVersion();

_userSettingsPlugin = service->QueryInterfaceByCallsign<Exchange::IUserSettings>("org.rdk.UserSettings");
if (nullptr == _userSettingsPlugin) {
LOGERR("Failed to get UserSettings interface");
}
else
{
_userSettingsPlugin->Register(&_userSettingsNotification);
LOGINFO("Successfully registered for UserSettings notifications");

string presentationLanguage, isoLang;
uint32_t status = _userSettingsPlugin->GetPresentationLanguage(presentationLanguage);
if (status == Core::ERROR_NONE) {
isoLang = mapToIso639_2(presentationLanguage);
LOGINFO("Successfully retrieved the Presentation language from the userSettings plugin - BCP47: %s, ISO 639-2: %s", presentationLanguage.c_str(), isoLang.c_str());
setCurrentLanguage(Language(isoLang.data()));
sendMenuLanguage();
}
else {
LOGERR("Failed to get presentation language: %u", status);
}
}

LOGINFO(" HdmiCecSinkImplementation plugin Initialize completed \n");
return Core::ERROR_NONE;

Expand Down Expand Up @@ -853,6 +884,17 @@
HdmiCecSinkImplementation::_instance->onHdmiHotPlug((int) port, isConnected);
}

void HdmiCecSinkImplementation::onPresentationLanguageChanged(const string& presentationLanguage)
{
if(!HdmiCecSinkImplementation::_instance)
return;

string isoLang = mapToIso639_2(presentationLanguage);
LOGINFO("OnPresentationLanguageChanged - language BCP47: %s, ISO 639-2: %s", presentationLanguage.c_str(), isoLang.c_str());
setCurrentLanguage(Language(isoLang.data()));
sendMenuLanguage();
}

void HdmiCecSinkImplementation::onPowerModeChanged(const PowerState &currentState, const PowerState &newState)
{
if(!HdmiCecSinkImplementation::_instance)
Expand Down Expand Up @@ -1484,6 +1526,7 @@
lang = language;

setCurrentLanguage(Language(lang.data()));
sendMenuLanguage();
successResult.success = true;

return Core::ERROR_NONE;
Expand Down Expand Up @@ -1722,6 +1765,46 @@
return cecSettingEnabled;
}

std::string HdmiCecSinkImplementation::mapToIso639_2(const string& lang_BCP47)
{
if (lang_BCP47.empty())
return "eng";

std::string lang = lang_BCP47.substr(0, lang_BCP47.find('-'));
std::transform(lang.begin(), lang.end(), lang.begin(), ::tolower);

if (lang.length() == 3)
return lang;

static const std::unordered_map<std::string, std::string> iso639_1_to_2 = {
{"en", "eng"},
{"fr", "fra"},
{"de", "deu"},
{"es", "spa"},
{"it", "ita"},
{"pt", "por"},
{"ru", "rus"},
{"zh", "zho"},
{"ja", "jpn"},
{"ko", "kor"},
{"ar", "ara"},
{"hi", "hin"},
{"nl", "nld"},
{"sv", "swe"},
{"fi", "fin"},
{"no", "nor"},
{"da", "dan"},
{"pl", "pol"},
{"tr", "tur"}
};

auto it = iso639_1_to_2.find(lang);
if (it != iso639_1_to_2.end())
return it->second;

return "eng";
}

void HdmiCecSinkImplementation::setEnabled(bool enabled)
{
LOGINFO("Entered setEnabled: %d cecSettingEnabled :%d ",enabled, cecSettingEnabled);
Expand Down Expand Up @@ -2637,7 +2720,6 @@
_instance->deviceList[_instance->m_logicalAddressAllocated].m_cecVersion = Version::V_1_4;
_instance->deviceList[_instance->m_logicalAddressAllocated].m_vendorID = appVendorId;
_instance->deviceList[_instance->m_logicalAddressAllocated].m_powerStatus = PowerStatus(powerState);
_instance->deviceList[_instance->m_logicalAddressAllocated].m_currentLanguage = defaultLanguage;
_instance->deviceList[_instance->m_logicalAddressAllocated].m_osdName = osdName.toString().c_str();
if(cecVersion == 2.0) {
_instance->deviceList[_instance->m_logicalAddressAllocated].m_cecVersion = Version::V_2_0;
Expand Down Expand Up @@ -3497,4 +3579,4 @@
}

} // namespace Plugin
} // namespace WPEFramework
} // namespace WPEFramework
Loading
Loading