Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5b1743f
CEC source and sink changes
karuppaiyak Sep 4, 2025
55ceafa
added host.hpp
karuppaiyak Sep 4, 2025
f8c01b3
Feature/rdkemw 7169 (#245)
hgfell683 Sep 4, 2025
7a0d569
1.4.6 release changelog updates
actions-user Sep 4, 2025
bef0aa3
Merge tag '1.4.6' into develop
actions-user Sep 4, 2025
7c031cf
Merge branch 'release/1.4.6'
actions-user Sep 4, 2025
a0fa4dc
base interface template change
karuppaiyak Sep 9, 2025
eac3ee0
copilot warnings
karuppaiyak Sep 9, 2025
08b3562
review comments added
karuppaiyak Sep 9, 2025
e7f3075
moved device setting init to plugin init
karuppaiyak Sep 9, 2025
b334b82
RDKEMW-7712: Sync low latency for AVOutput initialization (#6338)
arjunbinu Aug 22, 2025
81cc8f5
Merge pull request #249 from rdkcentral/feature/RDKEMW-7712
utkarshece14 Sep 9, 2025
5979423
1.4.7 release changelog updates
actions-user Sep 9, 2025
2bf6395
Merge branch 'release/1.4.7'
actions-user Sep 9, 2025
1ea0522
Merge tag '1.4.7' into develop
actions-user Sep 9, 2025
ff6eeee
reverted changes in HdmiCecSource/HdmiCecSource.cpp
karuppaiyak Sep 15, 2025
922fb7f
reverted init failure
karuppaiyak Sep 15, 2025
3501b16
test1
karuppaiyak Sep 17, 2025
f2c5780
compilation fixed
karuppaiyak Sep 17, 2025
bc803aa
added exception handling
karuppaiyak Sep 17, 2025
0623a75
corrected reference
karuppaiyak Sep 18, 2025
e9cd34f
handled return value
karuppaiyak Sep 18, 2025
f8ea54c
unit test addition
karuppaiyak Sep 19, 2025
76a6dd1
removed tests-trigger changes
karuppaiyak Sep 19, 2025
6ae6bd0
L1 unit test for source
karuppaiyak Sep 19, 2025
73a1113
instance pb
karuppaiyak Sep 19, 2025
0c48f19
Cec Sink L1 test corrected
karuppaiyak Sep 22, 2025
97af88f
enabled cec sink l1 test
karuppaiyak Sep 22, 2025
8f16519
using old tf branch
karuppaiyak Sep 22, 2025
27b02c7
host setImpl Added
karuppaiyak Sep 23, 2025
2e3aada
hdmiinput setimpl added
karuppaiyak Sep 23, 2025
8b5c432
CEC source and sink changes
karuppaiyak Sep 4, 2025
8b0cc04
added host.hpp
karuppaiyak Sep 4, 2025
60c25bd
base interface template change
karuppaiyak Sep 9, 2025
ff83a02
copilot warnings
karuppaiyak Sep 9, 2025
da3518c
review comments added
karuppaiyak Sep 9, 2025
24d314b
moved device setting init to plugin init
karuppaiyak Sep 9, 2025
14f2003
reverted changes in HdmiCecSource/HdmiCecSource.cpp
karuppaiyak Sep 15, 2025
ebd3200
reverted init failure
karuppaiyak Sep 15, 2025
6993a8d
test1
karuppaiyak Sep 17, 2025
a22b587
compilation fixed
karuppaiyak Sep 17, 2025
51b2c7f
added exception handling
karuppaiyak Sep 17, 2025
a0ccdbb
corrected reference
karuppaiyak Sep 18, 2025
6eacd50
handled return value
karuppaiyak Sep 18, 2025
96b094d
unit test addition
karuppaiyak Sep 19, 2025
cc42754
removed tests-trigger changes
karuppaiyak Sep 19, 2025
a3c694f
L1 unit test for source
karuppaiyak Sep 19, 2025
abc1156
instance pb
karuppaiyak Sep 19, 2025
7415208
Cec Sink L1 test corrected
karuppaiyak Sep 22, 2025
72bfc2a
enabled cec sink l1 test
karuppaiyak Sep 22, 2025
f73190e
using old tf branch
karuppaiyak Sep 22, 2025
2515fdd
host setImpl Added
karuppaiyak Sep 23, 2025
91b669a
hdmiinput setimpl added
karuppaiyak Sep 23, 2025
6e18267
Revert L1-tests.yml
KaleeswaranGnanagurusamy Sep 23, 2025
11c0a7d
Merge branch 'feature/RDKEMW-6163-c1' of https://github.com/rdkcentra…
karuppaiyak Sep 24, 2025
408cdc5
fw api calls validations
karuppaiyak Sep 24, 2025
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
22 changes: 21 additions & 1 deletion 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, 3566 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, 3603 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 @@ -753,7 +753,11 @@

int err;
dsHdmiInGetNumberOfInputsParam_t hdmiInput;
#ifdef IO_HCEC_ENABLE_IARM
InitializeIARM();
#else
device::Host::getInstance().Register(this, "WPE[HdmiCecSink]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is device::manager::Initialize() called before register ?

#endif /* IO_HCEC_ENABLE_IARM */
m_sendKeyEventThreadExit = false;
m_sendKeyEventThread = std::thread(threadSendKeyEvent);

Expand Down Expand Up @@ -879,7 +883,12 @@
}

HdmiCecSink::_instance = nullptr;
DeinitializeIARM();
#ifdef IO_HCEC_ENABLE_IARM
DeinitializeIARM();
#else
device::Host::getInstance().UnRegister(this);
#endif /* IO_HCEC_ENABLE_IARM */

LOGWARN(" HdmiCecSink Deinitialize() Done");
}

Expand Down Expand Up @@ -920,6 +929,7 @@
}
}

