Open Bug 1368938 Opened 4 years ago Updated 8 months ago

Support audio 5.1 with non-SMPTE layout devices


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

54 Branch




(Reporter: danialhorton, Assigned: padenot)


(Depends on 1 open bug, Blocks 2 open bugs)



(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170526133002

Steps to reproduce:

Creative XFI configured to 5.1
Analog connection to Logitech z-640 speakers

Run the Multichannel tests on

Actual results:

5.1 Tests fail to output LS/RS to Rear left and Right on 5.1 configurations on Firefox 54 and 55 (bad)
5.1 Tests work on Firefox 53. (good)
7.1 media tests output on front speakers with 53 (bad)
7.1 LS/RS/RSR/RSL are output to Rear speakers with 54 and 55 (good)

Expected results:

Rear and Rear surround channels to be output as expected with 5.1 configuration.
Component: Untriaged → Audio/Video: cubeb
Flags: needinfo?(cchang)
Product: Firefox → Core
This is either a duplicate or relies on / blocked by bug 1325023
The wired network of my office shut down today, so I can't run the URL for testing on my Window PC now.
However, the audio 5.1 on my Firefox 54, 55 works fine with local 5.1 ogg files and it works with when last time I tried(My device is Logitech z506). I'll check it when the environment is fixed.

Can you tell me what channel layout you are using? 

- Left, Right, Center, Low-Frequency Effects, Left Surround, Right Surround
- Left, Right, Center, Low-Frequency Effects, Rear Left Surround, Rear Right Surround

Then we can confirm it's caused by bug 1325023.
Flags: needinfo?(cchang) → needinfo?(danialhorton)
Creatives XFI drivers use the legacy Rear Left and Rear Right configuration, it does not expose the newer surround left/ surround right.
Flags: needinfo?(danialhorton)
This is my configuration. It works fine on my Windows PC. Its layout is SMPTE 3F2-LFE. On the other hand, attachment 8872927 [details] uses a different audio 5.1 setting, that we don't currently support in cubeb(Bug 1325023).
From what I have seen, the ITU spec is not the 'normal' for PC 5.1 audio, it has only been introduced more recently as a 5.1  configuration in particular sound cards, is not present at all on any XFI or Soundblaster driver, and most realtek devices implemented side/rear swapping as an option instead of adding the 5.1 configuration profile.
Assignee: nobody → cchang
Ever confirmed: true
Summary: Firefox 54 and 55 do not output LS and RS to Rear speakers in 5.1 AAC test files → Support audio 5.1 with non-SMPTE layout devices
Besides ASUS Xonar DGX(attachment 8872940 [details]), I have a another sound card, ASUS Xonar U7, whose device layout by default is same as attachment 8872927 [details]. However, it works fine on my Windows PC with all the tests on

The default layout of ASUS Xonar DGX is KSAUDIO_SPEAKER_5POINT1_SURROUND(Left, Right, Center, Low-Frequency Effects, Left Surround, Right Surround). It's same as our audio 5.1 layout(SMPTE 3F2-LFE) in Firefox[0], so the Xonar DGX perfectly matches Firefox.

On the other hand, the default layout of Xonar U7 is KSAUDIO_SPEAKER_5POINT1(Left, Right, Center, Low-Frequency Effects, Rear Left Surround, Rear Right Surround). It's different from SMPTE 3F2-LFE, but Xonar U7 accepts the stream with SMPTE 3F2-LFE to play sound when I tried[1]. 

I guess Xonar U7's driver is more fault-tolerant. If we want to make attachment 8872927 [details] works, we may need to remap the channel order after the device refuses the stream format and then re-setup the stream again.

Does the Xonar have any APO Enhancements?

Intel, Realtek and Soundblaster drivers utilise APO plugins to add enhancements for room space, bass, mixing or encoding to a digital stream.

There have been APO related issues before where multichannel audio has been concerned.

These APO enhancements interfere with WASAPI suggestions, last time it was breaking mono audio in html5 videos such as used by twitter/vine bug 971693.
I see Paul Adenot is in the mailing list, he might have some insight here, as he resolved enhancements related issues previously.
Hi Danial,
Could you please provide the following information
1. Your sound card information
2. Does audio 5.1 work in Chrome and Safari on your computer?
Flags: needinfo?(danialhorton)
Creative XFI Titanium, Driver version configured to 5.1
This problem is very likely to occur on Recon 3D and Soundblaster Z(x(r)) cards as they use the same APO modules.

RS and LS are sent to RSR and RSL in chrome, so yes working as expected.

I cannot find an official source for safari that works on windows.
Flags: needinfo?(danialhorton)
Paul, if you're back, can you try to reproduce this on that Soundblaster Z? (assuming you still have it).
I think I still have it lying around somewhere, but I don't have a windows desktop anymore (last time, I was using my own machine at home, but it died after around 10 years). I'll find another desktop machine.
Paul, I don't have any Creative XFI sound card in hand, so feel free to take the bug if your environment is setup.
I ordered a used desktop from IT and I'll put the soundblaster in it to debug this. Not too sure about the timeline here.
Chun-Min, I'm taking this for now, I'll try to do some digging.
Assignee: cchang → padenot
Rank: 29
Priority: -- → P2
Mass change P2->P3 to align with new Mozilla triage process.
Priority: P2 → P3
Running into this while doing some work on cubeb. Related issue on github:

Any progress? I've got a hacky solution locally where I alias the non-mapped layouts to existing ones. Non ideal, but it's giving me more sane results than without. I'm happy to work on a more involved fix, but I am less familiar with the non-WASAPI backends and do not have a good computer setup to test outside of Windows at the moment. has been merged to cubeb. On next update of cubeb in central it would be worth retesting this if possible.

Will look at doing the update if we don't get one in the next couple of days, just gotta sort some in flight stuff I have first.
Bug 1423901 brings in the above changes. If you're able to retest this issue may be mitigated.

We've updated the channel layout at some point in the past. Danial, could you try this again?

Flags: needinfo?(danialhorton)

HE-AAC and AAC-LC Rear channels producing sound,

Original Wave file does not, sound goes silent till you hear the tone of the sub.

Flags: needinfo?(danialhorton)
Depends on: 1619726
Blocks: 1073786
You need to log in before you can comment on or make changes to this bug.