Pipewire 7.1 channel virtual surround audio

Post Reply
chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

Dear Community,

I Use Ubuntu 21.10 with the newest kernel on my N2+.
To be able to use 7.1 surround sound I did by a Logitech G432 7.1 Gaming Headset (usb wired!).
I installed all pipewire packages, deactivated pulseaudio and activated pipewire with pipewire-pulse.#

Now I want to create a virtual 7.1 surround device.
I found a step by step guide.
https://kaeru.my/notes/pipewire-surround-headphones
https://gitlab.freedesktop.org/pipewire ... processing. I can't get this working.

Is there another way to realize this?

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

I was able to create a virtual 7.1 sourround device with this command

Code: Select all

pw-cli create-node adapter '{ factory.name=support.null-audio-sink node.name=hrir-headphones media.class=Audio/Sink object.linger=1 audio.position=[FL,RL,SL,FC,FR,RR,SR,LFE] }'
.
But there is no chance to create the 7.1 3D to Stereo 3D Downmix filter.

I did search for GUI based tools and did find https://gitlab.freedesktop.org/rncbc/qpwgraph.

I was able to connect the 7.1 monitors directly to the headset stereo playback.
Bildschirmfoto von 2022-03-21 10-42-42.png
Bildschirmfoto von 2022-03-21 10-42-42.png (613.13 KiB) Viewed 487 times
But this is just redirecting the channels. I believe that this is not a real virtual sourround on stereo.
There should be a virtual filter and downmixer device instead. Has anyone a clue how to create it?

User avatar
rooted
Posts: 9506
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 761 times
Been thanked: 487 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by rooted »

I don't think there is a such thing as "real" virtual surround.

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

Thank you for your thoughts.

There should be a "filter" between the hrir-headphones:monitor_XX and the G432 Gaming Headset:playback_XX for downmixing, position and volume effects on stereo output.
This would be a near "real" virtual surround. But I can't create the virtual device for it.

User avatar
rooted
Posts: 9506
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 761 times
Been thanked: 487 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by rooted »

It sounds like you have a far better handle on it than I.

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

Hello to everyone.

Update: I did upgrade to Ubuntu 22.04.

I have finally found the solution for the missing virtual device.

It is the filter-chain!

I am not so good in explaining it, but I found a video that shows everything.
It is working



I don't know what is the better hesuvi file? Dolby Atmos or openAL Standard

Now I use Dolby Atmos.

Maybe someone can do a audio benchmark.
These users thanked the author chatplosion for the post:
odroid (Fri Apr 29, 2022 8:21 pm)

chewitt
Posts: 180
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 3 times
Been thanked: 132 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chewitt »

This workaround patch in your kernel would help the 7.1 mission on HDMI: https://github.com/chewitt/linux/commit ... 603791497c as without it the ALSA channel map doesn't appear on the correct PCM device.

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

With this new configuration I did create a new visualisation of the complete audio system:

Image

As an example gzdoom connects directly to Virtual Surround Sink playback_*, which is the 7.1 input to the filter-chain.
The filter-chain uses the convolution engine to merge and mix it to stereo with spacial effects (virtual sourround) to send
it through Virtual Surround Sink output_* to my G432_Gaming_Headset playback_*.

It works fine for me and produces excelent sound.
Attachments
Bildschirmfoto vom 2022-05-01 12-37-52.png
Bildschirmfoto vom 2022-05-01 12-37-52.png (552.2 KiB) Viewed 308 times

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

My Pipewire is working very well. But I did get errors in the logs.

Please be warned that I have installed german locales.

The output of

Code: Select all

sudo journalctl | grep pipewire > ~/pipewire.log
gives me:

Code: Select all

Mai 15 14:52:47 odroid-n2plus pipewire[2529]: pw.context: context 0xaaaadf4cdd20: duplicate export type PipeWire:Interface:Node
Mai 15 14:52:47 odroid-n2plus pipewire[2529]: pw.context: context 0xaaaadf4cdd20: duplicate export type Spa:Pointer:Interface:Node
Mai 15 14:52:48 odroid-n2plus pipewire-pulse[2611]: 536870912
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:52:48 odroid-n2plus pipewire[2529]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 14:53:07 odroid-n2plus wireplumber[1276]: disconnected from pipewire
Mai 15 17:48:53 odroid-n2plus systemd[2520]: pipewire-pulse.service: Consumed 2.970s CPU time.
Mai 15 17:48:54 odroid-n2plus unknown[2531]: disconnected from pipewire
Mai 15 17:48:54 odroid-n2plus systemd[2520]: pipewire.service: Main process exited, code=killed, status=11/SEGV
Mai 15 17:48:54 odroid-n2plus systemd[2520]: pipewire.service: Failed with result 'signal'.
Mai 15 17:48:54 odroid-n2plus systemd[2520]: pipewire.service: Consumed 19.448s CPU time.
Mai 15 17:49:12 odroid-n2plus systemd[1239]: pipewire-session-manager.service: Cannot add dependency job, ignoring: Unit pipewire-session-manager.service failed to load properly, please adjust/correct and reload service manager: File exists
Mai 15 17:49:12 odroid-n2plus dbus-daemon[1053]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.26' (uid=120 pid=1269 comm="/usr/bin/pipewire " label="kernel")
Mai 15 17:49:13 odroid-n2plus pipewire-pulse[1298]: 536870912
Mai 15 17:49:29 odroid-n2plus pipewire[1651]: pw.context: context 0xaaaaae6fdd20: duplicate export type PipeWire:Interface:Node
Mai 15 17:49:29 odroid-n2plus pipewire[1651]: pw.context: context 0xaaaaae6fdd20: duplicate export type Spa:Pointer:Interface:Node
Mai 15 17:49:29 odroid-n2plus pipewire-pulse[1686]: 536870912
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:30 odroid-n2plus pipewire[1651]: mod.filter-chain: error id:3 seq:33 res:-2 (Datei oder Verzeichnis nicht gefunden): no node available
Mai 15 17:49:48 odroid-n2plus wireplumber[1272]: disconnected from pipewire
The filter-chain is actual working. What do you believe is this bunch of errors/alarms?

Or is it possible that version 0.3.48 has bugs? 0.3.51 is already released, but the arm64 faction seems to be left behind...

My full piped and greped pipewire selections from the syslog can be seen here:
pipewire.log
(184.82 KiB) Downloaded 6 times

chatplosion
Posts: 31
Joined: Wed Jan 29, 2020 3:35 pm
languages_spoken: german, english
ODROIDs: Odroid-N2 4GB-RAM CoreELEC
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Pipewire 7.1 channel virtual surround audio

Post by chatplosion »

A small update:

If you are using the wireplumber session manager, you should use first

Code: Select all

sudo apt remove --purge pipewire-media-session
before installing wireplumber.

This ensures that no old symlink of pipewire-media-session prevents wireplumber from starting and running!

I spend two months just for searching this and to delete this abomination.
These users thanked the author chatplosion for the post:
odroid (Mon Jun 20, 2022 8:36 am)

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests