Linux – Pipe/Mix Line In to Output in PulseAudio

audiolinuxpulseaudio

I work on two computers with one USB headset. I want to listen to both by piping the non-Linux computers' output into the Linux computer's line in (blue audio jack) and mixing the signal into the Linux computer's headset output using PulseAudio.

Audio hardware diagram

pavucontrol shows a "Built-in Audio Analog Stereo" Input Device which allows me to pick ports like "Line In" (selected), "Front Microphone", "Rear Microphone". I can see the device's volume meter reacting to audio playback on the non-Linux machine.

Built-in Audio Analog Stereo

How do I make PulseAudio play that audio signal into my choice of Output Device?

Best Answer

1. Load the loopback module

pacmd load-module module-loopback latency_msec=5

creates a playback and a recording device.

2. Configure the devices in pavucontrol

In pavucontrol, in the Recording tab, set the "Loopback" device's from input device to the device which receives the line in signal.

recording settings

In the Playback tab, set the "Loopback" device's on output device to the device through which you want to hear the line in signal.

playback settings

3. Troubleshooting

If the audio signal has issues, remove the module with pacmd unload-module module-loopback and retry a higher latency_msec= value

This answer was made possible by this forum post. Thanks!

Related Question