0

I run Debian 9 with PulseAudio on a computer with two sound cards. The screenshot below shows the Volume Control application when no audio is played back. When audio is played back, a drop down is displayed where I can select the output device. Is there a way to select the output device before the audio stream is started? To me this seems more natural.

PulseAudio Volume Control

  • 1
    The output devices tab should have a checkbox for marking the default and fallback devices to use. If not, you might need to install pavucontrol. – Mioriin Nov 25 '18 at 10:46
  • @Mioriin pavucontrol is the application you see in the screenshot. The problem is not that I can't select a playback device. What I would like to do is to select the playback device before an audio stream is started. – August Karlstrom Nov 25 '18 at 10:56
  • 1
    Pulseaudio cannot direct a non-existing audio stream anywhere. If you want to preselect a non-default device, you may have to do it by telling the playback program which device to use when you start the stream or by specifying the output in the program's configuration. – Mioriin Nov 25 '18 at 11:52
  • In principle, all applications using the Pulseaudio API can choose a specific sink, e.g. paplay -d sink_name .... You didn't tell us anything about the application you want to do this for, so I can't tell you how this specific application handles it. The "Volume Control" application by itself can't do it. As you've already been told, if you've redirected sound once for a specific application, Pulseaudio will remember it, and apply the same setting the next time the application starts. – dirkt Nov 26 '18 at 8:15
1

By default, PulseAudio will attempt to remember where each application's output was directed the last time it was used, and keep using that output device for it until told otherwise. If there is no record of previous use, the fallback device is used.

You could disable this feature and make all applications always start using the fallback device unless specifically configured otherwise by editing /etc/pulse/default.pa to change the line:

load-module module-stream-restore

to this:

load-module module-stream-restore restore_device=false

Alternatively, there's a paswitch tool that walks through PulseAudio's persistent record of outputs per application and changes them all to point to a specified device: https://www.tablix.org/~avian/git/paswitch.git (more info here)

  • Thanks for the instructions. This suggests that, after editing default.pa, the solution to my problem is to switch fallback (default) device in the Output Devices section. However, all output devices are set as fallback and I cannot deselect any of them (when I click on the button with a checkmark it remains pressed). – August Karlstrom Nov 25 '18 at 19:06
  • That's odd. Only one input device and only one output device should act as a fallback in any given time. If you select a new device as a fallback it should automatically unselect the old one. – telcoM Nov 26 '18 at 8:27
0

Pulseaudio playback will try to use default sink device first
if default is not available will then use fallback devices

With only 2 devices, set one as default and 2nd device will automatically be fallback if default not available

pavucontrol does not show default sink setting

you can use these terminal commands:
cat ~/.config/pulse/*default-sink - to show default card name
pactl list sinks | grep 'Name' - to show names of all active sinks
pactl set-default-sink <Name> - to change sink Name
(can change the default-sink file in 1st command with text editor instead)

Or use pasystray to view information in gui and change default if needed

Once default is set, audio streams can be set by user in pavucontrol to use other sink
User changes in pavucontrol are saved to database file in folder ~/.config/pulse

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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