Closed Bug 1890186 Opened 7 months ago Closed 5 months ago

Audio input and output devices are not listed in menu selection

Categories

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

Firefox 125
defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox125 --- wontfix
firefox126 --- wontfix
firefox127 --- wontfix
firefox128 --- fixed

People

(Reporter: nadirfejzo, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0

Steps to reproduce:

  1. Go to any video conferencing site
  2. Join a meeting
  3. Try to select which audio input (and/or output) device should be used

Actual results:

The list with available devices is not complete. Also testing this causes Firefox to stop responding, but I do not know how related is that.

See attached screenshot for discrepancy between options in Firefox vs. Sound settings in macos.

Expected results:

The list with available devices should be complete and let me choose audio output device.

Regarding User Agent: I am using "Mac mini m2" with macos 14.2.1 (23C71).

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: cubeb' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: cubeb
Product: Firefox → Core
Component: Audio/Video: cubeb → WebRTC: Audio/Video

Hi nadirfejzo, thanks for the report. To reduce variables let's focus on microphones first (as speakers work differently).

From your screenshot the "HD Pro Webcam C920" microphone seems correctly reflected in the list, so the problem seems isolated to the other devices, is that fair?

The other devices all seem unusual to me: a loopback audio device, an "aggregate device", and a "continuity" microphone. Do these work in Chrome and Safari?

I don't know what Teams and Zoom is doing in that UI list. To rule out website differences, please try this test page: https://jan-ivar.github.io/dummy/gum_picker_output3.html (hit the Go! button to start).

When it comes to speakers, there are additional reasons why a speaker may be not be listed (like not being associated with a microphone, or not using the new selectAudioOutput API used in the test page). E.g. Google Meet doesn't support speaker-selection at all in Firefox atm.

Flags: needinfo?(nadirfejzo)

Hello!

Yes, that is correct. The only microphone that gets picked up is the "HD Pro Webcam C920". Others are not being listed. In particular, the audio input from my Audio Interface (https://www.steinberg.net/audio-interfaces/ur12/) is not picked up.

Opening the link you provided me also crashes my Firefox (Firefox Developer Edition Version 125.0b9 (64-bit) at the moment). It just stops responding and I have to force quit it. Here's the report generated by macos: https://gist.github.com/nfejzic/c276ec0e263bb77056d4f82a56f8d19d

All audio input (and output) devices are listed on both Safari and Google Chrome. Regarding the Teams and Zoom, no idea why those exist, but I assume Zoom and Teams use some trickery and hence install those.

There was a similar (if not exact) problem in some of the previous versions of Firefox not too far ago. Pretty much the same behavior, so I'm fairly certain that this is some regression.

Flags: needinfo?(nadirfejzo)

The severity field is not set for this bug.
:jib, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jib)

Hi Nadir, sorry for the slow response. It sounds like the problem is isolated to specific microphones, and it's hard for us to repro since we don't have those devices.

You also mention Firefox not responding (comment 0) or crashing (comment 4). That's not good, and I'd suspect related to a particular device or its driver. It would be helpful if you could isolate it to a specific device by removing other devices and trying one device at a time.

If you're able to capture a Firefox profile using the https://profiler.firefox.com extension that would be great! To rule out cameras and other websites, you can try to profile going to https://jan-ivar.github.io/dummy/enumerate.html and click Start Mic! (+ allow) followed by Enumerate Devices!.

If it crashes again, please submit the crash report by going to about:crashes and paste the submitted ID here afterwards.

All that said, the best chance of fixing, given the repro difficulties, would probably be if you could run the https://mozilla.github.io/mozregression tool to narrow down the specific regression range.

Flags: needinfo?(jib) → needinfo?(nadirfejzo)

Hi Jan-Ivar,

No worries about the response time, I managed to use alternative browsers when I needed to join meetings.
I used the mozregression tool and tested with link you provided (https://jan-ivar.github.io/dummy/enumerate.html).

The mozregression tool managed to narrow it down to this: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=490c938040a6c0df6027404b271db29e8711f7e6&tochange=f6aface0fa8a884b74458aa5ee0d895a79e03695

I hope this helps.

Flags: needinfo?(nadirfejzo)

Setting Regressed by field after analyzing regression range found by mozregression in comment #7.

Keywords: regression
Regressed by: 1875235

:pehrsons, since you are the author of the regressor, bug 1875235, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(apehrson)

Hi Nadir, thanks for the report.

Could you please collect logs for us to analyze this?
Like so:

  • In Firefox, ideally freshly started with no other tabs to distract, go to about:logging
  • Select the WebRTC preset and click Start Logging
  • In a new tab, go to https://mozilla.github.io/webrtc-landing/gum_test.html, click "Microphone" and approve the prompt
  • Click Stop
  • Back on about:logging, click Stop Logging
  • In the new tab that appears with the Firefox Profiler, in the top right click the button to upload the profile
  • Make sure hidden threads are included and upload, then share the link here

The logs should contain enough data from the audio backend for us to work around your issue. Thanks in advance!

Assignee: nobody → apehrson
Flags: needinfo?(apehrson) → needinfo?(nadirfejzo)

Hey Andreas,

I did the steps you explained and got this: https://share.firefox.dev/4bf1kHb

Let me know if that helps you with the issue.

Flags: needinfo?(nadirfejzo)

Thanks! I see that both the continuity mic's and the UR12's input streams have terminal type kAudioStreamTerminalTypeUnknown, which we filter out because we found the builtin speaker tap stream to also have this in bug 1875235. I'll see if we can nuance this check a bit, or if we can find a better heuristic for what is a tap stream.

Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2

Set release status flags based on info from the regressing bug 1875235

Set release status flags based on info from the regressing bug 1875235

Duplicate of this bug: 1898067

Spencer, just to verify that your issue is indeed a duplicate of this, could you share a profile captured per comment 10? Thanks!

Flags: needinfo?(spencer)
See Also: → 1870678

qe-verify+ @QATeam, does the QA team have access to a microphone/speaker that reproduces this problem to help Andreas here?

Flags: qe-verify+

I should have all I need, see comment 11 and comment 12. I'm working through this in our macOS audio backend, with tests and all. Planning to have a fix in 128.

Priority: P2 → P1

I'll note that to debug and figure out a working approach to this bug, I developed a utility to traverse and dump the CoreAudio object tree (including with VPIO present - the reason we have this bug in the first place - and across device plugging): https://github.com/Pehrsons/cubeb-coreaudio-samples/blob/main/src/bin/traversal.rs

It can be run from the repo checkout, in a terminal, by cargo run --bin traversal -- --help.

Component: WebRTC: Audio/Video → Audio/Video: cubeb
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ad954710c53f Update cubeb-coreaudio-rs to 1796ace5bd. r=cubeb-reviewers,padenot

May not be useful anymore, but for reference, here's my profiling output after following the steps above:

https://share.firefox.dev/3KqK1HW

In my (hopefully) duplicate bug here, I put more info as to which devices were missing from Firefox that show up in Chrome.

Thanks for looking into this!

Flags: needinfo?(spencer)
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

Since my fix is available in latest Nightly, could you try https://jan-ivar.github.io/dummy/enumerate.html and any use case you had problems with before, there?

You can ceck that you have the right version on about:support. The build id with the fix is 20240603160728. Anything later should have it as well.

On the enumerate.html test page, please check that the number of audioinputs is the same before and after starting the mic, and that all audioinput devices you'd expect are present after starting. Thanks, and sorry for the troubles!

Flags: needinfo?(spencer)
Flags: needinfo?(nadirfejzo)

(In reply to Andreas Pehrson [:pehrsons] from comment #25)

Since my fix is available in latest Nightly, could you try https://jan-ivar.github.io/dummy/enumerate.html and any use case you had problems with before, there?

You can ceck that you have the right version on about:support. The build id with the fix is 20240603160728. Anything later should have it as well.

On the enumerate.html test page, please check that the number of audioinputs is the same before and after starting the mic, and that all audioinput devices you'd expect are present after starting. Thanks, and sorry for the troubles!

I can confirm that proper devices are now listed in latest nightly: https://pasteboard.co/0p6riPTl5UPl.png

Thank you for your work!

Flags: needinfo?(nadirfejzo)

I have confirmed also, in Nightly (128.0a1) I now see all my audio inputs.

Thanks a lot for the fix!

Flags: needinfo?(spencer)
Duplicate of this bug: 1904354
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: