You can use alsaloop
to loopback an input device to an output device.
To use this together with other applications, a quick summary of ALSA configuration:
ALSA is configured in the per-user ~/.asoundrc
or in the system-wide /etc/asound.conf
. That's what you see in QasConfig, but to avoid surprises, better look at the files directly. If the existing setup doesn't work for you, you need to create or modify ~/.asoundrc
.
Information about the "plugins" you can use to configure ALSA is e.g. here. The hw
devices usually just allow one single application to read/write to them. To allow multiple applications to do that, you use dmix
or dsnoop
. plughw
automates that by putting a number of plugins in front of hw
.
QasHctl
just shows the mixer (or any hardware-related control) settings that are also available with alsamixer
or amixer
.
So:
1) Make sure Pulseaudio is not running (ps axu
). Really sure. Pulseaudio uses ALSA to access the hardware.
Now configure ~/.asoundrc
:
2) Put a dmix
in front of your output device(s).
3) Put a dsnoop
in front of your input device(s).
These two should normally have been made available automatically, check aplay -L
or QasConfig
. If they are already present, use those.
4) If your default
device was set to the pulse
plugin, remove it -- that's the Pulseaudio compatability layer.
5) Set default
to one of the dmix
devices you just created (or plughw
to use the automatically created ones).
If you've trouble configuring everything, edit question with output of cat /proc/asound/pcm
so I can see your hardware, with the original ~/.asoundrc
(if present) and the one you tried to make, and I'll have a look.
pavucontrol
:pacmd load-module module-loopback ...
. If you use ALSA only:alsaloop
(won't work when Pulseaudio is running).alsaloop -C hw:2,0 -P hw:0,0 -t 50000 -d
which does what i want but as it is running i can't hear anymore the sounds coming from the PC itself. For example, VLC complains that the device 'default' is busy and watching youtube videos yields no audio.plughw
instead ofhw
(putdmix
etc. plugins in front).alsaloop -C plughw:2,0 -P plughw:0,0 -t 50000
and various combinations ofhw
andplughw
but still complains... There are various discussions online but can't figure out anything certain for now.