Setting PulseAudio playback device before playback











up vote
0
down vote

favorite












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










share|improve this question


















  • 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 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 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 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 at 8:15

















up vote
0
down vote

favorite












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










share|improve this question


















  • 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 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 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 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 at 8:15















up vote
0
down vote

favorite









up vote
0
down vote

favorite











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










share|improve this question













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







pulseaudio






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 at 10:43









August Karlstrom

3241130




3241130








  • 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 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 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 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 at 8:15
















  • 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 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 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 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 at 8:15










1




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 at 10:46




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 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 at 10:56




@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 at 10:56




1




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 at 11:52






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 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 at 8:15






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 at 8:15












1 Answer
1






active

oldest

votes

















up vote
1
down vote













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)






share|improve this answer





















  • 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 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 at 8:27











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f484010%2fsetting-pulseaudio-playback-device-before-playback%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













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)






share|improve this answer





















  • 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 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 at 8:27















up vote
1
down vote













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)






share|improve this answer





















  • 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 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 at 8:27













up vote
1
down vote










up vote
1
down vote









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)






share|improve this answer












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)







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 at 13:04









telcoM

14.6k11842




14.6k11842












  • 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 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 at 8:27


















  • 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 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 at 8:27
















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 at 19:06






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 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 at 8:27




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 at 8:27


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f484010%2fsetting-pulseaudio-playback-device-before-playback%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre