LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to handle 2 audio channels/outputs? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-handle-2-audio-channels-outputs-4175613601/)

yod 09-11-2017 08:44 AM

How to handle 2 audio channels/outputs?
 
Hi, I have a xonar dx that is located in the back of the pc and my sound speakers are connected to it. My headphones are connected to the motherboard audio because I have the jack input in front of the pc case and its more handy for me. In windows, when I want to use headphones I change the default audio channel / output through options.
How do I handle this in Linux Arch?
I installed "alsa-utils"
And when I tested it with the command "speaker-test -c 2" I could listen the headphones
So I guess this is the default audio device selected and its ok, but what I have to do if sometimes I want to listen the speakers?
I do not really want to edit a file everytime I have to switch speakers / headphones
Greetings

jsbjsb001 09-11-2017 09:02 AM

Quote:

Originally Posted by yod (Post 5757601)
Hi, I have a xonar dx that is located in the back of the pc and my sound speakers are connected to it. My headphones are connected to the motherboard audio because I have the jack input in front of the pc case and its more handy for me. In windows, when I want to use headphones I change the default audio channel / output through options.
How do I handle this in Linux Arch?
I installed "alsa-utils"
And when I tested it with the command "speaker-test -c 2" I could listen the headphones
So I guess this is the default audio device selected and its ok, but what I have to do if sometimes I want to listen the speakers?
I do not really want to edit a file everytime I have to switch speakers / headphones
Greetings

Have a look at pavucontrol (PulseAudio Volume Control)

You should be able to install it though your package manager.

Shadow_7 09-11-2017 09:31 AM

I got a headphone preamp, so all I have to do is turn knobs or hit a mute button.

In the case of laptops where there's speakers and a headphone jack, there's hardware that turns off the speakers when the headphone jack is in use. When you have two different soundcards there's no such hardware feature (that affects the other soundcard). Pulseaudio lets you select which soundcard to use, but you have to run pavucontrol and change things. With alsa you have to edit .asoundrc. You could have two .asoundrc files that you swap out and set a hotkey to do the swap in the wm/de via a script or other means. But you'll have to restart things for that change to take in terms of things that use the soundcard.

Various other routes like using snd-aloop and changing how you forward the audio output via alsaloop. The snd-aloop creates a dummy soundcard (Loopback) where the things that use it can be forwarded. The output is the input, as in what would go to speakers can be captured on the mic channel. I mostly use it to run jack and forward that to pulse over the network. But I have kind of the opposite problem. One good soundcard and good set of speakers and many computers. And the pulseaudio daemon runs on the non-main computer.


All times are GMT -5. The time now is 06:50 PM.