aws / amazon-chime-sdk-android

An Android client library for integrating multi-party communications powered by the Amazon Chime service.
https://aws.amazon.com/chime/chime-sdk/
Apache License 2.0
103 stars 53 forks source link

Incorrect audio routing with Samsung Pixel Buds Pro #437

Closed tmilovan123 closed 2 years ago

tmilovan123 commented 2 years ago

Describe the bug When using Samsung Pixel Buds Pro for audio input/output, the output is sometimes routed to earpiece and not to the buds.

To Reproduce Steps to reproduce the behavior:

  1. Have the buds connected to the device
  2. Start a meeting
  3. Turn the buds off/on several times.

Note that it does not happen consistently. Sometimes the sound routed correctly.

Expected behavior The sound should be routed correctly.

Logs samsung_buds_issue.log

Logs for the demo app repro attached. ChimeLogger level is set to Debug.

From the person who was reproducing the issue: "Interestingly, it successfully changed over to the buds the first time and every other time, but in between it didn't switch over"

Screenshots N/A

Test environment Info (please complete the following information):

Additional context Could be a system issue as well. I see logs "Setting route to 2" and "Setting route to 3" when switching devices, but never "Setting route to 1" which would indicate earpiece.

ziyiz-amzn commented 2 years ago

Hi, thanks for reporting this. @tmilovan123

When will routing to earpiece happen? When turn on or off the Buds? Is this issue also happening other phones/bluetooth audio devices as well?

Once devices changed, the SDK will get a refreshed device list and all devices will be sorted in this order. Apparently, AUDIO_BUILTIN_SPEAKER will always come before AUDIO_HANDSET from the sorting.

I tested on Google Pixel 3, with both Bose QC700 Bluetooth headphone and AirPods for 10+ times on and off. It always routes to headphone/AirPods when turn on, route to built-in speaker when turn off.