#ifdef IO_HCEC_ENABLE_IARM
void HdmiCecSink::dsHdmiEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
{
if(!HdmiCecSink::_instance)
Expand All @@ -934,6 +944,16 @@
HdmiCecSink::_instance->onHdmiHotPlug(portId,isHdmiConnected);
}
}
#else
void HdmiCecSink::OnHdmiInEventHotPlug(dsHdmiInPort_t port, bool isConnected)
{
if(!HdmiCecSink::_instance)
return;

LOGINFO("Received IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG event port: %d isConnected: %d \r\n", port, isConnected);
HdmiCecSink::_instance->onHdmiHotPlug((int) port, (int) isConnected);
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type casting bool to int may not preserve the intended boolean semantics. The onHdmiHotPlug method likely expects boolean values, so consider passing isConnected directly or using explicit boolean conversion.

Suggested change
HdmiCecSink::_instance->onHdmiHotPlug((int) port, (int) isConnected);
HdmiCecSink::_instance->onHdmiHotPlug((int) port, isConnected);

Copilot uses AI. Check for mistakes.

}
#endif /* IO_HCEC_ENABLE_IARM */

void HdmiCecSink::onPowerModeChanged(const PowerState currentState, const PowerState newState)
{
Expand Down
5 changes: 4 additions & 1 deletion HdmiCecSink/HdmiCecSink.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSink/HdmiCecSink.h

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.h' (Match: rdkcentral/rdkservices/1, 748 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: HdmiCecSink/HdmiCecSink.h)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -41,6 +41,8 @@
#include "UtilsLogging.h"
#include <interfaces/IPowerManager.h>
#include "PowerManagerInterface.h"
#include "host.hpp"


using namespace WPEFramework;
using PowerState = WPEFramework::Exchange::IPowerManager::PowerState;
Expand Down Expand Up @@ -482,7 +484,7 @@
// As the registration/unregistration of notifications is realized by the class PluginHost::JSONRPC,
// this class exposes a public method called, Notify(), using this methods, all subscribed clients
// will receive a JSONRPC message as a notification, in case this method is called.
class HdmiCecSink : public PluginHost::IPlugin, public PluginHost::JSONRPC {
class HdmiCecSink : public PluginHost::IPlugin, public PluginHost::JSONRPC, device::Host::IHdmiInEvents {

enum {
POLL_THREAD_STATE_NONE,
Expand Down Expand Up @@ -530,6 +532,7 @@
virtual const string Initialize(PluginHost::IShell* shell) override;
virtual void Deinitialize(PluginHost::IShell* service) override;
virtual string Information() const override { return {}; }
virtual void OnHdmiInEventHotPlug(dsHdmiInPort_t port, bool isConnected) override;
static HdmiCecSink* _instance;
CECDeviceParams deviceList[16];
std::vector<HdmiPortMap> hdmiInputs;
Expand Down
30 changes: 30 additions & 0 deletions HdmiCecSource/HdmiCecSourceImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSource/HdmiCecSourceImplementation.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 'HdmiCecSource/HdmiCecSourceImplementation.cpp' (Match: rdkcentral/rdkservices/1, 1618 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: HdmiCecSource/HdmiCecSource.cpp)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -390,7 +390,12 @@
}
_registeredEventHandlers = false;

#ifdef IO_HCEC_ENABLE_IARM
DeinitializeIARM();
#else
device::Host::getInstance().UnRegister(this);
#endif /* IO_HCEC_ENABLE_IARM */

}

Core::hresult HdmiCecSourceImplementation::Configure(PluginHost::IShell* service)
Expand All @@ -409,7 +414,9 @@
logicalAddress = 0xFF;

//CEC plugin functionalities will only work if CECmgr is available. If plugin Initialize failure upper layer will call dtor directly.
#ifdef IO_HCEC_ENABLE_IARM
InitializeIARM();
#endif /* IO_HCEC_ENABLE_IARM */
InitializePowerManager(service);

// load persistence setting
Expand All @@ -418,6 +425,11 @@
{
//TODO(MROLLINS) this is probably per process so we either need to be running in our own process or be carefull no other plugin is calling it
device::Manager::Initialize();

#ifndef IO_HCEC_ENABLE_IARM
device::Host::getInstance().Register(this, "WPE[HdmiCecSource]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to truncate clientName to less than 11 chars so that, small string optimization is used, take care at all instances. Also I see in other PR's WPE:: convention is used.

#endif /* IO_HCEC_ENABLE_IARM */

std::string strVideoPort = device::Host::getInstance().getDefaultVideoPortName();
device::VideoOutputPort vPort = device::Host::getInstance().getVideoOutputPort(strVideoPort.c_str());
if (vPort.isDisplayConnected())
Expand Down Expand Up @@ -759,6 +771,7 @@
LOGINFO("Exit threadHotPlugEventHandler \r\n");
}

#ifdef IO_HCEC_ENABLE_IARM
void HdmiCecSourceImplementation::dsHdmiEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
{
if(!HdmiCecSourceImplementation::_instance || !_instance->cecEnableStatus)
Expand All @@ -779,7 +792,24 @@
}
}
}
#else
void HdmiCecSourceImplementation::OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent)
{
LOGINFO("OnDisplayHDMIHotPlug : displayEvent = %d ", displayEvent);

if(!HdmiCecSourceImplementation::_instance || !_instance->cecEnableStatus)
{
LOGINFO("Return from dsHdmiEventHandler due HdmiCecSourceImplementation::_instance:%p cecEnableStatus:%d \r\n", HdmiCecSourceImplementation::_instance, _instance->cecEnableStatus);
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message references 'dsHdmiEventHandler' but this is inside the 'OnDisplayHDMIHotPlug' method. The message should be updated to reflect the correct method name.

Suggested change
LOGINFO("Return from dsHdmiEventHandler due HdmiCecSourceImplementation::_instance:%p cecEnableStatus:%d \r\n", HdmiCecSourceImplementation::_instance, _instance->cecEnableStatus);
LOGINFO("Return from OnDisplayHDMIHotPlug due HdmiCecSourceImplementation::_instance:%p cecEnableStatus:%d \r\n", HdmiCecSourceImplementation::_instance, _instance->cecEnableStatus);

Copilot uses AI. Check for mistakes.

return;
}

int hdmi_hotplug_event = (int) displayEvent;
LOGINFO("Received IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG event data:%d \r\n", hdmi_hotplug_event);
std::thread worker(threadHotPlugEventHandler,hdmi_hotplug_event);
worker.detach();

}
#endif /* IO_HCEC_ENABLE_IARM */
void HdmiCecSourceImplementation::onPowerModeChanged(const PowerState currentState, const PowerState newState)
{
if(!HdmiCecSourceImplementation::_instance)
Expand Down
5 changes: 4 additions & 1 deletion HdmiCecSource/HdmiCecSourceImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include <interfaces/IPowerManager.h>
#include "PowerManagerInterface.h"
#include <interfaces/IHdmiCecSource.h>
#include "host.hpp"


using namespace WPEFramework;
using PowerState = WPEFramework::Exchange::IPowerManager::PowerState;
Expand Down Expand Up @@ -170,7 +172,7 @@ namespace WPEFramework {
// As the registration/unregistration of notifications is realized by the class PluginHost::JSONRPC,
// this class exposes a public method called, Notify(), using this methods, all subscribed clients
// will receive a JSONRPC message as a notification, in case this method is called.
class HdmiCecSourceImplementation : public Exchange::IHdmiCecSource {
class HdmiCecSourceImplementation : public Exchange::IHdmiCecSource, device::Host::IDisplayDeviceEvents {
enum {
VOLUME_UP = 0x41,
VOLUME_DOWN = 0x42,
Expand All @@ -196,6 +198,7 @@ namespace WPEFramework {
public:
HdmiCecSourceImplementation();
virtual ~HdmiCecSourceImplementation();
virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) override;
void onPowerModeChanged(const PowerState currentState, const PowerState newState);
void registerEventHandlers();
static HdmiCecSourceImplementation* _instance;
Expand Down
Loading