PulseAudio – How to Force a Preferred Sound Output Device

pulseaudiosound

In my sound settings interface, there are two devices for sound output:

sound settings

Both refer to the same physical device, which is a network sound device.

Both work, but only with the second one, Simultaneous output to Kenwook Audio Device Digital Stereo (IEC958) on mythbuntu@mythbuntu, does the output volume respond to being changed. The first one always plays at the same level, and ignores volume settings.

Every time I boot, the first one is selected. How can I make it so the second one is the default and the first one is disabled or at least never selected?

I've uploaded to Pastebin the output from pacmd list-sinks and the contents of my default.pa file.

Best Answer

The entry "Simultaneous output to..." tells us that in our setup the pulseaudio module-combine-sink, or a network combined device from module-tunnel-sink was loaded.

This can be done in an entry in /etc/pulse/default.pa, in ~/.pulse/default.pa or manually, e.g. by a script. It may have been loaded in the default.pa used by the daemon or from an application that provides the network audio.

Changing the default output sink to this combined sink should be done after we loaded the sink. In addition we need to know the name of this sink which may be the default "combined" or any other name.

Find out the name of the sink

To find out the name given we can list all installed sinks on our sytem with the command

pacmd list-sinks

Change the default output sink to e.g. "combined"

To change the default sink we can issue the following command

pacmd set-default-sink "combined"  # or any other sink name or index

This command can also be issued from a script.

Make this sink permanent on start of the pulseaudio daemon

To define a default sink permanently on startup of the daemon we uncomment/add the following line at the end of our default.pa

set-default-sink "combined"  # or any other sink name

In case we want this for all users we edit /etc/pulse/default.pa, in case its for one user only we may copy (and edit) the default.pa to ~/.pulse/. Make sure that this sink was loaded before.