PulseAudio: Is it possible to have two sinks for one card multiple ports? [Solved]

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
lmuserx4849

PulseAudio: Is it possible to have two sinks for one card multiple ports? [Solved]

Post by lmuserx4849 »

Just want to confirm that this cannot be done in PulseAudio.

I have multiple monitors connected to a single video card's Display Ports (radeon rx480).

When I view sinks, via pacmd list-sinks, it only lists one sink. In pavucontrol > configuration, I can see Profiles for HDMI 5 and 6. I can select one and hear the sound from one monitor, select the other and hear the sound from the other monitor. I'd like to hear the sound from both monitors at the same time.

At the end of the file, /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf, there is an example of combining multiple-sink profiles.

But it looks like I only have one sink. Is it possible to have two sinks for one card with multiple ports?
Last edited by lmuserx4849 on Tue Feb 27, 2018 2:18 am, edited 1 time in total.
Hoser Rob
Level 20
Level 20
Posts: 11806
Joined: Sat Dec 15, 2012 8:57 am

Re: PulseAudio: Is it possible to have two sinks for one card multiple ports?

Post by Hoser Rob »

There's a GUI program whose package name is paprefs which apparently does this but I haven't tried it.

I'm on my Mint 17.3 netbook at the moment and I just checked the repos with apt-cache policy paprefs. It's there but I don't know if it's in the 18.x repos. It's an old app and I don't know how well it's still maintained. And for something like this I'd definitely want tested repo software.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
lmuserx4849

Re: PulseAudio: Is it possible to have two sinks for one card multiple ports?

Post by lmuserx4849 »

I saw paprefs, but it didn't work for me. I think because I have 1 card (radeon rx480) with multiple ports, and the monitors, with integrated speakers, are plugged into Display Ports on that card.

In paprefs, I checked the "Add virtual output device for simultaneous output on all local sound cards" checkbox, but when I open Sound Preferences > Output, I see:

Sound Preferences > Output:
_ HDA ATI HDI Digital Stero (HDMI 5) Stero

_ Simulataneous output to HDA ATI HDI Digital Stero (HDMI 5) Stero
If I go to pavucontrol > Configuration, there are 2 profiles, "HDA ATI HDMI" and "Built-In Audio". The "Built-In Audio" is off. In the "HDA ATI HDMI" dropdown, I can select "Digital Stero (HDMI 5) Output" or "Digital Stero (HDMI 6) Output". If I change the dropdown from HDMI 5 to HDMI 6, the Sound Preference > Output changes from 5 to 6.

How do I get HDMI 5 and 6 at the same time....hhhhhhmmmmm, I'm not sure how this should be phrased, but I think I need an HDMI 5 and HDMI 6 profile, and then those combined for simultaneous output (????)

I think the answer might be here, How to output unique audio to multiple ports/profiles of a PulseAudio card?. According to this, "You are creating different audio sinks on the same card.". It looks really messy. And udev too !!!
lmuserx4849

Re: PulseAudio: Is it possible to have two sinks for one card multiple ports?

Post by lmuserx4849 »

It works. Sound is coming out of both monitor speakers at the same time, which are connected to the rx480 card.

And paprefs was needed :-)

The lines below were added to "/etc/pulse/default.pa" aplay -l shows the hardware device names.

Code: Select all

load-module module-alsa-sink device="hw:1,10" sink_name=radeonrx480_hdmi_4
load-module module-alsa-sink device="hw:1,11" sink_name=radeonrx480_hdmi_5
load-module module-combine-sink sink_name=hdmi_all_radeonrx480_digital slaves=radeonrx480_hdmi_4,radeonrx480_hdmi_5
set-default-sink hdmi_all_radeonrx480_digital
paprefs updates the file "$HOME/.gconf/system/pulseaudio/modules/combine/%gconf.xml", but how it is used by PA is unknown. :?
If interested see: https://cgit.freedesktop.org/pulseaudio ... paprefs.cc and look for writeToGConfCombine.

This link helped: https://bbs.archlinux.org/viewtopic.php?id=118026
pyro12
Level 1
Level 1
Posts: 1
Joined: Mon Feb 17, 2020 2:55 pm

Re: PulseAudio: Is it possible to have two sinks for one card multiple ports? [Solved]

Post by pyro12 »

Thank you so much for going down this rabbit hole and not only solving it but documenting it, too!

You saved me HOURS. I just wanted the two sinks - the simultaneous playback was a neat bonus

I will add, as this caused some brief frustration and head scratching, that I had to visit the configuration tab in pulse audio and turn the Ellesmere Radeon profile to OFF. Otherwise, pulseaudio could not initialize whichever output was selected when it processed the

Code: Select all

load-module module-alsa-sink device="hw:X,Y" sink_name=radeonrx480_hdmi_Z
lines.
Locked

Return to “Sound”