Bug #118281

【AF】【EVT3】【AUDIO】副屏连接蓝牙耳机,微信语音通话中断开蓝牙连接后,再恢复蓝牙连接,蓝牙耳机上无声音输出

Added by 物联网测试组_CDTS 唐霞 about 2 years ago. Updated about 2 years ago.

Status:CLOSEDStart date:2023-05-26
Priority:NormalDue date:
Assignee:CD TEST-方永红% Done:

0%

Category:AUDIO-FW
Target version:-
Need_Info:-- Found Version:FlatBuild_HH_MCE_FSE.M.D.user.01.00.C103(X103).202305260126
Resolution:FIXED Degrated:--
Severity:Normal Verified Version:
Reproducibility:Every time Fixed Version:
Test Type:Release Test Root cause:修复setCommunicationRouteForClient方法中的蓝牙部分

Description

【前置条件】
副屏连接中控,网络正常
【测试步骤】
1.副屏连接蓝牙耳机,副屏在微信语音通话中。中控音乐播放中
2.副屏断开蓝牙连接,副屏通话声从喇叭输出,中控音乐暂停播放
3.副屏连接蓝牙耳机
【预期结果】
副屏微信通话从蓝牙耳机输出,中控恢复音乐播放
【测试结果】
副屏微信通话声未从蓝牙耳机输出(微信切换音源输出无蓝牙设备可选),中控音乐播放正常

526-1834.txt Magnifier (4.95 MB) 物联网测试组_CDTS 唐霞 , 2023-05-26 18:48

中科创达软件股份有限公司20230526-184716.mp4 (16.8 MB) 物联网测试组_CDTS 唐霞 , 2023-05-26 18:48

1933.txt Magnifier (7.79 MB) CD TEST-方永红, 2023-06-02 19:37

History

#1 Updated by Multimedia组-RD3_TSCD 梁卿山 about 2 years ago

  • Category changed from AUDIO-FW to LC
  • Status changed from New to ASSIGNED
  • Assignee changed from Multimedia组-RD3_TSCD 梁卿山 to CD LC 陶洪普

HI 洪普

当前分析:
该问题发生时,蓝牙没有调用setBluetoothScoOn导致了AudioDeviceBroker中的蓝牙sco状态为false,就导致设备没有切回蓝牙。

异常时日志:

05-29 16:39:02.220  1106  2119 V AS.AudioService: setMode(mode=3, pid=4281, uid=10102, caller=com.tencent.mm)
05-29 16:39:02.220  1106  2119 V AS.AudioService: setMode(3) updating hldr for pid: 4281
05-29 16:39:02.221  4281  4459 I AudioManager: In setSpeakerphoneOn(), on: false, calling application: com.tencent.mm
05-29 16:39:02.221  1106  2119 I AS.AudioService: In setSpeakerphoneOn(), on: false, eventSource: setSpeakerphoneOn(false) from u/pid:10102/4281
05-29 16:39:02.221  1106  2119 V AS.AudioDeviceBroker: setSpeakerphoneOn, on: false pid: 4281
05-29 16:39:02.222  1106  2119 I AS.AudioService: In startBluetoothSco()
05-29 16:39:02.222  1106  2119 I AS.AudioService: In startBluetoothScoInt(), scoAudioMode: -1
05-29 16:39:02.222  1106  2119 V AS.AudioDeviceBroker: startBluetoothScoForClient_Sync, pid: 4281
05-29 16:39:02.222  1106  2119 V AS.AudioDeviceBroker: setCommunicationRouteForClient: device: AudioDeviceAttributes: role:output type:bt_sco addr:
05-29 16:39:02.222  1106  2119 I AS.AudioDeviceBroker: setCommunicationRouteForClient for pid: 4281 device: AudioDeviceAttributes: role:output type:bt_sco addr: from API: startBluetoothSco()) from u/pid:10102/4281
05-29 16:39:02.223  1106  2119 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: AudioDeviceAttributes: role:output type:bt_sco addr: mode owner pid: 4281
05-29 16:39:02.223  1106  2119 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: AudioDeviceAttributes: role:output type:bt_sco addr: mode owner pid: 4281
05-29 16:39:02.245  1106  1840 V AS.AudioService: onUpdateAudioMode() new mode: 3, current mode: 3 requested mode: 3
05-29 16:39:02.249  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice mBluetoothScoOn: false ★★★蓝牙sco状态为false
05-29 16:39:02.250  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice mBtHelper.isBluetoothScoOn(): false ★★★ 蓝牙sco状态为false
05-29 16:39:02.251  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice btSCoOn: false
05-29 16:39:02.251  1106  1846 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: AudioDeviceAttributes: role:output type:bt_sco addr: mode owner pid: 4281
05-29 16:39:02.251  1106  1846 D AS.AudioDeviceBroker: TS >>> requestedCommunicationDevice device 2 :AudioDeviceAttributes: role:output type:bt_sco addr:
05-29 16:39:02.251  1106  1846 D AS.AudioDeviceBroker: TS >>> requestedCommunicationDevice device type :7 ★★★ 设备无法选择到蓝牙

正常时日志:

05-29 16:44:07.820  1106  5121 V AS.AudioService: setMode(mode=3, pid=4281, uid=10102, caller=com.tencent.mm)
05-29 16:44:07.820  1106  5121 V AS.AudioService: setMode(3) adding handler for pid=4281
05-29 16:44:07.821  1106  1840 V AS.AudioService: onUpdateAudioMode() new mode: 3, current mode: 0 requested mode: 3
05-29 16:44:07.838  4281  4576 I AudioManager: In setSpeakerphoneOn(), on: false, calling application: com.tencent.mm
05-29 16:44:07.838  1106  5104 I AS.AudioService: In setSpeakerphoneOn(), on: false, eventSource: setSpeakerphoneOn(false) from u/pid:10102/4281
05-29 16:44:07.839  1106  5104 V AS.AudioDeviceBroker: setSpeakerphoneOn, on: false pid: 4281
05-29 16:44:08.538  1106  1719 I AS.AudioService: In startBluetoothSco()
05-29 16:44:08.539  1106  1719 I AS.AudioService: In startBluetoothScoInt(), scoAudioMode: -1
05-29 16:44:08.539  1106  1719 V AS.AudioDeviceBroker: startBluetoothScoForClient_Sync, pid: 4281
05-29 16:44:08.539  1106  1719 V AS.AudioDeviceBroker: setCommunicationRouteForClient: device: AudioDeviceAttributes: role:output type:bt_sco addr:
05-29 16:44:08.539  1106  1719 I AS.AudioDeviceBroker: setCommunicationRouteForClient for pid: 4281 device: AudioDeviceAttributes: role:output type:bt_sco addr: from API: startBluetoothSco()) from u/pid:10102/4281
05-29 16:44:08.539  1106  1719 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: null mode owner pid: 4281
05-29 16:44:08.539  1106  1719 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: AudioDeviceAttributes: role:output type:bt_sco addr: mode owner pid: 4281
05-29 16:44:08.623 18563 18641 I AudioManager: In setBluetoothScoOn(), on: true, calling application: com.android.bluetooth ★★★蓝牙调用了setBluetoothScoOn,将mBluetoothScoOn设置为true;
05-29 16:44:08.624  1106  1719 I AS.AudioService: In setBluetoothScoOn(), eventSource: setBluetoothScoOn(true) from u/pid:1002/18563
05-29 16:44:08.624  1106  1719 V AS.AudioDeviceBroker: setBluetoothScoOn: true setBluetoothScoOn(true) from u/pid:1002/18563
05-29 16:44:08.624  1106  1719 D AS.AudioService: idcm_af:setBluetoothConnected: true
05-29 16:44:08.624  1106  1719 D AS.AudioService: idcm_af:abandonAudioFocus Bluetooth Sco is connect
05-29 16:44:08.631  1106  1106 V AS.AudioDeviceBroker: setBluetoothScoOn: true BtHelper.receiveBtEvent
05-29 16:44:08.631  1106  1106 V AS.AudioDeviceBroker: requestedCommunicationDevice, device: AudioDeviceAttributes: role:output type:bt_sco addr: mode owner pid: 4281
05-29 16:44:08.698  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice mBluetoothScoOn: true ★★★ 蓝牙状态为true
05-29 16:44:08.699  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice mBtHelper.isBluetoothScoOn(): true ★★★ 蓝牙状态为true
05-29 16:44:08.699  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice btSCoOn: true 
05-29 16:44:08.699  1106  1846 D AS.AudioDeviceBroker: TS >>> preferredCommunicationDevice device 1 :AudioDeviceAttributes: role:output type:bt_sco addr:00:00:00:00:00:00 ★★★ 设备选择为蓝牙

下一步
请蓝牙组继续分析为什么蓝牙没有调用setBluetoothScoOn。

#2 Updated by 短距组_SSRDCNJ 蒋俊杰 about 2 years ago

