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
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ option(GIT_BRANCH, "Repository Branch" OFF)
option(IP_ENABLED "Enable IP" OFF)
option(LOCAL_MIC "Local Microphone" OFF)
option(LOCAL_MIC_DISABLE_VIA_PRIVACY "Use Privacy to disable microphone" OFF)
option(MAC_POLLING "MAC polling" OFF)
option(MEM_DEBUG "Enable memory debugging" OFF)
option(MEMORY_LOCK "Memory Lock" OFF)
option(MIC_TAP "Enable MIC_TAP" OFF)
Expand All @@ -67,7 +66,6 @@ option(THUNDER_SECURITY "Enable THUNDER_SECURITY" OFF)
option(USE_SAFEC "Use safec" OFF)
option(USE_IARM_POWER_MANAGER "Use IARM Power Manager" OFF)
option(VOICE_KEYWORD_BEEP "Enable VOICE_KEYWORD_BEEP" OFF)
option(VOICE_NEXTGEN_MAC "Enable VOICE_NEXTGEN_MAC" OFF)
option(XRSR_HTTP "Enable XRSR_HTTP" OFF)
option(XRSR_SDT "Enable XRSR_SDT" OFF)
option(ENABLE_ASYNC_SRVR_MSG "Enable Asynchronous Server Messaging Feature" OFF)
Expand Down Expand Up @@ -218,7 +216,6 @@ if(AUTH_ENABLED)
add_compile_definitions(AUTH_ACTIVATION_STATUS)
endif()
#By default disabled but can be enabled
#add_compile_definitions(AUTH_RECEIVER_ID)
#add_compile_definitions(AUTH_EXPERIENCE)
target_link_libraries(controlMgr ctrlm-hal-certificate)
else()
Expand Down Expand Up @@ -287,10 +284,6 @@ if(LOCAL_MIC)
endif()
endif()

if(MAC_POLLING)
add_compile_definitions(MAC_POLLING)
endif()

if(MEM_DEBUG)
add_compile_definitions(MEM_DEBUG)
endif()
Expand Down Expand Up @@ -347,10 +340,6 @@ if(VOICE_KEYWORD_BEEP)
install(FILES ${CMAKE_SOURCE_DIR}/../${BEEP_ON_KWD_FILE} DESTINATION share )
endif()

if(VOICE_NEXTGEN_MAC)
add_compile_definitions(VOICE_NEXTGEN_MAC)
endif()

if(USE_DEPRECATED_HDMI_INPUT_PLUGIN)
add_compile_definitions(USE_DEPRECATED_HDMI_INPUT_PLUGIN)
endif()
Expand Down
2 changes: 0 additions & 2 deletions include/ctrlm_ipc.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in include/ctrlm_ipc.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 'include/ctrlm_ipc.h' (Match: rdkcentral/rdkservices/1, 777 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: Tests/mocks/Ctrlm.h)
* following copyright and licenses apply:
*
* Copyright 2014 RDK Management
Expand Down Expand Up @@ -156,7 +156,6 @@
#define CTRLM_MAIN_MAX_BOUND_CONTROLLERS (9) ///< Maximum number of bound controllers
#define CTRLM_MAIN_MAX_CHIPSET_LENGTH (16) ///< Maximum length of chipset name string (including null termination)
#define CTRLM_MAIN_COMMIT_ID_MAX_LENGTH (48) ///< Maximum length of commit ID string (including null termination)
#define CTRLM_MAIN_RECEIVER_ID_MAX_LENGTH (40) ///< Maximum length of receiver ID string (including null termination)
#define CTRLM_MAIN_DEVICE_ID_MAX_LENGTH (24) ///< Maximum length of device ID string (including null termination)

#define CTRLM_PROPERTY_ACTIVE_PERIOD_BUTTON_VALUE_MIN (5000) ///< Minimum active period (in ms) for button binding.
Expand Down Expand Up @@ -500,7 +499,6 @@
char ctrlm_version[CTRLM_MAIN_VERSION_LENGTH]; ///< OUT - Software version of Control Manager
char ctrlm_commit_id[CTRLM_MAIN_COMMIT_ID_MAX_LENGTH]; ///< OUT - Last commit ID of Control Manager
char stb_device_id[CTRLM_MAIN_DEVICE_ID_MAX_LENGTH]; ///< OUT - Device ID obtained from the Set-Top Box
char stb_receiver_id[CTRLM_MAIN_RECEIVER_ID_MAX_LENGTH]; ///< OUT - Receiver ID obtained from the Set-Top Box
} ctrlm_main_iarm_call_status_t;

/// @brief RF Channel Structure
Expand Down
2 changes: 1 addition & 1 deletion include/ctrlm_ipc_voice.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef enum {
CTRLM_VOICE_SESSION_ABORT_REASON_FAILURE = 3, ///< Session aborted for any other reason
CTRLM_VOICE_SESSION_ABORT_REASON_VOICE_DISABLED = 4, ///< Session aborted because the voice feature is disabled
CTRLM_VOICE_SESSION_ABORT_REASON_DEVICE_UPDATE = 5, ///< Session aborted due to device update in progress
CTRLM_VOICE_SESSION_ABORT_REASON_NO_RECEIVER_ID = 6, ///< Session aborted because there is no receiver id
CTRLM_VOICE_SESSION_ABORT_REASON_NO_AUTH_DATA = 6, ///< Session aborted due to missing authorization data
CTRLM_VOICE_SESSION_ABORT_REASON_NEW_SESSION = 7, ///< Session aborted because the remote's previous session is still active
CTRLM_VOICE_SESSION_ABORT_REASON_INVALID_CONTROLLER_ID = 8, ///< Session aborted because the controller id isn't valid
CTRLM_VOICE_SESSION_ABORT_REASON_APPLICATION_RESTART = 9, ///< Session aborted due to restarting controlMgr.
Expand Down
1 change: 0 additions & 1 deletion src/auth/ctrlm_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ctrlm_auth_t {
virtual ~ctrlm_auth_t();

virtual bool is_ready() = 0;
virtual bool get_receiver_id(std::string &receiver_id) = 0;
virtual bool get_device_id(std::string &device_id) = 0;
virtual bool get_account_id(std::string &account_id) = 0;
virtual bool get_partner_id(std::string &partner_id) = 0;
Expand Down
5 changes: 0 additions & 5 deletions src/auth/ctrlm_auth_thunder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ bool ctrlm_auth_thunder_t::is_ready() {
return(ret);
}

bool ctrlm_auth_thunder_t::get_receiver_id(std::string &receiver_id) {
bool ret = this->plugin->get_receiver_id(receiver_id);
return(ret);
}

bool ctrlm_auth_thunder_t::get_device_id(std::string &device_id) {
bool ret = this->plugin->get_device_id(device_id);
return(ret);
Expand Down
1 change: 0 additions & 1 deletion src/auth/ctrlm_auth_thunder.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ctrlm_auth_thunder_t : public ctrlm_auth_t {
virtual ~ctrlm_auth_thunder_t();

virtual bool is_ready();
virtual bool get_receiver_id(std::string &receiver_id);
virtual bool get_device_id(std::string &device_id);
virtual bool get_account_id(std::string &account_id);
virtual bool get_partner_id(std::string &partner_id);
Expand Down
18 changes: 0 additions & 18 deletions src/auth/ctrlm_thunder_plugin_authservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,6 @@ bool ctrlm_thunder_plugin_authservice_t::is_device_activated() {
return(ret);
}

bool ctrlm_thunder_plugin_authservice_t::get_receiver_id(std::string &receiver_id) {
bool ret = false;
JsonObject params, response;
if(this->call_plugin("getDeviceId", (void *)&params, (void *)&response)) {
if(response["success"].Boolean()) { // If success doesn't exist, it defaults to false which is fine.
receiver_id = response["deviceId"].String();
if(!receiver_id.empty()) {
ret = true;
}
} else {
XLOGD_WARN("Success for getDeviceId was false");
}
} else {
XLOGD_WARN("Call for getDeviceId failed");
}
return(ret);
}

bool ctrlm_thunder_plugin_authservice_t::get_device_id(std::string &device_id) {
bool ret = false;
JsonObject params, response;
Expand Down
7 changes: 0 additions & 7 deletions src/auth/ctrlm_thunder_plugin_authservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ class ctrlm_thunder_plugin_authservice_t : public Thunder::Plugin::ctrlm_thunder
*/
bool is_device_activated();

/**
* Function that retrieves the Receiver ID from Authservice.
* @param receiver_id The reference to a string which will contain the Receiver ID.
* @return True on success otherwise False.
*/
bool get_receiver_id(std::string &receiver_id);

/**
* Function that retrieves the Device ID from Authservice.
* @param device_id The reference to a string which will contain the Device ID.
Expand Down
11 changes: 11 additions & 0 deletions src/ble/ctrlm_ble_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,17 @@ void ctrlm_obj_network_ble_t::ind_process_voice_session_end(void *data, int size
XLOGD_ERROR("Controller object doesn't exist for controller id %u!", controller_id);
return;
}

unsigned long long ieee_address = controllers_[controller_id]->ieee_address_get().get_value();;

if (ble_rcu_interface_) {
int32_t audioDuration = -1;
if (!ble_rcu_interface_->stopAudioStreaming(ieee_address, audioDuration)) {
XLOGD_ERROR("failed to end voice session for controller id <%u>", controller_id);
} else {
XLOGD_INFO("voice session ended for controller id <%u>", controller_id);
}
}
}

// ==================================================================================================================================================================
Expand Down
4 changes: 4 additions & 0 deletions src/ble/hal/configsettings/configmodelsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ using namespace std;
ConfigModelSettingsData::ConfigModelSettingsData()
: m_valid(false)
, m_disabled(false)
, m_voiceKeyCodePresent(false)
, m_typeZ(false)
, m_hasConnParams(false)
, m_servicesType(ConfigModelSettings::GattServiceType)
Expand All @@ -50,6 +51,8 @@ ConfigModelSettingsData::ConfigModelSettingsData(const ConfigModelSettingsData &
, m_pairingNameFormat(other.m_pairingNameFormat)
, m_otaProductName(other.m_otaProductName)
, m_standbyMode(other.m_standbyMode)
, m_voiceKeyCode(other.m_voiceKeyCode)
, m_voiceKeyCodePresent(other.m_voiceKeyCodePresent)
, m_typeZ(other.m_typeZ)
, m_connParamUpdateBeforeOtaVersion(other.m_connParamUpdateBeforeOtaVersion)
, m_upgradePauseVersion(other.m_upgradePauseVersion)
Expand Down Expand Up @@ -105,6 +108,7 @@ ConfigModelSettingsData::ConfigModelSettingsData(json_t *json)
, m_pairingNameFormat("")
, m_otaProductName("")
, m_standbyMode("")
, m_voiceKeyCodePresent(false)
, m_typeZ(false)
, m_connParamUpdateBeforeOtaVersion("")
, m_upgradePauseVersion("")
Expand Down
2 changes: 0 additions & 2 deletions src/ctrlm.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ gboolean ctrlm_is_one_touch_autobind_active(void);
gboolean ctrlm_is_binding_table_empty(void);
gboolean ctrlm_is_binding_table_full(void);
bool ctrlm_is_pii_mask_enabled(void);
gboolean ctrlm_main_has_receiver_id_get(void);
gboolean ctrlm_main_has_device_id_get(void);
gboolean ctrlm_main_has_device_type_get(void);
gboolean ctrlm_main_has_service_account_id_get(void);
Expand Down Expand Up @@ -507,7 +506,6 @@ void ctrlm_update_last_key_info(int controller_id, ctrlm_key_source_t sou
ctrlm_irdb_interface_t* ctrlm_main_irdb_get();
ctrlm_auth_t* ctrlm_main_auth_get();
void ctrlm_main_auth_start_poll();
std::string ctrlm_receiver_id_get();
std::string ctrlm_device_id_get();
std::string ctrlm_stb_name_get();
std::string ctrlm_device_mac_get();
Expand Down
4 changes: 2 additions & 2 deletions src/ctrlm_config_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"voice_data_retry_max" : 0,
"voice_csma_backoff_max" : 4,
"voice_data_backoff_exp_min" : 0,
"voice_command_encryption" : 0,
"voice_command_encryption" : 1,
"rib_update_check_interval" : 24,
"auto_check_validation_period" : 500,
"link_lost_wait_time" : 10000,
Expand Down Expand Up @@ -245,7 +245,7 @@
"minimum_duration" : 300,
"ffv_leading_samples" : 1600,
"timeout_packet_initial" : 3200,
"timeout_packet_subsequent" : 250,
"timeout_packet_subsequent" : 1000,
"bitrate_minimum" : 64,
"time_threshold" : 1000,
"timeout_stats" : 3000,
Expand Down
4 changes: 0 additions & 4 deletions src/ctrlm_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ ctrlm_network_id_t ctrlm_obj_controller_t::network_id_get() const {
return(obj_network_->network_id_get());
}

string ctrlm_obj_controller_t::receiver_id_get() const {
return(obj_network_->receiver_id_get());
}

string ctrlm_obj_controller_t::device_id_get() const {
return(obj_network_->device_id_get());
}
Expand Down
1 change: 0 additions & 1 deletion src/ctrlm_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class ctrlm_obj_controller_t

ctrlm_controller_id_t controller_id_get() const;
ctrlm_network_id_t network_id_get() const;
std::string receiver_id_get() const;
std::string device_id_get() const;
std::string service_account_id_get() const;
std::string partner_id_get() const;
Expand Down
62 changes: 2 additions & 60 deletions src/ctrlm_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ typedef struct {
sem_t ctrlm_utils_sem;
GAsyncQueue * queue;
string stb_name;
string receiver_id;
string device_id;
ctrlm_device_type_t device_type;
string service_account_id;
Expand All @@ -206,7 +205,6 @@ typedef struct {
string image_build_time;
string db_path;
string minidump_path;
gboolean has_receiver_id;
gboolean has_device_id;
gboolean has_device_type;
gboolean has_service_account_id;
Expand Down Expand Up @@ -293,10 +291,6 @@ static ctrlm_global_t g_ctrlm;
#ifdef AUTH_ENABLED
static gboolean ctrlm_has_authservice_data(void);
static gboolean ctrlm_load_authservice_data(void);
#ifdef AUTH_RECEIVER_ID
static gboolean ctrlm_load_receiver_id(void);
static void ctrlm_main_has_receiver_id_set(gboolean has_id);
#endif
#ifdef AUTH_DEVICE_ID
static gboolean ctrlm_load_device_id(void);
static void ctrlm_main_has_device_id_set(gboolean has_id);
Expand Down Expand Up @@ -579,7 +573,6 @@ int main(int argc, char *argv[]) {
g_ctrlm.telemetry = NULL;
g_ctrlm.telemetry_report_interval = JSON_INT_VALUE_CTRLM_GLOBAL_TELEMETRY_REPORT_INTERVAL;
g_ctrlm.service_access_token.clear();
g_ctrlm.has_receiver_id = false;
g_ctrlm.has_device_id = false;
g_ctrlm.has_device_type = false;
g_ctrlm.has_service_account_id = false;
Expand Down Expand Up @@ -1316,7 +1309,7 @@ gboolean ctrlm_load_device_mac(void) {
XLOGD_INFO("Device Mac set to <%s>", ctrlm_is_pii_mask_enabled() ? "***" : mac.c_str());
} else {
XLOGD_ERROR("Failed to get MAC address for device mac");
g_ctrlm.device_mac = "UNKNOWN";
g_ctrlm.device_mac = "";
}

return(ret);
Expand Down Expand Up @@ -1378,31 +1371,6 @@ void ctrlm_main_auth_start_poll() {
NULL);
}

#ifdef AUTH_RECEIVER_ID
gboolean ctrlm_main_has_receiver_id_get(void) {
return(g_ctrlm.has_receiver_id);
}

void ctrlm_main_has_receiver_id_set(gboolean has_id) {
g_ctrlm.has_receiver_id = has_id;
}

gboolean ctrlm_load_receiver_id(void) {
if(!g_ctrlm.authservice->get_receiver_id(g_ctrlm.receiver_id)) {
ctrlm_main_has_receiver_id_set(false);
return(false);
}

g_ctrlm.voice_session->voice_stb_data_receiver_id_set(g_ctrlm.receiver_id);

for(auto const &itr : g_ctrlm.networks) {
itr.second->receiver_id_set(g_ctrlm.receiver_id);
}
ctrlm_main_has_receiver_id_set(true);
return(true);
}
#endif

#ifdef AUTH_DEVICE_ID
void ctrlm_main_has_device_id_set(gboolean has_id) {
g_ctrlm.has_device_id = has_id;
Expand Down Expand Up @@ -1550,12 +1518,6 @@ gboolean ctrlm_load_service_access_token(void) {
gboolean ctrlm_has_authservice_data(void) {
gboolean ret = TRUE;
#ifdef AUTH_ENABLED
#ifdef AUTH_RECEIVER_ID
if(!ctrlm_main_has_receiver_id_get()) {
ret = FALSE;
}
#endif

#ifdef AUTH_DEVICE_ID
if(!ctrlm_main_has_device_id_get()) {
ret = FALSE;
Expand Down Expand Up @@ -1594,18 +1556,6 @@ gboolean ctrlm_load_authservice_data(void) {
gboolean ret = TRUE;
#ifdef AUTH_ENABLED
if(g_ctrlm.authservice->is_ready()) {
#ifdef AUTH_RECEIVER_ID
if(!ctrlm_main_has_receiver_id_get()) {
XLOGD_INFO("load receiver id");
if(!ctrlm_load_receiver_id()) {
XLOGD_TELEMETRY("failed to load receiver id");
ret = FALSE;
} else {
XLOGD_INFO("load receiver id successfully <%s>", ctrlm_is_pii_mask_enabled() ? "***" : g_ctrlm.receiver_id.c_str());
}
}
#endif

#ifdef AUTH_DEVICE_ID
if(!ctrlm_main_has_device_id_get()) {
XLOGD_INFO("load device id");
Expand Down Expand Up @@ -3289,10 +3239,6 @@ void ctrlm_main_iarm_call_status_get_(ctrlm_main_iarm_call_status_t *status) {
safec_rc = strncpy_s(status->stb_device_id, sizeof(status->stb_device_id), g_ctrlm.device_id.c_str(), CTRLM_MAIN_DEVICE_ID_MAX_LENGTH - 1);
ERR_CHK(safec_rc);
status->stb_device_id[CTRLM_MAIN_DEVICE_ID_MAX_LENGTH - 1] = '\0';

safec_rc = strncpy_s(status->stb_receiver_id, sizeof(status->stb_receiver_id), g_ctrlm.receiver_id.c_str(), CTRLM_MAIN_RECEIVER_ID_MAX_LENGTH - 1);
ERR_CHK(safec_rc);
status->stb_receiver_id[CTRLM_MAIN_RECEIVER_ID_MAX_LENGTH - 1] = '\0';
}

gboolean ctrlm_main_iarm_call_ir_remote_usage_get(ctrlm_main_iarm_call_ir_remote_usage_t *ir_remote_usage) {
Expand Down Expand Up @@ -4817,10 +4763,6 @@ ctrlm_auth_t* ctrlm_main_auth_get() {
#endif
}

string ctrlm_receiver_id_get(){
return g_ctrlm.receiver_id;
}

string ctrlm_device_id_get(){
return g_ctrlm.device_id;
}
Expand Down Expand Up @@ -6126,4 +6068,4 @@ void *ctrlm_load_hal_rf4ce(void) {

gboolean ctrlm_is_rf4ce_enabled(void) {
return(g_ctrlm.rf4ce_enabled);
}
}
10 changes: 0 additions & 10 deletions src/ctrlm_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,6 @@ const char * ctrlm_obj_network_t::version_get() const {
return(version_.c_str());
}

void ctrlm_obj_network_t::receiver_id_set(const string& receiver_id) {
THREAD_ID_VALIDATE();
receiver_id_ = receiver_id;
}

string ctrlm_obj_network_t::receiver_id_get() const {
THREAD_ID_VALIDATE();
return(receiver_id_);
}

void ctrlm_obj_network_t::device_id_set(const string& device_id) {
THREAD_ID_VALIDATE();
device_id_ = device_id;
Expand Down
Loading
Loading