Surround sound not working, all audio is stereo
Categories
(Core :: Audio/Video: Playback, defect, P4)
Tracking
()
People
(Reporter: andrewammerlaan, Assigned: sna)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0
Steps to reproduce:
In Firefox 101.0 (possibly earlier) surround sound seems to have broken (on Linux(?)). Testing with [1] results in only stereo sound output.
Vlc is working, Chrome is working. The latest Firefox esr release (91.10.0) is also working just fine. I created a new fresh profile, in which I could still reproduce the issue.
This is a Gentoo Linux system running kernel 5.18.1, pulseaudio version 16.0, and pipewire version 0.3.51.
[1] https://www2.iis.fraunhofer.de/AAC/multichannel.html
Actual results:
By inspecting the number of channels produced using pavucontrol I confirmed that audio is only stereo.
Expected results:
Full 5.1 audio should have been produced, in accordance with the system audio profile. As happens in the latest esr release.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Web Audio' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Could you try using mozregression to find out what caused this?
Comment 3•3 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
Reporter | ||
Comment 5•3 years ago
|
||
Reporter | ||
Comment 6•3 years ago
|
||
(In reply to Marco Castelluccio [:marco] from comment #2)
Could you try using mozregression to find out what caused this?
Done, I hope this is useful. The application was quite crashy on my system for some reason so I had to do it a couple of times. I copied and uploaded the log and took a screenshot after a successful run.
Comment 7•3 years ago
|
||
Thanks! So it looks like the culprit might be bug 1351378.
Comment 8•3 years ago
|
||
:NordinAbouzahra+BMO, since you are the author of the regressor, bug 1351378, could you take a look?
For more information, please visit auto_nag documentation.
Comment 9•3 years ago
|
||
Andrew, what audio backend is reported in about:support
under the media section? Also, are you using a build provided by Gentoo (or using non-default options for the audio backend when building) or a Mozilla build?
Reporter | ||
Comment 10•3 years ago
|
||
(In reply to Matthew Gregan [:kinetik] from comment #9)
Andrew, what audio backend is reported in
about:support
under the media section? Also, are you using a build provided by Gentoo (or using non-default options for the audio backend when building) or a Mozilla build?
The "Audio Backend" is "pulse-rust", interestingly enough "Max Channels" is actually reported correctly as "6" (even though all actual audio is stereo according to pavucontrol). I tried both the official Mozilla binary (www-client/firefox-bin) and a custom built one from source (www-client/firefox). I have the same problem with both versions. I also tried explicitly enabling sndio support in the custom build since it is mentioned above, however this made no difference.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Set release status flags based on info from the regressing bug 1351378
Updated•2 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:jimm, since the bug has recent activity, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Adding an additional comment for the same issue.
Arch Linux user using the latest Linux Firefox 103.0.2 (64-bit). Audio > 2 channels does not work properly.
A good test page to troubleshoot/verify, play the first sample "HE-AAC Bitstream:":
https://www2.iis.fraunhofer.de/AAC/multichannel.html
Important note: I have found that if I downgrade to Linux Firefox 99.x (tested on 99.0.1-1), the audio works as expected for multichannel audio suggesting only later versions of Firefox 100.x.x are affected. As a further confirmation, I tested the same scenario in Google Chrome and multichannel audio is working as expected.
Below is a copy>paste of my support page with some basic related info, showing 6 channels detected. This is the same issue as Andrew Ammerlaan's.
Hope a fix will be issued soon since I really do not want to use an older version of Firefox as a workaround is certainly not optimal or secure. Please let me know if I can provide any further details.
about:support
Application Basics
Name Firefox
Version 103.0.2
Build ID 20220808225913
Distribution ID archlinux
User Agent Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0
OS Linux 5.18.16-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 03 Aug 2022 11:25:10 +0000
Media
Audio Backend pulse-rust
Max Channels 6
Preferred Sample Rate 48000
Roundtrip latency (standard deviation) 44.66ms (2.70)
Output Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Starship/Matisse HD Audio Controller Analog Surround 5.1 /devices/pci0000:00/0000:00:08.1/0000:0a:00.4/sound/card1 Advanced Micro Devices, Inc. [AMD] Enabled All default: F32LE, support: S16LE S16BE F32LE F32BE 6 default: 48000, support: 1 - 384000 0 - 0
Input Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Monitor of Starship/Matisse HD Audio Controller Analog Surround 5.1 /devices/pci0000:00/0000:00:08.1/0000:0a:00.4/sound/card1 Advanced Micro Devices, Inc. [AMD] Enabled None default: F32LE, support: S16LE S16BE F32LE F32BE 6 default: 48000, support: 1 - 384000 0 - 0
Starship/Matisse HD Audio Controller Analog Stereo /devices/pci0000:00/0000:00:08.1/0000:0a:00.4/sound/card1 Advanced Micro Devices, Inc. [AMD] Enabled All default: F32LE, support: S16LE S16BE F32LE F32BE 2 default: 96000, support: 1 - 384000 0 - 0
(In reply to Andrew Ammerlaan from comment #10)
(In reply to Matthew Gregan [:kinetik] from comment #9)
Andrew, what audio backend is reported in
about:support
under the media section? Also, are you using a build provided by Gentoo (or using non-default options for the audio backend when building) or a Mozilla build?The "Audio Backend" is "pulse-rust", interestingly enough "Max Channels" is actually reported correctly as "6" (even though all actual audio is stereo according to pavucontrol). I tried both the official Mozilla binary (www-client/firefox-bin) and a custom built one from source (www-client/firefox). I have the same problem with both versions. I also tried explicitly enabling sndio support in the custom build since it is mentioned above, however this made no difference.
Comment 14•2 years ago
|
||
Firefox version 105.0.2 as of this post, surround sound is still not working properly on Linux distributions
- All Chrome-based browser latest versions, surround sound works properly.
- Installing any Firefox versions 99.x or earlier, surround sound works properly.
As stated prior, this audio bug was introduced in Firefox Linux versions 100.x and up.
Please advise, thank you.
Assignee | ||
Comment 15•2 years ago
|
||
(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #8)
:NordinAbouzahra+BMO, since you are the author of the regressor, bug 1351378, could you take a look?
For more information, please visit auto_nag documentation.
Sorry, I was busy for some time. I look into this but from the brief overview bug 1351378 was build system changes of which should not have effected PulseAudio's ability for multichannel audio but I will investigate further in case there was some brittle build system logic that broke.
(In reply to Patrick Sheets from comment #13)
Adding an additional comment for the same issue.
Arch Linux user using the latest Linux Firefox 103.0.2 (64-bit). Audio > 2 channels does not work properly.
Are you also running a PulseAudio + PipeWire setup?
Comment 16•2 years ago
|
||
(In reply to Patrick Sheets from comment #13)
Adding an additional comment for the same issue.
Arch Linux user using the latest Linux Firefox 103.0.2 (64-bit). Audio > 2 channels does not work properly.Are you also running a PulseAudio + PipeWire setup?
Yes, I am currently using PulseAudio + PipeWire. To note here however, I upgraded to PipeWire less than a month ago. My initial experience (and likely many others) are/were without use of Pipewire. This bug effects both PulseAudio & PulseAudio+Pipewire setups. I am not entirely sure how audio backends work within Firefox, but it would seem the issue may be somewhere to changes specific to Firefox's calls to PulseAudio. According to about:config, Firefox uses "Audio Backend pulse-rust". Not sure what changes happened in Firefox 100.x and up, I wish I could be of more use here. In either scenario (Pipewire, non-Pipewire), downgrading Firefox to versions 99.x and lower, surround works as expected immediately, without any changes to the Linux operating system.
Hopefully a resolution can be found soon, thank you kindly for your reply.
Assignee | ||
Comment 17•2 years ago
|
||
(In reply to Patrick Sheets from comment #16)
(In reply to Patrick Sheets from comment #13)
Adding an additional comment for the same issue.
Arch Linux user using the latest Linux Firefox 103.0.2 (64-bit). Audio > 2 channels does not work properly.Are you also running a PulseAudio + PipeWire setup?
Yes, I am currently using PulseAudio + PipeWire. To note here however, I upgraded to PipeWire less than a month ago. My initial experience (and likely many others) are/were without use of Pipewire. This bug effects both PulseAudio & PulseAudio+Pipewire setups. I am not entirely sure how audio backends work within Firefox, but it would seem the issue may be somewhere to changes specific to Firefox's calls to PulseAudio. According to about:config, Firefox uses "Audio Backend pulse-rust". Not sure what changes happened in Firefox 100.x and up, I wish I could be of more use here. In either scenario (Pipewire, non-Pipewire), downgrading Firefox to versions 99.x and lower, surround works as expected immediately, without any changes to the Linux operating system.
Hopefully a resolution can be found soon, thank you kindly for your reply.
I found the culprit. I removed what I thought was a spurious set_define()
as I never saw any ifdef logic using it. I did check using searchfox but nothing populated in the codebase back then I believe. Fortunately there is an easy work around/solution. For the time being in about:config
type media.forcestereo.enabled
and set it to false
(this is what the ifdef logic is suppose to do).
If Patrick or Andrew can confirm setting media.forcestereo.enabled
to false
resolves the issue for them as well I will go ahead and write a patch for it.
Reporter | ||
Comment 18•2 years ago
|
||
I found the culprit. I removed what I thought was a spurious
set_define()
as I never saw any ifdef logic using it. I did check using searchfox but nothing populated in the codebase back then I believe. Fortunately there is an easy work around/solution. For the time being inabout:config
typemedia.forcestereo.enabled
and set it tofalse
(this is what the ifdef logic is suppose to do).If Patrick or Andrew can confirm setting
media.forcestereo.enabled
tofalse
resolves the issue for them as well I will go ahead and write a patch for it.
I can confirm that this works! Thanks for the workaround!
Comment 19•2 years ago
|
||
(In reply to Nordin Abouzahra from comment #17)
(In reply to Patrick Sheets from comment #16)
(In reply to Patrick Sheets from comment #13)
Adding an additional comment for the same issue.
Arch Linux user using the latest Linux Firefox 103.0.2 (64-bit). Audio > 2 channels does not work properly.Are you also running a PulseAudio + PipeWire setup?
Yes, I am currently using PulseAudio + PipeWire. To note here however, I upgraded to PipeWire less than a month ago. My initial experience (and likely many others) are/were without use of Pipewire. This bug effects both PulseAudio & PulseAudio+Pipewire setups. I am not entirely sure how audio backends work within Firefox, but it would seem the issue may be somewhere to changes specific to Firefox's calls to PulseAudio. According to about:config, Firefox uses "Audio Backend pulse-rust". Not sure what changes happened in Firefox 100.x and up, I wish I could be of more use here. In either scenario (Pipewire, non-Pipewire), downgrading Firefox to versions 99.x and lower, surround works as expected immediately, without any changes to the Linux operating system.
Hopefully a resolution can be found soon, thank you kindly for your reply.
I found the culprit. I removed what I thought was a spurious
set_define()
as I never saw any ifdef logic using it. I did check using searchfox but nothing populated in the codebase back then I believe. Fortunately there is an easy work around/solution. For the time being inabout:config
typemedia.forcestereo.enabled
and set it tofalse
(this is what the ifdef logic is suppose to do).If Patrick or Andrew can confirm setting
media.forcestereo.enabled
tofalse
resolves the issue for them as well I will go ahead and write a patch for it.
That appears to have fixed the issue perfectly! I have tested with media.forcestereo.enabled
to false
and then played multichannel audio tests via the fraunhofer AAC page (https://www2.iis.fraunhofer.de/AAC/multichannel.html), as well as with video streaming from Netflix, for an additional confirmation of proper functionality. I also tried this on a few other Linux distributions that are using Firefox 100.x and above such as Debian 11, Manjaro, and the latest Ubuntu. All audio channels are working properly as expected with that setting change.
Nordin, appreciate your efforts here and also your time for the upcoming patch.
Again, many thanks!
Assignee | ||
Comment 20•2 years ago
|
||
Earlier in bug 1351378 some superfluous set_define()s were removed. However,
some were accidentally removed despite having purpose. This commit restores
the MOZ_ALSA and MOZ_PULSEAUDIO defines, the former being used in
Sandbox{Filter,BrokerPolicyFactory,Launch}.cpp and the latter used in setting
the preference media.forcestereo.enabled to false which fixes the primary
concern of bug report.
Updated•2 years ago
|
Comment 21•2 years ago
|
||
Any update on this? I know there is a workaround, but it was mentioned recently on reddit:
https://www.reddit.com/r/firefox/comments/1050x4o/51_audio_on_version_10801_linux_mint_jan_2023/
Assignee | ||
Comment 22•2 years ago
|
||
(In reply to Dianna Smith [:diannaS] from comment #21)
Any update on this? I know there is a workaround, but it was mentioned recently on reddit:
https://www.reddit.com/r/firefox/comments/1050x4o/51_audio_on_version_10801_linux_mint_jan_2023/
There is a patch. Just needs to be reviewed, should be a trivial task.
Comment 23•2 years ago
|
||
Mathew, curious if you can help get this fix landed?
Comment 24•2 years ago
|
||
Reviewed and queued for landing. Thanks for the fix!
Comment 25•2 years ago
|
||
Comment 26•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Comment 27•2 years ago
|
||
The patch landed in nightly and beta is affected.
:sna, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox109
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 28•2 years ago
|
||
(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #27)
The patch landed in nightly and beta is affected.
:sna, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox109
towontfix
.For more information, please visit auto_nag documentation.
The bug is not important enough, as well as there is an easy workaround. However, I cannot set status-firefox109
to wontfix
(wontfix
is not an option for me to set).
Updated•2 years ago
|
Description
•