Skip to content

[dumpling] TWS Bluetooth connection triggers phantom Wired Headset event and breaks audio routing #505

Description

@user32234

Device Codename

dumpling

LineageOS Version

lineage-22.2

Build Date

20260818

Kernel Version

Linux localhost 4.4.302-perf+ #1 SMP PREEMPT Tue Aug 18 06:03:33 UTC 2026 aarch64 Toybox

Baseband Version

No response

System Modifications

No response

Expected Behavior

Connecting TWS should route audio via Bluetooth (A2DP/LE Audio) without triggering WiredHeadsetManager UEVENTs. The problematic BT stack commits might need a revert for legacy QCOM HALs.

Current Behavior

Recent security patches in packages/modules/Bluetooth (specifically around LE connections/deadlocks) introduced a regression on legacy Qualcomm platforms (MSM8998/SDM660). When connecting TWS Bluetooth earbuds, the Bluetooth stack misbehaves and falsely fires a WiredHeadset plug-in event. This messes up the audio routing entirely, switching the system to a non-existent wired headset and cutting off the audio.

08-24 20:26:46.981 I/Telecom ( 1877): Logging.Events: Non-call EVENT: AUDIO_ROUTE, Entering audio route: AudioRoute[Type=TYPE_EARPIECE, Address=invalid] (active=false): WHC.oADR->CARC.pM_DISCONNECT_WIRED_HEADSET->CARC.pM_EXIT_PENDING_ROUTE@GMs❗                                   
08-24 20:26:46.981 I/Telecom ( 1877): CallAudioRouteController: updateCallAudioState: updating call audio state to [AudioState isMuted: false, route: EARPIECE, supportedRouteMask: EARPIECE, SPEAKER, activeBluetoothDevice: [null], supportedBluetoothDevices: []]: WHC.oADR->CARC.pM_DISCONNECT_WIRED_HEADSET->CARC.pM_EXIT_PENDING_ROUTE@GMs🔒                                                      
08-24 20:26:46.981 I/Telecom ( 1877): CallEndpointController: onCallAudioStateChanged, audioState: [AudioState isMuted: false, route: WIRED_HEADSET, supportedRouteMask: EARPIECE, SPEAKER, activeBluetoothDevice: [null], supportedBluetoothDevices: []] -> [AudioState isMuted: false, route: EARPIECE, supportedRouteMask: EARPIECE, SPEAKER, activeBluetoothDevice: [null], supportedBluetoothDevices: []]: WHC.oADR->CARC.pM_DISCONNECT_WIRED_HEADSET->CARC.pM_EXIT_PENDING_ROUTE@GMs🔒                            
08-24 20:26:47.019 I/Telecom ( 1877): WiredHeadsetManager: ACTION_HEADSET_PLUG event, plugged in: true, : WHC.oADA@GMw❗                                                
08-24 20:26:47.019 I/Telecom ( 1877): CallAudioRouteController: Message received: CONNECT_WIRED_HEADSET=1, arg1=0: WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗        
08-24 20:26:47.019 I/Telecom ( 1877): AudioRoute$Factory: createRetry; type=TYPE_WIRED_HEADSET, address=null, retryCount=2: WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw ❗                                                      
08-24 20:26:47.019 I/Telecom ( 1877): AudioRoute$Factory: type: 1: WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗
08-24 20:26:47.019 I/Telecom ( 1877): AudioRoute$Factory: type: 2: WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗
08-24 20:26:47.019 I/Telecom ( 1877): AudioRoute$Factory: type: 3: WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗
08-24 20:26:47.019 I/Telecom ( 1877): CallAudioRouteController: Enter pending route, origAudioRoute[Type=TYPE_EARPIECE, Address=invalid](active=false), destAudioRoute[Type=TYPE_WIRED_HEADSET, Address=invalid](active=false): WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗           
08-24 20:26:47.019 I/Telecom ( 1877): AudioRoute: onOrigRouteAsPendingRoute: active (false), type (null): WHC.oADA->CARC.pM_CONNECT_WIRED_HEADSET@GMw❗

Possible Solution

No response

Steps to Reproduce

  1. Enable Bluetooth on a legacy Qualcomm device (MSM8998/SDM660).
  2. Connect any TWS Bluetooth earbuds via Bluetooth.
  3. Observe the audio routing behavior immediately after the connection is established

Confirmation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions