Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
414b130
Release/1.1.12 (#200)
egalla204 Apr 9, 2026
02e0576
Merge branch 'release/1.1.12'
egalla204 Apr 9, 2026
dfe370a
Merge branch 'release/1.1.13'
egalla204 Apr 21, 2026
324fbce
Merge branch 'release/1.1.14'
egalla204 Apr 22, 2026
a4755a8
Merge branch 'release/1.1.15'
egalla204 May 5, 2026
e658ebd
Merge branch 'release/1.1.16'
egalla204 May 8, 2026
21b35fa
Merge branch 'release/1.1.17'
egalla204 Jun 9, 2026
8fdd8f5
Merge branch 'release/1.1.18'
egalla204 Jun 17, 2026
3a5102a
Adding uuids for mfv voice service
msmith113 Jun 10, 2026
e2de84c
Laying down a skeleton
msmith113 Jun 10, 2026
e4fcb55
Initial skeleton for mfv
msmith113 Jun 16, 2026
1c6c1a4
Update
msmith113 Jun 16, 2026
3fdcabf
Start impl
msmith113 Jun 16, 2026
7dbebb5
More changes before testing locally
msmith113 Jun 23, 2026
54ac9f8
Fix for missing MFV values
msmith113 Jun 24, 2026
4fbaa0f
Fix
msmith113 Jun 24, 2026
5ced3bd
Fix
msmith113 Jun 24, 2026
3f9aba6
Updates
msmith113 Jun 24, 2026
42fea94
Removing unused file
msmith113 Jun 25, 2026
cb35b0f
Removing uneeded diffs
msmith113 Jun 25, 2026
0e34662
Updates
msmith113 Jun 25, 2026
c3e97e5
Updates
msmith113 Jun 25, 2026
bc4a206
Updates
msmith113 Jun 25, 2026
22351ea
Fixing notifications
msmith113 Jun 25, 2026
1b3e45f
Start voice session during mfv detection type property update
msmith113 Jun 25, 2026
721e418
Updates
msmith113 Jun 26, 2026
def3fe1
Updates
msmith113 Jun 26, 2026
ea1b75d
Updates
msmith113 Jun 26, 2026
f69e58e
Updates
msmith113 Jun 26, 2026
6f47667
Addressing review comments, adding 'mfv_below_threshold_session_enabl…
msmith113 Jun 29, 2026
8aa708a
Update
msmith113 Jul 9, 2026
99db214
Apply suggestions from code review
msmith113 Jul 9, 2026
a96afdd
Potential fix for pull request finding
msmith113 Jul 9, 2026
11c00a6
Potential fix for pull request finding
msmith113 Jul 9, 2026
b8224be
Potential fix for pull request finding
msmith113 Jul 9, 2026
76201ed
Apply suggestions from code review
msmith113 Jul 9, 2026
e103577
Update
msmith113 Jul 9, 2026
bb0eae2
Merge branch 'develop' into feature/RDKEMW-14903
msmith113 Jul 9, 2026
0bae6b6
Potential fix for pull request finding
msmith113 Jul 9, 2026
c762f0e
Potential fix for pull request finding
msmith113 Jul 9, 2026
939543c
Update from copilot review comments
msmith113 Jul 9, 2026
38eece0
Updating from copilot comments
msmith113 Jul 9, 2026
38bee20
Update
msmith113 Jul 9, 2026
c81c4e2
Apply suggestions from code review
msmith113 Jul 9, 2026
f0a10a1
Potential fix for pull request finding
msmith113 Jul 9, 2026
b019ce8
Updates
msmith113 Jul 9, 2026
cc586dc
Centralizing MFV state
msmith113 Jul 9, 2026
ccb2696
Clean up
msmith113 Jul 9, 2026
841cabb
Updates
msmith113 Jul 9, 2026
1047802
Updates
msmith113 Jul 9, 2026
990403f
Potential fix for pull request finding
msmith113 Jul 9, 2026
2de17da
Update
msmith113 Jul 9, 2026
86ea479
Potential fix for pull request finding
msmith113 Jul 9, 2026
41f3f30
Update
msmith113 Jul 9, 2026
cdb8188
Fix
msmith113 Jul 10, 2026
b31b363
Merge tag '1.1.18' into feature/RDKEMW-14903
msmith113 Jul 10, 2026
3d520c8
Update cached value of model config data after write
msmith113 Jul 13, 2026
47b2939
Apply suggestions from code review
msmith113 Jul 13, 2026
83c5494
Commenting out stream stats for now
msmith113 Jul 13, 2026
213d3b5
Potential fix for pull request finding
msmith113 Jul 13, 2026
985ac8a
Clean up from copilot comments
msmith113 Jul 13, 2026
444efb0
Potential fix for pull request finding
msmith113 Jul 13, 2026
21b6795
Potential fix for pull request finding
msmith113 Jul 13, 2026
0e88877
Reverting invoking mfv privacy changed as it's already being handled …
msmith113 Jul 13, 2026
91e4936
Added session type for voice session calls
msmith113 Jul 13, 2026
cd31b57
Fixing error logging and notification enablement
msmith113 Jul 13, 2026
1535413
Using state to retry notifications
msmith113 Jul 13, 2026
90ea44b
Using timer instead of state machine for retry logic
msmith113 Jul 14, 2026
1df2b03
No longer setting a cap fro notify retries.
msmith113 Jul 14, 2026
10018c8
Added logging for debugging
msmith113 Jul 14, 2026
ab2eb42
Potential fix for notify failures
msmith113 Jul 15, 2026
57c27cc
Apply suggestions from code review
msmith113 Jul 15, 2026
eb69377
Another attempt to get notify working
msmith113 Jul 15, 2026
a489aea
Potential fix for pull request finding
msmith113 Jul 15, 2026
96c6e06
Temp test
msmith113 Jul 15, 2026
5ab2dde
Potential fix for pull request finding
msmith113 Jul 15, 2026
c7671d1
More changes
msmith113 Jul 15, 2026
c469913
Fix
msmith113 Jul 15, 2026
702d9b2
Reverting changes made to debug/fix the notify issues
msmith113 Jul 16, 2026
4b7e238
Added exponential backoff for retry logic (mfv notify)
msmith113 Jul 16, 2026
88cf07a
Reverting debug changes
msmith113 Jul 16, 2026
fcaa753
Update
msmith113 Jul 16, 2026
e7b050b
Updates
msmith113 Jul 16, 2026
f044a8a
Update
msmith113 Jul 16, 2026
743383e
Update
msmith113 Jul 17, 2026
b798d90
Potential fix for pull request finding
msmith113 Jul 17, 2026
8d215ea
Potential fix for pull request finding
msmith113 Jul 17, 2026
224f3b2
Init commit MFV interface
klu339 Jun 26, 2026
5f01bae
Add MFV device class and init metadata
klu339 Jul 8, 2026
9b22b16
Remove TV audio reference
klu339 Jul 14, 2026
a7e48e1
Fix for ff sessions incorrectly coming in as PTT
msmith113 Jul 17, 2026
d5e18ab
Another change
msmith113 Jul 17, 2026
c63c23b
Change from copilot suggestion
msmith113 Jul 20, 2026
a428346
Feed MFV detection data to the voice sdk
klu339 Jul 22, 2026
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
74 changes: 46 additions & 28 deletions include/ctrlm_hal_ble.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ typedef enum {
CTRLM_HAL_BLE_VOICE_STREAM_END_UNKNOWN
} ctrlm_hal_ble_VoiceStreamEnd_t;

/// @brief MFV wake word detection types (matches BleRcuAudioService::DetectionType values).
typedef enum {
CTRLM_HAL_BLE_MFV_DETECTION_UNKNOWN = 0x00,
CTRLM_HAL_BLE_MFV_DETECTION_FULL_POWER = 0x01,
CTRLM_HAL_BLE_MFV_DETECTION_AAD = 0x02,
CTRLM_HAL_BLE_MFV_DETECTION_BELOW_THRESHOLD = 0x03,
} ctrlm_hal_ble_MfvDetectionType_t;

/// @brief Supported voice data encoding types.
typedef enum {
CTRLM_HAL_BLE_PROPERTY_IEEE_ADDDRESS = 0,
Expand Down Expand Up @@ -85,6 +93,10 @@ typedef enum {
CTRLM_HAL_BLE_PROPERTY_WAKEUP_CONFIG,
CTRLM_HAL_BLE_PROPERTY_WAKEUP_CUSTOM_LIST,
CTRLM_HAL_BLE_PROPERTY_IRDBS_SUPPORTED,
CTRLM_HAL_BLE_PROPERTY_MFV_DETECTION_TYPE,
CTRLM_HAL_BLE_PROPERTY_MFV_DETECTION_DATA,
CTRLM_HAL_BLE_PROPERTY_MFV_PRIVACY,
CTRLM_HAL_BLE_PROPERTY_MFV_CAPABILITIES,
CTRLM_HAL_BLE_PROPERTY_UNKNOWN
} ctrlm_hal_ble_RcuProperty_t;
/// @}
Expand All @@ -95,34 +107,40 @@ typedef enum {
/// @details The Control Manager HAL provides structures that are used in calls to the HAL networks.

Comment thread
msmith113 marked this conversation as resolved.
typedef struct {
int device_minor_id;
uint8_t battery_level;
bool connected;
unsigned long long ieee_address;
char fw_revision[CTRLM_MAX_PARAM_STR_LEN];
char hw_revision[CTRLM_MAX_PARAM_STR_LEN];
char sw_revision[CTRLM_MAX_PARAM_STR_LEN];
char manufacturer[CTRLM_MAX_PARAM_STR_LEN];
char model[CTRLM_MAX_PARAM_STR_LEN];
char name[CTRLM_MAX_PARAM_STR_LEN];
char serial_number[CTRLM_MAX_PARAM_STR_LEN];
int ir_code;
uint8_t audio_gain_level;
uint32_t audio_codecs;
bool audio_streaming;
unsigned int touch_mode;
bool touch_mode_settable;
bool is_upgrading;
int upgrade_progress;
char upgrade_error[CTRLM_MAX_PARAM_STR_LEN];
ctrlm_ble_RcuUnpairReason_t unpair_reason;
ctrlm_ble_RcuRebootReason_t reboot_reason;
char assert_report[CTRLM_RCU_ASSERT_REPORT_MAX_SIZE+1];
uint16_t last_wakeup_key;
uint8_t wakeup_config;
int wakeup_custom_list[CTRLM_WAKEUP_CONFIG_LIST_MAX_SIZE];
int wakeup_custom_list_size;
uint8_t irdbs_supported;
int device_minor_id;
uint8_t battery_level;
bool connected;
unsigned long long ieee_address;
char fw_revision[CTRLM_MAX_PARAM_STR_LEN];
char hw_revision[CTRLM_MAX_PARAM_STR_LEN];
char sw_revision[CTRLM_MAX_PARAM_STR_LEN];
char manufacturer[CTRLM_MAX_PARAM_STR_LEN];
char model[CTRLM_MAX_PARAM_STR_LEN];
char name[CTRLM_MAX_PARAM_STR_LEN];
char serial_number[CTRLM_MAX_PARAM_STR_LEN];
int ir_code;
uint8_t audio_gain_level;
uint32_t audio_codecs;
bool audio_streaming;
unsigned int touch_mode;
bool touch_mode_settable;
bool is_upgrading;
int upgrade_progress;
char upgrade_error[CTRLM_MAX_PARAM_STR_LEN];
ctrlm_ble_RcuUnpairReason_t unpair_reason;
ctrlm_ble_RcuRebootReason_t reboot_reason;
char assert_report[CTRLM_RCU_ASSERT_REPORT_MAX_SIZE+1];
uint16_t last_wakeup_key;
uint8_t wakeup_config;
int wakeup_custom_list[CTRLM_WAKEUP_CONFIG_LIST_MAX_SIZE];
int wakeup_custom_list_size;
uint8_t irdbs_supported;
ctrlm_hal_ble_MfvDetectionType_t mfv_detection_type;
uint16_t mfv_ww_start;
uint16_t mfv_ww_end;
uint16_t mfv_confidence; // encoded as percentage * 10 (e.g. 976 = 97.6%)
bool mfv_privacy_enabled;
uint8_t mfv_capabilities;
Comment on lines +138 to +143
} ctrlm_hal_ble_rcu_data_t;

typedef struct {
Expand Down
77 changes: 77 additions & 0 deletions src/ble/ctrlm_ble_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,76 @@ ctrlm_timestamp_t ctrlm_obj_controller_ble_t::getVoiceStartTimeLocal() const {
return(voice_start_time_local_);
}

void ctrlm_obj_controller_ble_t::setMfvDetectionType(ctrlm_hal_ble_MfvDetectionType_t type) {
mfv_detection_type_ = type;
}

ctrlm_hal_ble_MfvDetectionType_t ctrlm_obj_controller_ble_t::getMfvDetectionType() const {
return mfv_detection_type_;
}

void ctrlm_obj_controller_ble_t::setMfvDetectionData(uint16_t start, uint16_t end, uint16_t confidence) {
mfv_ww_start_ = start;
mfv_ww_end_ = end;
mfv_confidence_ = confidence;
}

uint16_t ctrlm_obj_controller_ble_t::getMfvWwStart() const {
return mfv_ww_start_;
}

uint16_t ctrlm_obj_controller_ble_t::getMfvWwEnd() const {
return mfv_ww_end_;
}

uint16_t ctrlm_obj_controller_ble_t::getMfvConfidence() const {
return mfv_confidence_;
}

float ctrlm_obj_controller_ble_t::getMfvConfidencePercent() const {
return mfv_confidence_ / 10.0f;
}

void ctrlm_obj_controller_ble_t::setMfvPrivacy(bool enabled) {
mfv_privacy_enabled_ = enabled;
}

bool ctrlm_obj_controller_ble_t::getMfvPrivacy() const {
return mfv_privacy_enabled_;
}

void ctrlm_obj_controller_ble_t::setMfvCapabilities(uint8_t caps) {
mfv_capabilities_ = caps;
}

uint8_t ctrlm_obj_controller_ble_t::getMfvCapabilities() const {
return mfv_capabilities_;
}

void ctrlm_obj_controller_ble_t::setMfvDetectionPending(bool pending, int audio_fd) {
mfv_detection_pending_ = pending;
mfv_detection_audio_fd_ = pending ? audio_fd : -1;
if (!pending) {
mfv_detection_data_fresh_ = false;
}
}

bool ctrlm_obj_controller_ble_t::isMfvDetectionPending() const {
return mfv_detection_pending_;
}

int ctrlm_obj_controller_ble_t::getMfvDetectionAudioFd() const {
return mfv_detection_audio_fd_;
}

void ctrlm_obj_controller_ble_t::setMfvDetectionDataFresh(bool fresh) {
mfv_detection_data_fresh_ = fresh;
}

bool ctrlm_obj_controller_ble_t::isMfvDetectionDataFresh() const {
return mfv_detection_data_fresh_;
}

void ctrlm_obj_controller_ble_t::setSupportedIrdbs(uint8_t vendor_support_bitmask) {
this->irdbs_supported_ = vendor_support_bitmask;

Expand Down Expand Up @@ -689,6 +759,13 @@ void ctrlm_obj_controller_ble_t::print_status() {
XLOGD_INFO("Programmed AVR IRDB Code : %s", irdb_entry_id_name_avr_->to_string().c_str());
XLOGD_INFO("");
voice_metrics_->print(__FUNCTION__);
XLOGD_INFO("");
XLOGD_INFO("MFV Detection Type : 0x%02X", static_cast<unsigned int>(mfv_detection_type_));
XLOGD_INFO("MFV WW Start : %u", mfv_ww_start_);
XLOGD_INFO("MFV WW End : %u", mfv_ww_end_);
XLOGD_INFO("MFV Confidence : %.1f%%", mfv_confidence_ / 10.0);
XLOGD_INFO("MFV Privacy : %s", mfv_privacy_enabled_ ? "enabled" : "disabled");
XLOGD_INFO("MFV Capabilities : 0x%02X", static_cast<unsigned int>(mfv_capabilities_));
XLOGD_WARN("------------------------------------------------------------");
}

Expand Down
31 changes: 31 additions & 0 deletions src/ble/ctrlm_ble_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,27 @@ class ctrlm_obj_controller_ble_t : public ctrlm_obj_controller_t {
ctrlm_timestamp_t getVoiceStartTimeKey() const;
ctrlm_timestamp_t getVoiceStartTimeLocal() const;

void setMfvDetectionType(ctrlm_hal_ble_MfvDetectionType_t type);
ctrlm_hal_ble_MfvDetectionType_t getMfvDetectionType() const;
void setMfvDetectionData(uint16_t start, uint16_t end, uint16_t confidence);
uint16_t getMfvWwStart() const;
uint16_t getMfvWwEnd() const;
uint16_t getMfvConfidence() const; // returns raw value encoded as integer * 10 (e.g. 953 = 95.3%)
float getMfvConfidencePercent() const; // returns confidence as a percentage (e.g. 95.3)
void setMfvPrivacy(bool enabled);
bool getMfvPrivacy() const;
void setMfvCapabilities(uint8_t caps);
uint8_t getMfvCapabilities() const;

// MFV wake-word (detection-triggered) session state. Such a session starts audio streaming, waits
// for the detection data (wake word timing/confidence), then opens the voice session. See
// ctrlm_obj_network_ble_t::req_process_detection_voice_session_begin().
void setMfvDetectionPending(bool pending, int audio_fd = -1);
Comment on lines +162 to +165
bool isMfvDetectionPending() const;
int getMfvDetectionAudioFd() const;
void setMfvDetectionDataFresh(bool fresh); // fresh detection data received for the current pending session (stale-data safeguard)
bool isMfvDetectionDataFresh() const;

void update_controller_id_and_db_entry(std::string name, ctrlm_network_id_t network_id, ctrlm_controller_id_t new_id);

private:
Expand Down Expand Up @@ -197,6 +218,16 @@ class ctrlm_obj_controller_ble_t : public ctrlm_obj_controller_t {

bool type_z_supported_ = false;

ctrlm_hal_ble_MfvDetectionType_t mfv_detection_type_ = CTRLM_HAL_BLE_MFV_DETECTION_UNKNOWN;
uint16_t mfv_ww_start_ = 0;
uint16_t mfv_ww_end_ = 0;
uint16_t mfv_confidence_ = 0; // encoded as integer * 10 (e.g. 953 = 95.3%)
bool mfv_privacy_enabled_ = false;
uint8_t mfv_capabilities_ = 0;
bool mfv_detection_pending_ = false; // a wake-word session has started audio and is awaiting its detection data
bool mfv_detection_data_fresh_ = false; // fresh detection data arrived for the current pending session
int mfv_detection_audio_fd_ = -1; // fd of the audio stream started for the pending session

bool conn_param_update_before_ota_supported_ = false;
ctrlm_sw_version_t conn_param_update_before_ota_version_;

Expand Down
Loading