How do I route the audio signal from the 'line-in' of the sound card (Creative CA0132)?
Where can I learn about sound in KDE Plasma (Kubuntu 20.04), so to understand what to do?
How can I read the raw/unaltered ADC data from the line-in, preferably in Python for easier postprocessing?
... you'll want to use pydoc3 ...

pydoc3 <name> ...
Show text documentation on something. <name> may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If <name> contains a '/', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.
...
pydoc3 -b
Start an HTTP server on an arbitrary unused port and open a Web browser
to interactively browse documentation.
sudo apt update
sudo apt install python3-pyqt5.qtmultimedia
sudo apt install python3-pyside2.qtmultimedia
sudo apt install qtmultimedia5* apt list *qtmultimedia*
Listing... Done
python3-pyqt5.qtmultimedia-dbg/focal 5.14.1+dfsg-3build1 amd64
python3-pyqt5.qtmultimedia-dbg/focal 5.14.1+dfsg-3build1 i386
python3-pyqt5.qtmultimedia/focal,now 5.14.1+dfsg-3build1 amd64 [installed]
python3-pyqt5.qtmultimedia/focal 5.14.1+dfsg-3build1 i386
python3-pyside2.qtmultimedia/focal,now 5.14.0-1~exp1ubuntu5 amd64 [installed]
python3-pyside2.qtmultimediawidgets/focal 5.14.0-1~exp1ubuntu5 amd64
qml-module-qtmultimedia/focal,now 5.12.8-0ubuntu1 amd64 [installed,automatic]
qml-module-qtmultimedia/focal 5.12.8-0ubuntu1 i386
qtmultimedia5-dev/focal,now 5.12.8-0ubuntu1 amd64 [installed]
qtmultimedia5-dev/focal 5.12.8-0ubuntu1 i386
qtmultimedia5-doc-html/focal,focal,now 5.12.8-0ubuntu1 all [installed]
qtmultimedia5-doc/focal,focal,now 5.12.8-0ubuntu1 all [installed]
qtmultimedia5-examples/focal,now 5.12.8-0ubuntu1 amd64 [installed]
qtmultimedia5-examples/focal 5.12.8-0ubuntu1 i386
pydoc3 -b
('hdajackretask' can show/change the physical jacks assignment - if not present, install it with 'sudo apt install alsa-tools-gui').
- on top of ALSA sits PulseAudio (and/or JACK), which mostly is in charge with handling and routing audio data streams between applications, or between ALSA and applications
- PulseAudio is a higher abstraction layer, therefore PulseAudio is not aware of all the audio features available in the hardware of each soundcard
- usually, JACK inhibits PulseAudio, but there are tools to make them work together (I didn't try)
- on top of ALSA sits PulseAudio (and/or JACK), which mostly is in charge with handling and routing audio data streams between applications, or between ALSA and applications
- PulseAudio is a higher abstraction layer, therefore PulseAudio is not aware of all the audio features available in the hardware of each soundcard
- usually, JACK inhibits PulseAudio, but there are tools to make them work together (I didn't try)
All of the above has been replaced by Pipewire on top of part of ALSA. Pipewire is lower abstraction than PulseAudio, thus faster, and it has better handling of streams.
All of the above [ALSA/Pulse] has been replaced by Pipewire on top of part of ALSA. Pipewire is lower abstraction than PulseAudio, thus faster, and it has better handling of streams.
The desktop is Kubuntu 20.04 LTS (Focal Fossa), which does not have PipeWire yet.
I've read that it's not trivial to backport pipewire, so I didn't try to install it, also, since PipeWire has become the default audio in Ubuntu only starting with this year, it means less examples and tools available.
To learn, I'll prefer something with more tools, docs and examples. In terms of speed, the desktop is an i7-4790K/4.4GHz/32GB, it shouldn't be a problem to measure live distortions of a single channel, and latency on a constant sinusoidal signal doesn't matter. PipeWire seems too new, and with no particular advantage for this application (live FFT + live display of THD and THD+noise).
Does PipeWire has any advantage for which it might worth the effort of installing it?
3. - How can I read the raw/unaltered ADC data from the line-in, preferably in Python for easier postprocessing?
3. - How can I read the raw/unaltered ADC data from the line-in, preferably in Python for easier postprocessing?This is the specific point I had in mind when recommending bypassing all the sound server and multimedia framework turd and talking to ALSA directly.
ALSA is all the kernel drivers for soundcards plus a library (libasound) for talking to them though their device files in /dev/snd/ which also includes a framework of "plugins" for sample rate conversion, mixing from many applications etc, but you don't need to use them. Open the hw:N device and you have your bit-perfect playback/recording, provided that nothing else is conflicting with your use of the soundcard at the time.

Got it, thank you.
About generating and playing samples, this won't be needed. The signal is generated outside of the computer by a physical circuit, an LC oscillator (I named it Peltz-Wyatt oscillator because it's a Peltz oscillator combined with a Wyatt current source in the hope of lowering the distortions existing in the sinusoidal signal).
- at first, I've evaluated the distortions with an oscilloscope, by eyeballing at the waveform, then display it as a FFT on the oscilloscope, but the oscilloscope ADC is only 8 bits, so I wanted a more precise measurement
- then, I've used an USB sound card, but that card seemed very noisy, so I wanted to use the line-in from the onboard sound card instead
- so far I've managed to use 'ARTA' and 'baudline' (programs that can display live audio spectrum and THD) but only with the USB soundcard, couldn't make them use the line-in instead
- apart from this, each measures the THD in its own way, I would like more control, and thus the idea of writing my own tool, as a Python exercise in audio.
This is the generator I want to measure its distortions, the jack connector on the left is the audio out to go into line-in of the onboard soundcard.
You can always record a WAV file and analyze it later with whatever tools.
For a real time analyzer, I tend to use JAAA...

jaaa -A -d hw:1
$ jaaa -A -C hw:0
playback : not enabled
capture :
nchan : 2
rate : 48000
frsize : 1024
nfrags : 2
format : S32_LE
Connected to ALSA with 2 inputs and 0 outputs
About audio in Linux, for now my understanding is like this:
- there are (kernel) hardware drivers for each chipset
- on top of the drivers sits another sound component ALSA (Advanced Linux Sound Architecture)
Either way, I want to at least learn more by writing something, than to endlessly google for error messages while fiddling with somebody else's software (i.e. 'baudline' only knows OSS or JACK, JACK freezes any other PulseAudio AV streams, while ALSA in ubuntu was not compiled with the OSS emulation switch, so I had to make 'baudline' read from stdin instead and launch it with 'parec --format=s16le --channels=1 --latency-msec=5 | ./baudline -stdin', and so on, all kinds of workarounds depending on what the existing programs can or can't do).
A focus on audio. The subscription baudline 1.09 has the following additions:
Advanced Linux Sound Architecture (ALSA) driver support
Pulse Audio driver support
Ported to Raspberry Pi ARM systems
Works on Mac OS X Catalina (10.15)
Now works with XQuartz 2.7.11
Some JACK and Core Audio bug fixes
Improved audio playback latency
OSS is irrelevant on Linux. There is no need to worry about it unless you wan to impress your friends with cat sound.wav >/dev/dsp, but if you want then you have no friends anyway, so OSS is irrelevant on Linux.
Well I understand that some folks new to DAW grade may be confused...
and may be lost with some complicated things...
However.. as the steps go anyone will understand that INTERPRETED interfaces and GUIs have absolute ZERO place at real-time high quality AUDIO and quality Instrumentation..
Obvious reasons interpreted is just a crap dog slow shit.
Even dedicated C interfaces have issues when hardware clock is not friendly
With REAL MIDI bus you may have external clock synch..
but 99% cases you don't
I have made some cute TOYS (yepo they are just my toys) to interface UNIX with JACK along last years..
Just for fun I have some handy toys to check how good or bad I can use them..
- A FULLY FUNCTIONAL Function Generator s/ spectrum + Modulator LADSPA support plugin bay
- A FULLY FUNCTIONAL JACK ANALYSER with quality HD graphic CUSTOM FILTERS and SPECTRUMs
...
PS> I made this today in kinda 15 seconds...
last shot is an FM (narrow) modulated generated signal... instruments can really go up to 500KHz nicely
All C pure C and GTK based... nothing capable to stress upgrades..
Absolute ZERO systemd and UDEV - all customized device nodes..