The Arch Wiki tells you how to setup an ALSA source as a monitor.
Basically, use pactl list
to find the name of your source, something that includes analog-stereo.monitor
. Then add to /etc/asound.conf
or ~/.asoundrc
the following lines:
pcm.pulse_monitor {
type pulse
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}
ctl.pulse_monitor {
type pulse
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}
Then select that source for recording. The arecord
manual lists some options for specifying a device to use if it doesn't automatically use the right one.
-l, --list-devices
List all soundcards and digital audio devices
-L, --list-pcms
List all PCMs defined
-D, --device=NAME
Select PCM by name