This is a FAQ page for audio channel layout in Firefox. If you have problem when playing the audio in Firefox with a multi-channel soundcard, here are some tips for self-debugging. This page also provides steps to open a Firefox bug with detailed information that helps our developer to address your issues more efficiently.
What is Channel Layout
Please see the post here.
How to Setup the Channel Layout
On Max OS
The channel layout can be set via Audio MIDI setup > Configure Speakers
On Windows
TBC
On Linux
TBC
Mixing, Downmixing and Upmixing
When the input channel layout is different from the output channel layout, we need to convert the audio input data to fit the audio output’s configuration. We call it mixing.
The downmixing means the number of the input channels is greater than the number of the output channels. On the contrary, the upmixing means the number of the output channels is greater than the input channels.
When the the number of the input channels is equal to the the number of the output channels, the channels would just be remapped if the input channels are same as the output channels with different order. Otherwise, the mixing depends on the mixing coefficients from X channel to Y channel.
To read more detail, please see the post here and the audio mixer code here.
When will Audio Mixing Happens
As mentioned above, the mixing will happen when
- either the number of the input channels is different from the number of the output channels
- or the channel layout of the audio source is different from the channel layout of the output hardware
- e.g. audio source is [Front-Right, Front-Left], while the output hardware is [Front-Left, Front-Right]
Known Driver Issues
On Mac OS
- Sound Blaster X3 7.1 External USB DAC (see Bug 1474175)
- Motu 828 MkII (see Bug 1627827)
- Asus Xonar U7 cannot be set to non-stereo
File a Bug
If you find the audio output is different from what you expect and you think it’s a Firefox bug, please follow the steps below to open a bug with the following information
It would be very help to upload the below information in to the bug report:
- The Media information shown on
about:support
page (see post here for example) - The program logs
Steps to Create a Bug Report
- Open a bug report on Mozilla Bugzilla
and set the Product and Compenent to Core and Audio/Video: cubeb respectively
- Please brief describe what’s going on, incluing
- Steps to reproduce the problem
- What’s the expected result
- What’s the actual result
- Please brief describe what’s going on, incluing
- Get the log for audio output, by the step-by-step tutorial below
- Zip all the log files (all the
firefox.*
files below, includingfirefox.moz_log
and allfirefox.child-*.moz_log
files. there should be a number in the place of*
) - Upload the zipped file to the opened bug report
- Paste the information of your
about:support
page to the opened bug report
Get the Log (for Channel Layout and Mixer)
Here is the command to get the Firefox audio log. Please attach the log files to the bug report.
On Mac OS
- Open Terminal app via Launchpad and click Other
- Show what folder you are currently in: Enter
pwd
- Enter the command below to launch Firefox, which will create log files saved to the folder you are currently in
- The command format is:
MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_LOG=<MODULE:LEVEL> MOZ_LOG_FILE=<FILENAME> <APP_LOCATION>
- For audio problem, please replace
<MODULE:LEVEL>
bycubeb:4
for audio-setting issues. This should be good for most of the bugscubeb:5
for audio sound issues like noise, or glitch
<FILENAME>
can be anyname you like, e.g.,firefox
<APP_LOCATION>
is- For Firefox release:
/Applications/Firefox.app/Contents/MacOS/firefox
- For Firefox Nightly:
/Applications/Firefox\ Nightly.app/Contents/MacOS/firefox
- For Firefox release:
- The command format is:
- Open a tab and play the media/audio/video that (may) play incorrectly on your device and reproduce the problem
- In your current folder, bundle and zip all the file whose name starts with
<FILENAME>
(e.g.,firefox
). There should be a"<FILENAME>.moz_log"
and a couple of"<FILENAME>.child-X.moz_log.0"
(X
should be an integer)
On Windows
- Search “Command Prompt” application in your Windows 10 machine
- Launch “Command Prompt” application
- Type:
set MOZ_LOG=timestamp,rotate:200,sync, <MODULE:LEVEL>
, in the “Command Prompt” applicationcubeb:4
for audio-setting issues. This should be good for most of the bugscubeb:5
for audio sound issues like noise, or glitch
- Type:
set MOZ_LOG_FILE=%TEMP%\log.txt
, in the “Command Prompt” application - Enter the path to the Firefox executable program to launch Firefox, which also creates the program logs automatically (by above settings)
- e.g.,
"c:\Program Files\Mozilla Firefox\firefox.exe"
,"c:\Program Files (x86)\Mozilla Firefox\firefox.exe"
or"C:\Users\CM\AppData\Local\Mozilla Firefox\firefox.exe"
- The path can be founded by
- right click to Firefox app on your desktop
- copy the path in the “Target” row
- e.g.,
- Open a tab and play the media/audio/video that (may) play incorrectly on your device and reproduce the problem
- Go to “C:\Users<YOUR_USERNAME>\AppData\Local\Temp”. The log files should be there
- Bundle and zip all the file whose name starts with
"log.txt"
. There should be a"log.txt.moz_log"
and a couple of"log.txt.child-X.moz_log.0"
(X
should be an integer)
On Linux
TBC