You are not logged in.

#1 2011-05-02 08:09:16

sultanoswing
Member
Registered: 2008-07-23
Posts: 285

[SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

With the compulsory release of Gnome 3 into [extra] and it's doppelganger PulseAudio, I've lost the ability to simultaneously output analog (through the jacks) and digital (through SPDIF) from my VIA VT1828S on-board sound.

This has been a challenge to do previously (in both Windows and Linux) but was possible under ALSA and G-Streamer using the following asound.conf:

pcm.!default {
type plug
slave {
pcm "hw:0,1"
# pcm "spdif"
rate 48000
}
}

ctl.!default {
type hw
card 0
}

I've tried substituting the new /etc/asound.conf file with the above, but Pulse ploughs on right through it and I'm still stuck with either analog or digital output, but not both together.

I've seen something about adding a virtual device then using module-combine (http://superuser.com/questions/267442/h … nd-digital), but the instructions are a little vague, and there doesn't appear to be that level of configuration possible in Gnome 3's current control GUI for audio (*sigh*).

Any help / hints much appreciated. And no, I'm not quite desperate enough to go back to Gnome 2 (although a method to ditch pulse in favour of good old ALSA would be OK).

[EDIT] Installing paprefs and pavucontrol have opened up some more config options, including the ability to add a virtual device. I'll see what I can do and report back... Oh, I needed to reinstall libglade before the above GTK apps would work (wrong ELF Class). Strange, since I have multilib configured.]

Last edited by sultanoswing (2011-05-03 09:03:36)


Arch 4.4.13-lts (x86_64) w/Gnome 3.20.2
ASUS P7P55-E-Pro, Geforce GT430, i5-750, 8GB, Samsung 830 SSD | Intel NUC 5i5RYK | ASUS ux303ua | HP Folio 13

Offline

#2 2011-05-02 08:49:29

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,816

Re: [SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

You should not need multilib for anything related to setting up and configuring pulseaudio, by the way. And Gnome3 depends on pulseaudio, but the best pulse tools are still the pulse-specific ones (pavucontrol etc.) rather than gnome's audio applet.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-05-02 09:30:50

sultanoswing
Member
Registered: 2008-07-23
Posts: 285

Re: [SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

ngoonee wrote:

You should not need multilib for anything related to setting up and configuring pulseaudio, by the way. And Gnome3 depends on pulseaudio, but the best pulse tools are still the pulse-specific ones (pavucontrol etc.) rather than gnome's audio applet.

I'm actually quite surprised the Gnome 3 developers saw fit to include a volume slider. This concession must have stretched their 'no customisation' mantra to the limits! wink


Arch 4.4.13-lts (x86_64) w/Gnome 3.20.2
ASUS P7P55-E-Pro, Geforce GT430, i5-750, 8GB, Samsung 830 SSD | Intel NUC 5i5RYK | ASUS ux303ua | HP Folio 13

Offline

#4 2011-05-03 09:26:26

sultanoswing
Member
Registered: 2008-07-23
Posts: 285

Re: [SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

Solved - I now have simultaneous digital and analog simultaneously playing from Amarok.

To recap:

1) Hardware
ASUS P7-P55D-E-Pro with on-board VIA Vinyl HD Audio (VT1828S chipset)
Analog output via standard 3.5mm plugs to analog 5.1 setup
Digital output via spdif port through coaxial cable into 5.1 receiver

2) Software
Arch (latest updates as at 2/5/11)
Gnome 3 with its built-in Pulse and "pulseaudio-alsa" installed, but alsa is NOT running as a daemon (as per the Pulseaudio Wiki)
Amarok 2.4.0 with GStreamer phonon backend
Default /etc/asound.conf

In brief, the solution involves (with thanks to the link in my first post):

1. Install pavucontrol (pacman it). I had paprefs too, but have NOT used this to enable simultaneous ouput.
2. In a terminal, launch "pacmd" - a command line utility for loading pulse modules
3. Enter the following commands in pacmd in this order (where your numbers for "hw:0,0" are determined by entering "aplay -l" in terminal. One number is the hardware ID for the analog device, the other for the digital).

load-module module-alsa-sink device="hw:0,0" sink_name=analog_output
load-module module-alsa-sink device="hw:0,1" sink_name=digital_output
load-module module-combine sink_name=analog_digital slaves=digital_output,analog_output

4. Open "pavucontrol" from a terminal:
- Under pavucontrol's "Playback Tab", for the running app Amarok, select "Simultaneous output to Internal Audio, Internal Audio" (you will need to have Amarok playing something to test this)
- Under the "Configuration Tab" Select "Digital Stereo Duplex (IEC958)" for "Internal Audio" (your exact names may vary here, according to how ALSA has named your hardware). You should now be able to hear Amarok playing on both your analog and digital outputs!

The above solution only holds to long as you have pacmd running, and is specific for the running app (in the above example, Amarok).

To set the the sinks up every reboot and for all audio apps, add the above load-module commands to your /etc/pulse/default.pa file. You may need to add them at the start of the file, just above line "### Automatically restore the volume of streams and devices", or it may not work as expected.

Finally, use the Gnome 3 sound preferences to set your system's default "Output" to "Simultaneous output to Internal Audio, Internal Audio".

Not exactly an easy solution to do what should be bloody simple, and is surely not an unusual thing for end-users to want to do. Why-oh-why can't it be as simple as selecting "Combined Digital/Analog output" from the available profiles?

[EDIT: Added to the PulseAudio Wiki: https://wiki.archlinux.org/index.php/Pu … log_Output]

Last edited by sultanoswing (2011-05-03 12:29:22)


Arch 4.4.13-lts (x86_64) w/Gnome 3.20.2
ASUS P7P55-E-Pro, Geforce GT430, i5-750, 8GB, Samsung 830 SSD | Intel NUC 5i5RYK | ASUS ux303ua | HP Folio 13

Offline

#5 2011-05-05 00:08:30

doorknob60
Member
From: Oregon
Registered: 2008-09-29
Posts: 401

Re: [SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

Or easier solution this should work: open paprefs -> Simultaneous Output tab -> Check the box -> Switch to the virtual device in gnome's settings or pavucontrol

That's what I do to simultaneously output to my speakers and to HDMI, so I'd assume it would work for you too, even though you seem to have already figured it out.

Offline

#6 2011-05-05 06:03:17

sultanoswing
Member
Registered: 2008-07-23
Posts: 285

Re: [SOLVED] PulseAudio (in GNOME 3) - simultaneous digital and analog?

doorknob60 wrote:

Or easier solution this should work: open paprefs -> Simultaneous Output tab -> Check the box -> Switch to the virtual device in gnome's settings or pavucontrol

That's what I do to simultaneously output to my speakers and to HDMI, so I'd assume it would work for you too, even though you seem to have already figured it out.

Didn't work for me, if I recall.


Arch 4.4.13-lts (x86_64) w/Gnome 3.20.2
ASUS P7P55-E-Pro, Geforce GT430, i5-750, 8GB, Samsung 830 SSD | Intel NUC 5i5RYK | ASUS ux303ua | HP Folio 13

Offline

Board footer

Powered by FluxBB