Closed Bug 1903027 Opened 4 months ago Closed 4 months ago

Capturing input without VPIO may get stuck in a reinit-loop

Categories

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

Unspecified
macOS
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox127 --- unaffected
firefox128 + verified
firefox129 + verified

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

When not using VPIO we set up an aggregate device containing both the input and the output device. We have a bug in reading the input channel count out of the HAL unit on top of the aggregate device, because it behaves differently than the VPIO unit. If the output channel count is higher than the input channel count, we mix them up and get stuck in a reinit-loop because we try to over-render in the input callback.

I hit this when using Apple Studio Display for both input and output because that configuration is blocklisted for VPIO, and has 1 input channel and 2 output channels.

[Tracking Requested - why for this release]: Audio input cannot be captured for some devices and constraints combinations on macOS.

Keywords: regression
Regressed by: 1895787
Depends on: 1903002
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6ce5b96cd8a8 Update cubeb-coreaudio to b5dc6e2431. r=cubeb-reviewers,padenot
Attachment #9408133 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Certain audio input devices may not work with certain constraints on macOS. Apple Studio Display won't work for input at all when it is also the output.
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: In Audio MIDI Setup, create an aggregate device with sub devices such that there are one input channel and two output channels. Set the prefs media.getusermedia.audio.processing.aec.enabled, media.getusermedia.audio.processing.agc.enabled and media.getusermedia.audio.processing.noise.enabled to false. On https://mozilla.github.io/webrtc-landing/gum_test.html click microphone and select the new aggregate device in the prompt (beware of echo!). Capture should work (you'll hear the echo). The status bar mic capture icon shouldn't flicker.
  • Risk associated with taking this patch: Low
  • Explanation of risk level: This patch is trivial. D214088 is larger and changes the timing of certain operations but is still simple enough. I'd be happy to skip it for the uplift but it comes first upstream and I don't see it being complex enough to warrant special handling upstream.
  • String changes made/needed: None
  • Is Android affected?: no
Flags: qe-verify+
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5ebaa2b0211d Update cubeb-coreaudio to b5dc6e2431. r=cubeb-reviewers,padenot
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Attachment #9408133 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Reproduced the issue on Firefox 129.0a1 (2024-06-17) on macOS 14.5 by following the STR provided in Comment 4.

The issue is fixed on Firefox 128.0b7 and Firefox 129.0a1 (2024-06-25) on the same system.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: