Open Bug 1776253 Opened 2 years ago Updated 1 year ago

Periodic audio input glitches on a particular setup on macOS

Categories

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

defect

Tracking

()

People

(Reporter: padenot, Assigned: padenot)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Here's what I know (I've been unable to repro so far):

  • This happens on a MacBook air, unsure which kind (M1, x86?)
  • The output device is a screen, the audio passes through HDMI. It's unclear if the computer is plugged in to the computer using a dongle, or directly via thunderbolt / usb-c
  • The input device is a Logitech C922 camera. It may be plugged in to the screen or to the computer
  • This comes and goes during the course of a call
  • It's been the case for a long time
  • The somewhat recent aggregate device blanket fix didn't change anything

I've tested various permutations on my Macbook Pro, M1 Max, plugging a similar webcam (C920) to either the screen or the macbook to try to fish out clock domain bugs, but no luck, it runs as it should for hours. In any case the Mac is plugged to the screen with a regular HDMI cable, and the headphones are plugged in to the screen.

What could be helpful:

Group: core-security-release

This happens on a MacBook air, unsure which kind (M1, x86?)

M1 Air.

The output device is a screen, the audio passes through HDMI. It's unclear if the computer is plugged in to the computer using a dongle, or directly via thunderbolt / usb-c

HDMI through an Anker adapter:
https://www.amazon.com/gp/product/B07PPGWQ15/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

The input device is a Logitech C922 camera. It may be plugged in to the screen or to the computer

The computer via USB.

This comes and goes during the course of a call

Not that I know of. It starts fine and then gets progressively worse.

It's been the case for a long time

Yes.

The somewhat recent aggregate device blanket fix didn't change anything

I don't know when this was applied, but no, I think it got somewhat better, but not enough.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(kinetik)
Severity: -- → S3
Priority: -- → P2
Flags: needinfo?(kinetik)

Requesting help from QA in attempting to reproduce and capture a media profile when the issue exhibits.

Flags: qe-verify?
Flags: needinfo?(andrei.vaida)

Hello,

I have tried to reproduce this issue without any luck. The configurations used are as follows:

  • FF Nightly v105.a1(20220731212434) / FF Beta v104.0b4 / FF v103 (as well as the nightly from 2022-06-23, when this issue was submitted)
  • Samsung 28'' U28D590 (connected both through HDMI , as well as via thunderbolt/HDMI dongle)
  • Microsoft HD 3000 webcam (could only connect it via laptop)
  • Headphones connected via jack port( 3.5mm) / Headphones connected via type-c
  • MacBook Pro Retina Mid 2015
  • Zoom , Hangouts, Jitsy (both short calls-10m , as well as 1 long call-1h)

Are you still able to reproduce this issue with the same configurations, on the latest nightly?

Flags: needinfo?(andrei.vaida)
Blocks: 1791995

Changing qe-verify? to qe-verify+.

Flags: qe-verify? → qe-verify+

I think I'm experiencing this bug.

I'm running macOS 13.5 on a 2020 iMac (intel), with an Auna CM900 mic connected via USB.

When I'm on a video call using Google Meet, colleagues report that my voice starts off fine, but increasingly starts to glitch. It'll be fine for the first ~1 minute or so, then start to deteriorate such that within 3 minutes it's entirely unintelligible.

I have been able to capture a sample of the audio showing the glitching problem, but I don't seem to be able to upload it here. I'm happy to email it to someone or upload somewhere, as required.

I'm running FF 116, and it's not fixed in latest nightly (2023-08-10).

Oddly, the issue only occurs if I'm using either the iMac's built-in speakers or speakers plugged into the headphone jack. If I use my AirPods (connected over Bluetooth), the issue doesn't occur.

Originally I thought the issue was to do with interaction between the sound coming out of the speakers and the mic, but it happens even if there is no sound coming out of the speakers.

I seem to have been able to fix the problem by forcing my mic and speakers to 48kHz (to match the output of https://paul.cx/public/samplerate.html) via Audio Midi Setup, but this isn't a great solution for most users.

Update: Actually, the "seem to have been able to fix" only works if I do it while the call is open. If I hang up and reconnect, then the problem comes back.

If, however, I switch the sample rate on the mic to 44.1kHz, and then back to 48kHz while the call is happening, the problem goes away.

Attached file log entry when in call (deleted) —
Looking back, I can see that :padenot suggested some ways of helping debug this. > MOZ_LOG=cubeb:5, reproducing this and attaching the logs here. If redirecting the output, this doesn't require disabling the sandbox I'm not sure that I did this right, but I did manage to get some logs into a file. I don't think I can attach anything, but the contents of the file comprise: ``` [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1888, channels 2, frames 236. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1888, channels 2, frames 236. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235. [Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235. ``` Repeatedly, before I start the Meet call Then, when I enter the call: ``` ``` > a Media profile with this reproducing: see https://blog.paul.cx/post/profiling-firefox-media-workloads/#the-media-preset for instructions I have done this: https://share.firefox.dev/3Qwq9rd . Incredibly helpful post (even if the name of the Publish button has now changed). One further note: after a couple more minutes, my voice seems to be fine, and it seems to stay that way. Although it might be a useful practice for me to turn up to all of my meetings 5 minutes early, I'm not sure that's practical in the long term.

Looking back, I can see that :padenot suggested some ways of helping debug this.

MOZ_LOG=cubeb:5, reproducing this and attaching the logs here. If redirecting the output, this doesn't require disabling the sandbox

I'm not sure that I did this right, but I did manage to get some logs into a file. I don't think I can attach anything, but the contents of the file comprise:

When I enter the call:

[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:3616: Cubeb stream (0x1711fa100) stopped successfully.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:3616: Cubeb stream (0x1711fa100) stopped successfully.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:3572: Cubeb stream (0x1711fa100) destroyed successful.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2123: Use global latency 256 instead of the requested latency 512.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:197: Using the system default device
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2434: Input device ID: 106 (aggregate: false)
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2447: Output device ID: 106 (aggregate: false)
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 50 (Microsoft Teams Audio) has 2 INPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 106 (Auna Mic CM900) has 1 INPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 113 (iMac Speakers) has 0 INPUT-channels
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 120 (External Headphones) has 0 INPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 127 (iMac Microphone) has 1 INPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 132 (DELL S2721QS) has 0 INPUT-channels
[Parent 29427: AudioIPC Server RPC]: E/cubeb aggregate_device.rs:476: Set master device of the aggregate device 223 to device 113
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 50 (Microsoft Teams Audio) has 2 OUTPUT-channels
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 106 (Auna Mic CM900) has 0 OUTPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 113 (iMac Speakers) has 2 OUTPUT-channels
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 120 (External Headphones) has 2 OUTPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 127 (iMac Microphone) has 0 OUTPUT-channels
[Parent 29427: VideoCaptureAVFoundationCallback]: E/cubeb mod.rs:1689: Device 132 (DELL S2721QS) has 2 OUTPUT-channels
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: AudioIPC Server RPC]: E/cubeb aggregate_device.rs:87: Add devices input 106 and output 113 into an aggregate device 223
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2527: (0x19698fc00) Using an aggregate device 223 for input and output.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2551: (0x19698fc00) Initializing input by device info: device_info { id: 223, flags: DEV_INPUT }
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2568: (0x19698fc00) Opening input side: rate 48000, channels 1, format Float32LE, layout (empty), prefs VOICE, latency in frames 256.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2597: (0x19698fc00) Input hardware description: AudioStreamBasicDescription { mSampleRate: 48000.0, mFormatID: 1819304813, mFormatFlags: 9, mBytesPerPacket: 4, mFramesPerPacket: 1, mBytesPerFrame: 4, mChannelsPerFrame: 1, mBitsPerChannel: 32, mReserved: 0 }
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:1221: The new buffer frames size of AudioUnit 0x872f3165 for INPUT is 256
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2708: (0x19698fc00) Input audiounit init with device 223 successfully.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2716: (0x19698fc00) Initialize output by device info: device_info { id: 223, flags: DEV_OUTPUT }
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2727: (0x19698fc00) Opening output side: rate 48000, channels 2, format Float32LE, layout FRONT_LEFT | FRONT_RIGHT, prefs NONE, latency in frames 256.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2756: (0x19698fc00) Output hardware description: AudioStreamBasicDescription { mSampleRate: 48000.0, mFormatID: 1819304813, mFormatFlags: 9, mBytesPerPacket: 8, mFramesPerPacket: 1, mBytesPerFrame: 8, mChannelsPerFrame: 2, mBitsPerChannel: 32, mReserved: 0 }
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:1150: The buffer frame size of AudioUnit 0x872f3167 for OUTPUT is already 256
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2876: (0x19698fc00) Output audiounit init with device 223 successfully.
[Parent 29427: AudioIPC Server RPC]: E/cubeb cubeb_resampler_internal.h:521:Input and output sample-rate match, target rate of 48000Hz
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:2184: (0x19698fc00) Cubeb stream init successful.
[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:3698: Cubeb stream (0x19698fc00) set volume to 1.

..then

[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1888, channels 2, frames 236.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.

...repeated about 20 times...

then

[Parent 29427: AudioIPC Server RPC]: E/cubeb mod.rs:3599: Cubeb stream (0x19698fc00) started successfully.

then

[Parent 29427: cubeb_log]: E/cubeb mod.rs:588: input: buffers 1, size 1024, channels 1, rendered frames 256, total frames 256.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x19698fc00) output: buffers 1, size 2048, channels 2, frames 256.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x140740400) output: buffers 1, size 1880, channels 2, frames 235.
[Parent 29427: cubeb_log]: E/cubeb mod.rs:652: (0x18530a000) output: buffers 1, size 1880, channels 2, frames 235.

....repeated continuously as the call progressed.

a Media profile with this reproducing: see https://blog.paul.cx/post/profiling-firefox-media-workloads/#the-media-preset for instructions

I have done this: https://share.firefox.dev/3Qwq9rd . Incredibly helpful post (even if the name of the Publish button has now changed).

One further note: after a couple more minutes, my voice seems to be fine, and it seems to stay that way. Although it might be a useful practice for me to turn up to all of my meetings 5 minutes early, I'm not sure that's practical in the long term.

Further isolation to FF: I've used the same hardware combination and meeting website in both Chrome and Safari this week, without issue. I've now switched to using Safari for my day-to-day work, which has resolved the issue for me. Hopefully we get this fixed in FF, as I do prefer it!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: