Skip to content

RDKOSS-22272 : Main Change in sup_8.3.4.0 - #118

Open
PreethiALPI wants to merge 1 commit into
support/8.3.4.0from
RDKEMW-22272_prepatch
Open

RDKOSS-22272 : Main Change in sup_8.3.4.0#118
PreethiALPI wants to merge 1 commit into
support/8.3.4.0from
RDKEMW-22272_prepatch

Conversation

@PreethiALPI

Copy link
Copy Markdown

Reason for change: crash
Test Procedure: Factory reset
Risks: Medium
Priority: P0

Reason for change: crash
Test Procedure: Factory reset
Risks: Medium
Priority: P0

Signed-off-by: ppalan289 <preethi_palanisamy@comcast.com>
Copilot AI review requested due to automatic review settings July 24, 2026 09:04
@PreethiALPI
PreethiALPI requested a review from a team as a code owner July 24, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Bluetooth manager deinitialization to more reliably complete disconnects for certain connected audio devices (speakers/headsets), aiming to prevent a crash during teardown (noted test procedure: factory reset).

Changes:

  • Adds a post-disconnect polling loop in BTRMGR_DeInit to confirm device disconnection for speakers/headsets (with a bounded timeout).
  • Adds log messages for disconnect confirmation/timeout outcomes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ifce/btrMgr.c
Comment on lines +4036 to +4049
if (lenBtrCoreDevTy == enBTRCoreSpeakers || lenBtrCoreDevTy == enBTRCoreHeadSet) {
unsigned int ui32PollCount = 10; /* 10 × 100ms = 1000ms max */

do {
usleep(100000); /* 100ms */
lenBtrCoreRet = BTRCore_GetDeviceDisconnected(ghBTRCoreHdl,lstConnectedDevices.m_deviceProperty[ui16LoopIdx].m_deviceHandle,lenBtrCoreDevTy);
} while ((lenBtrCoreRet != enBTRCoreSuccess) && (--ui32PollCount));

if (!ui32PollCount) {
BTRMGRLOG_WARN("Disconnect confirmation timeout for device %llu\n", lstConnectedDevices.m_deviceProperty[ui16LoopIdx].m_deviceHandle);
} else {
BTRMGRLOG_WARN("Disconnect confirmed for device %llu in %dms\n", lstConnectedDevices.m_deviceProperty[ui16LoopIdx].m_deviceHandle, (10 - ui32PollCount) * 100);
}
}
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants