Firefox 127 not playing audio out Channels assigned in Audio MIDI setup Mac OS 14.5
Categories
(Core :: Audio/Video: cubeb, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | affected |
firefox129 | --- | wontfix |
firefox130 | --- | wontfix |
firefox131 | --- | fixed |
People
(Reporter: zmix, Assigned: chunmin, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This appears to be a regression of this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1552928
At least it's the same Symptoms.
Comment 1•2 months ago
|
||
The severity field is not set for this bug.
:kinetik, could you have a look please?
For more information, please visit BugBot documentation.
(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #1)
The severity field is not set for this bug.
Sorry, I missed that. I'd say the severity is S1 because it forces all the audio to a default output, and prevents the user from changing the routing.
Comment 3•2 months ago
•
|
||
(In reply to zmix from comment #0)
This appears to be a regression of this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1552928
At least it's the same Symptoms.
That landed a long time ago. Maybe Chun-Min has some ideas.
Assignee | ||
Comment 4•2 months ago
•
|
||
Hi, thanks for the report.
Could you provide your about:support
information under the Media section for us and the device information that has the issue? Additionally, could you use the mozgression tool to help us narrow down the culprits and follow the steps below to get the program logs? That will be super helpful, and I'll really appreciate any help you can provide (currently, I don't have a multi-channel sound card at hand to test this, but I am going to find one).
Steps to get logs
- Install Firefox profiler: https://profiler.firefox.com/
- Open Firefox, and go to about:logging page
- Click Logging preset and choose
Media Playback
- Click Start Logging
- Open a new tab and repeat the steps that cause the issue. Once you reproduce the issue, close the tab, then go back to
about:logging
page and clickStop Logging
. - The Firefox Profiler should launch itself automatically.
- Click Upload Local Profile, then download and upload the profile to Bugzilla or paste the share link in the comment directly.
(The tutorial to get the logs is here: https://www.loom.com/share/24ea3a8e3a054c478de94643a0ea8620?sid=87b0ffaa-c4ea-43ce-8107-639f24b747a8 or https://paul.cx/public/about-logging-presentation.webm)
Assignee | ||
Comment 5•2 months ago
•
|
||
I just got a Cubilux Surround Sound Card (CA7) and reproduced the issue on my MacBook Pro. The channel layout was set to 6 channels: [BackLeft, BackRight, FrontCenter, LowFrequency, FrontLeft, FrontRight]. Chrome works fine, but Firefox doesn't. The mixer wasn't created as I expected. I suspect the problem is probably caused by the code here. I'll investigate it ASAP.
Assignee | ||
Comment 6•2 months ago
•
|
||
(In reply to C.M.Chang[:chunmin] from comment #5)
Commenting this piece of code doesn't solve the issue, since the output_dev_desc.mChannelsPerFrame
(and output_hw_desc.mChannelsPerFrame
), on my Cubilux Surround Sound Card (CA7), reports 2
while the device_layout
reports that the hardware layout is set to [BackLeft, BackRight, FrontCenter, LowFrequency, FrontLeft, FrontRight]
(via Audio MIDI Setup) (get_channel_count
reports 6
in this case). These two pieces of hardware information contradict each other.
In this absurd case, Mixer
forces the channel layout to [FrontLeft, FrontRight]
. However, forcing the channel to 6
doesn't solve the issue, and it would lead to break the output_buffer_size >= size_needed
assertion in audiounit_output_callback
.
More investigation is required to know why the assertion is reached when mutating the channel from 2
to 6
.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 7•2 months ago
•
|
||
(In reply to C.M.Chang[:chunmin] from comment #6)
(In reply to C.M.Chang[:chunmin] from comment #5)
....More investigation is required to know why the assertion is reached when mutating the channel from
2
to6
.
This means the buffer size given by the output callback is only for 2-channel instead of for 6-channel since the channel of audio stream is set to output_dev_desc.mChannelsPerFrame
, which is 2
. The channel of the output_dev_desc
is defined by output_hw_desc.mChannelsPerFrame
, which is expected to reflect the hardware information. However, it reports 2
in this case as well. Setting kAudioUnitScope_Input
to kAudioUnitScope_Output
makes output_hw_desc.mChannelsPerFrame
report 6
, meeting the expectation.
Commenting this piece of code doesn't solve the issue, since the
output_dev_desc.mChannelsPerFrame
(andoutput_hw_desc.mChannelsPerFrame
), on my Cubilux Surround Sound Card (CA7), reports2
while thedevice_layout
reports that the hardware layout is set to[BackLeft, BackRight, FrontCenter, LowFrequency, FrontLeft, FrontRight]
(via Audio MIDI Setup) (get_channel_count
reports6
in this case). These two pieces of hardware information contradict each other.
Commenting this piece of code setting kAudioUnitProperty_AudioChannelLayout
and reverting the kAudioUnitScope_Input
back to kAudioUnitScope_Output
resolves the issue with my Cubilux Surround Sound Card (CA7).
These changes (kAudioUnitScope_Input
and kAudioUnitProperty_AudioChannelLayout
) were introduced in PR #220 and PR #222 resepctively. However, there were no comments or explanations detailing the issues they were meant to address. Without this context, I am unsure if reverting these changes is the right approach or if it might lead to other regressions.
This issue is mirrored to git repo: https://github.com/mozilla/cubeb-coreaudio-rs/issues/232
Paul, do you remember what those settings do?
Assignee | ||
Comment 8•2 months ago
|
||
PR #220 and PR #222 were merged in bug 1474175 and bug 1895787
Comment 9•2 months ago
|
||
Bug relationship was reversed
Comment 10•2 months ago
|
||
The goal of those changes is to play stereo to the channels that have been set as stereo in Audio MIDI setup
, and having macOS mix for us, regardless of what the hardware supports, instead of opening all channels, and sending silence to most of them.
Assignee | ||
Comment 11•1 month ago
|
||
This patch updates cubeb-coreaudio to f7e50c2 by running
cargo update -p cubeb-coreaudio && ./mach vendor rust
to import the code in the given version.
Updated•1 month ago
|
Assignee | ||
Comment 12•1 month ago
•
|
||
The uploaded patch should fix this issue. Note that for 2-ch audio input, the channels go to the stereo configuration set via Audio MIDI Setup, while multi-channel audio input (e.g., https://www2.iis.fraunhofer.de/AAC/multichannel.html) follows the surround configurations. See https://github.com/mozilla/cubeb-coreaudio-rs/issues/232#issuecomment-2302658638 for more details.
Comment 13•1 month ago
|
||
Comment 14•1 month ago
|
||
bugherder |
Updated•1 month ago
|
Updated•29 days ago
|
Comment 15•27 days ago
|
||
The patch landed in nightly and beta is affected.
:chunmin, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox130
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 16•27 days ago
|
||
I believe this problem is minor, and it's okay to let the patch ride the train instead of uplifting it.
Updated•18 days ago
|
Comment 17•2 days ago
|
||
Unfortunately, I don't have the specific sound card (Cubilux Surround Sound Card CA7 mentioned in Comment 5) to test it directly.
@zmix, could you kindly check if the issue still persists on your end with the latest Firefox 131.0b8 ? Thank you.
Description
•