diff --git a/.github/workflows/L1-tests.yml b/.github/workflows/L1-tests.yml index 0b5cfccd..4f85ca8a 100755 --- a/.github/workflows/L1-tests.yml +++ b/.github/workflows/L1-tests.yml @@ -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 @@ -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/actions-setup-cmake@v1.13 @@ -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 diff --git a/.github/workflows/L2-tests.yml b/.github/workflows/L2-tests.yml index 9dc033be..70b3894a 100755 --- a/.github/workflows/L2-tests.yml +++ b/.github/workflows/L2-tests.yml @@ -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 @@ -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/actions-setup-cmake@v1.13 @@ -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 diff --git a/.github/workflows/tests-trigger.yml b/.github/workflows/tests-trigger.yml index 3aa84f0f..bb3de6af 100755 --- a/.github/workflows/tests-trigger.yml +++ b/.github/workflows/tests-trigger.yml @@ -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 }} - diff --git a/CHANGELOG.md b/CHANGELOG.md index e60fb2bf..5b5817fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/HdmiCecSink/HdmiCecSink.cpp b/HdmiCecSink/HdmiCecSink.cpp index ecb5415e..a1ac6a75 100644 --- a/HdmiCecSink/HdmiCecSink.cpp +++ b/HdmiCecSink/HdmiCecSink.cpp @@ -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 @@ -710,6 +710,7 @@ namespace WPEFramework m_isHdmiInConnected = false; hdmiCecAudioDeviceConnected = false; m_isAudioStatusInfoUpdated = false; + m_audioStatusRequestedCount = 0; m_audioStatusReceived = false; m_audioStatusTimerStarted = false; m_audioDevicePowerStatusRequested = false; @@ -1161,9 +1162,11 @@ namespace WPEFramework 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); @@ -1355,7 +1358,15 @@ namespace WPEFramework 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); } @@ -2497,10 +2508,11 @@ namespace WPEFramework 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; @@ -3121,10 +3133,10 @@ namespace WPEFramework 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++) { @@ -3361,6 +3373,8 @@ namespace WPEFramework 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()); @@ -3380,16 +3394,16 @@ namespace WPEFramework 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; @@ -3404,6 +3418,7 @@ namespace WPEFramework } } } + } } }//while(!_instance->m_sendKeyEventThreadExit) diff --git a/HdmiCecSink/HdmiCecSink.h b/HdmiCecSink/HdmiCecSink.h index 418fb134..2bc6d7c6 100644 --- a/HdmiCecSink/HdmiCecSink.h +++ b/HdmiCecSink/HdmiCecSink.h @@ -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 m_SendKeyQueue; diff --git a/Tests/README.md b/Tests/README.md index 4b6eb4ac..48e14c27 100644 --- a/Tests/README.md +++ b/Tests/README.md @@ -6,30 +6,20 @@ 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- => 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- 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- directory -example: cd entservices-testframework +example: cd entservices-deviceanddisplay 3. check and ensure current working branch points to develop example: git branch @@ -37,18 +27,33 @@ 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= +5. Run L1, L2, L2-oop test +example: ./bin/act -W .github/workflows/tests-trigger.yml -s GITHUB_TOKEN= -5. 5b/to run L2 test -example: ./bin/act -W .github/workflows/L2-tests.yml -s GITHUB_TOKEN= - -5. 5c/to run L2 test OOP -example: ./bin/act -W .github/workflows/L2-tests-oop.yml -s GITHUB_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 +``` diff --git a/helpers/PluginInterfaceBuilder.h b/helpers/PluginInterfaceBuilder.h index a10ad6a6..fdfc5edb 100755 --- a/helpers/PluginInterfaceBuilder.h +++ b/helpers/PluginInterfaceBuilder.h @@ -113,7 +113,6 @@ namespace Plugin { auto pluginInterface = controller->QueryInterfaceByCallsign(callsign.c_str()); if (pluginInterface) { - pluginInterface->AddRef(); LOGINFO("plugin interface succeed and retry count: %d",count); return pluginInterface; }