Closed Bug 1725810 Opened 2 months ago Closed 2 months ago

Sound from bluetooth headset's mic become distorted after upgrade to Firefox 91.0

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P1)

Firefox 91
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- wontfix
firefox91 --- wontfix
firefox92 + wontfix
firefox93 + fixed

People

(Reporter: christianschmidt, Assigned: chunmin)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36

Steps to reproduce:

I already had the same issue after upgrading from v80.0.1 to v81.0 and the issue was fixed with v83.0. See https://bugzilla.mozilla.org/show_bug.cgi?id=1667464 (expecially comment 18).

I used the following page for testing:
https://webcammictest.com/de/check-mic.html

Steps to reproduce:

I updated my Firefox installation from the version v90.0.2 to v91.0
The microphone of my headset "Sony WH-XB900N" stopped working with web-meeting software like "3cx" and "WebEx" during a call or web-meeting. It does not matter if I grant access to the microphone temporarily or permanently. The issue persists even with not plugins or extensions involved and a new profile.

Name: Firefox
Version: 91.0
Build ID: 20210804193234
Distribution ID: mint
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
OS: Linux 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021

Version that worked:
Firefox 90.0.2 (no extensions installed, new profile)
Version that has the problem:
Firefox 91.0 (no extensions installed, new profile)

Install Firefox 90.0.2

Pair/connect the Headset to the computer

Go to a web-meeting site and grant access to the microphone of the headset

Make a call. Test if speaker and especially microphone is functional (it should be)
-> speaker works, microphone works!

Update Firefox to 91.0

Reboot

Pair/connect the Headset to the computer

Go to a web-meeting site and grant access to the microphone of the headset

Make a call. Test if speaker and especially microphone is functional
-> speaker works, microphone does not work (seems to be always muted)!

Downgrade again Firefox to 90.0.2

Reboot

Pair/connect the Headset to the computer

Go to a web-meeting site and grant access to the microphone of the headset

Make a call. Test if speaker and especially microphone is functional
-> speaker works, microphone works again!

Logfile from mozregression:

app_name: firefox
build_date: 2021-06-10 07:55:03.350000
build_file: /home/cschmidt/.mozilla/mozregression/persist/0c91f4b43462--autoland--target.tar.bz2
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/TIQ1EdbQSF-HK1x00Lp2Pw/runs/0/artifacts/public%2Fbuild%2Ftarget.tar.bz2
changeset: 0c91f4b43462413cc99c2b580052742d22eba7b1
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0c91f4b43462413cc99c2b580052742d22eba7b1&tochange=41792e6152e6b5e8ad472e6cc21ce07352447bb8
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: TIQ1EdbQSF-HK1x00Lp2Pw

[...]
2021-08-14T18:34:44.811000: INFO : Narrowed integration regression window from [fe803065, f0c73621] (3 builds) to [3793e0a6, f0c73621] (2 builds) (~1 steps left)
2021-08-14T18:34:44.816000: DEBUG : Starting merge handling...
2021-08-14T18:34:44.816000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=f0c736218ab6592dbd8f973af162fbac414266fd&full=1
2021-08-14T18:34:44.816000: DEBUG : redo: attempt 1/3
2021-08-14T18:34:44.816000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=f0c736218ab6592dbd8f973af162fbac414266fd&full=1',), kwargs: {}, attempt #1
2021-08-14T18:34:44.819000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2021-08-14T18:34:45.926000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=f0c736218ab6592dbd8f973af162fbac414266fd&full=1 HTTP/1.1" 200 None
2021-08-14T18:34:45.981000: DEBUG : Found commit message:
Bug 1702646 - Add an util-function to append interleaved buffer in AudioSegment r=padenot

Add an utility function named AppendFromInterleavedBuffer in
AudioSegment to append data from the given interleaved buffer. This
function does the same job as what AudioInputProcessing::InsertInGraph
and NativeInputTrack::ProcessInput were used to do. As a result, these
two functions can be eliminated or simplified.

Depends on D116673

Differential Revision: https://phabricator.services.mozilla.com/D116674

2021-08-14T18:34:45.981000: DEBUG : Did not find a branch, checking all integration branches
2021-08-14T18:34:45.985000: INFO : The bisection is done.
2021-08-14T18:34:45.987000: INFO : Stopped

Actual results:

Upgrade of Firefox 90.0.2 to Firefox 91.0 broke usability of the bluetooth microphone. Lots of noises and voice is not recognizable.

