12

My speakers use a digital input, but my headphones use an analog input. I have them both plugged in, and when I want to use the headphones I just turn off the speakers and switch on the headphones. I know that simultaneous output on digital and analog is supported by the hardware, because it worked fine in Windows XP. But on Ubuntu, I seem to only get one at a time, depending on which setting is selected in the combo box located at System -> Preferences -> Sound -> Hardware.

How can I get simultaneous analog and digital output without having to switch the profile every time? I'm on Ubuntu 11.04 and it's an HDA Intel chip.

enter image description here

2 Answers 2

11

We have the optional application paprefs Install paprefs that allows to install a virtual output device to pulseaudio. This enables simultaneous output to all attached sound cards/devices:

paprefs

The additionally created audio output device for simultaneous output may be selected in the "Output" tab from pulseaudio sound preferences menu:

enter image description here


From the command line we can also load the device for simultaneous output without having to run paprefs by

pacmd load-module module-combine-sink
# pacmd load-module module-combine # for PulseAudio < 1.0

Put this line (without pacmd) in your /etc/pulse/default.pa to load this device at startup.

5
  • 1
    great , it worked !
    – wim
    Aug 17, 2011 at 12:41
  • Do you know how to do this without installing this application? I'm guessing it should be only a single command line operation.
    – l0b0
    Dec 14, 2011 at 9:53
  • 1
    @l0b0: see edit for this.
    – Takkat
    Dec 14, 2011 at 21:56
  • This works, though sometimes, such as after suspend/resume, the sound goes out again through one source and I have to select the synchronous output again. Plus sometimes the audio is out of sync, but this I can solve easily pausing and resuming the video. Apr 18, 2020 at 19:55
  • 1
    @JoseGómez: both may be a timing issue, e.g. a sink is not yet ready on resuming after suspend. Hard to get around this - at least I don't have any good idea.
    – Takkat
    Apr 18, 2020 at 20:05
0

The accepted answer doesn't work anymore, at least from ubuntu 16.04 LTS (maybe even more, but I am not sure). What works is the following (tested in ubuntu 17.10): https://wiki.archlinux.org/index.php/PulseAudio/Examples

Specifically add the following to your /etc/pulse/default.pa

### Load analog device
load-module module-alsa-sink device=hw:0,0
load-module module-combine-sink sink_name=combined
set-default-sink combined
1
  • 1
    Sorry. Made the corrections.
    – mahesh
    Mar 12, 2018 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.