//正常情况:
05-26 18:35:58.496 1522 24493 I AS.AudioDeviceBroker: setCommunicationRouteForClient for pid: 5433 device: AudioDeviceAttributes: role:output type:bt_sco addr: from API: startBluetoothSco()) from u/pid:10113/5433 //AudioDeviceBroker调用mBtHelper.startBluetoothSco()
05-26 18:35:58.496 1522 24493 I AS.BtHelper: In requestScoState(), state: 12, scoAudioMode: -1 //startBluetoothSco()调用requestScoState然后继续sco切换open的流程
05-26 18:35:58.497 1522 24493 I AS.BtHelper: In connectBluetoothScoAudioHelper(), scoAudioMode: 0, bluetoothHeadset: android.bluetooth.BluetoothHeadset@836b002, BluetoothDevice: 60:F4:3A:B2:E8:8D
05-26 18:35:58.497 1522 24493 I AS.BtHelper: In connectBluetoothScoAudioHelper(), calling startScoUsingVirtualVoiceCall()
05-26 18:35:58.497 1522 24493 D BluetoothHeadset: startScoUsingVirtualVoiceCall()
05-26 18:35:58.497 5254 5588 I HeadsetService: startScoUsingVirtualVoiceCall: uid/pid=1000/1522

//问题日志
05-26 18:36:25.189 1929 2404 D CachedBluetoothDevice: onProfileStateChanged: profile HEADSET, device EDIFIER W281BT, newProfileState 2
05-26 18:36:25.271 1522 12859 I AS.AudioDeviceBroker: setCommunicationRouteForClient for pid: 5433 device: AudioDeviceAttributes: role:output type:bt_sco addr: from API: startBluetoothSco()) from u/pid:10113/5433 //后续未触发requestScoState

【结论】:setCommunicationRouteForClient()方法内存在异常,需要audio排查

#3 Updated by CD LC 陶洪普 about 2 years ago

  • Category changed from LC to AUDIO-FW
  • Assignee changed from CD LC 陶洪普 to Multimedia组-RD3_TSCD 梁卿山

Hi 卿山,

如同步的,请帮忙确认上面Comment,谢谢!

#4 Updated by IoT scm about 2 years ago

Gerrit Merge Information
ID Project Branch Uploader
203700 general/platform/frameworks/base Pre_figure_turbox-c2130c-la1.1-qssi12-dev
MM: Audio: Fix Bluetooth switching after reconnect
Fix Bluetooth switching after reconnect
TC-RID: 0301-0900116
IssueID: TS-R-DF-118281
Change-Id: Ibedc1a44e3a1cd27e18a8ca57e6a49766c34d084

#5 Updated by Multimedia组-RD3_TSCD 梁卿山 about 2 years ago

  • Status changed from ASSIGNED to RESOLVED
  • Assignee changed from Multimedia组-RD3_TSCD 梁卿山 to CD TEST-方永红
  • Resolution changed from -- to FIXED
  • Root cause set to 修复setCommunicationRouteForClient方法中的蓝牙部分

Hi 永红

该问题已经合入修复的patch,请使用5/31后的版本验证,谢谢!

#6 Updated by CD TEST-方永红 about 2 years ago

  • File 1933.txtMagnifier added
  • Status changed from RESOLVED to VERIFY_FAILED
  • Assignee changed from CD TEST-方永红 to Multimedia组-RD3_TSCD 梁卿山

断开重连蓝牙的过程中,一会儿耳机没声音、一会儿喇叭没声音

#7 Updated by Multimedia组-RD3_TSCD 梁卿山 about 2 years ago

HI ALL

当前分析:
当前从日志中没有发现切换蓝牙失败的日志;

当前复现情况:
中控:86
副屏:106

复现次数:0/30

#8 Updated by Multimedia组-RD3_TSCD 梁卿山 about 2 years ago

  • Status changed from VERIFY_FAILED to RESOLVED
  • Assignee changed from Multimedia组-RD3_TSCD 梁卿山 to CD TEST-方永红

HI 永红

当前测试情况:

中控:86
副屏:107

复现次数:0/30

该问题不再发生,请验证,谢谢!

#9 Updated by SZTS_TEST 邹涛 about 2 years ago

  • Status changed from RESOLVED to VERIFIED

在FlatBuild_HH_MCE_FSE.M.R.user.01.00.0110.C104版本验证通过

#10 Updated by CD TEST-方永红 about 2 years ago

  • Status changed from VERIFIED to CLOSED

0625
暂未复现此问题

Also available in: Atom PDF