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
13 changes: 13 additions & 0 deletions .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: L1-tests

on:
workflow_call:
inputs:
caller_source:
description: "Specifies the source type (e.g., local or test framework) for the workflow."
required: true
type: string
secrets:
RDKCM_RDKE:
required: true
Expand Down Expand Up @@ -69,6 +74,7 @@ jobs:
- name: ACK External Trigger
run: |
echo "Message: External Trigger Received for L1 Tests"
echo "Trigger Source: ${{ inputs.caller_source }}"

- name: Set up CMake
uses: jwlawson/[email protected]
Expand Down Expand Up @@ -121,6 +127,13 @@ jobs:
token: ${{ secrets.RDKCM_RDKE }}

- name: Checkout entservices-inputoutput
if: ${{ inputs.caller_source == 'local' }}
uses: actions/checkout@v3
with:
path: entservices-inputoutput

- name: Checkout entservices-inputoutput-testframework
if: ${{ inputs.caller_source == 'testframework' }}
uses: actions/checkout@v3
with:
repository: rdkcentral/entservices-inputoutput
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/L2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: L2-tests

on:
workflow_call:
inputs:
caller_source:
description: "Specifies the source type (e.g., local or test framework) for the workflow."
required: true
type: string
secrets:
RDKCM_RDKE:
required: true
Expand Down Expand Up @@ -39,6 +44,7 @@ jobs:
- name: ACK External Trigger
run: |
echo "Message: External Trigger Received for L2 Tests"
echo "Trigger Source: ${{ inputs.caller_source }}"

- name: Set up CMake
uses: jwlawson/[email protected]
Expand Down Expand Up @@ -83,6 +89,13 @@ jobs:
ref: R4.4.3

- name: Checkout entservices-inputoutput
if: ${{ inputs.caller_source == 'local' }}
uses: actions/checkout@v3
with:
path: entservices-inputoutput

- name: Checkout entservices-inputoutput-testframework
if: ${{ inputs.caller_source == 'testframework' }}
uses: actions/checkout@v3
with:
repository: rdkcentral/entservices-inputoutput
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ on:
jobs:
trigger-L1:
uses: ./.github/workflows/L1-tests.yml
with:
caller_source: local
secrets:
RDKCM_RDKE: ${{ secrets.RDKCM_RDKE }}

