Bug 1946027 - [Feature Request] Add option to turn ON/OFF the 5.1 audio upmixer
Summary: [Feature Request] Add option to turn ON/OFF the 5.1 audio upmixer
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: pipewire
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Wim Taymans
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-03 16:57 UTC by Ricardo Ramos
Modified: 2023-11-14 03:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-12 17:10:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ricardo Ramos 2021-04-03 16:57:30 UTC
Description of problem:

I was testing Fedora 34 beta and connected my computer to my AV receiver to test the multichannel audio output and I found an strange issue where the stereo audio playback doesn't output to the front left and front right speakers but only in the center speaker.

Multichannel PCM audio plays correctly and also Dolby and DTS codecs.


Steps to Reproduce:

1. Connect the computer through the HDMI output port to any of the available HDMI inputs on the AV receiver.

2. Go to audio settings and select the appropriate audio output, in this case I select the 5.1 audio hardware option in the dropdown menu, then to verify the audio output I press the "Test" button and click on every speaker to make sure the audio outputs to the correct one which it does correctly.

3. Play ANY stereo audio source, whether it's from YouTube or a local audio file.

Actual results:

Stereo audio doesn't output to the left and right speakers but only to the center speaker.


Expected results:

I was expecting to hear stereo audio playback ONLY on the front left and front right speakers as it should, however, multichannel PCM audio plays correctly to each correspond speaker.

Additional info:

It's important to clarify that I'm NOT using any of the multichannel audio options in the receiver such as Dolby Pro Logic II, DTS Neo 6, etc, my receiver is set on the "Auto" option, where audio is reproduced as encoded/recorded without adding any extra processing.

Oddly, on Windows 10, for some reason the center, surrounds and subwoofer channels are capped, so only the front left channel and front right channel are heard; I don't know if this was intentional my Microsoft or it is a bug plaguing every computer out there because I tested two completely different computers and I've got the exact same issue.

As a reference, I also have a Nintendo Switch connected to the AV receiver and I can confirm that games with stereo audio play only on the front left and front right speakers as it should, while games with multichannel PCM also play correctly.

Comment 1 Ricardo Ramos 2021-05-08 02:53:16 UTC
I tested the recent stable release of Fedora 34 and it appears the issue is fixed, I played different stereo PCM sources and they played correctly from the from left and front right speakers, while multichannel PCM also played correctly.

Thanks.

Comment 2 Ben Cotton 2022-05-12 16:44:21 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Ricardo Ramos 2022-12-10 19:08:58 UTC
Reopening this since I'm still getting an issue:

While connecting the computer to a multichannel AV receiver, Pipewire is not playing the stereo audio only from the left and right channels but it's also being split to the center, left surround and right surround, the stereo audio is not being upmixed, it's just being sent to all the speakers, not audio treatment such as Dolby Surround upmixer or anything is being applied in the receiver, this is something done by Pipewire, audio settings in Fedora are set correctly as well.

Comment 4 Wim Taymans 2022-12-11 16:59:03 UTC
> the stereo audio is not being upmixed, it's just being sent to all the speakers

PipeWire always upmixes stereo sound to all speakers. It uses the Passive Surround Decoder algorithm for this (https://www.researchgate.net/publication/45796449_Real-Time_Conversion_of_Stereo_Audio_to_51_Channel_Audio_for_Providing_Realistic_Sounds) which gives pretty good results.

This is also related to https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/861

Comment 5 Ricardo Ramos 2022-12-12 03:11:06 UTC
Is there a way that I can turn that OFF?, I really don't like it, if I want to upmix stereo to 5.1 I would use Dolby Surround or DTS Neural X but only when I want to and not all the time by default.

Comment 6 Wim Taymans 2022-12-12 08:07:48 UTC
> Is there a way that I can turn that OFF?

Yes, you need to make a ~/.config/pipewire/pipewire-pulse.conf.d/10-no-upmix.conf file and put this in it:

stream.properties = {
    channelmix.upmix = false
    channelmix.upmix-method = none
    channelmix.lfe-cutoff = 0.0
    channelmix.fc-cutoff = 0.0
}


See also:

https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-client#streamproperties
https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-client#channel-mixer-properties
https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PulseAudio#configuration-file-pipewire-pulseconf

Comment 7 Ricardo Ramos 2022-12-12 15:08:03 UTC
Thank you for the solution, however, Pipewire team should add an option in Gnome audio settings to turn it ON and OFF conveniently.

Thank you.

Comment 8 Ricardo Ramos 2022-12-26 16:48:26 UTC
Changing the title of this bug report as a "feature request" to add an option in gnome audio settings to turn OFF the 5.1 audio upmixer.

Comment 9 Ricardo Ramos 2022-12-27 00:09:44 UTC
(In reply to Wim Taymans from comment #6)

> Yes, you need to make a ~/.config/pipewire/pipewire-pulse.conf.d/10-no-upmix.conf file and put this
> in it:
> 
> stream.properties = {
>     channelmix.upmix = false
>     channelmix.upmix-method = none
>     channelmix.lfe-cutoff = 0.0
>     channelmix.fc-cutoff = 0.0
> }

So I created the "pipewire" subfolder in the root of the ".config" folder, then I created the "pipewire-pulse.conf.d" folder in the root of the "pipewire" subfolder and inside I put the "10-no-upmix.conf" file and it didn't work, I obviously rebooted the computer for the file to take effect but it still upmixes the audio.

What gives?

Comment 10 Wim Taymans 2023-01-26 12:05:46 UTC
> What gives?

Please attach the output of pw-dump here when media a playing and is being upmixed. It could be that it is using the ALSA plugin or PipeWire API directly, in which case this needs to be configured in a different directory.

Comment 11 Ricardo Ramos 2023-01-29 16:45:16 UTC
Where should I get the "pw-dump" file?

Comment 12 Wim Taymans 2023-01-31 08:40:23 UTC
> Where should I get the "pw-dump" file?

In another terminal when the audio is playing, type:

pw-dump >dump.log

That will make a file called dump.log in the current directory with the state of the system. Attach this file to this bug report and we can have a look what is going on.

Comment 13 Ricardo Ramos 2023-02-04 15:55:58 UTC
This is what I'm getting:

[W][00516.309346] pw.context   | [       context.c:  367 pw_context_new()] 0x55e68cf88290: no modules loaded from context.modules
[W][00516.309547] default      | [        thread.c:  121 impl_acquire_rt()] acquire_rt thread:0x7f2c9d9ba640 prio:-1 not implemented
[E][00516.309803] pw.core      | [          core.c:  382 core_new()] 0x55e68cf96dd0: can't find protocol 'PipeWire:Protocol:Native': operation is not supported
can't connect: operation is not supported

Comment 14 Ricardo Ramos 2023-02-25 14:28:44 UTC
I created a topic at "Ask Fedora" and someone says that Pipewire is not readying the config file:

https://ask.fedoraproject.org/t/i-want-to-turn-off-the-5-1-audio-upmixer-a-solution-they-provided-doesnt-work/30578/16

Comment 15 Ricardo Ramos 2023-11-14 03:07:44 UTC
I've tested Fedora 39 and the upmixer seems to be gone.

Is it OK to close this bug report or you still need to work on something here?


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