Expected results:

Bluetooth microphone of the headset should still work with Firefox 91.0 after upgrading from Firefox 90.0.2

Keywords: regression
Regressed by: 1702646
Flags: needinfo?(cchang)

Could this be the same problem as last time, the function to append to the graph changed thread ?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → Audio/Video: MediaStreamGraph
Product: Firefox → Core

I encountered a different problem on Linux with my Bose QC 35 II, which is a bluetooth headset. As long as it's in hand-free mode (HSP/HFP), the audio output and input don't work at all. I'll check what's going on.

I would guess the problem is somehow only on Linux. I've attended lots of online meetings by Firefox Nightly with my Bose QC 35 II on my MacBook, but it works well all the time

Severity: -- → S3
OS: Unspecified → Linux
Priority: -- → P1
Hardware: Unspecified → Desktop

christianschmidt, do you happen to have other platforms (e.g., Windows or Mac OS) to test if the microphone works? It will help us to find out what we should focus on

Flags: needinfo?(cchang) → needinfo?(christianschmidt)

(In reply to christianschmidt from comment #0)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
...
I used the following page for testing:
https://webcammictest.com/de/check-mic.html

I tested this on my another Ubuntu PC and went to https://webcammictest.com/check-mic.html and https://webrtc.github.io/samples/. The mic of my Bose QC35II works in Firefox 91 and 93, but the voice is distorted

Flags: needinfo?(cchang)

I double checked with Windows 10 and Firefox:

Name Firefox
Version 91.0.1
Build ID 20210816143654

I wasn't able to install 90.0.2 or 91.0. Therefore I just tested with the latest version from the download page (v91.0.1), which is newer than the broken Linux version. The Windows version 91.0.1 worked fine.

Flags: needinfo?(christianschmidt)

christianschmidt, would you mind helping me with the following things:

  1. Provide the information under Media section in your about:support page
    • Enter about:support in your URL bar, copy the information under Media (it's either raw data or text), and paste it here
  2. Upload the program log
Flags: needinfo?(christianschmidt)

Sorry, for the late reply. I was away from my computer the last 2 days.

Here is the Media info from 90.0.2 where it was still working:

Media
Audio Backend pulse-rust
Max Channels 1
Preferred Sample Rate 8000
Roundtrip latency (standard deviation) 136.08ms (21.89)
Output Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
WH-XB900N Enabled All default: S16LE, support: S16LE S16BE F32LE F32BE 1 default: 8000, support: 1 - 384000 0 - 0
Input Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Monitor of Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Monitor of Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Monitor of WH-XB900N Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 1 default: 8000, support: 1 - 384000 0 - 0
WH-XB900N

and here from 91.0 where it was broken:

Media
Audio Backend pulse-rust
Max Channels 1
Preferred Sample Rate 8000
Roundtrip latency (standard deviation) 138.52ms (24.48)
Output Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
WH-XB900N Enabled All default: S16LE, support: S16LE S16BE F32LE F32BE 1 default: 8000, support: 1 - 384000 0 - 0
Input Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Monitor of Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/pci0000:00/0000:00:1b.0/sound/card1 Intel Corporation Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Monitor of Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Built-in Audio Analog Stereo /devices/platform/snd_aloop.0/sound/card2 Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 1 - 384000 0 - 0
Monitor of WH-XB900N Enabled None default: S16LE, support: S16LE S16BE F32LE F32BE 1 default: 8000, support: 1 - 384000 0 - 0
WH-XB900N

I'll also will attach 2 log-files (Including the media info form above, too)

  • FF_90.0.2_working.log
  • FF_91.0_broken.log
Attached file FF_90.0.2_working.log
Flags: needinfo?(christianschmidt)
Attached file FF_91.0_broken.log

chunmin, have you been able to look at the logs?

(In reply to Julien Cristau [:jcristau] from comment #11)

chunmin, have you been able to look at the logs?

I am fixing another bug right now but I will definitely get back to this. However, I am not able to reproduce it locally so I would need to guess the cause based on the log. Is there any release due date I should be aware of?

Given where we are in the cycle, this is going to miss 92 at this point, so let's aim for mid-September so there's still time to uplift a fix to 93 if reasonable?

Assignee: nobody → cchang
Flags: needinfo?(cchang)

(In reply to C.M.Chang[:chunmin] from comment #2)

I encountered a different problem on Linux with my Bose QC 35 II, which is a bluetooth headset. As long as it's in hand-free mode (HSP/HFP), the audio output and input don't work at all. I'll check what's going on.

With my bluethooth headset, the Firefox crashes here (even in FF 90). This looks like a different problem. Besides, my Bluetooth devices doesn't work in Chrome as well so I guess it's a driver issue (I use a Bluetooth dongle). For now, I'll try using another Ubuntu machine I have to debug this issue.

(In reply to C.M.Chang[:chunmin] from comment #5)

I tested this on my another Ubuntu PC and went to https://webcammictest.com/check-mic.html and https://webrtc.github.io/samples/. The mic of my Bose QC35II works in Firefox 91 and 93, but the voice is distorted

Just run the test with my another machine. The voice input in FF 90 sounds better than the one in FF 91, so the problem can be reproduced in this machine. I'll use my another machine to debug instead

(In reply to christianschmidt from comment #6)

The Windows version 91.0.1 worked fine.

Weird. The patches for bug 1702646 doesn't have any platform-dependent code, but only Linux is broken.

(In reply to christianschmidt from comment #0)

Actual results:

Upgrade of Firefox 90.0.2 to Firefox 91.0 broke usability of the bluetooth microphone. Lots of noises and voice is not recognizable.

The code for audio processing is indeed changed. I'll try to start from here.

Blocks: 1238038
Summary: Microphone of bluetooth headset not working anymore after upgrade to Firefox 91.0 → Sound from bluetooth headset's mic become distorted after upgrade to Firefox 91.0

I think I have a clue. It seems the audio distortion starts from applying D114807. I suspect there are more AudioInputProcessing::NotifyInputData calls than AudioInputProcessing::ProcessInput so some audio/voice input data are dropped without being processing.

(In reply to C.M.Chang[:chunmin] from comment #15)

I suspect there are more AudioInputProcessing::NotifyInputData calls than AudioInputProcessing::ProcessInput so some audio/voice input data are dropped without being processing.

D123840, which addresses this issue, seems to fix the distortion on my end. I am going to revise the patch based on this. Meanwhile, christianschmidt, would you mind checking if this works on your end? You can try a test version from https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/fG3XikATTgmlrUuQwpsa8A/runs/0/artifacts/public/build/target.tar.bz2

Flags: needinfo?(christianschmidt)

AudioDataBuffers is used to hold the information of the audio input
and output. However, nothing special needs to be done there.

Depends on D123840

Move the ownership of the cloned/queued interleaved audio input data
from AudioInputProcessing to NativeInputTrack so all the tracks
asking for the same input device share one chunk instead of copying the
data by themselves.

Depends on D123996

Attachment #9238272 - Attachment description: WIP: Bug 1725810 - Fix audio distortion → Bug 1725810 - Fix audio distortion
Attachment #9238593 - Attachment description: WIP: Bug 1725810 - Remove `AudioDataBuffers` → Bug 1725810 - Remove `AudioDataBuffers`
Attachment #9238594 - Attachment description: WIP: Bug 1725810 - Share the raw audio data from NativeInputTrack → Bug 1725810 - Share the raw audio data from `NativeInputTrack`
Duplicate of this bug: 1665895

(In reply to C.M.Chang[:chunmin] from comment #17)

D123840, which addresses this issue, seems to fix the distortion on my end. I am going to revise the patch based on this. Meanwhile, christianschmidt, would you mind checking if this works on your end? You can try a test version from https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/fG3XikATTgmlrUuQwpsa8A/runs/0/artifacts/public/build/target.tar.bz2

I just verified the headset/microphone fix on my side with the version you provided above and it seems to work fine again. Thank you very much!

Flags: needinfo?(christianschmidt)
Attachment #9238594 - Attachment description: Bug 1725810 - Share the raw audio data from `NativeInputTrack` → Bug 1725810 - Add a test case simulate the issue
Blocks: 1729041
Pushed by cchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61ab7a0293f4
Add a test case simulate the issue r=padenot
https://hg.mozilla.org/integration/autoland/rev/45a8bc7cd18b
Remove `AudioDataBuffers` r=padenot
https://hg.mozilla.org/integration/autoland/rev/60c6b98b954e
Fix audio distortion r=padenot
Flags: qe-verify+
Flags: in-testsuite+
Duplicate of this bug: 1732466
Duplicate of this bug: 1732419
See Also: → 1736481
You need to log in before you can comment on or make changes to this bug.