trigger-L2:
uses: ./.github/workflows/L2-tests.yml
with:
caller_source: local
secrets:
RDKCM_RDKE: ${{ secrets.RDKCM_RDKE }}

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,36 @@ 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.4.2](https://github.com/rdkcentral/entservices-inputoutput/compare/1.4.1...1.4.2)

- RDKEMW-4708: Replacing IARM Power manager with Power Manager Plugin [`#194`](https://github.com/rdkcentral/entservices-inputoutput/pull/194)
- Merge tag '1.4.1' into develop [`263272d`](https://github.com/rdkcentral/entservices-inputoutput/commit/263272d6c89623461ace94af863e746fda34f9c3)

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

> 1 August 2025

- RDKEMW-6582: Improve the ARC volume logo smoothness during the Volume +/- press and hold scenario [`#215`](https://github.com/rdkcentral/entservices-inputoutput/pull/215)
- [RDKEMW-5410] RDKEMW-6572 : Compilation error was not reported for the PR branch [`#211`](https://github.com/rdkcentral/entservices-inputoutput/pull/211)
- 1.4.1 release change log updates [`f6c7916`](https://github.com/rdkcentral/entservices-inputoutput/commit/f6c7916aff03d41fb65e8b631f5c05f666ec92c6)
- Merge tag '1.4.0' into develop [`152ff74`](https://github.com/rdkcentral/entservices-inputoutput/commit/152ff74a4066cd3b6fc10800d1b3835fe7d3b543)

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

> 28 July 2025

- RDKEMW-2942 : Remove the HdmiInput plugin and replace its references with AVInput [`#205`](https://github.com/rdkcentral/entservices-inputoutput/pull/205)
- [RDKEMW-3513] PR action to run with latest change [`#163`](https://github.com/rdkcentral/entservices-inputoutput/pull/163)
- RDKEMW-6325: platfromSupport is missing from dimmingMode capabilities [`#198`](https://github.com/rdkcentral/entservices-inputoutput/pull/198)
- RDKTV-37015 - Changelog updates for 1.4.0 [`b969871`](https://github.com/rdkcentral/entservices-inputoutput/commit/b969871181dd194dd835750ec8eb908b66d34537)
- Merge tag '1.3.5' into develop [`024be52`](https://github.com/rdkcentral/entservices-inputoutput/commit/024be52d58d512b138b84aee9b12609e603d7110)

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

> 23 July 2025

- RDKEMW-6230: Retry logic used dsGetHDMIARCPortId in HdmiCecSink [`#203`](https://github.com/rdkcentral/entservices-inputoutput/pull/203)
- 1.3.5 release changelog updates [`b12cd97`](https://github.com/rdkcentral/entservices-inputoutput/commit/b12cd97a05c2dc2b7915cfac28c998fb2277d349)
- Merge tag '1.3.4' into develop [`760ee0f`](https://github.com/rdkcentral/entservices-inputoutput/commit/760ee0f9da46e0b0ed2e2adb4523bfec85c5a927)

#### [1.3.4](https://github.com/rdkcentral/entservices-inputoutput/compare/1.3.3...1.3.4)
Expand Down
33 changes: 24 additions & 9 deletions HdmiCecSink/HdmiCecSink.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSink/HdmiCecSink.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/HdmiCecSink.cpp' (Match: rdkcentral/rdkservices/866, 3546 lines, url: https://github.com/rdkcentral/rdkservices/archive/AML_BSP_VERSION_866.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)

Check failure on line 1 in HdmiCecSink/HdmiCecSink.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/HdmiCecSink.cpp' (Match: rdkcentral/rdkservices/1, 3583 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.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 @@ -75,7 +75,7 @@
#define HDMICECSINK_NUMBER_TV_ADDR 2
#define HDMICECSINK_UPDATE_POWER_STATUS_INTERVA_MS (60 * 1000)
#define HDMISINK_ARC_START_STOP_MAX_WAIT_MS 4000
#define HDMICECSINK_UPDATE_AUDIO_STATUS_INTERVAL_MS 500
#define HDMICECSINK_UPDATE_AUDIO_STATUS_INTERVAL_MS 2000


#define SAD_FMT_CODE_AC3 2
Expand Down Expand Up @@ -710,6 +710,7 @@
m_isHdmiInConnected = false;
hdmiCecAudioDeviceConnected = false;
m_isAudioStatusInfoUpdated = false;
m_audioStatusRequestedCount = 0;
m_audioStatusReceived = false;
m_audioStatusTimerStarted = false;
m_audioDevicePowerStatusRequested = false;
Expand Down Expand Up @@ -1161,9 +1162,11 @@
LOGINFO("AudioStatus received from the Audio Device and the timer is still active. So stopping the timer!\n");
m_audioStatusDetectionTimer.stop();
}
LOGINFO("AudioStatus received from the Audio Device. Updating the AudioStatus info! m_isAudioStatusInfoUpdated :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ", m_isAudioStatusInfoUpdated,m_audioStatusReceived,m_audioStatusTimerStarted);
LOGINFO("AudioStatus received from the Audio Device. Updating the AudioStatus info! m_isAudioStatusInfoUpdated :%d, m_audioStatusRequestedCount :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ", m_isAudioStatusInfoUpdated,m_audioStatusRequestedCount,m_audioStatusReceived,m_audioStatusTimerStarted);
}
LOGINFO("Command: ReportAudioStatus %s audio Mute status %d means %s and current Volume level is %d \n",GetOpName(msg.opCode()),msg.status.getAudioMuteStatus(),msg.status.toString().c_str(),msg.status.getAudioVolume());
if(m_audioStatusRequestedCount > 0)
m_audioStatusRequestedCount--;
LOGINFO("Command: ReportAudioStatus %s audio Mute status %d means %s and current Volume level is %d \n",GetOpName(msg.opCode()),msg.status.getAudioMuteStatus(),msg.status.toString().c_str(),msg.status.getAudioVolume());
params["muteStatus"] = msg.status.getAudioMuteStatus();
params["volumeLevel"] = msg.status.getAudioVolume();
sendNotify(eventString[HDMICECSINK_EVENT_REPORT_AUDIO_STATUS], params);
Expand Down Expand Up @@ -1355,7 +1358,15 @@
return;
if(!(_instance->smConnection))
return;
if (m_audioStatusDetectionTimer.isActive())
{
LOGINFO("Stopping the Audio Status Timer!\n");
m_audioStatusDetectionTimer.stop();
m_audioStatusTimerStarted = false;
LOGINFO("m_isAudioStatusInfoUpdated :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ",m_isAudioStatusInfoUpdated,m_audioStatusReceived,m_audioStatusTimerStarted);
}
LOGINFO(" Send GiveAudioStatus ");
m_audioStatusRequestedCount++;
_instance->smConnection->sendTo(LogicalAddress::AUDIO_SYSTEM,MessageEncoder().encode(GiveAudioStatus()), 100);

}
Expand Down Expand Up @@ -2497,10 +2508,11 @@
m_audioStatusDetectionTimer.stop();
}
m_isAudioStatusInfoUpdated = false;
m_audioStatusRequestedCount = 0;
m_audioStatusReceived = false;
m_audioStatusTimerStarted = false;
LOGINFO("Audio device removed, reset the audio status info. m_isAudioStatusInfoUpdated :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ", m_isAudioStatusInfoUpdated,m_audioStatusReceived,m_audioStatusTimerStarted);
sendNotify(eventString[HDMICECSINK_EVENT_AUDIO_DEVICE_CONNECTED_STATUS], params);
LOGINFO("Audio device removed, reset the audio status info. m_isAudioStatusInfoUpdated :%d, m_audioStatusRequestedCount :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d", m_isAudioStatusInfoUpdated,m_audioStatusRequestedCount,m_audioStatusReceived,m_audioStatusTimerStarted);
sendNotify(eventString[HDMICECSINK_EVENT_AUDIO_DEVICE_CONNECTED_STATUS], params);
}

_instance->deviceList[logicalAddress].m_isRequestRetry = 0;
Expand Down Expand Up @@ -3121,10 +3133,10 @@
m_audioStatusDetectionTimer.stop();
}
m_isAudioStatusInfoUpdated = false;
m_audioStatusRequestedCount = 0;
m_audioStatusReceived = false;
m_audioStatusTimerStarted = false;
LOGINFO("CEC Disabled, reset the audio status info. m_isAudioStatusInfoUpdated :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ", m_isAudioStatusInfoUpdated,m_audioStatusReceived,m_audioStatusTimerStarted);

LOGINFO("CEC Disabled, reset the audio status info. m_isAudioStatusInfoUpdated :%d, m_audioStatusRequestedCount :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ", m_isAudioStatusInfoUpdated,m_audioStatusRequestedCount,m_audioStatusReceived,m_audioStatusTimerStarted);

for(int i=0; i< 16; i++)
{
Expand Down Expand Up @@ -3361,6 +3373,8 @@
keyInfo = _instance->m_SendKeyQueue.front();
_instance->m_SendKeyQueue.pop();

if((keyInfo.logicalAddr != 0x5) || ((keyInfo.logicalAddr == 0x5) && (_instance->hdmiCecAudioDeviceConnected == true)))
{
if(keyInfo.UserControl == "sendUserControlPressed" )
{
LOGINFO("sendUserControlPressed : logical addr:0x%x keyCode: 0x%x queue size :%zu \n",keyInfo.logicalAddr,keyInfo.keyCode,_instance->m_SendKeyQueue.size());
Expand All @@ -3380,16 +3394,16 @@

if((_instance->m_SendKeyQueue.size()<=1 || (_instance->m_SendKeyQueue.size() % 2 == 0)) && ((keyInfo.keyCode == VOLUME_UP) || (keyInfo.keyCode == VOLUME_DOWN) || (keyInfo.keyCode == MUTE)) )
{
LOGINFO("m_isAudioStatusInfoUpdated :%d, m_audioStatusRequestedCount :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ",_instance->m_isAudioStatusInfoUpdated,_instance->m_audioStatusRequestedCount,_instance->m_audioStatusReceived,_instance->m_audioStatusTimerStarted);
if(keyInfo.keyCode == MUTE)
{
_instance->sendGiveAudioStatusMsg();
}
else
{
LOGINFO("m_isAudioStatusInfoUpdated :%d, m_audioStatusReceived :%d, m_audioStatusTimerStarted:%d ",_instance->m_isAudioStatusInfoUpdated,_instance->m_audioStatusReceived,_instance->m_audioStatusTimerStarted);
if (!_instance->m_isAudioStatusInfoUpdated)
{
if ( !(_instance->m_audioStatusDetectionTimer.isActive()))
if ((!(_instance->m_audioStatusDetectionTimer.isActive())) && (_instance->m_audioStatusRequestedCount == 0))
{
LOGINFO("Audio status info not updated. Starting the Timer!");
_instance->m_audioStatusTimerStarted = true;
Expand All @@ -3404,6 +3418,7 @@
}
}
}
}
}

}//while(!_instance->m_sendKeyEventThreadExit)
Expand Down
1 change: 1 addition & 0 deletions HdmiCecSink/HdmiCecSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ namespace WPEFramework {
bool m_isAudioStatusInfoUpdated;
bool m_audioStatusReceived;
bool m_audioStatusTimerStarted;
int m_audioStatusRequestedCount;
std::thread m_sendKeyEventThread;
std::mutex m_sendKeyEventMutex;
std::queue<SendKeyInfo> m_SendKeyQueue;
Expand Down
59 changes: 32 additions & 27 deletions Tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,54 @@ Hence, any modifications/additions related to mocks should be commited to entser

# Individual Repo Handling
Each individual entservices-* repo was added with a .yml file to trigger L1, L2, L2-OOP test job in github workflow. This yml file triggers below mentioned build jobs in addition to regular build jobs (thunder, thunder tools & etc,).

```
a/ Build mocks => To create TestMock Lib from all required mock relates stubs and copy to install/usr/lib path.
b/ Build entservices-<repo-name> => To create Test Lib of .so type from all applicable test files which are enabled for plugin test.
c/ Build entservices-testframework => To create L1/L2 executable by linking the plugins/test .so files.

```
This ensures everything in-tact in repo level across multiple related plugins when there is a new change comes in.

# testframework Repo Handling
The entservices-testframework repo contains yml files corresponds to L1, L2 & L2-OOP to trigger test job in github workflow.

This yml file triggers below mentioned build jobs in addition to regular build jobs (thunder, thunder tools & etc,).

a/ Build mocks => To create TestMock Lib from all required mock relates stubs and copy to install/usr/lib path.
b/ Build entservices-* => Jobs to checkout/build all individual repo's plugin & test files which are enabled for plugin test and copy all required libs to install/usr/lib path.
c/ Build entservices-testframework => To create L1/L2 executable by linking the plugins/test .so files.

This ensures everything in-tact across multiple repos when there is a new change comes either in mocks or test case or plugins.

##### Steps to run L1, L2, L2-OOP test locally #####
```
1. checkout the entservices-<repo-name> to your working directory in your build machine.
example: git clone https://github.com/rdkcentral/entservices-testframework.git
example: git clone https://github.com/rdkcentral/entservices-deviceanddisplay.git

2. switch to entservices-<repo-name> directory
example: cd entservices-testframework
example: cd entservices-deviceanddisplay

3. check and ensure current working branch points to develop
example: git branch

4. Run below curl command to download act executable to your repo.
example: curl -SL https://raw.githubusercontent.com/nektos/act/master/install.sh | bash

5. 5a/to run L1 test
example: ./bin/act -W .github/workflows/L1-tests.yml -s GITHUB_TOKEN=<your access token>
5. Run L1, L2, L2-oop test
example: ./bin/act -W .github/workflows/tests-trigger.yml -s GITHUB_TOKEN=<your access token>

5. 5b/to run L2 test
example: ./bin/act -W .github/workflows/L2-tests.yml -s GITHUB_TOKEN=<your access token>

5. 5c/to run L2 test OOP
example: ./bin/act -W .github/workflows/L2-tests-oop.yml -s GITHUB_TOKEN=<your access token>
NOTE: By default test-trigger.yml will trigger all tests(L1, L2 and etc) parallely, if you want any one test alone to be triggered/verified then remove the other trigger rules from the tests-trigger.yml
```
# testframework Repo Handling
tf-trigger.yml file of testframework repo will get loaded into github action whenever there is a pull or push happens. This file in-turn triggers all individual repos L1, L2, L2-oop tests. testframework repo test can run only in github workflow.

NOTES:
a/ If you face any secret token related error while run your yml, pls comment the below mentioned line
NOTE:
If you face any secret token related error while run your yml, pls comment the below mentioned line
#token: ${{ secrets.RDKE_GITHUB_TOKEN }}
b/ Coverage Report of both L1 and L2 test are uploaded to artifacts server.
c/ For the case, which has modification in plugin and/or test files as well in entservices-testframework mock files, change the ref key of checkout job to point your own branch instead of develop, in both entservices-testframework and entservices-* repo and ensure L1, L2, L2-OOP test jobs are passing for your PR.
example: ref: feature/L1-test

# Execution usecases where manual change required before triggering the test:
```
a/ changes in testframework repo only:
Need to change ref pointer of "Checkout entservices-testframework" job in individual repo yml file, to point your current working branch of testframework and in tftrigger.yml of testframework repo need to change trigger branch name to your individual repo branch name instead of develop which is default.
example:
ref: topic/method_1 /* Checkout entservices-testframework job */
uses: rdkcentral/entservices-deviceanddisplay/.github/workflows/L1-tests.yml@topic/method_1 /* tf-trigger.yml */

b/ changes in both testframework repo and invidual repo:
Changes mentioned in step (a) above + "Checkout entservices-deviceanddisplay-testframework" job in individual repo yml file, ref field to point your deviceanddisplay current working branch.
example:
ref: topic/method_1 /* Checkout entservices-testframework job */
ref: topic/method_1 /* Checkout entservices-deviceanddisplay-testframework job */
uses: rdkcentral/entservices-deviceanddisplay/.github/workflows/L1-tests.yml@topic/method_1 /* tf-trigger.yml */

c/ changes in individual entservices-* repo only
no changes required
```
1 change: 0 additions & 1 deletion helpers/PluginInterfaceBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ namespace Plugin {
auto pluginInterface = controller->QueryInterfaceByCallsign<INTERFACE>(callsign.c_str());

if (pluginInterface) {
pluginInterface->AddRef();
LOGINFO("plugin interface succeed and retry count: %d",count);
return pluginInterface;
}
Expand Down
Loading